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.

Featured Replies

Posted

Hello everyone im trying to update my AI Packets for my mod however since Packets now use bytes often im having issues with my sendingPackets it often crashes here

 

public class Packet02 extends AbstractPacket{

private byte animID;
private int entityID;

public Packet02(int id, EntityMob mob) {
	animID = (byte) id;
	entityID = tigrex.getEntityId();
}

@Override
public void encodeInto(ChannelHandlerContext paramChannelHandlerContext, ByteBuf x) {
	x.writeByte(animID);
	x.writeInt(entityID);
}

@Override
public void decodeFrom(ChannelHandlerContext paramChannelHandlerContext, ByteBuf x) {
	animID = x.readByte();
	entityID = x.readInt();
}

@Override
public void handleClientSide(EntityPlayer paramEntityPlayer) {
	EntityMob mob= (EntityMob)paramEntityPlayer.worldObj.getEntityByID(entityID);
	if(mob != null && animID != -1) {
		mob.setAnimID(animID);
		if(animID == 0) mob.setAnimTick(0);
	}
}

@Override
public void handleServerSide(EntityPlayer paramEntityPlayer) {

}

}


 

specifically this line which causes the crash

 

x.writeByte(animID);

 

also this is the entity code that sends the packet to its AI

 

public void sendAttackPacket(int id){
        if(ModMain.isEffectiveClient())
        {
            return;
        }
        currentAttackID = id;
        MHFCMain.pipe.sendToAll(new Packet02(id, this));
      
    }

Are you sure you can cast your currentAttackId to a byte without overflowing the stack? If your id is an int with a possible value greater than 255, then you should leave it as an int. ByteBuf can write integers just as well as bytes, as you did with the entityId.

Why you ignore the argument that is the mob and use a hardcoded entity instance?

public Packet02(int id, EntityMob mob) {
	animID = (byte) id;
	entityID = tigrex.getEntityId();
}

In other words, "tigrex" is not an argument to the Packet02 constructor, so where's it from? What's wrong with the argument "mob"?

Hi

 

If the error is on this line, I imagine it is a "Null Pointer Exception", yes?

		x.writeByte(animID);

 

That probably means you are calling

	@Override
public void encodeInto(ChannelHandlerContext paramChannelHandlerContext, ByteBuf x) {
	x.writeByte(animID);
	x.writeInt(entityID);
}

with an argument x that is null.

 

If you can figure out why that is happening, you'll be a step closer...

 

-TGG

 

 

 

  • Author

I fix some issues somehow but still having some crash issues

 

heres the crash found in the eclipse console

 

[09:27:13] [Client thread/ERROR] [FML]: There was a critical exception handling a packet on channel mhfc
io.netty.handler.codec.DecoderException: java.lang.InstantiationException: mhfc.net.common.packet.Packet02Tigrex
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:?]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?]
at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:80) [FMLProxyPacket.class:?]
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:232) [NetworkManager.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:321) [PlayerControllerMP.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1647) [Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:994) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:910) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Caused by: java.lang.InstantiationException: mhfc.net.common.packet.Packet02Tigrex
at java.lang.Class.newInstance(Unknown Source) ~[?:1.7.0_51]
at mhfc.net.common.packet.PacketPipeline.decode(PacketPipeline.java:93) ~[PacketPipeline.class:?]
at mhfc.net.common.packet.PacketPipeline.decode(PacketPipeline.java:1) ~[PacketPipeline.class:?]
at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?]
... 18 more

 

 

My Packet

 

package mhfc.net.common.packet;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import mhfc.net.client.entity.mob.EntityTigrex;
import mhfc.net.common.implement.iMHFC;
import net.minecraft.entity.player.EntityPlayer;

