Beispiel #1
0
 @Override
 public boolean doRead(EntityPlayer player, MCDataInput in) {
   SyncedObjectProxy entity = (SyncedObjectProxy) player.worldObj.getEntityByID(in.readInt());
   if (entity == null) {
     return false;
   }
   SyncCompanion companion = entity._sc$getCompanion();
   if (companion == null) {
     return false;
   }
   companion.read(entity, in);
   return true;
 }
Beispiel #2
0
 @Override
 public boolean doRead(EntityPlayer player, MCDataInput in) {
   SyncedObjectProxy te =
       (SyncedObjectProxy)
           player.worldObj.getBlockTileEntity(in.readInt(), in.readUnsignedByte(), in.readInt());
   if (te == null) {
     return false;
   }
   SyncCompanion companion = te._sc$getCompanion();
   if (companion == null) {
     return false;
   }
   companion.read(te, in);
   return true;
 }