예제 #1
0
 @Override
 public void setPartBounds(BlockMultipart bl, int part) {
   if (part != super.Rotation >> 2) {
     super.setPartBounds(bl, part);
   } else {
     switch (part) {
       case 0:
         bl.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F);
         break;
       case 1:
         bl.setBlockBounds(0.0F, 0.15F, 0.0F, 1.0F, 1.0F, 1.0F);
         break;
       case 2:
         bl.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.75F);
         break;
       case 3:
         bl.setBlockBounds(0.0F, 0.0F, 0.15F, 1.0F, 1.0F, 1.0F);
         break;
       case 4:
         bl.setBlockBounds(0.0F, 0.0F, 0.0F, 0.75F, 1.0F, 1.0F);
         break;
       case 5:
         bl.setBlockBounds(0.15F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
     }
   }
 }
예제 #2
0
 @SuppressWarnings({"unchecked", "rawtypes"})
 @Override
 protected void writeToPacket(ArrayList data) {
   super.writeToPacket(data);
   data.add(6);
   data.add(this.PowerVal1);
   data.add(this.PowerVal2);
 }
예제 #3
0
 @Override
 protected void readFromPacket(ByteBuf buffer) {
   super.readFromPacket(buffer);
   if (buffer.readInt() == 6) {
     this.PowerVal1 = buffer.readShort();
     this.PowerVal2 = buffer.readShort();
   }
 }
예제 #4
0
 @Override
 public void writeToNBT(NBTTagCompound tag) {
   super.writeToNBT(tag);
   tag.setByte("pv1", (byte) this.PowerVal1);
   tag.setByte("pv2", (byte) this.PowerVal2);
 }
예제 #5
0
 @Override
 public void readFromNBT(NBTTagCompound tag) {
   super.readFromNBT(tag);
   this.PowerVal1 = (short) (tag.getByte("pv1") & 255);
   this.PowerVal2 = (short) (tag.getByte("pv2") & 255);
 }