public class Packet02Tigrex extends AbstractPacket{

private int attackID;
private int entityID;

public Packet02Tigrex(int id, EntityTigrex tigrex){
	attackID = id;
	entityID = tigrex.getEntityId();
}

@Override
public void encodeInto(ChannelHandlerContext paramChannelHandlerContext, ByteBuf buff) {
	buff.writeInt(attackID);
	buff.writeInt(entityID);
}

@Override
public void decodeFrom(ChannelHandlerContext paramChannelHandlerContext, ByteBuf buff) {
	attackID = buff.readInt();
	entityID = buff.readInt();
}

@Override
public void handleClientSide(EntityPlayer player) {
	EntityTigrex entity = (EntityTigrex)player.worldObj.getEntityByID(entityID);
	if ((entity != null) && (attackID != -1)) {
		entity.currentAttackID = attackID;
	if (attackID == 0) entity.animTick = 0;
	}
}

@Override
public void handleServerSide(EntityPlayer player) {

}

}

You need to have a standard constructor without parameters, like

public Packet02Tigrex() {...}

It happened to me, too. ;)

The constructor can be completely empty.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

  • Author

Just did it a while ago and now gives me this crash

 

io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: writerIndex( + minWritableBytes(4) exceeds maxCapacity(: SlicedByteBuf(ridx: 0, widx: 8, cap: 8/8, unwrapped: UnpooledHeapByteBuf(ridx: 1, widx: 9, cap: 9/9))
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:?]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?]
at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:80) [FMLProxyPacket.class:?]
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:232) [NetworkManager.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:321) [PlayerControllerMP.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1647) [Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:994) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:910) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Caused by: java.lang.IndexOutOfBoundsException: writerIndex( + minWritableBytes(4) exceeds maxCapacity(: SlicedByteBuf(ridx: 0, widx: 8, cap: 8/8, unwrapped: UnpooledHeapByteBuf(ridx: 1, widx: 9, cap: 9/9))
at io.netty.buffer.AbstractByteBuf.ensureWritable(AbstractByteBuf.java:241) ~[AbstractByteBuf.class:?]
at io.netty.buffer.AbstractByteBuf.writeInt(AbstractByteBuf.java:776) ~[AbstractByteBuf.class:?]
at mhfc.net.common.packet.Packet02Tigrex.encodeInto(Packet02Tigrex.java:24) ~[Packet02Tigrex.class:?]
at mhfc.net.common.packet.PacketPipeline.decode(PacketPipeline.java:94) ~[PacketPipeline.class:?]
at mhfc.net.common.packet.PacketPipeline.decode(PacketPipeline.java:1) ~[PacketPipeline.class:?]
at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?]
... 18 more

I just cant understand why this packet does it

Just did it a while ago and now gives me this crash

 

io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: writerIndex( + minWritableBytes(4) exceeds maxCapacity(: SlicedByteBuf(ridx: 0, widx: 8, cap: 8/8, unwrapped: UnpooledHeapByteBuf(ridx: 1, widx: 9, cap: 9/9))
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:?]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?]
at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:80) [FMLProxyPacket.class:?]
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:232) [NetworkManager.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:321) [PlayerControllerMP.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1647) [Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:994) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:910) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Caused by: java.lang.IndexOutOfBoundsException: writerIndex( + minWritableBytes(4) exceeds maxCapacity(: SlicedByteBuf(ridx: 0, widx: 8, cap: 8/8, unwrapped: UnpooledHeapByteBuf(ridx: 1, widx: 9, cap: 9/9))
at io.netty.buffer.AbstractByteBuf.ensureWritable(AbstractByteBuf.java:241) ~[AbstractByteBuf.class:?]
at io.netty.buffer.AbstractByteBuf.writeInt(AbstractByteBuf.java:776) ~[AbstractByteBuf.class:?]
at mhfc.net.common.packet.Packet02Tigrex.encodeInto(Packet02Tigrex.java:24) ~[Packet02Tigrex.class:?]
at mhfc.net.common.packet.PacketPipeline.decode(PacketPipeline.java:94) ~[PacketPipeline.class:?]
at mhfc.net.common.packet.PacketPipeline.decode(PacketPipeline.java:1) ~[PacketPipeline.class:?]
at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?]
... 18 more

I just cant understand why this packet does it

 

can you give us the new packet code and possibly your pipeline class (the type class of MHFCMain.pipe)?

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

  • Author

here mate

 

Main Class

package mhfc.net;

import mhfc.net.client.lib.MHFCReference;
import mhfc.net.client.tab.MHFCTab;
import mhfc.net.common.MHFCCommon;
import mhfc.net.common.configuration.MHFCConfig;
import mhfc.net.common.handler.MHFCGuiHandler;
import mhfc.net.common.handler.MHFCTickHandler;
import mhfc.net.common.packet.Packet01Anim;
import mhfc.net.common.packet.Packet02Tigrex;
import mhfc.net.common.packet.PacketPipeline;
import mhfc.net.common.registry.MHFCReg;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry;


/**
* 
* This Main File is owned by the MHF Modding Team
* 
* @author <Heltrato>
* @license MHFModding Team Copyright (http://www.minecraftforum.net/topic/1977334-164spmp-monster-hunter-frontier-craft-extreme-mob-hunting-adventure-15000-downloads/) 
* Visit www.mhfrontiercraft.blogspot.com for more info.
* 
*/

@Mod(modid = MHFCMain.modid, name = MHFCReference.name, version = MHFCReference.version)

public class MHFCMain {
@SidedProxy(clientSide = "mhfc.net.client.MHFCClient", serverSide = "mhfc.net.common.MHFCCommon")
public static MHFCCommon proxy;
public static MHFCConfig launch;
public static MHFCReg	 reg;
public static MHFCTickHandler handler;
public static final PacketPipeline packetpipeline = new PacketPipeline();
@Mod.Instance("mhfc")
public static MHFCMain instance;
// Mod References	
public static final String modid = "mhfc";
public static final String authors = "Heltrato , Karseus , Shaduun, Aleksandair, NightCrow";
// Mod Statics
public static final String[] fTimer;
public static boolean explosionsDestroyBlocks = true;
public static int startEntityId = 300;
public static CreativeTabs mhfctabs = new MHFCTab(CreativeTabs.getNextID(),"MHFC Tab");

//	
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent pre){
	launch.init(pre);
	pre.getModMetadata().logoFile = "MHFCLogo.png";
	handler = new MHFCTickHandler();
	MinecraftForge.EVENT_BUS.register(handler);
	 FMLCommonHandler.instance().bus().register(handler);
	NetworkRegistry.INSTANCE.registerGuiHandler(this, new MHFCGuiHandler());

}
@Mod.EventHandler
public void load(FMLInitializationEvent event){
	packetpipeline.initialize();
	packetpipeline.registerPacket(Packet02Tigrex.class);
	packetpipeline.registerPacket(Packet01Anim.class);
	proxy.regSounds();
	proxy.regStuff();
	proxy.regTimer();
	proxy.regTick();
	proxy.regCapes();
}

@Mod.EventHandler
public void postInit(FMLPostInitializationEvent e) {
	packetpipeline.postInitialize();
}

public static boolean isClient(){
	return FMLCommonHandler.instance().getSide().isClient();
}
public static boolean isEffectiveClient(){
	return FMLCommonHandler.instance().getEffectiveSide().isClient();
}
static {
	fTimer = new String[] {"field_71428_T", "S", "timer"};
}
public static void onRenderTick() {}
public static void onClientTick() {}
public static void onServerTick() {}
}

 

