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.

olie304

Members
  • Joined

  • Last visited

  1. Ah thanks. I just have an event that runs the command when the player left clicks a block at my executor class. Main.INSTANCE.sendToServer(new MyMessage(4)); //Sends the integer 4 to the server upon left clicking a block EDIT: Alright I fixed that stuff up and I get no errors but I don't think it is running because I should be seeing the number 4 in the console. Basically I just if (!MinecraftServer.getServer().isDedicatedServer()) //before sending the packet // changed Side.CLIENT to Side.SERVER in the message register
  2. Hello everyone, fairly new with packets and networking so I just tried to put this together for a test run by using the Forge documentation on SimpleImpl. It did not work when I tried sending and receiving the packet and I got this error. Any hints? Thanks. public class Main { public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("mechannel"); public void init(FMLInitializationEvent event) { INSTANCE.registerMessage(MyMessageHandler.class, MyMessage.class, 0, Side.CLIENT); } } public class MyMessage implements IMessage { public MyMessage() { } private int testInt; public MyMessage(int testInt) { this.setTestInt(testInt); } @Override public void toBytes(ByteBuf buf) { buf.writeInt(getTestInt()); } @Override public void fromBytes(ByteBuf buf) { setTestInt(buf.readInt()); } public int getTestInt() { return testInt; } public void setTestInt(int testInt) { this.testInt = testInt; } } public class MyMessageHandler implements IMessageHandler<MyMessage, IMessage> { @Override public IMessage onMessage(MyMessage message, MessageContext ctx) { int number = message.getTestInt(); System.out.println(number); return null; } } public class Executor { Main.INSTANCE.sendToServer(new MyMessage(4)); }
  3. ins't that more for modifying the actual item? I was more thinking of making a tab with a copy of the item so that you could go on vanilla creative servers and user the creative menu without doing /give
  4. How would I do that?
  5. I wanted to make it so I had no new items, but I had default minecraft items in the creative menu with custom NBT. I tried googling my question but I could only find answers for applying NBT to custom items after they were taken from the menu or crafted. Another thing I wanted to do was create an (I believe an) authlib patch to prevent against a specific corrupt NBT pattern I know of.

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.