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.

builder_1one

Members
  • Joined

  • Last visited

Everything posted by builder_1one

  1. Hello everyone, I have the problem, that "world.playSound", called by a onItemRightClick event only works on the client side and doesn't work if send to the clients over the server. If I use worldIn.playSound(playerIn, playerIn.getPosition(), DifficultyModRegister.glock18_sound, difficultyModSound, 1.0F, 1.0F); it works in the singleplayer and also for the client shooting, but if somebody is standing near by or if I replace the first playerIn with null, you are getting disconnected from the server when shooting. I have allready read the sounds documentation and I haven't found anything, that could be wrong. The error is as followed every time: [16:20:51] [Netty Client IO #6/ERROR] [FML]: NetworkDispatcher exception io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(3) + length(1) exceeds writerIndex(3): UnpooledHeapByteBuf(ridx: 3, widx: 3, cap: 3) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:280) ~[byteToMessageDecoder.class:4.0.23.Final] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:149) ~[byteToMessageDecoder.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) [byteToMessageDecoder.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) [byteToMessageDecoder.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:150) [ReadTimeoutHandler.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) [DefaultChannelPipeline.class:4.0.23.Final] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130) [AbstractNioByteChannel$NioByteUnsafe.class:4.0.23.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [NioEventLoop.class:4.0.23.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [NioEventLoop.class:4.0.23.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [NioEventLoop.class:4.0.23.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [NioEventLoop.class:4.0.23.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [singleThreadEventExecutor$2.class:4.0.23.Final] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102] Caused by: java.lang.IndexOutOfBoundsException: readerIndex(3) + length(1) exceeds writerIndex(3): UnpooledHeapByteBuf(ridx: 3, widx: 3, cap: 3) at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1175) ~[AbstractByteBuf.class:4.0.23.Final] at io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:570) ~[AbstractByteBuf.class:4.0.23.Final] at net.minecraft.network.PacketBuffer.readByte(PacketBuffer.java:792) ~[PacketBuffer.class:?] at net.minecraft.network.PacketBuffer.readVarInt(PacketBuffer.java:215) ~[PacketBuffer.class:?] at net.minecraft.network.PacketBuffer.readEnumValue(PacketBuffer.java:196) ~[PacketBuffer.class:?] at net.minecraft.network.play.server.SPacketSoundEffect.readPacketData(SPacketSoundEffect.java:45) ~[sPacketSoundEffect.class:?] at net.minecraft.network.NettyPacketDecoder.decode(NettyPacketDecoder.java:38) ~[NettyPacketDecoder.class:?] at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:249) ~[byteToMessageDecoder.class:4.0.23.Final] ... 20 more I don't know what exactly is causing the index out of bounds exception and I would be happy if any one can help me with that problem. [solved] I have used the wrong sound category now I am using SoundCategory.MASTER and everything works fine.

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.