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.

graycatvr

Members
  • Joined

  • Last visited

Everything posted by graycatvr

  1. Thank you for your interest in helping me. Do you know another forum where I could post my problem at?
  2. Greetings, I am currently trying to register a packet listener for forge 1.8.9 like this: public class NameChangePacketListener { @SubscribeEvent @SideOnly(Side.CLIENT) public void onPacketReceived(FMLNetworkEvent.ClientCustomPacketEvent event) throws IOException { System.out.println("test"); if (event.packet.toS3FPackets() instanceof S38PacketPlayerListItem) { S38PacketPlayerListItem packet = (S38PacketPlayerListItem) event.packet.toS3FPackets(); if (packet.func_179768_b() == S38PacketPlayerListItem.Action.UPDATE_DISPLAY_NAME) { for (S38PacketPlayerListItem.AddPlayerData playerData : packet.func_179767_a()) { String newName = playerData.getDisplayName().getUnformattedText(); IChatComponent chatComponent = new ChatComponentText("Your name has been changed") .setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GREEN)); Minecraft.getMinecraft().thePlayer.addChatMessage(chatComponent); } } } } } Now, in the init method, I register this listener to the event bus like so: @Mod.EventHandler @SideOnly(Side.CLIENT) public static void init(FMLInitializationEvent event){ MinecraftForge.EVENT_BUS.register(new NameChangePacketListener()); } I know for a fact the init method works, so why does the "onPacketReceived" method not get called? the "test" doesn't print at all

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.