What do you want to do? if you CLONE an Entity , they would be in the same place in eachother , do the same walk and the same things. They would go to the same Cords on the same time.
I think you would NOT even see the secound one.
Try to create a NEW Entity with the same conditions.
Ok i think PlayerLoggedInEvent is severside, but it goes with EntityJoinWorldEvent, just check if it is the Entityplayer on the Client.
Also i think ClientConnectedToServerEvent is called before the EntityPlayer is constructed, so thats to early to send a message.
do you have checked what you have send to the server?
public KeybindMessage(boolean keybindDown) {
this.keybindDown = keybindDown;
System.out.println(the key is: "+keybindDown);
}
this.keybindDown = ByteBufUtils.readBoolean((buf);
better show the KeybindMessage class of yours.
in your capability you can create a setter method and set the value on the server. do not forget to save it in Nbt aswell.
Make sure that you register your packet for the SERVER side
onMessage you take the Entityplayer and get the CAPABILITY for that player.
now you use your setter to set the value you want. the server will save that if you fill serializeNBT and deserializeNBT in your CAPABILITY
Is it better to create for each value a new capabilitiy to a capability provider or just add it with one?
like mana/energy/stats?
Edit: Before I used IEEP and that was easier for me. I saw that it does still exsits but i try to went to the new system.
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.
At first thank you !
I started with the Custom values, i did it like this:
And i got :
Ingame it looks like these cordinates
but i figured out that the path is going into the ground... now i look at the function which set the goal coordinats
its :
and i got some strange news
and now i got it.... thats still the wrong cords,... its a simple fail.. because i Z is more then -255