This commit is contained in:
modmuss50 2018-07-20 22:31:20 +01:00
parent 389b716880
commit f5c6b59ebd
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
79 changed files with 163 additions and 204 deletions

View file

@ -63,7 +63,7 @@ public class BlockAlarm extends BaseTileBlock {
public BlockAlarm() {
super(Material.ROCK);
setUnlocalizedName("techreborn.alarm");
setTranslationKey("techreborn.alarm");
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, false));
this.bbs = GenBoundingBoxes(0.19, 0.81);
setCreativeTab(TechRebornCreativeTab.instance);
@ -144,7 +144,7 @@ public class BlockAlarm extends BaseTileBlock {
@Override
public IBlockState getStateFromMeta(int meta) {
Boolean active = (meta & 8) == 8;
EnumFacing facing = EnumFacing.getFront(meta & 7);
EnumFacing facing = EnumFacing.byIndex(meta & 7);
return this.getDefaultState().withProperty(FACING, facing).withProperty(ACTIVE, active);
}

View file

@ -47,7 +47,7 @@ public class BlockComputerCube extends BlockMachineBase {
public BlockComputerCube() {
super();
this.setUnlocalizedName("techreborn.computercube");
this.setTranslationKey("techreborn.computercube");
setCreativeTab(TechRebornCreativeTab.instance);
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
}

View file

@ -58,7 +58,7 @@ public class BlockFlare extends BlockContainer {
public BlockFlare() {
super(Material.REDSTONE_LIGHT);
setCreativeTab(TechRebornCreativeTab.instance);
setUnlocalizedName("techreborn.flare");
setTranslationKey("techreborn.flare");
this.setDefaultState(this.blockState.getBaseState().withProperty(COLOR, EnumDyeColor.WHITE));
}
@ -104,7 +104,7 @@ public class BlockFlare extends BlockContainer {
@Override
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer() {
public BlockRenderLayer getRenderLayer() {
return BlockRenderLayer.CUTOUT;
}

View file

@ -53,7 +53,7 @@ public class BlockNuke extends BaseBlock {
public BlockNuke() {
super(Material.TNT);
setUnlocalizedName("techreborn.nuke");
setTranslationKey("techreborn.nuke");
setCreativeTab(TechRebornCreativeTab.instance);
this.setDefaultState(this.blockState.getBaseState().withProperty(OVERLAY, false));
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this));
@ -70,7 +70,7 @@ public class BlockNuke extends BaseBlock {
}
@Override
public void onBlockDestroyedByExplosion(World worldIn, BlockPos pos, Explosion explosionIn) {
public void onExplosionDestroy(World worldIn, BlockPos pos, Explosion explosionIn) {
if (!worldIn.isRemote) {
EntityNukePrimed entitynukeprimed = new EntityNukePrimed(worldIn, (double) ((float) pos.getX() + 0.5F),
(double) pos.getY(), (double) ((float) pos.getZ() + 0.5F), explosionIn.getExplosivePlacedBy());
@ -80,7 +80,7 @@ public class BlockNuke extends BaseBlock {
}
@Override
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) {
public void onEntityCollision(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) {
if (!worldIn.isRemote && entityIn instanceof EntityArrow) {
EntityArrow entityarrow = (EntityArrow) entityIn;

View file

@ -61,7 +61,7 @@ public class BlockReinforcedGlass extends BlockGlass {
@Override
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer() {
public BlockRenderLayer getRenderLayer() {
return BlockRenderLayer.CUTOUT;
}

View file

@ -72,9 +72,9 @@ public class BlockRubberLeaves extends BlockLeaves {
}
@Override
public BlockRenderLayer getBlockLayer() {
public BlockRenderLayer getRenderLayer() {
if(!fancyLeaves()){
return super.getBlockLayer();
return super.getRenderLayer();
}
return BlockRenderLayer.CUTOUT_MIPPED;
}

View file

@ -91,7 +91,7 @@ public class BlockRubberLog extends Block {
hasSap = true;
tempMeta -= 3;
}
EnumFacing facing = EnumFacing.getHorizontal(tempMeta);
EnumFacing facing = EnumFacing.byHorizontalIndex(tempMeta);
return this.getDefaultState().withProperty(SAP_SIDE, facing).withProperty(HAS_SAP, hasSap);
}
@ -153,7 +153,7 @@ public class BlockRubberLog extends Block {
super.updateTick(worldIn, pos, state, rand);
if (!state.getValue(HAS_SAP)) {
if (rand.nextInt(50) == 0) {
EnumFacing facing = EnumFacing.getHorizontal(rand.nextInt(4));
EnumFacing facing = EnumFacing.byHorizontalIndex(rand.nextInt(4));
if (worldIn.getBlockState(pos.down()).getBlock() == this
&& worldIn.getBlockState(pos.up()).getBlock() == this) {
worldIn.setBlockState(pos, state.withProperty(HAS_SAP, true).withProperty(SAP_SIDE, facing));
@ -177,7 +177,7 @@ public class BlockRubberLog extends Block {
if ((capEnergy != null && capEnergy.getEnergyStored() > 20) || stack.getItem() instanceof ItemTreeTap) {
if (state.getValue(HAS_SAP) && state.getValue(SAP_SIDE) == side) {
worldIn.setBlockState(pos,
state.withProperty(HAS_SAP, false).withProperty(SAP_SIDE, EnumFacing.getHorizontal(0)));
state.withProperty(HAS_SAP, false).withProperty(SAP_SIDE, EnumFacing.byHorizontalIndex(0)));
worldIn.playSound(null, pos.getX(), pos.getY(), pos.getZ(), ModSounds.SAP_EXTRACT, SoundCategory.BLOCKS,
0.6F, 1F);
if (!worldIn.isRemote) {

View file

@ -113,8 +113,8 @@ public abstract class BlockRubberPlankSlab extends BlockSlab {
}
@Override
public String getUnlocalizedName(int meta) {
return super.getUnlocalizedName();
public String getTranslationKey(int meta) {
return super.getTranslationKey();
}
@Override

View file

@ -38,7 +38,7 @@ import java.util.List;
public class BlockSupercondensator extends BlockMachineBase {
public BlockSupercondensator(Material material) {
super();
setUnlocalizedName("techreborn.supercondensator");
setTranslationKey("techreborn.supercondensator");
setCreativeTab(TechRebornCreativeTab.instance);
}

View file

@ -204,7 +204,7 @@ public class BlockCable extends BlockContainer {
}
@Override
public BlockRenderLayer getBlockLayer() {
public BlockRenderLayer getRenderLayer() {
return BlockRenderLayer.CUTOUT;
}
@ -285,8 +285,8 @@ public class BlockCable extends BlockContainer {
}
@Override
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entity) {
super.onEntityCollidedWithBlock(worldIn, pos, state, entity);
public void onEntityCollision(World worldIn, BlockPos pos, IBlockState state, Entity entity) {
super.onEntityCollision(worldIn, pos, state, entity);
if (state.getValue(TYPE).canKill && entity instanceof EntityLivingBase) {
TileEntity tileEntity = worldIn.getTileEntity(pos);
if (tileEntity != null && tileEntity instanceof TileCable) {

View file

@ -38,7 +38,7 @@ public class BlockFluidTechReborn extends BlockFluidBase {
public BlockFluidTechReborn(Fluid fluid, Material material, String name) {
super(fluid, material);
setUnlocalizedName(name);
setTranslationKey(name);
this.name = name;
}

View file

@ -134,7 +134,7 @@ public class BlockLamp extends BaseTileBlock {
}
@Override
public BlockRenderLayer getBlockLayer() {
public BlockRenderLayer getRenderLayer() {
return BlockRenderLayer.CUTOUT;
}
@ -197,7 +197,7 @@ public class BlockLamp extends BaseTileBlock {
@Override
public IBlockState getStateFromMeta(int meta) {
Boolean active = (meta&8)==8;
EnumFacing facing = EnumFacing.getFront(meta&7);
EnumFacing facing = EnumFacing.byIndex(meta&7);
return this.getDefaultState().withProperty(FACING, facing).withProperty(ACTIVE, active);
}
}

View file

@ -41,7 +41,7 @@ public class BlockAutoCraftingTable extends BlockMachineBase {
public BlockAutoCraftingTable() {
super(true);
setUnlocalizedName("techreborn.electriccraftingtable");
setTranslationKey("techreborn.electriccraftingtable");
setCreativeTab(TechRebornCreativeTab.instance);
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
}

View file

@ -46,7 +46,7 @@ public class BlockDigitalChest extends BlockMachineBase {
public BlockDigitalChest() {
super();
this.setUnlocalizedName("techreborn.digitalChest");
this.setTranslationKey("techreborn.digitalChest");
setCreativeTab(TechRebornCreativeTab.instance);
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
}

View file

@ -46,7 +46,7 @@ public class BlockQuantumChest extends BlockMachineBase {
public BlockQuantumChest() {
super();
this.setUnlocalizedName("techreborn.quantumChest");
this.setTranslationKey("techreborn.quantumChest");
setCreativeTab(TechRebornCreativeTab.instance);
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier3_machines"));
}