/** * Sends the entity metadata (DataWatcher) and attributes to all players tracking this entity, including the entity * itself if a player. */ private void sendMetadataToAllAssociatedPlayers() { DataWatcher datawatcher = this.trackedEntity.getDataWatcher(); if (datawatcher.hasObjectChanged()) { this.func_151261_b(new S1CPacketEntityMetadata(this.trackedEntity.getEntityId(), datawatcher, false)); } if (this.trackedEntity instanceof EntityLivingBase) { ServersideAttributeMap serversideattributemap = (ServersideAttributeMap)((EntityLivingBase)this.trackedEntity).getAttributeMap(); Set<IAttributeInstance> set = serversideattributemap.getAttributeInstanceSet(); if (!set.isEmpty()) { this.func_151261_b(new S20PacketEntityProperties(this.trackedEntity.getEntityId(), set)); } set.clear(); } }
private void func_111190_b() { DataWatcher var1 = this.myEntity.getDataWatcher(); if (var1.hasChanges()) { this.func_151261_b(new S1CPacketEntityMetadata(this.myEntity.getEntityId(), var1, false)); } if (this.myEntity instanceof EntityLivingBase) { ServersideAttributeMap var2 = (ServersideAttributeMap)((EntityLivingBase)this.myEntity).getAttributeMap(); Set var3 = var2.getAttributeInstanceSet(); if (!var3.isEmpty()) { this.func_151261_b(new S20PacketEntityProperties(this.myEntity.getEntityId(), var3)); } var3.clear(); } }
private void sendMetadataToAllAssociatedPlayers() { DataWatcher datawatcher = this.myEntity.getDataWatcher(); if (datawatcher.hasChanges()) { this.func_151261_b(new S1CPacketEntityMetadata(this.myEntity.getEntityId(), datawatcher, false)); } if (this.myEntity instanceof EntityLivingBase) { ServersideAttributeMap serversideattributemap = (ServersideAttributeMap)((EntityLivingBase)this.myEntity).getAttributeMap(); Set set = serversideattributemap.getAttributeInstanceSet(); if (!set.isEmpty()) { this.func_151261_b(new S20PacketEntityProperties(this.myEntity.getEntityId(), set)); } set.clear(); } }
/** * Invoked when the server registers new proximate objects in your watchlist or when objects in your watchlist have * changed -> Registers any changes locally */ public void handleEntityMetadata(S1CPacketEntityMetadata packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityId()); if (entity != null && packetIn.func_149376_c() != null) { entity.getDataWatcher().updateWatchedObjectsFromList(packetIn.func_149376_c()); } }
/** * Invoked when the server registers new proximate objects in your watchlist or * when objects in your watchlist have changed -> Registers any changes locally */ public void handleEntityMetadata(S1CPacketEntityMetadata packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityId()); if (entity != null && packetIn.func_149376_c() != null) { entity.getDataWatcher().updateWatchedObjectsFromList(packetIn.func_149376_c()); } }
/** * Invoked when the server registers new proximate objects in your watchlist or when objects in your watchlist have * changed -> Registers any changes locally */ public void handleEntityMetadata(S1CPacketEntityMetadata p_147284_1_) { Entity var2 = this.clientWorldController.getEntityByID(p_147284_1_.func_149375_d()); if (var2 != null && p_147284_1_.func_149376_c() != null) { var2.getDataWatcher().updateWatchedObjectsFromList(p_147284_1_.func_149376_c()); } }
private void sendMetadataToAllAssociatedPlayers() { DataWatcher datawatcher = this.myEntity.getDataWatcher(); if (datawatcher.hasChanges()) { this.func_151261_b(new S1CPacketEntityMetadata(this.myEntity.getEntityId(), datawatcher, false)); } if (this.myEntity instanceof EntityLivingBase) { ServersideAttributeMap serversideattributemap = (ServersideAttributeMap)((EntityLivingBase)this.myEntity).getAttributeMap(); Set set = serversideattributemap.getAttributeInstanceSet(); if (!set.isEmpty()) { // CraftBukkit start - Send scaled max health if (this.myEntity instanceof EntityPlayerMP) { ((EntityPlayerMP) this.myEntity).getBukkitEntity().injectScaledMaxHealth(set, false); } // CraftBukkit end this.func_151261_b(new S20PacketEntityProperties(this.myEntity.getEntityId(), set)); } set.clear(); } }
public void handleEntityMetadata(S1CPacketEntityMetadata p_147284_1_) { Entity entity = this.clientWorldController.getEntityByID(p_147284_1_.func_149375_d()); if (entity != null && p_147284_1_.func_149376_c() != null) { entity.getDataWatcher().updateWatchedObjectsFromList(p_147284_1_.func_149376_c()); } }
public S1CPacketEntityMetadata getUpdatePacket(String text, int health){ return new S1CPacketEntityMetadata(entityId, getWatcher(text, health), true); }
/** * Invoked when the server registers new proximate objects in your watchlist or when objects in your watchlist have * changed -> Registers any changes locally */ void handleEntityMetadata(S1CPacketEntityMetadata packetIn);
/** * Invoked when the server registers new proximate objects in your watchlist or when objects in your watchlist have * changed -> Registers any changes locally */ void handleEntityMetadata(S1CPacketEntityMetadata var1);
void handleEntityMetadata(S1CPacketEntityMetadata p_147284_1_);