new packet

 

package mhfc.net.common.packet;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import mhfc.net.client.entity.mob.EntityTigrex;
import mhfc.net.common.implement.iMHFC;
import net.minecraft.entity.player.EntityPlayer;

public class Packet02Tigrex extends AbstractPacket{

private int attackID;
private int entityID;

public Packet02Tigrex(){

}
public Packet02Tigrex(int id, EntityTigrex tigrex){
	attackID = id;
	entityID = tigrex.getEntityId();
}

public void encodeInto(ChannelHandlerContext paramChannelHandlerContext, ByteBuf buff) {
	buff.writeInt(attackID);
	buff.writeInt(entityID);
}

public void decodeFrom(ChannelHandlerContext paramChannelHandlerContext, ByteBuf buff) {
	attackID = buff.readInt();
	entityID = buff.readInt();
}

public void handleClientSide(EntityPlayer player) {
	EntityTigrex entity = (EntityTigrex)player.worldObj.getEntityByID(entityID);
	if ((entity != null) && (attackID != -1)) {
		entity.currentAttackID = attackID;
	if (attackID == 0) entity.animTick = 0;
	}
}

public void handleServerSide(EntityPlayer player) {

}

}

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

  • Author

Still crashes damn i cant understand what this CRITICAL ERROR MEANS .

 

