NextInima Posted April 26, 2018 Posted April 26, 2018 (edited) Hello guys, Is there a way to send an Item which contains NBT to the Client with a Packet? Already i know how i can send NBT data but i want to send the whole Item. But at the moment i try to build a Item registry on the Client and get the Item with an ID from the Packet. Edited April 26, 2018 by NextInima Quote May RPG MOD KoRIN at minecraftforum http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2570463-kingdom-of-rin-rpg-stuff-classes-dungeons http://rin-online.de/forum/
Draco18s Posted April 26, 2018 Posted April 26, 2018 Yes. Vanilla obviously does it, so the answer is yes. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
jabelar Posted April 26, 2018 Posted April 26, 2018 The PacketBuffer class has a writeItemStack() and readItemStack() method. You can look at SPacketWindowItems for ideas. So I would make a custom packet using SPacketCustomPayload and pass it a PacketBuffer where you've used those methods for your ItemStack. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
NextInima Posted April 26, 2018 Author Posted April 26, 2018 Nice i got it, that´s easy. Thanks Quote May RPG MOD KoRIN at minecraftforum http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2570463-kingdom-of-rin-rpg-stuff-classes-dungeons http://rin-online.de/forum/
Recommended Posts
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.