Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
    @Override
    public boolean doRead(EntityPlayer player, MCDataInput in) {
      int entityId = in.readInt();
      int propsId = in.readVarInt();

      Entity entity = player.worldObj.getEntityByID(entityId);
      if (entity == null) {
        return false;
      }
      List<IEEPSyncCompanion> props = ((EntityProxy) entity)._sc$getPropsCompanions();
      if (props == null) {
        return false;
      }
      IEEPSyncCompanion companion = JavaUtils.get(props, propsId);
      companion.read(companion._sc$ieep, in);
      return true;
    }