[08:50:58] [Client thread/ERROR] [FML]: There was a critical exception handling a packet on channel mhfc
io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: writerIndex( + minWritableBytes(4) exceeds maxCapacity(: SlicedByteBuf(ridx: 0, widx: 8, cap: 8/8, unwrapped: UnpooledHeapByteBuf(ridx: 1, widx: 9, cap: 9/9))
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:?]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?]
at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:80) [FMLProxyPacket.class:?]
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:232) [NetworkManager.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:321) [PlayerControllerMP.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1647) [Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:994) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:910) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Caused by: java.lang.IndexOutOfBoundsException: writerIndex( + minWritableBytes(4) exceeds maxCapacity(: SlicedByteBuf(ridx: 0, widx: 8, cap: 8/8, unwrapped: UnpooledHeapByteBuf(ridx: 1, widx: 9, cap: 9/9))
at io.netty.buffer.AbstractByteBuf.ensureWritable(AbstractByteBuf.java:241) ~[AbstractByteBuf.class:?]
at io.netty.buffer.AbstractByteBuf.writeInt(AbstractByteBuf.java:776) ~[AbstractByteBuf.class:?]
at mhfc.net.common.packet.Packet02Tigrex.encodeInto(Packet02Tigrex.java:23) ~[Packet02Tigrex.class:?]
at mhfc.net.common.packet.PacketPipeline.decode(PacketPipeline.java:95) ~[PacketPipeline.class:?]
at mhfc.net.common.packet.PacketPipeline.decode(PacketPipeline.java:1) ~[PacketPipeline.class:?]
at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?]
... 18 more

 

 

If i can find out what makes this

  • Author

Yeah man i tried my best to register it and debug but still these error crash come out

 

There was a critical exception handling a packet on channel mhfc
io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: writerIndex( + minWritableBytes(4) exceeds maxCapacity(: SlicedByteBuf(ridx: 0, widx: 8, cap: 8/8, unwrapped: UnpooledHeapByteBuf(ridx: 1, widx: 9, cap: 9/9))
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:?]
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?]
at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:80) [FMLProxyPacket.class:?]
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:232) [NetworkManager.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:321) [PlayerControllerMP.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1647) [Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:994) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:910) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Caused by: java.lang.IndexOutOfBoundsException: writerIndex( + minWritableBytes(4) exceeds maxCapacity(: SlicedByteBuf(ridx: 0, widx: 8, cap: 8/8, unwrapped: UnpooledHeapByteBuf(ridx: 1, widx: 9, cap: 9/9))
at io.netty.buffer.AbstractByteBuf.ensureWritable(AbstractByteBuf.java:241) ~[AbstractByteBuf.class:?]
at io.netty.buffer.AbstractByteBuf.writeInt(AbstractByteBuf.java:776) ~[AbstractByteBuf.class:?]
at mhfc.net.common.packet.Packet02Tigrex.encodeInto(Packet02Tigrex.java:23) ~[Packet02Tigrex.class:?]
at mhfc.net.common.packet.PacketPipeline.decode(PacketPipeline.java:95) ~[PacketPipeline.class:?]
at mhfc.net.common.packet.PacketPipeline.decode(PacketPipeline.java:1) ~[PacketPipeline.class:?]
at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:?]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:?]
... 18 more

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.