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 i was doing a basic packet sending using my own custom mobs using netty tutorial . Now since i have several packets i usually received in console box this code

 

Something like this

packet leak "BearsWorld" : 100

 

im basic in modding thou

And as i search i saw diesieben07 tutorial but i was confuse since what i need most methods is not in there.

 

like the handle client side and stuff

 

heres one of  my packet bear actually

 

public class PacketAIBearLover extends AbstractPacket {
private byte animID;
private int entityID;

public PacketAIBearLover() {

}

public PacketAIBearLover(byte anim, EntityBearLover entity) {
	animID = anim;
	entityID = entity.getEntityId();
}

public void encodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
	buffer.writeByte(animID);
	buffer.writeInt(entityID);
}

public void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
	animID = buffer.readByte();
	entityID = buffer.readInt();
}

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

public void handleServerSide(EntityPlayer player) {

}

 

Please help me how would i start using the IMessageHandler i think or IMessage im really confuse on those

Lex told me you can use Netty as long as you use the proper chennels provided by Forge.

If you don't understand the above you have to use diesieben tutorial.

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.