Fix Dimension ID handling

This commit is contained in:
Kam committed 2024-02-20 00:39:51 -05:00
1 parent 75dc7ed95c
commit 2cc5e31dc7
2 files changed
+8 -1

No files matched your search

@@ -390,10 +390,17 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
public void updateClient() {
NBTTagCompound compound = writeSpawnData();
compound.setInteger("EntityId", getEntityId());
fixDimensionID();
Server.sendAssociatedData(this, EnumPacketClient.UPDATE_NPC, compound);
updateClient = false;
}
public void fixDimensionID(){
if(worldObj == null || worldObj.provider == null || this.dimension == worldObj.provider.dimensionId)
return;
this.dimension = worldObj.provider.dimensionId;
}
@Override
public boolean interact(EntityPlayer player) {