Esempio n. 1
0
 public void registerEntity(
     Class<? extends Entity> cls,
     String name,
     Enum id,
     int updateFrequency,
     boolean sendVelocityUpdates) {
   registerEntity(cls, name, id.ordinal(), updateFrequency, sendVelocityUpdates);
 }
 @Override
 public boolean handleMessageFromServer(Enum messageType, ByteBuf input) throws IOException {
   if (super.handleMessageFromServer(messageType, input)) {
     return true;
   }
   if (messageType.equals(factorization.net.StandardMessageType.Description)) {
     readStateChange(input);
     front = SpaceUtil.getOrientation(input.readByte());
     setRotation(input.readByte());
     parts.clear();
     ArrayList<Object> args = new ArrayList();
     while (true) {
       try {
         parts.add(new ClayLump().read(input));
       } catch (IOException e) {
         break;
       }
     }
     shouldRenderTesr = getState() == ClayState.WET;
   } else if (messageType.equals(GreenwareMessage.SculptMove)) {
     updateLump(input.readInt(), new ClayLump().read(input));
   } else if (messageType.equals(GreenwareMessage.SculptNew)) {
     addLump();
   } else if (messageType.equals(GreenwareMessage.SculptRemove)) {
     removeLump(input.readInt());
   } else if (messageType.equals(GreenwareMessage.SculptState)) {
     readStateChange(input);
   } else {
     return false;
   }
   cache_dirty = true;
   if (renderEfficient()) {
     getCoord().redraw();
   }
   return true;
 }
Esempio n. 3
0
 public void openGui(EntityPlayer player, Enum id, World world, int x, int y, int z) {
   openGui(player, id.ordinal(), world, x, y, z);
 }
Esempio n. 4
0
 public void addContainer(Enum id, Class<? extends Container> cls) {
   addContainer(id.ordinal(), cls);
 }
Esempio n. 5
0
 public void registerEntity(Class<? extends Entity> cls, String name, Enum id) {
   registerEntity(cls, name, id.ordinal());
 }