Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

vladmany

Members
  • Joined

  • Last visited

Everything posted by vladmany

  1. Ok. Then how to highlight the block with a glowing effect, without a entities?
  2. I need to spawn/render a local entity that won't be on the server. This is needed in order to create an invisible shulker in a block with a glowing effect. Here's how I did it without mods: But the point is to do this only on the client.
  3. Is it possible to summon a entity only on the client? Let me remind you that in my situation, the mod must be client-side.
  4. I need to highlight a block with a spectral arrow effect (glowing) only on the client side. All that came to my mind was to make the game think that there is an invisible shulker in a certain place, which has the effect of glowing. I tried to implement this using mixins, but did not achieve the desired result. Perhaps there is also an option to render the effect itself without an entity, but I do not quite understand how to do this. I will be grateful for help.
  5. I am creating a modification for one RPG server, which should, when holding down a certain key, continuously force the player to attack, like he would press the left mouse button many times. This is not a cheat! Clickers are allowed on this server. Only I want to trigger the attack itself, and not a click of the left mouse button. Sorry for my English.
  6. I need to trigger a player's attack action. I copied the net.minecraft.client.Minecraft.clickMouse() method from the sources and changed it a bit, removing everything about the leftClickCounter private property: public static void callAttackAction() { Minecraft instance = Minecraft.getMinecraft(); if (!instance.player.isRowingBoat()) { switch (instance.objectMouseOver.typeOfHit) { case ENTITY: if (instance.objectMouseOver.entityHit != null && instance.playerController != null) { try { instance.playerController.attackEntity(instance.player, instance.objectMouseOver.entityHit); } catch (Exception e) { e.printStackTrace(); } } break; case BLOCK: BlockPos blockpos = instance.objectMouseOver.getBlockPos(); if (!instance.world.isAirBlock(blockpos)) { instance.playerController.clickBlock(blockpos, instance.objectMouseOver.sideHit); break; } case MISS: instance.player.resetCooldown(); net.minecraftforge.common.ForgeHooks.onEmptyLeftClick(instance.player); } instance.player.swingArm(EnumHand.MAIN_HAND); } } It works, but sometimes times this error occurs on line 168 in the attackEntity method: [Netty Client IO #1/ERROR] [FML]: NetworkDispatcher exception io.netty.handler.codec.EncoderException: java.lang.NullPointerException at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125) ~[MessageToByteEncoder.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.write(NetworkDispatcher.java:548) ~[NetworkDispatcher.class:?] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1032) ~[DefaultChannelPipeline.class:4.1.9.Final] at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:296) ~[AbstractChannel.class:4.1.9.Final] at net.minecraft.network.NetworkManager$4.run(NetworkManager.java:245) [NetworkManager$4.class:?] at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [AbstractEventExecutor.class:4.1.9.Final] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) [SingleThreadEventExecutor.class:4.1.9.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442) [NioEventLoop.class:4.1.9.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:4.1.9.Final] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_281] Caused by: java.lang.NullPointerException at net.minecraft.network.play.client.CPacketPlayerDigging.writePacketData(CPacketPlayerDigging.java:41) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:51) ~[NettyPacketEncoder.class:?] at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:12) ~[NettyPacketEncoder.class:?] at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[MessageToByteEncoder.class:4.1.9.Final] How can I fix it?
  7. Whatever I do, whatever I try, the config button remains grayed out and inaccessible. I used the simplest example of config implementation, and even it doesn't work. What could be the problem? I created a git repository for my project.

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.