update to new RebornCore
This commit is contained in:
parent
6faa7a77ce
commit
c791bcdeb5
7 changed files with 15 additions and 46 deletions
|
@ -358,18 +358,6 @@ public abstract class BlockMachineBase extends BaseTileBlock implements IBlockTe
|
|||
return "techreborn:blocks/machine/machine_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMetaValue(int meta) {
|
||||
boolean active = false;
|
||||
int facingInt = meta;
|
||||
if(facingInt > 3){
|
||||
active = true;
|
||||
facingInt = facingInt - 3;
|
||||
}
|
||||
EnumFacing facing = getSideFromint(facingInt);
|
||||
return this.getDefaultState().withProperty(FACING, facing).withProperty(ACTIVE, active);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
int facingInt = getSideFromEnum(state.getValue(FACING));
|
||||
|
@ -379,7 +367,14 @@ public abstract class BlockMachineBase extends BaseTileBlock implements IBlockTe
|
|||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getStateFromMetaValue(meta);
|
||||
boolean active = false;
|
||||
int facingInt = meta;
|
||||
if(facingInt > 3){
|
||||
active = true;
|
||||
facingInt = facingInt - 3;
|
||||
}
|
||||
EnumFacing facing = getSideFromint(facingInt);
|
||||
return this.getDefaultState().withProperty(FACING, facing).withProperty(ACTIVE, active);
|
||||
}
|
||||
|
||||
public boolean isActive(IBlockState state){
|
||||
|
|
|
@ -39,7 +39,7 @@ public class BlockMachineCasing extends BlockMultiblockBase implements IBlockTex
|
|||
public PropertyInteger METADATA;
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMetaValue(int meta) {
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return this.getDefaultState().withProperty(METADATA, meta);
|
||||
}
|
||||
|
||||
|
@ -109,8 +109,4 @@ public class BlockMachineCasing extends BlockMultiblockBase implements IBlockTex
|
|||
return types.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getStateFromMetaValue(meta);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,14 +67,9 @@ public class BlockMachineFrame extends BaseBlock implements IBlockTextureProvide
|
|||
return types.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMetaValue(int meta) {
|
||||
return this.getDefaultState().withProperty(METADATA, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
return (Integer) state.getValue(METADATA);
|
||||
return state.getValue(METADATA);
|
||||
}
|
||||
|
||||
protected BlockState createBlockState() {
|
||||
|
@ -85,6 +80,6 @@ public class BlockMachineFrame extends BaseBlock implements IBlockTextureProvide
|
|||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getStateFromMetaValue(meta);
|
||||
return this.getDefaultState().withProperty(METADATA, meta);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ public class BlockOre extends BaseBlock implements IBlockTextureProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMetaValue(int meta) {
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return this.getDefaultState().withProperty(METADATA, meta);
|
||||
}
|
||||
|
||||
|
@ -178,8 +178,4 @@ public class BlockOre extends BaseBlock implements IBlockTextureProvider {
|
|||
return new BlockState(this, METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getStateFromMetaValue(meta);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,11 +132,6 @@ public class BlockPlayerDetector extends BaseTileBlock implements IBlockTextureP
|
|||
return types.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMetaValue(int meta) {
|
||||
return this.getDefaultState().withProperty(METADATA, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
return (Integer) state.getValue(METADATA);
|
||||
|
@ -150,6 +145,6 @@ public class BlockPlayerDetector extends BaseTileBlock implements IBlockTextureP
|
|||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getStateFromMetaValue(meta);
|
||||
return this.getDefaultState().withProperty(METADATA, meta);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ public class BlockStorage extends BaseBlock implements IBlockTextureProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMetaValue(int meta) {
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return this.getDefaultState().withProperty(METADATA, meta);
|
||||
}
|
||||
|
||||
|
@ -93,8 +93,4 @@ public class BlockStorage extends BaseBlock implements IBlockTextureProvider {
|
|||
return new BlockState(this, METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getStateFromMetaValue(meta);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class BlockStorage2 extends BaseBlock implements IBlockTextureProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMetaValue(int meta) {
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return this.getDefaultState().withProperty(METADATA, meta);
|
||||
}
|
||||
|
||||
|
@ -91,8 +91,4 @@ public class BlockStorage2 extends BaseBlock implements IBlockTextureProvider {
|
|||
return new BlockState(this, METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getStateFromMetaValue(meta);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue