This commit is contained in:
Raoul Van den Berge
2016-07-08 14:57:37 +02:00
parent 611d73ff11
commit b564128509
14 changed files with 21 additions and 21 deletions

View File

@@ -44,7 +44,7 @@ public abstract class BlockBase extends Block {
protected BlockStateContainer.Builder createBlockStateBuilder() {
BlockStateContainer.Builder builder = new BlockStateContainer.Builder(this);
if (getDirectionType() != null) {
if (getPlacementType() != null) {
builder.add(DIRECTION);
}
@@ -72,7 +72,7 @@ public abstract class BlockBase extends Block {
@Override
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) {
if (getDirectionType() != null) {
if (getPlacementType() != null) {
return state.withProperty(DIRECTION, ((TileBase) world.getTileEntity(pos)).getDirection());
}
@@ -86,10 +86,10 @@ public abstract class BlockBase extends Block {
@Override
public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis) {
if (!world.isRemote && getDirectionType() != null) {
if (!world.isRemote && getPlacementType() != null) {
TileBase tile = (TileBase) world.getTileEntity(pos);
tile.setDirection(getDirectionType().getNext(tile.getDirection()));
tile.setDirection(getPlacementType().getNext(tile.getDirection()));
RefinedStorageUtils.updateBlock(world, pos);
@@ -103,12 +103,12 @@ public abstract class BlockBase extends Block {
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack) {
super.onBlockPlacedBy(world, pos, state, player, stack);
if (getDirectionType() != null) {
if (getPlacementType() != null) {
TileBase tile = (TileBase) world.getTileEntity(pos);
EnumFacing facing = getDirectionType().getFrom(pos, player);
EnumFacing facing = getPlacementType().getFrom(pos, player);
if (player.isSneaking() && getDirectionType() == EnumPlacementType.ANY) {
if (player.isSneaking() && getPlacementType() == EnumPlacementType.ANY) {
facing = facing.getOpposite();
}
@@ -145,7 +145,7 @@ public abstract class BlockBase extends Block {
world.setBlockToAir(pos);
}
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return EnumPlacementType.HORIZONTAL;
}
}

View File

@@ -76,7 +76,7 @@ public class BlockCable extends BlockNode {
}
@Override
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return null;
}
}

View File

@@ -32,7 +32,7 @@ public class BlockConstructor extends BlockNode {
}
@Override
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return EnumPlacementType.ANY;
}
}

View File

@@ -32,7 +32,7 @@ public class BlockCrafter extends BlockNode {
}
@Override
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return EnumPlacementType.ANY;
}

View File

@@ -32,7 +32,7 @@ public class BlockDestructor extends BlockNode {
}
@Override
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return EnumPlacementType.ANY;
}
}

View File

@@ -71,7 +71,7 @@ public class BlockDetector extends BlockNode {
}
@Override
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return EnumPlacementType.ANY;
}
}

View File

@@ -32,7 +32,7 @@ public class BlockExporter extends BlockNode {
}
@Override
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return EnumPlacementType.ANY;
}
}

View File

@@ -46,7 +46,7 @@ public class BlockExternalStorage extends BlockNode {
}
@Override
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return EnumPlacementType.ANY;
}
}

View File

@@ -32,7 +32,7 @@ public class BlockImporter extends BlockNode {
}
@Override
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return EnumPlacementType.ANY;
}
}

View File

@@ -32,7 +32,7 @@ public class BlockInterface extends BlockNode {
}
@Override
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return null;
}
}

View File

@@ -6,7 +6,7 @@ public class BlockMachineCasing extends BlockBase {
}
@Override
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return null;
}
}

View File

@@ -6,7 +6,7 @@ public class BlockQuartzEnrichedIron extends BlockBase {
}
@Override
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return null;
}
}

View File

@@ -32,7 +32,7 @@ public class BlockRelay extends BlockNode {
}
@Override
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return null;
}

View File

@@ -108,7 +108,7 @@ public class BlockStorage extends BlockNode {
}
@Override
public EnumPlacementType getDirectionType() {
public EnumPlacementType getPlacementType() {
return null;
}
}