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; }
@Override public BedBlockMat[] types() { return BedBlockMat.bedBlockTypes(); }
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); }
/** * 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); }