olie304
Members-
Posts
6 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
olie304's Achievements
Tree Puncher (2/8)
0
Reputation
-
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
-
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)); }
-
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
-
How would I do that?
-
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.