remove block metadata functions
This commit is contained in:
parent
6ef8caddbe
commit
244220f78c
63 changed files with 0 additions and 619 deletions
|
@ -455,10 +455,6 @@ public class Block {
|
|||
return this.savedProps;
|
||||
}
|
||||
|
||||
public State getStateFromMeta(int meta) {
|
||||
return this.getState();
|
||||
}
|
||||
|
||||
public State getActualState(State state, IWorldAccess worldIn, BlockPos pos) {
|
||||
return state;
|
||||
}
|
||||
|
|
|
@ -180,11 +180,6 @@ public class BlockBed extends Block implements Rotatable {
|
|||
// }
|
||||
// }
|
||||
|
||||
public State getStateFromMeta(int meta) {
|
||||
return this.getState().withProperty(PART, (meta & 8) > 0 ? BlockBed.EnumPartType.HEAD : BlockBed.EnumPartType.FOOT)
|
||||
.withProperty(FACING, Facing.getHorizontal(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties() {
|
||||
return new Property[] {FACING, PART};
|
||||
}
|
||||
|
|
|
@ -214,14 +214,6 @@ public class BlockCake extends Block
|
|||
return BlockLayer.CUTOUT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(BITES, Integer.valueOf(meta > 6 ? 0 : meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {BITES};
|
||||
|
|
|
@ -314,14 +314,6 @@ public class BlockDoor extends Block implements Rotatable
|
|||
return BlockLayer.CUTOUT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return (meta & 8) > 0 ? this.getState().withProperty(HALF, BlockDoor.EnumDoorHalf.UPPER).withProperty(HINGE, (meta & 1) > 0 ? BlockDoor.EnumHingePosition.RIGHT : BlockDoor.EnumHingePosition.LEFT).withProperty(POWERED, Boolean.valueOf((meta & 2) > 0)) : this.getState().withProperty(HALF, BlockDoor.EnumDoorHalf.LOWER).withProperty(FACING, Facing.getHorizontal(meta & 3).rotateYCCW()).withProperty(OPEN, Boolean.valueOf((meta & 4) > 0));
|
||||
}
|
||||
|
||||
public static Facing getFacing(IBlockAccess worldIn, BlockPos pos)
|
||||
{
|
||||
return worldIn.getState(pos).getValue(FACING);
|
||||
|
|
|
@ -171,14 +171,6 @@ public class BlockFenceGate extends Block implements Rotatable
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, Facing.getHorizontal(meta)).withProperty(OPEN, Boolean.valueOf((meta & 4) != 0)).withProperty(POWERED, Boolean.valueOf((meta & 8) != 0));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, OPEN, POWERED, IN_WALL};
|
||||
|
|
|
@ -21,26 +21,6 @@ public class BlockHay extends BlockRotatedPillar
|
|||
this.setFlammable(60, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
Facing.Axis enumfacing$axis = Facing.Axis.Y;
|
||||
int i = meta & 12;
|
||||
|
||||
if (i == 4)
|
||||
{
|
||||
enumfacing$axis = Facing.Axis.X;
|
||||
}
|
||||
else if (i == 8)
|
||||
{
|
||||
enumfacing$axis = Facing.Axis.Z;
|
||||
}
|
||||
|
||||
return this.getState().withProperty(AXIS, enumfacing$axis);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {AXIS};
|
||||
|
|
|
@ -136,21 +136,6 @@ public class BlockLadder extends Block implements Rotatable
|
|||
return BlockLayer.CUTOUT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
Facing enumfacing = Facing.getFront(meta);
|
||||
|
||||
if (enumfacing.getAxis() == Facing.Axis.Y)
|
||||
{
|
||||
enumfacing = Facing.NORTH;
|
||||
}
|
||||
|
||||
return this.getState().withProperty(FACING, enumfacing);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING};
|
||||
|
|
|
@ -259,15 +259,6 @@ public class BlockPortal extends Block
|
|||
return this.getRenderColor(worldIn.getState(pos));
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(AXIS, (meta & 8) == 8 ? Facing.Axis.Z : Facing.Axis.X)
|
||||
.withProperty(DIM, meta & 7);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {AXIS, DIM};
|
||||
|
|
|
@ -107,14 +107,6 @@ public class BlockPortalFrame extends Block implements Rotatable
|
|||
return ((Boolean)worldIn.getState(pos).getValue(ORB)).booleanValue() ? 15 : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(ORB, Boolean.valueOf((meta & 4) != 0)).withProperty(FACING, Facing.getHorizontal(meta & 3));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, ORB};
|
||||
|
|
|
@ -33,24 +33,6 @@ public class BlockQuartzPillar extends BlockRotatedPillar
|
|||
{
|
||||
return this.getState().withProperty(AXIS, facing.getAxis());
|
||||
}
|
||||
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
State state = this.getState();
|
||||
switch (meta & 3)
|
||||
{
|
||||
default:
|
||||
state = state.withProperty(AXIS, Facing.Axis.Y);
|
||||
break;
|
||||
case 1:
|
||||
state = state.withProperty(AXIS, Facing.Axis.X);
|
||||
break;
|
||||
case 2:
|
||||
state = state.withProperty(AXIS, Facing.Axis.Z);
|
||||
break;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
|
|
|
@ -34,10 +34,6 @@ public class BlockSkull extends Block implements Rotatable {
|
|||
return this.getState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
|
||||
}
|
||||
|
||||
public State getStateFromMeta(int meta) {
|
||||
return this.getState().withProperty(FACING, Facing.getHorizontal(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties() {
|
||||
return new Property[] {FACING};
|
||||
}
|
||||
|
|
|
@ -55,14 +55,6 @@ public class BlockSlab extends Block implements Directional
|
|||
this.textureSide = side;
|
||||
SLABS.add(this);
|
||||
}
|
||||
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
meta = meta & 7;
|
||||
return this.getState().withProperty(DOUBLE, meta >= 6).withProperty(SEAMLESS, meta == 7)
|
||||
.withProperty(FACING, (meta == 0 || meta >= 6) ? Facing.DOWN :
|
||||
(meta == 1 ? Facing.UP : Facing.getHorizontal(meta - 2)));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
|
|
|
@ -736,16 +736,6 @@ public class BlockStairs extends Block implements Rotatable
|
|||
return movingobjectposition1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
State iblockstate = this.getState().withProperty(HALF, (meta & 4) > 0 ? BlockStairs.EnumHalf.TOP : BlockStairs.EnumHalf.BOTTOM);
|
||||
iblockstate = iblockstate.withProperty(FACING, Facing.getFront(5 - (meta & 3)));
|
||||
return iblockstate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the actual Block state of this Block at the given position. This applies properties not visible in the
|
||||
* metadata, such as fence connections.
|
||||
|
|
|
@ -257,14 +257,6 @@ public class BlockTrapDoor extends Block implements Rotatable
|
|||
return BlockLayer.CUTOUT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, getFacing(meta)).withProperty(OPEN, Boolean.valueOf((meta & 4) != 0)).withProperty(HALF, (meta & 8) == 0 ? BlockTrapDoor.DoorHalf.BOTTOM : BlockTrapDoor.DoorHalf.TOP);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, OPEN, HALF};
|
||||
|
|
|
@ -145,14 +145,6 @@ public class BlockCactus extends Block
|
|||
return BlockLayer.CUTOUT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(AGE, Integer.valueOf(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {AGE};
|
||||
|
|
|
@ -200,14 +200,6 @@ public class BlockCocoa extends Block implements Rotatable, IGrowable
|
|||
return BlockLayer.CUTOUT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, Facing.getHorizontal(meta)).withProperty(AGE, Integer.valueOf((meta & 12) == 12 ? 0 : ((meta & 12) >> 2)));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, AGE};
|
||||
|
|
|
@ -202,14 +202,6 @@ public class BlockCrops extends BlockBush implements IGrowable
|
|||
this.grow(worldIn, pos, state);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(AGE, Integer.valueOf(meta > 7 ? 0 : meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {AGE};
|
||||
|
|
|
@ -256,14 +256,6 @@ public class BlockDoublePlant extends BlockBush implements IGrowable
|
|||
spawnAsEntity(worldIn, pos, new ItemStack(this.getItem()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return (meta & 8) > 0 ? this.getState().withProperty(HALF, BlockDoublePlant.EnumBlockHalf.UPPER) : this.getState().withProperty(HALF, BlockDoublePlant.EnumBlockHalf.LOWER);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {HALF};
|
||||
|
|
|
@ -156,14 +156,6 @@ public class BlockFarmland extends Block
|
|||
return Items.dirt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(MOISTURE, Integer.valueOf(meta & 7));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {MOISTURE};
|
||||
|
|
|
@ -79,14 +79,6 @@ public class BlockHugeMushroom extends Block
|
|||
return this.getState();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(VARIANT, BlockHugeMushroom.EnumType.byMetadata(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {VARIANT};
|
||||
|
|
|
@ -304,10 +304,6 @@ public class BlockLeaves extends BlockLeavesBase
|
|||
== null ? Colorizer.getFoliageColor(worldIn, pos) : this.type.getTintType().getColor());
|
||||
}
|
||||
|
||||
public State getStateFromMeta(int meta) {
|
||||
return this.getState().withProperty(DECAY, Boolean.valueOf((meta & 8) == 0));
|
||||
}
|
||||
|
||||
protected Property[] getProperties() {
|
||||
return new Property[] {DECAY};
|
||||
}
|
||||
|
|
|
@ -81,16 +81,6 @@ public class BlockLilyPad extends BlockBush implements Rotatable
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// public int getMetaFromState(IBlockState state)
|
||||
// {
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, Facing.getHorizontal(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
|
|
|
@ -66,28 +66,6 @@ public class BlockLog extends BlockRotatedPillar
|
|||
.e().rot(90);
|
||||
}
|
||||
}
|
||||
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
State state = this.getState();
|
||||
|
||||
switch (meta & 3)
|
||||
{
|
||||
default:
|
||||
state = state.withProperty(AXIS, Facing.Axis.Y);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
state = state.withProperty(AXIS, Facing.Axis.X);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
state = state.withProperty(AXIS, Facing.Axis.Z);
|
||||
break;
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
|
|
|
@ -29,10 +29,6 @@ public class BlockPumpkin extends Block implements Rotatable {
|
|||
return this.getState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
|
||||
}
|
||||
|
||||
public State getStateFromMeta(int meta) {
|
||||
return this.getState().withProperty(FACING, Facing.getHorizontal(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties() {
|
||||
return new Property[] {FACING};
|
||||
}
|
||||
|
|
|
@ -165,14 +165,6 @@ public class BlockReed extends Block
|
|||
return BlockLayer.CUTOUT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(AGE, Integer.valueOf(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {AGE};
|
||||
|
|
|
@ -114,14 +114,6 @@ public class BlockSapling extends BlockBush implements IGrowable
|
|||
this.grow(worldIn, pos, state, rand);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState() /* .withProperty(TYPE, BlockPlanks.EnumType.byMetadata(meta & 7)) */ .withProperty(STAGE, meta & 1);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {STAGE};
|
||||
|
|
|
@ -213,14 +213,6 @@ public class BlockStem extends BlockBush implements DirectionalUp, IGrowable
|
|||
this.growStem(worldIn, pos, state);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(AGE, Integer.valueOf(meta > 7 ? 0 : meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {AGE, FACING};
|
||||
|
|
|
@ -441,14 +441,6 @@ public class BlockVine extends Block
|
|||
return BlockLayer.CUTOUT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(SOUTH, Boolean.valueOf((meta & 1) > 0)).withProperty(WEST, Boolean.valueOf((meta & 2) > 0)).withProperty(NORTH, Boolean.valueOf((meta & 4) > 0)).withProperty(EAST, Boolean.valueOf((meta & 8) > 0));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {UP, NORTH, EAST, SOUTH, WEST};
|
||||
|
|
|
@ -108,14 +108,6 @@ public class BlockWart extends BlockBush
|
|||
return Items.soul_wart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(AGE, Integer.valueOf(meta > 3 ? 0 : meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {AGE};
|
||||
|
|
|
@ -378,14 +378,6 @@ public abstract class BlockLiquid extends Block
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(LEVEL, Integer.valueOf(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {LEVEL};
|
||||
|
|
|
@ -437,14 +437,6 @@ public class BlockFire extends Block
|
|||
return BlockLayer.CUTOUT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(AGE, Integer.valueOf(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {AGE, NORTH, EAST, SOUTH, WEST, UPPER, FLIP, ALT};
|
||||
|
|
|
@ -151,14 +151,6 @@ public class BlockSnow extends Block
|
|||
return side == Facing.UP ? true : super.shouldSideBeRendered(worldIn, pos, side);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(LAYERS, Integer.valueOf((meta & 7) + 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this Block can be replaced directly by other blocks (true for e.g. tall grass)
|
||||
*/
|
||||
|
|
|
@ -121,14 +121,6 @@ public class BlockAnvil extends BlockFalling implements Rotatable
|
|||
return this.getState().withProperty(FACING, Facing.SOUTH);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, Facing.getHorizontal(meta & 3));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING};
|
||||
|
|
|
@ -501,21 +501,6 @@ public class BlockBrewingStand extends BlockContainer
|
|||
return BlockLayer.CUTOUT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
State iblockstate = this.getState();
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
iblockstate = iblockstate.withProperty(HAS_BOTTLE[i], Boolean.valueOf((meta & 1 << i) > 0));
|
||||
}
|
||||
|
||||
return iblockstate;
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {HAS_BOTTLE[0], HAS_BOTTLE[1], HAS_BOTTLE[2]};
|
||||
|
|
|
@ -316,43 +316,6 @@ public class BlockButton extends Block implements Directional
|
|||
worldIn.notifyNeighborsOfStateChange(pos.offset(facing.getOpposite()), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
Facing enumfacing;
|
||||
|
||||
switch (meta & 7)
|
||||
{
|
||||
case 0:
|
||||
enumfacing = Facing.DOWN;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
enumfacing = Facing.EAST;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
enumfacing = Facing.WEST;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
enumfacing = Facing.SOUTH;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
enumfacing = Facing.NORTH;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
default:
|
||||
enumfacing = Facing.UP;
|
||||
}
|
||||
|
||||
return this.getState().withProperty(FACING, enumfacing).withProperty(POWERED, Boolean.valueOf((meta & 8) > 0));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, POWERED};
|
||||
|
|
|
@ -643,14 +643,6 @@ public class BlockCauldron extends Block
|
|||
return ((Integer)worldIn.getState(pos).getValue(LEVEL)).intValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(LEVEL, Integer.valueOf(meta > 3 ? 0 : meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {LEVEL};
|
||||
|
|
|
@ -604,21 +604,6 @@ public class BlockChest extends BlockContainer implements Rotatable
|
|||
return Container.calcRedstoneFromInventory(this.getLockableContainer(worldIn, pos));
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
Facing enumfacing = Facing.getFront(meta);
|
||||
|
||||
if (enumfacing.getAxis() == Facing.Axis.Y)
|
||||
{
|
||||
enumfacing = Facing.NORTH;
|
||||
}
|
||||
|
||||
return this.getState().withProperty(FACING, enumfacing);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING};
|
||||
|
|
|
@ -156,14 +156,6 @@ public class BlockDaylightDetector extends BlockContainer
|
|||
return new TileEntityDaylightDetector();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(POWER, Integer.valueOf(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {POWER};
|
||||
|
|
|
@ -274,14 +274,6 @@ public class BlockDispenser extends BlockContainer implements Directional
|
|||
return this.getState().withProperty(FACING, Facing.SOUTH);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, getFacing(meta)).withProperty(TRIGGERED, Boolean.valueOf((meta & 8) > 0));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, TRIGGERED};
|
||||
|
|
|
@ -247,21 +247,6 @@ public class BlockFurnace extends BlockContainer implements Rotatable
|
|||
return this.getState().withProperty(FACING, Facing.SOUTH);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
Facing enumfacing = Facing.getFront(meta);
|
||||
|
||||
if (enumfacing.getAxis() == Facing.Axis.Y)
|
||||
{
|
||||
enumfacing = Facing.NORTH;
|
||||
}
|
||||
|
||||
return this.getState().withProperty(FACING, enumfacing);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING};
|
||||
|
|
|
@ -271,14 +271,6 @@ public class BlockHopper extends BlockContainer implements DirectionalDown
|
|||
return BlockLayer.CUTOUT_MIPPED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, getFacing(((meta & 7) == 1 || (meta & 7) > 5) ? 0 : meta)).withProperty(ENABLED, Boolean.valueOf(isEnabled(meta)));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, ENABLED};
|
||||
|
|
|
@ -249,14 +249,6 @@ public class BlockLever extends Block
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, BlockLever.EnumOrientation.byMetadata(meta & 7)).withProperty(POWERED, Boolean.valueOf((meta & 8) > 0));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, POWERED};
|
||||
|
|
|
@ -85,10 +85,6 @@ public abstract class BlockMachine extends Block implements Rotatable, ITileEnti
|
|||
return this.getState().withProperty(FACING, placer.getHorizontalFacing());
|
||||
}
|
||||
|
||||
public State getStateFromMeta(int meta) {
|
||||
return this.getState().withProperty(FACING, Facing.getHorizontal(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties() {
|
||||
return new Property[] {FACING};
|
||||
}
|
||||
|
|
|
@ -679,14 +679,6 @@ public class BlockPistonBase extends Block implements Directional
|
|||
return this.getState().withProperty(FACING, Facing.UP);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, getFacing(meta)).withProperty(EXTENDED, Boolean.valueOf((meta & 8) > 0));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, EXTENDED};
|
||||
|
|
|
@ -230,14 +230,6 @@ public class BlockPistonHead extends Block implements Directional
|
|||
return worldIn.getState(pos).getValue(TYPE) == BlockPistonHead.EnumPistonType.STICKY ? Items.sticky_piston : Items.piston;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, getFacing(meta)).withProperty(TYPE, (meta & 8) > 0 ? BlockPistonHead.EnumPistonType.STICKY : BlockPistonHead.EnumPistonType.DEFAULT);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, TYPE, SHORT};
|
||||
|
|
|
@ -282,14 +282,6 @@ public class BlockPistonMoving extends BlockContainer
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, BlockPistonHead.getFacing(meta)).withProperty(TYPE, (meta & 8) > 0 ? BlockPistonHead.EnumPistonType.STICKY : BlockPistonHead.EnumPistonType.DEFAULT);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, TYPE};
|
||||
|
|
|
@ -67,14 +67,6 @@ public class BlockPressurePlate extends BlockBasePressurePlate
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(POWERED, Boolean.valueOf(meta == 1));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {POWERED};
|
||||
|
|
|
@ -54,14 +54,6 @@ public class BlockPressurePlateWeighted extends BlockBasePressurePlate
|
|||
return 10;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(POWER, Integer.valueOf(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {POWER};
|
||||
|
|
|
@ -30,14 +30,6 @@ public class BlockRail extends BlockRailBase
|
|||
return SHAPE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(SHAPE, BlockRailBase.EnumRailDirection.byMetadata(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {SHAPE};
|
||||
|
|
|
@ -176,14 +176,6 @@ public class BlockRailDetector extends BlockRailBase
|
|||
return new BoundingBox((double)((float)pos.getX() + 0.2F), (double)pos.getY(), (double)((float)pos.getZ() + 0.2F), (double)((float)(pos.getX() + 1) - 0.2F), (double)((float)(pos.getY() + 1) - 0.2F), (double)((float)(pos.getZ() + 1) - 0.2F));
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(SHAPE, BlockRailBase.EnumRailDirection.byMetadata((meta & 7) > 5 ? 0 : (meta & 7))).withProperty(POWERED, Boolean.valueOf((meta & 8) > 0));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {SHAPE, POWERED};
|
||||
|
|
|
@ -163,14 +163,6 @@ public class BlockRailPowered extends BlockRailBase
|
|||
return SHAPE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(SHAPE, BlockRailBase.EnumRailDirection.byMetadata((meta & 7) > 5 ? 0 : (meta & 7))).withProperty(POWERED, Boolean.valueOf((meta & 8) > 0));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {SHAPE, POWERED};
|
||||
|
|
|
@ -274,14 +274,6 @@ public class BlockRedstoneComparator extends BlockRedstoneDiode implements ITile
|
|||
return new TileEntityComparator();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, Facing.getHorizontal(meta)).withProperty(POWERED, Boolean.valueOf((meta & 8) > 0)).withProperty(MODE, (meta & 4) > 0 ? BlockRedstoneComparator.Mode.SUBTRACT : BlockRedstoneComparator.Mode.COMPARE);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, MODE, POWERED};
|
||||
|
|
|
@ -136,14 +136,6 @@ public class BlockRedstoneRepeater extends BlockRedstoneDiode
|
|||
this.notifyNeighbors(worldIn, pos, state);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, Facing.getHorizontal(meta)).withProperty(LOCKED, Boolean.valueOf(false)).withProperty(DELAY, Integer.valueOf(1 + (meta >> 2)));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, DELAY, LOCKED};
|
||||
|
|
|
@ -803,14 +803,6 @@ public class BlockRedstoneWire extends Block
|
|||
return BlockLayer.CUTOUT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(POWER, Integer.valueOf(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {NORTH, EAST, SOUTH, WEST, POWER};
|
||||
|
|
|
@ -158,14 +158,6 @@ public class BlockTNT extends Block
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(EXPLODE, Boolean.valueOf((meta & 1) > 0));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {EXPLODE};
|
||||
|
|
|
@ -244,39 +244,6 @@ public class BlockTorch extends Block implements DirectionalUp
|
|||
return BlockLayer.CUTOUT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
State iblockstate = this.getState();
|
||||
|
||||
switch (meta)
|
||||
{
|
||||
case 1:
|
||||
iblockstate = iblockstate.withProperty(FACING, Facing.EAST);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
iblockstate = iblockstate.withProperty(FACING, Facing.WEST);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
iblockstate = iblockstate.withProperty(FACING, Facing.SOUTH);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
iblockstate = iblockstate.withProperty(FACING, Facing.NORTH);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
default:
|
||||
iblockstate = iblockstate.withProperty(FACING, Facing.UP);
|
||||
}
|
||||
|
||||
return iblockstate;
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING};
|
||||
|
|
|
@ -264,14 +264,6 @@ public class BlockTripWire extends Block
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(POWERED, Boolean.valueOf((meta & 1) > 0)).withProperty(SUSPENDED, Boolean.valueOf((meta & 2) > 0)).withProperty(ATTACHED, Boolean.valueOf((meta & 4) > 0)).withProperty(DISARMED, Boolean.valueOf((meta & 8) > 0));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {POWERED, SUSPENDED, ATTACHED, DISARMED, NORTH, EAST, WEST, SOUTH};
|
||||
|
|
|
@ -342,14 +342,6 @@ public class BlockTripWireHook extends Block implements Rotatable
|
|||
return BlockLayer.CUTOUT_MIPPED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(FACING, Facing.getHorizontal(meta & 3)).withProperty(POWERED, Boolean.valueOf((meta & 8) > 0)).withProperty(ATTACHED, Boolean.valueOf((meta & 4) > 0));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, POWERED, ATTACHED, SUSPENDED};
|
||||
|
|
|
@ -131,21 +131,6 @@ public class BlockWarpChest extends Block implements Rotatable
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
Facing enumfacing = Facing.getFront(meta);
|
||||
|
||||
if (enumfacing.getAxis() == Facing.Axis.Y)
|
||||
{
|
||||
enumfacing = Facing.NORTH;
|
||||
}
|
||||
|
||||
return this.getState().withProperty(FACING, enumfacing);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING};
|
||||
|
|
|
@ -59,18 +59,6 @@ public class BlockBannerHanging extends BlockBanner
|
|||
super.onNeighborBlockChange(worldIn, pos, state, neighborBlock);
|
||||
}
|
||||
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
Facing enumfacing = Facing.getFront(meta);
|
||||
|
||||
if (enumfacing.getAxis() == Facing.Axis.Y)
|
||||
{
|
||||
enumfacing = Facing.NORTH;
|
||||
}
|
||||
|
||||
return this.getState().withProperty(FACING, enumfacing);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING};
|
||||
|
|
|
@ -29,11 +29,6 @@ public class BlockBannerStanding extends BlockBanner
|
|||
super.onNeighborBlockChange(worldIn, pos, state, neighborBlock);
|
||||
}
|
||||
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(ROTATION, Integer.valueOf(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {ROTATION};
|
||||
|
|
|
@ -32,14 +32,6 @@ public class BlockStandingSign extends BlockSign
|
|||
super.onNeighborBlockChange(worldIn, pos, state, neighborBlock);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getState().withProperty(ROTATION, Integer.valueOf(meta));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {ROTATION};
|
||||
|
|
|
@ -63,21 +63,6 @@ public class BlockWallSign extends BlockSign implements Rotatable
|
|||
super.onNeighborBlockChange(worldIn, pos, state, neighborBlock);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
public State getStateFromMeta(int meta)
|
||||
{
|
||||
Facing enumfacing = Facing.getFront(meta);
|
||||
|
||||
if (enumfacing.getAxis() == Facing.Axis.Y)
|
||||
{
|
||||
enumfacing = Facing.NORTH;
|
||||
}
|
||||
|
||||
return this.getState().withProperty(FACING, enumfacing);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue