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.

Shelk

Members
  • Joined

  • Last visited

Everything posted by Shelk

  1. Okay, I'll ask somewhere else. Thank you
  2. It says if you come for help with other versions, you can't. But 1.12 is not in the other versions. And what differences are there with 1.14 and 1.12 for plugin messages ?
  3. Isn't the system the same for every version ? Edit : I read it and it says Doesn't it mean I can get help for 1.12.2 anyway ?
  4. Hello, I want my plugin to send an integer to my mod but I don't understand how to get the integer. Registering in main class : SimpleNetworkWrapper network = NetworkRegistry.INSTANCE.newSimpleChannel("MyChannel"); network.registerMessage(CommunicationMessage.Handler.class, CommunicationMessage.class, 0, Side.CLIENT); My CommunicationMessage class : public class CommunicationMessage implements IMessage { private static int actualMana; public CommunicationMessage() { } public CommunicationMessage(int actualMana) { this.actualMana = actualMana; } @Override public void fromBytes(ByteBuf buf) { actualMana = ByteBufUtils.readVarInt(buf, 100000); } @Override public void toBytes(ByteBuf buf) { ByteBufUtils.writeVarInt(buf, actualMana, 100000); } public static class Handler implements IMessageHandler<CommunicationMessage, IMessage> { @Override public IMessage onMessage(CommunicationMessage message, MessageContext ctx) { Minecraft.getMinecraft().player.sendChatMessage("detected"); return null; } } } Registering in plugin the channel : Bukkit.getServer().getMessenger().registerOutgoingPluginChannel(this, "MyChannel"); How I send the packet in my plugin : public static void sendManaToHUD(Player p, int actualMana) { ByteArrayDataOutput output = ByteStreams.newDataOutput(); output.writeInt(0); output.writeInt(actualMana); p.sendPluginMessage(ModPluginAPI.pl, "MyChannel", output.toByteArray()); } So, the packet is detected within my onMessage event, but how do I get the integer I sent ? I checked and the ByteBuf is null so the int actualMana too. Could you explain what I did wrong ? Thank you very much
  5. Hello, My idea is basically to create custom particles with custom textures and then, with a plugin, use them. However, I absolutely have no idea where to start with. There is just one thing that I can come up with. With a plugin, you can send a packet that shows particles with a certain id to a player. I saw on the wiki that this list contains the vanilla particles with their id : https://wiki.vg/Protocol#Particle My guess is that I need to create a Particle class, and then register it with an id so I can send the packet with my plugin. I found the register way : Minecraft.getMinecraft().effectRenderer.registerParticle(idParticle, new MyParticle.Factory()) So, I need to make a Particle class and give a Factory ? How can I make the factory ? How can I give a texture to my particle ? Thank you very much !

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.