mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Fixed crystal hearts not rendering correctly after a relog
This commit is contained in:
parent
b337709f78
commit
47a2046188
1 changed files with 3 additions and 7 deletions
|
@ -145,9 +145,9 @@ public class FloatingArtefactEntity extends Entity implements UDamageSources {
|
|||
|
||||
@Override
|
||||
protected void readCustomDataFromNbt(NbtCompound compound) {
|
||||
ItemStack itemStack = ItemStack.fromNbt(compound.getCompound("Item"));
|
||||
setStack(itemStack);
|
||||
setStack(ItemStack.fromNbt(compound.getCompound("Item")));
|
||||
setState(State.valueOf(compound.getInt("State")));
|
||||
setSpin(compound.getFloat("spin"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -157,6 +157,7 @@ public class FloatingArtefactEntity extends Entity implements UDamageSources {
|
|||
compound.put("Item", stack.writeNbt(new NbtCompound()));
|
||||
}
|
||||
compound.putInt("State", getState().ordinal());
|
||||
compound.putFloat("spin", getSpin());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -186,11 +187,6 @@ public class FloatingArtefactEntity extends Entity implements UDamageSources {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet<ClientPlayPacketListener> createSpawnPacket() {
|
||||
return Channel.SERVER_SPAWN_PROJECTILE.toPacket(new MsgSpawnProjectile(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public World asWorld() {
|
||||
return getWorld();
|
||||
|
|
Loading…
Reference in a new issue