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
|
@Override
|
||||||
protected void readCustomDataFromNbt(NbtCompound compound) {
|
protected void readCustomDataFromNbt(NbtCompound compound) {
|
||||||
ItemStack itemStack = ItemStack.fromNbt(compound.getCompound("Item"));
|
setStack(ItemStack.fromNbt(compound.getCompound("Item")));
|
||||||
setStack(itemStack);
|
|
||||||
setState(State.valueOf(compound.getInt("State")));
|
setState(State.valueOf(compound.getInt("State")));
|
||||||
|
setSpin(compound.getFloat("spin"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -157,6 +157,7 @@ public class FloatingArtefactEntity extends Entity implements UDamageSources {
|
||||||
compound.put("Item", stack.writeNbt(new NbtCompound()));
|
compound.put("Item", stack.writeNbt(new NbtCompound()));
|
||||||
}
|
}
|
||||||
compound.putInt("State", getState().ordinal());
|
compound.putInt("State", getState().ordinal());
|
||||||
|
compound.putFloat("spin", getSpin());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -186,11 +187,6 @@ public class FloatingArtefactEntity extends Entity implements UDamageSources {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Packet<ClientPlayPacketListener> createSpawnPacket() {
|
|
||||||
return Channel.SERVER_SPAWN_PROJECTILE.toPacket(new MsgSpawnProjectile(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public World asWorld() {
|
public World asWorld() {
|
||||||
return getWorld();
|
return getWorld();
|
||||||
|
|
Loading…
Reference in a new issue