예제 #1
0
 protected BedBlockMat(final BlockFace face, final boolean isHeadPart, final boolean isOccupied) {
   super(
       BED_FOOT_SOUTH.name(),
       BED_FOOT_SOUTH.ordinal(),
       BED_FOOT_SOUTH.getMinecraftId(),
       (isHeadPart ? "HEAD_" : "FOOT_") + face.name() + (isOccupied ? "_OCCUPIED" : ""),
       combine(face, isHeadPart, isOccupied),
       BED_FOOT_SOUTH.getHardness(),
       BED_FOOT_SOUTH.getBlastResistance());
   this.blockFacing = face;
   this.isHeadPart = isHeadPart;
   this.isOccupied = isOccupied;
 }
예제 #2
0
 @Override
 public BedBlockMat[] types() {
   return BedBlockMat.bedBlockTypes();
 }
예제 #3
0
 static {
   BedBlockMat.register(BED_FOOT_SOUTH);
   BedBlockMat.register(BED_FOOT_WEST);
   BedBlockMat.register(BED_FOOT_NORTH);
   BedBlockMat.register(BED_FOOT_EAST);
   BedBlockMat.register(BED_FOOT_SOUTH_OCCUPIED);
   BedBlockMat.register(BED_FOOT_WEST_OCCUPIED);
   BedBlockMat.register(BED_FOOT_NORTH_OCCUPIED);
   BedBlockMat.register(BED_FOOT_EAST_OCCUPIED);
   BedBlockMat.register(BED_HEAD_SOUTH);
   BedBlockMat.register(BED_HEAD_WEST);
   BedBlockMat.register(BED_HEAD_NORTH);
   BedBlockMat.register(BED_HEAD_EAST);
   BedBlockMat.register(BED_HEAD_SOUTH_OCCUPIED);
   BedBlockMat.register(BED_HEAD_WEST_OCCUPIED);
   BedBlockMat.register(BED_HEAD_NORTH_OCCUPIED);
   BedBlockMat.register(BED_HEAD_EAST_OCCUPIED);
 }
예제 #4
0
 /**
  * Register new sub-type, may replace existing sub-types. Should be used only if you know what are
  * you doing, it will not create fully usable material.
  *
  * @param element sub-type to register
  */
 public static void register(final BedBlockMat element) {
   byID.put((byte) element.getType(), element);
   byName.put(element.getTypeName(), element);
 }