Mappings
This commit is contained in:
parent
389b716880
commit
f5c6b59ebd
79 changed files with 163 additions and 204 deletions
|
@ -43,8 +43,8 @@ if (ENV.BUILD_NUMBER) {
|
||||||
}
|
}
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
version = "1.12.2-14.23.4.2705"
|
version = "1.12.2-14.23.4.2739"
|
||||||
mappings = "snapshot_20171003"
|
mappings = "snapshot_20180720"
|
||||||
replace "@MODVERSION@", project.version
|
replace "@MODVERSION@", project.version
|
||||||
useDepAts = true
|
useDepAts = true
|
||||||
runDir = "run"
|
runDir = "run"
|
||||||
|
|
|
@ -69,12 +69,12 @@ public class RollingMachineRecipe {
|
||||||
|
|
||||||
public static ResourceLocation getNameForRecipe(ItemStack output) {
|
public static ResourceLocation getNameForRecipe(ItemStack output) {
|
||||||
ModContainer activeContainer = Loader.instance().activeModContainer();
|
ModContainer activeContainer = Loader.instance().activeModContainer();
|
||||||
ResourceLocation baseLoc = new ResourceLocation(activeContainer.getModId(), output.getItem().getRegistryName().getResourcePath());
|
ResourceLocation baseLoc = new ResourceLocation(activeContainer.getModId(), output.getItem().getRegistryName().getPath());
|
||||||
ResourceLocation recipeLoc = baseLoc;
|
ResourceLocation recipeLoc = baseLoc;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
while (recipes.containsKey(recipeLoc)) {
|
while (recipes.containsKey(recipeLoc)) {
|
||||||
index++;
|
index++;
|
||||||
recipeLoc = new ResourceLocation(activeContainer.getModId(), baseLoc.getResourcePath() + "_" + index);
|
recipeLoc = new ResourceLocation(activeContainer.getModId(), baseLoc.getPath() + "_" + index);
|
||||||
}
|
}
|
||||||
return recipeLoc;
|
return recipeLoc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class BlockAlarm extends BaseTileBlock {
|
||||||
|
|
||||||
public BlockAlarm() {
|
public BlockAlarm() {
|
||||||
super(Material.ROCK);
|
super(Material.ROCK);
|
||||||
setUnlocalizedName("techreborn.alarm");
|
setTranslationKey("techreborn.alarm");
|
||||||
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, false));
|
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, false));
|
||||||
this.bbs = GenBoundingBoxes(0.19, 0.81);
|
this.bbs = GenBoundingBoxes(0.19, 0.81);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
|
@ -144,7 +144,7 @@ public class BlockAlarm extends BaseTileBlock {
|
||||||
@Override
|
@Override
|
||||||
public IBlockState getStateFromMeta(int meta) {
|
public IBlockState getStateFromMeta(int meta) {
|
||||||
Boolean active = (meta & 8) == 8;
|
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);
|
return this.getDefaultState().withProperty(FACING, facing).withProperty(ACTIVE, active);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class BlockComputerCube extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockComputerCube() {
|
public BlockComputerCube() {
|
||||||
super();
|
super();
|
||||||
this.setUnlocalizedName("techreborn.computercube");
|
this.setTranslationKey("techreborn.computercube");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class BlockFlare extends BlockContainer {
|
||||||
public BlockFlare() {
|
public BlockFlare() {
|
||||||
super(Material.REDSTONE_LIGHT);
|
super(Material.REDSTONE_LIGHT);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setUnlocalizedName("techreborn.flare");
|
setTranslationKey("techreborn.flare");
|
||||||
this.setDefaultState(this.blockState.getBaseState().withProperty(COLOR, EnumDyeColor.WHITE));
|
this.setDefaultState(this.blockState.getBaseState().withProperty(COLOR, EnumDyeColor.WHITE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ public class BlockFlare extends BlockContainer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public BlockRenderLayer getBlockLayer() {
|
public BlockRenderLayer getRenderLayer() {
|
||||||
return BlockRenderLayer.CUTOUT;
|
return BlockRenderLayer.CUTOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class BlockNuke extends BaseBlock {
|
||||||
|
|
||||||
public BlockNuke() {
|
public BlockNuke() {
|
||||||
super(Material.TNT);
|
super(Material.TNT);
|
||||||
setUnlocalizedName("techreborn.nuke");
|
setTranslationKey("techreborn.nuke");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
this.setDefaultState(this.blockState.getBaseState().withProperty(OVERLAY, false));
|
this.setDefaultState(this.blockState.getBaseState().withProperty(OVERLAY, false));
|
||||||
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this));
|
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this));
|
||||||
|
@ -70,7 +70,7 @@ public class BlockNuke extends BaseBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockDestroyedByExplosion(World worldIn, BlockPos pos, Explosion explosionIn) {
|
public void onExplosionDestroy(World worldIn, BlockPos pos, Explosion explosionIn) {
|
||||||
if (!worldIn.isRemote) {
|
if (!worldIn.isRemote) {
|
||||||
EntityNukePrimed entitynukeprimed = new EntityNukePrimed(worldIn, (double) ((float) pos.getX() + 0.5F),
|
EntityNukePrimed entitynukeprimed = new EntityNukePrimed(worldIn, (double) ((float) pos.getX() + 0.5F),
|
||||||
(double) pos.getY(), (double) ((float) pos.getZ() + 0.5F), explosionIn.getExplosivePlacedBy());
|
(double) pos.getY(), (double) ((float) pos.getZ() + 0.5F), explosionIn.getExplosivePlacedBy());
|
||||||
|
@ -80,7 +80,7 @@ public class BlockNuke extends BaseBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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) {
|
if (!worldIn.isRemote && entityIn instanceof EntityArrow) {
|
||||||
EntityArrow entityarrow = (EntityArrow) entityIn;
|
EntityArrow entityarrow = (EntityArrow) entityIn;
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class BlockReinforcedGlass extends BlockGlass {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public BlockRenderLayer getBlockLayer() {
|
public BlockRenderLayer getRenderLayer() {
|
||||||
return BlockRenderLayer.CUTOUT;
|
return BlockRenderLayer.CUTOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,9 +72,9 @@ public class BlockRubberLeaves extends BlockLeaves {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockRenderLayer getBlockLayer() {
|
public BlockRenderLayer getRenderLayer() {
|
||||||
if(!fancyLeaves()){
|
if(!fancyLeaves()){
|
||||||
return super.getBlockLayer();
|
return super.getRenderLayer();
|
||||||
}
|
}
|
||||||
return BlockRenderLayer.CUTOUT_MIPPED;
|
return BlockRenderLayer.CUTOUT_MIPPED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class BlockRubberLog extends Block {
|
||||||
hasSap = true;
|
hasSap = true;
|
||||||
tempMeta -= 3;
|
tempMeta -= 3;
|
||||||
}
|
}
|
||||||
EnumFacing facing = EnumFacing.getHorizontal(tempMeta);
|
EnumFacing facing = EnumFacing.byHorizontalIndex(tempMeta);
|
||||||
return this.getDefaultState().withProperty(SAP_SIDE, facing).withProperty(HAS_SAP, hasSap);
|
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);
|
super.updateTick(worldIn, pos, state, rand);
|
||||||
if (!state.getValue(HAS_SAP)) {
|
if (!state.getValue(HAS_SAP)) {
|
||||||
if (rand.nextInt(50) == 0) {
|
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
|
if (worldIn.getBlockState(pos.down()).getBlock() == this
|
||||||
&& worldIn.getBlockState(pos.up()).getBlock() == this) {
|
&& worldIn.getBlockState(pos.up()).getBlock() == this) {
|
||||||
worldIn.setBlockState(pos, state.withProperty(HAS_SAP, true).withProperty(SAP_SIDE, facing));
|
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 ((capEnergy != null && capEnergy.getEnergyStored() > 20) || stack.getItem() instanceof ItemTreeTap) {
|
||||||
if (state.getValue(HAS_SAP) && state.getValue(SAP_SIDE) == side) {
|
if (state.getValue(HAS_SAP) && state.getValue(SAP_SIDE) == side) {
|
||||||
worldIn.setBlockState(pos,
|
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,
|
worldIn.playSound(null, pos.getX(), pos.getY(), pos.getZ(), ModSounds.SAP_EXTRACT, SoundCategory.BLOCKS,
|
||||||
0.6F, 1F);
|
0.6F, 1F);
|
||||||
if (!worldIn.isRemote) {
|
if (!worldIn.isRemote) {
|
||||||
|
|
|
@ -113,8 +113,8 @@ public abstract class BlockRubberPlankSlab extends BlockSlab {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUnlocalizedName(int meta) {
|
public String getTranslationKey(int meta) {
|
||||||
return super.getUnlocalizedName();
|
return super.getTranslationKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -38,7 +38,7 @@ import java.util.List;
|
||||||
public class BlockSupercondensator extends BlockMachineBase {
|
public class BlockSupercondensator extends BlockMachineBase {
|
||||||
public BlockSupercondensator(Material material) {
|
public BlockSupercondensator(Material material) {
|
||||||
super();
|
super();
|
||||||
setUnlocalizedName("techreborn.supercondensator");
|
setTranslationKey("techreborn.supercondensator");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ public class BlockCable extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockRenderLayer getBlockLayer() {
|
public BlockRenderLayer getRenderLayer() {
|
||||||
return BlockRenderLayer.CUTOUT;
|
return BlockRenderLayer.CUTOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,8 +285,8 @@ public class BlockCable extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entity) {
|
public void onEntityCollision(World worldIn, BlockPos pos, IBlockState state, Entity entity) {
|
||||||
super.onEntityCollidedWithBlock(worldIn, pos, state, entity);
|
super.onEntityCollision(worldIn, pos, state, entity);
|
||||||
if (state.getValue(TYPE).canKill && entity instanceof EntityLivingBase) {
|
if (state.getValue(TYPE).canKill && entity instanceof EntityLivingBase) {
|
||||||
TileEntity tileEntity = worldIn.getTileEntity(pos);
|
TileEntity tileEntity = worldIn.getTileEntity(pos);
|
||||||
if (tileEntity != null && tileEntity instanceof TileCable) {
|
if (tileEntity != null && tileEntity instanceof TileCable) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class BlockFluidTechReborn extends BlockFluidBase {
|
||||||
|
|
||||||
public BlockFluidTechReborn(Fluid fluid, Material material, String name) {
|
public BlockFluidTechReborn(Fluid fluid, Material material, String name) {
|
||||||
super(fluid, material);
|
super(fluid, material);
|
||||||
setUnlocalizedName(name);
|
setTranslationKey(name);
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ public class BlockLamp extends BaseTileBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockRenderLayer getBlockLayer() {
|
public BlockRenderLayer getRenderLayer() {
|
||||||
return BlockRenderLayer.CUTOUT;
|
return BlockRenderLayer.CUTOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ public class BlockLamp extends BaseTileBlock {
|
||||||
@Override
|
@Override
|
||||||
public IBlockState getStateFromMeta(int meta) {
|
public IBlockState getStateFromMeta(int meta) {
|
||||||
Boolean active = (meta&8)==8;
|
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);
|
return this.getDefaultState().withProperty(FACING, facing).withProperty(ACTIVE, active);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class BlockAutoCraftingTable extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockAutoCraftingTable() {
|
public BlockAutoCraftingTable() {
|
||||||
super(true);
|
super(true);
|
||||||
setUnlocalizedName("techreborn.electriccraftingtable");
|
setTranslationKey("techreborn.electriccraftingtable");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class BlockDigitalChest extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockDigitalChest() {
|
public BlockDigitalChest() {
|
||||||
super();
|
super();
|
||||||
this.setUnlocalizedName("techreborn.digitalChest");
|
this.setTranslationKey("techreborn.digitalChest");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class BlockQuantumChest extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockQuantumChest() {
|
public BlockQuantumChest() {
|
||||||
super();
|
super();
|
||||||
this.setUnlocalizedName("techreborn.quantumChest");
|
this.setTranslationKey("techreborn.quantumChest");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier3_machines"));
|
RebornModelRegistry.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier3_machines"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,6 @@ public class RegisterItemJsons {
|
||||||
register(ModItems.MANUAL, "misc/manual");
|
register(ModItems.MANUAL, "misc/manual");
|
||||||
register(ModItems.DEBUG, "misc/debug");
|
register(ModItems.DEBUG, "misc/debug");
|
||||||
register(ModBlocks.RUBBER_SAPLING, "misc/rubber_sapling");
|
register(ModBlocks.RUBBER_SAPLING, "misc/rubber_sapling");
|
||||||
register(ModItems.MISSING_RECIPE_PLACEHOLDER, "misc/missing_recipe");
|
|
||||||
|
|
||||||
register(ModItems.STEEL_DRILL, "tool/steel_drill");
|
register(ModItems.STEEL_DRILL, "tool/steel_drill");
|
||||||
register(ModItems.DIAMOND_DRILL, "tool/diamond_drill");
|
register(ModItems.DIAMOND_DRILL, "tool/diamond_drill");
|
||||||
|
@ -181,9 +180,9 @@ public class RegisterItemJsons {
|
||||||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||||
Map<IProperty<?>, Comparable<?>> map = Maps.<IProperty<?>, Comparable<?>>newLinkedHashMap(state.getProperties());
|
Map<IProperty<?>, Comparable<?>> map = Maps.<IProperty<?>, Comparable<?>>newLinkedHashMap(state.getProperties());
|
||||||
if (state.getValue(BlockCable.TYPE).ordinal() <= 4) {
|
if (state.getValue(BlockCable.TYPE).ordinal() <= 4) {
|
||||||
return new ModelResourceLocation(new ResourceLocation(ModBlocks.CABLE.getRegistryName().getResourceDomain(), ModBlocks.CABLE.getRegistryName().getResourcePath()) + "_thin", this.getPropertyString(map));
|
return new ModelResourceLocation(new ResourceLocation(ModBlocks.CABLE.getRegistryName().getNamespace(), ModBlocks.CABLE.getRegistryName().getPath()) + "_thin", this.getPropertyString(map));
|
||||||
}
|
}
|
||||||
return new ModelResourceLocation(new ResourceLocation(ModBlocks.CABLE.getRegistryName().getResourceDomain(), ModBlocks.CABLE.getRegistryName().getResourcePath()) + "_thick", this.getPropertyString(map));
|
return new ModelResourceLocation(new ResourceLocation(ModBlocks.CABLE.getRegistryName().getNamespace(), ModBlocks.CABLE.getRegistryName().getPath()) + "_thick", this.getPropertyString(map));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -197,7 +196,7 @@ public class RegisterItemJsons {
|
||||||
for (IProperty<?> iproperty : ignoredProperties) {
|
for (IProperty<?> iproperty : ignoredProperties) {
|
||||||
map.remove(iproperty);
|
map.remove(iproperty);
|
||||||
}
|
}
|
||||||
return new ModelResourceLocation(new ResourceLocation(block.getRegistryName().getResourceDomain(), path + slash + block.getRegistryName().getResourcePath()), this.getPropertyString(map));
|
return new ModelResourceLocation(new ResourceLocation(block.getRegistryName().getNamespace(), path + slash + block.getRegistryName().getPath()), this.getPropertyString(map));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -230,7 +229,7 @@ public class RegisterItemJsons {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void registerBlockstate(Item i, int meta, String variant, String dir) {
|
private static void registerBlockstate(Item i, int meta, String variant, String dir) {
|
||||||
ResourceLocation loc = new ResourceLocation("techreborn", dir + i.getRegistryName().getResourcePath());
|
ResourceLocation loc = new ResourceLocation("techreborn", dir + i.getRegistryName().getPath());
|
||||||
ModelLoader.setCustomModelResourceLocation(i, meta, new ModelResourceLocation(loc, "type=" + variant));
|
ModelLoader.setCustomModelResourceLocation(i, meta, new ModelResourceLocation(loc, "type=" + variant));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@ public class GuiBase extends GuiContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void drawTitle() {
|
protected void drawTitle() {
|
||||||
drawCentredString(I18n.format(tile.getBlockType().getUnlocalizedName() + ".name"), 6, 4210752, Layer.FOREGROUND);
|
drawCentredString(I18n.format(tile.getBlockType().getTranslationKey() + ".name"), 6, 4210752, Layer.FOREGROUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void drawCentredString(String string, int y, int colour, Layer layer) {
|
protected void drawCentredString(String string, int y, int colour, Layer layer) {
|
||||||
|
|
|
@ -157,9 +157,9 @@ public class GuiBlastFurnace extends GuiBase {
|
||||||
// this.tile.getPos().getY(), this.tile.getPos().getZ(), this.tile.getWorld());
|
// this.tile.getPos().getY(), this.tile.getPos().getZ(), this.tile.getWorld());
|
||||||
MultiblockRenderEvent.anchor = new BlockPos(
|
MultiblockRenderEvent.anchor = new BlockPos(
|
||||||
this.tile.getPos().getX()
|
this.tile.getPos().getX()
|
||||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetX() * 2,
|
- EnumFacing.byIndex(this.tile.getFacingInt()).getXOffset() * 2,
|
||||||
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
||||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetZ() * 2);
|
- EnumFacing.byIndex(this.tile.getFacingInt()).getZOffset() * 2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||||
|
|
|
@ -154,9 +154,9 @@ public class GuiDistillationTower extends GuiBase {
|
||||||
ClientProxy.multiblockRenderEvent.parent = this.tile.getPos();
|
ClientProxy.multiblockRenderEvent.parent = this.tile.getPos();
|
||||||
MultiblockRenderEvent.anchor = new BlockPos(
|
MultiblockRenderEvent.anchor = new BlockPos(
|
||||||
this.tile.getPos().getX()
|
this.tile.getPos().getX()
|
||||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetX() * 2,
|
- EnumFacing.byIndex(this.tile.getFacingInt()).getXOffset() * 2,
|
||||||
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
||||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetZ() * 2);
|
- EnumFacing.byIndex(this.tile.getFacingInt()).getZOffset() * 2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||||
|
|
|
@ -134,9 +134,9 @@ public class GuiFluidReplicator extends GuiBase {
|
||||||
ClientProxy.multiblockRenderEvent.parent = tile.getPos();
|
ClientProxy.multiblockRenderEvent.parent = tile.getPos();
|
||||||
MultiblockRenderEvent.anchor = new BlockPos(
|
MultiblockRenderEvent.anchor = new BlockPos(
|
||||||
this.tile.getPos().getX()
|
this.tile.getPos().getX()
|
||||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetX() * 2,
|
- EnumFacing.byIndex(this.tile.getFacingInt()).getXOffset() * 2,
|
||||||
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
||||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetZ() * 2);
|
- EnumFacing.byIndex(this.tile.getFacingInt()).getZOffset() * 2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||||
|
|
|
@ -153,9 +153,9 @@ public class GuiIndustrialGrinder extends GuiBase {
|
||||||
ClientProxy.multiblockRenderEvent.parent = this.tile.getPos();
|
ClientProxy.multiblockRenderEvent.parent = this.tile.getPos();
|
||||||
MultiblockRenderEvent.anchor = new BlockPos(
|
MultiblockRenderEvent.anchor = new BlockPos(
|
||||||
this.tile.getPos().getX()
|
this.tile.getPos().getX()
|
||||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetX() * 2,
|
- EnumFacing.byIndex(this.tile.getFacingInt()).getXOffset() * 2,
|
||||||
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
||||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetZ() * 2);
|
- EnumFacing.byIndex(this.tile.getFacingInt()).getZOffset() * 2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||||
|
|
|
@ -152,9 +152,9 @@ public class GuiIndustrialSawmill extends GuiBase {
|
||||||
ClientProxy.multiblockRenderEvent.parent = this.tile.getPos();
|
ClientProxy.multiblockRenderEvent.parent = this.tile.getPos();
|
||||||
MultiblockRenderEvent.anchor = new BlockPos(
|
MultiblockRenderEvent.anchor = new BlockPos(
|
||||||
this.tile.getPos().getX()
|
this.tile.getPos().getX()
|
||||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetX() * 2,
|
- EnumFacing.byIndex(this.tile.getFacingInt()).getYOffset() * 2,
|
||||||
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
||||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetZ() * 2);
|
- EnumFacing.byIndex(this.tile.getFacingInt()).getYOffset() * 2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||||
|
|
|
@ -129,7 +129,7 @@ public class ModelDynamicCell implements IModel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean accepts(ResourceLocation modelLocation) {
|
public boolean accepts(ResourceLocation modelLocation) {
|
||||||
return modelLocation.getResourceDomain().equals("techreborn") && modelLocation.getResourcePath().contains("dynamic_cell");
|
return modelLocation.getNamespace().equals("techreborn") && modelLocation.getNamespace().contains("dynamic_cell");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class ModelHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Reader getReaderForResource(ResourceLocation location) throws IOException {
|
public static Reader getReaderForResource(ResourceLocation location) throws IOException {
|
||||||
ResourceLocation file = new ResourceLocation(location.getResourceDomain(), location.getResourcePath() + ".json");
|
ResourceLocation file = new ResourceLocation(location.getNamespace(), location.getPath() + ".json");
|
||||||
IResource iresource = Minecraft.getMinecraft().getResourceManager().getResource(file);
|
IResource iresource = Minecraft.getMinecraft().getResourceManager().getResource(file);
|
||||||
return new BufferedReader(new InputStreamReader(iresource.getInputStream(), Charsets.UTF_8));
|
return new BufferedReader(new InputStreamReader(iresource.getInputStream(), Charsets.UTF_8));
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class FluidBlockModelHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void registerFluidBlockModel(BlockFluidTechReborn block) {
|
private static void registerFluidBlockModel(BlockFluidTechReborn block) {
|
||||||
String name = block.getUnlocalizedName().substring(5).toLowerCase();
|
String name = block.getTranslationKey().substring(5).toLowerCase();
|
||||||
Item item = Item.getItemFromBlock(block);
|
Item item = Item.getItemFromBlock(block);
|
||||||
ModelResourceLocation location = new ModelResourceLocation(
|
ModelResourceLocation location = new ModelResourceLocation(
|
||||||
new ResourceLocation(ModInfo.MOD_ID.toLowerCase(), "fluids"), name);
|
new ResourceLocation(ModInfo.MOD_ID.toLowerCase(), "fluids"), name);
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class StackToolTipEvent {
|
||||||
try {
|
try {
|
||||||
Block block = Block.getBlockFromItem(item);
|
Block block = Block.getBlockFromItem(item);
|
||||||
if (block != null && (block instanceof BlockContainer || block instanceof ITileEntityProvider)
|
if (block != null && (block instanceof BlockContainer || block instanceof ITileEntityProvider)
|
||||||
&& block.getRegistryName().getResourceDomain().contains("techreborn")) {
|
&& block.getRegistryName().getNamespace().contains("techreborn")) {
|
||||||
TileEntity tile = block.createTileEntity(Minecraft.getMinecraft().world,
|
TileEntity tile = block.createTileEntity(Minecraft.getMinecraft().world,
|
||||||
block.getStateFromMeta(event.getItemStack().getItemDamage()));
|
block.getStateFromMeta(event.getItemStack().getItemDamage()));
|
||||||
if (tile instanceof IListInfoProvider) {
|
if (tile instanceof IListInfoProvider) {
|
||||||
|
|
|
@ -80,10 +80,10 @@ public class TRRecipeHandler {
|
||||||
if (recipe.getRegistryName() == null) {
|
if (recipe.getRegistryName() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!recipe.getRegistryName().getResourceDomain().equals(ModInfo.MOD_ID)) {
|
if (!recipe.getRegistryName().getNamespace().equals(ModInfo.MOD_ID)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!recipe.getRecipeOutput().getItem().getRegistryName().getResourceDomain().equals(ModInfo.MOD_ID)) {
|
if (!recipe.getRecipeOutput().getItem().getRegistryName().getNamespace().equals(ModInfo.MOD_ID)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (hiddenEntrys.contains(recipe.getRecipeOutput().getItem())) {
|
if (hiddenEntrys.contains(recipe.getRecipeOutput().getItem())) {
|
||||||
|
|
|
@ -393,7 +393,7 @@ public class ModBlocks {
|
||||||
*/
|
*/
|
||||||
public static void registerBlock(Block block, String name) {
|
public static void registerBlock(Block block, String name) {
|
||||||
name = name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
block.setUnlocalizedName(ModInfo.MOD_ID + ":" + name);
|
block.setTranslationKey(ModInfo.MOD_ID + ":" + name);
|
||||||
RebornRegistry.registerBlock(block, new ResourceLocation(ModInfo.MOD_ID, name));
|
RebornRegistry.registerBlock(block, new ResourceLocation(ModInfo.MOD_ID, name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -405,19 +405,19 @@ public class ModBlocks {
|
||||||
*/
|
*/
|
||||||
public static void registerBlock(Block block, Class<? extends ItemBlock> itemclass, String name) {
|
public static void registerBlock(Block block, Class<? extends ItemBlock> itemclass, String name) {
|
||||||
name = name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
block.setUnlocalizedName(ModInfo.MOD_ID + ":" + name);
|
block.setTranslationKey(ModInfo.MOD_ID + ":" + name);
|
||||||
RebornRegistry.registerBlock(block, itemclass, new ResourceLocation(ModInfo.MOD_ID, name));
|
RebornRegistry.registerBlock(block, itemclass, new ResourceLocation(ModInfo.MOD_ID, name));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerBlock(Block block, ItemBlock itemBlock, String name) {
|
public static void registerBlock(Block block, ItemBlock itemBlock, String name) {
|
||||||
name = name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
block.setUnlocalizedName(ModInfo.MOD_ID + ":" + name);
|
block.setTranslationKey(ModInfo.MOD_ID + ":" + name);
|
||||||
RebornRegistry.registerBlock(block, itemBlock, new ResourceLocation(ModInfo.MOD_ID, name));
|
RebornRegistry.registerBlock(block, itemBlock, new ResourceLocation(ModInfo.MOD_ID, name));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerBlockNoItem(Block block, String name) {
|
public static void registerBlockNoItem(Block block, String name) {
|
||||||
name = name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
block.setUnlocalizedName(ModInfo.MOD_ID + ":" + name);
|
block.setTranslationKey(ModInfo.MOD_ID + ":" + name);
|
||||||
RebornRegistry.registerBlockNoItem(block, new ResourceLocation(ModInfo.MOD_ID, name));
|
RebornRegistry.registerBlockNoItem(block, new ResourceLocation(ModInfo.MOD_ID, name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,178 +140,178 @@ public class ModFluids {
|
||||||
public static void init() {
|
public static void init() {
|
||||||
FluidRegistry.registerFluid(BERYLLIUM);
|
FluidRegistry.registerFluid(BERYLLIUM);
|
||||||
BLOCK_BERYLLIUM = new BlockFluidTechReborn(BERYLLIUM, Material.WATER, "techreborn.berylium");
|
BLOCK_BERYLLIUM = new BlockFluidTechReborn(BERYLLIUM, Material.WATER, "techreborn.berylium");
|
||||||
registerBlock(BLOCK_BERYLLIUM, ModInfo.MOD_ID + "_" + BLOCK_BERYLLIUM.getUnlocalizedName().substring(5));
|
registerBlock(BLOCK_BERYLLIUM, ModInfo.MOD_ID + "_" + BLOCK_BERYLLIUM.getTranslationKey().substring(5));
|
||||||
|
|
||||||
|
|
||||||
FluidRegistry.registerFluid(CALCIUM);
|
FluidRegistry.registerFluid(CALCIUM);
|
||||||
BLOCK_CALCIUM = new BlockFluidTechReborn(CALCIUM, Material.WATER, "techreborn.calcium");
|
BLOCK_CALCIUM = new BlockFluidTechReborn(CALCIUM, Material.WATER, "techreborn.calcium");
|
||||||
registerBlock(BLOCK_CALCIUM,
|
registerBlock(BLOCK_CALCIUM,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_CALCIUM.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_CALCIUM.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(CALCIUM_CARBONATE);
|
FluidRegistry.registerFluid(CALCIUM_CARBONATE);
|
||||||
BLOCK_CALCIUM_CARBONATE = new BlockFluidTechReborn(CALCIUM_CARBONATE, Material.WATER,
|
BLOCK_CALCIUM_CARBONATE = new BlockFluidTechReborn(CALCIUM_CARBONATE, Material.WATER,
|
||||||
"techreborn.calciumcarbonate");
|
"techreborn.calciumcarbonate");
|
||||||
registerBlock(BLOCK_CALCIUM_CARBONATE,
|
registerBlock(BLOCK_CALCIUM_CARBONATE,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_CALCIUM_CARBONATE.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_CALCIUM_CARBONATE.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(CHLORITE);
|
FluidRegistry.registerFluid(CHLORITE);
|
||||||
BLOCK_CHLORITE = new BlockFluidTechReborn(CHLORITE, Material.WATER, "techreborn.chlorite");
|
BLOCK_CHLORITE = new BlockFluidTechReborn(CHLORITE, Material.WATER, "techreborn.chlorite");
|
||||||
registerBlock(BLOCK_CHLORITE,
|
registerBlock(BLOCK_CHLORITE,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_CHLORITE.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_CHLORITE.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(DEUTERIUM);
|
FluidRegistry.registerFluid(DEUTERIUM);
|
||||||
BLOCK_DEUTERIUM = new BlockFluidTechReborn(DEUTERIUM, Material.WATER, "techreborn.deuterium");
|
BLOCK_DEUTERIUM = new BlockFluidTechReborn(DEUTERIUM, Material.WATER, "techreborn.deuterium");
|
||||||
registerBlock(BLOCK_DEUTERIUM,
|
registerBlock(BLOCK_DEUTERIUM,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_DEUTERIUM.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_DEUTERIUM.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(GLYCERYL);
|
FluidRegistry.registerFluid(GLYCERYL);
|
||||||
BLOCK_GLYCERYL = new BlockFluidTechReborn(GLYCERYL, Material.WATER, "techreborn.glyceryl");
|
BLOCK_GLYCERYL = new BlockFluidTechReborn(GLYCERYL, Material.WATER, "techreborn.glyceryl");
|
||||||
registerBlock(BLOCK_GLYCERYL,
|
registerBlock(BLOCK_GLYCERYL,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_GLYCERYL.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_GLYCERYL.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(HELIUM);
|
FluidRegistry.registerFluid(HELIUM);
|
||||||
BLOCK_HELIUM = new BlockFluidTechReborn(HELIUM, Material.WATER, "techreborn.helium");
|
BLOCK_HELIUM = new BlockFluidTechReborn(HELIUM, Material.WATER, "techreborn.helium");
|
||||||
registerBlock(BLOCK_HELIUM,
|
registerBlock(BLOCK_HELIUM,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_HELIUM.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_HELIUM.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(HELIUM_3);
|
FluidRegistry.registerFluid(HELIUM_3);
|
||||||
BLOCK_HELIUM_3 = new BlockFluidTechReborn(HELIUM_3, Material.WATER, "techreborn.helium3");
|
BLOCK_HELIUM_3 = new BlockFluidTechReborn(HELIUM_3, Material.WATER, "techreborn.helium3");
|
||||||
registerBlock(BLOCK_HELIUM_3,
|
registerBlock(BLOCK_HELIUM_3,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_HELIUM_3.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_HELIUM_3.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(HELIUMPLASMA);
|
FluidRegistry.registerFluid(HELIUMPLASMA);
|
||||||
BLOCK_HELIUMPLASMA = new BlockFluidTechReborn(HELIUMPLASMA, Material.WATER, "techreborn.heliumplasma");
|
BLOCK_HELIUMPLASMA = new BlockFluidTechReborn(HELIUMPLASMA, Material.WATER, "techreborn.heliumplasma");
|
||||||
registerBlock(BLOCK_HELIUMPLASMA,
|
registerBlock(BLOCK_HELIUMPLASMA,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_HELIUMPLASMA.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_HELIUMPLASMA.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(HYDROGEN);
|
FluidRegistry.registerFluid(HYDROGEN);
|
||||||
BLOCK_HYDROGEN = new BlockFluidTechReborn(HYDROGEN, Material.WATER, "techreborn.hydrogen");
|
BLOCK_HYDROGEN = new BlockFluidTechReborn(HYDROGEN, Material.WATER, "techreborn.hydrogen");
|
||||||
registerBlock(BLOCK_HYDROGEN,
|
registerBlock(BLOCK_HYDROGEN,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_HYDROGEN.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_HYDROGEN.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(LITHIUM);
|
FluidRegistry.registerFluid(LITHIUM);
|
||||||
BLOCK_LITHIUM = new BlockFluidTechReborn(LITHIUM, Material.WATER, "techreborn.lithium");
|
BLOCK_LITHIUM = new BlockFluidTechReborn(LITHIUM, Material.WATER, "techreborn.lithium");
|
||||||
registerBlock(BLOCK_LITHIUM,
|
registerBlock(BLOCK_LITHIUM,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_LITHIUM.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_LITHIUM.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(MERCURY);
|
FluidRegistry.registerFluid(MERCURY);
|
||||||
BLOCK_MERCURY = new BlockFluidTechReborn(MERCURY, Material.WATER, "techreborn.mercury");
|
BLOCK_MERCURY = new BlockFluidTechReborn(MERCURY, Material.WATER, "techreborn.mercury");
|
||||||
registerBlock(BLOCK_MERCURY,
|
registerBlock(BLOCK_MERCURY,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_MERCURY.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_MERCURY.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(METHANE);
|
FluidRegistry.registerFluid(METHANE);
|
||||||
BLOCK_METHANE = new BlockFluidTechReborn(METHANE, Material.WATER, "techreborn.methane");
|
BLOCK_METHANE = new BlockFluidTechReborn(METHANE, Material.WATER, "techreborn.methane");
|
||||||
registerBlock(BLOCK_METHANE,
|
registerBlock(BLOCK_METHANE,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_METHANE.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_METHANE.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(NITROCOAL_FUEL);
|
FluidRegistry.registerFluid(NITROCOAL_FUEL);
|
||||||
BLOCK_NITROCOAL_FUEL = new BlockFluidTechReborn(NITROCOAL_FUEL, Material.WATER,
|
BLOCK_NITROCOAL_FUEL = new BlockFluidTechReborn(NITROCOAL_FUEL, Material.WATER,
|
||||||
"techreborn.nitrocoalfuel");
|
"techreborn.nitrocoalfuel");
|
||||||
registerBlock(BLOCK_NITROCOAL_FUEL,
|
registerBlock(BLOCK_NITROCOAL_FUEL,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_NITROCOAL_FUEL.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_NITROCOAL_FUEL.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(NITROFUEL);
|
FluidRegistry.registerFluid(NITROFUEL);
|
||||||
BLOCK_NITROFUEL = new BlockFluidTechReborn(NITROFUEL, Material.WATER, "techreborn.nitrofuel");
|
BLOCK_NITROFUEL = new BlockFluidTechReborn(NITROFUEL, Material.WATER, "techreborn.nitrofuel");
|
||||||
registerBlock(BLOCK_NITROFUEL,
|
registerBlock(BLOCK_NITROFUEL,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_NITROFUEL.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_NITROFUEL.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(NITROGEN);
|
FluidRegistry.registerFluid(NITROGEN);
|
||||||
BLOCK_NITROGEN = new BlockFluidTechReborn(NITROGEN, Material.WATER, "techreborn.nitrogen");
|
BLOCK_NITROGEN = new BlockFluidTechReborn(NITROGEN, Material.WATER, "techreborn.nitrogen");
|
||||||
registerBlock(BLOCK_NITROGEN,
|
registerBlock(BLOCK_NITROGEN,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_NITROGEN.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_NITROGEN.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(NITROGENDIOXIDE);
|
FluidRegistry.registerFluid(NITROGENDIOXIDE);
|
||||||
BLOCK_NITROGENDIOXIDE = new BlockFluidTechReborn(NITROGENDIOXIDE, Material.WATER,
|
BLOCK_NITROGENDIOXIDE = new BlockFluidTechReborn(NITROGENDIOXIDE, Material.WATER,
|
||||||
"techreborn.nitrogendioxide");
|
"techreborn.nitrogendioxide");
|
||||||
registerBlock(BLOCK_NITROGENDIOXIDE,
|
registerBlock(BLOCK_NITROGENDIOXIDE,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_NITROGENDIOXIDE.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_NITROGENDIOXIDE.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(POTASSIUM);
|
FluidRegistry.registerFluid(POTASSIUM);
|
||||||
BLOCK_POTASSIUM = new BlockFluidTechReborn(POTASSIUM, Material.WATER, "techreborn.potassium");
|
BLOCK_POTASSIUM = new BlockFluidTechReborn(POTASSIUM, Material.WATER, "techreborn.potassium");
|
||||||
registerBlock(BLOCK_POTASSIUM,
|
registerBlock(BLOCK_POTASSIUM,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_POTASSIUM.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_POTASSIUM.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(SILICON);
|
FluidRegistry.registerFluid(SILICON);
|
||||||
BLOCK_SILICON = new BlockFluidTechReborn(SILICON, Material.WATER, "techreborn.silicon");
|
BLOCK_SILICON = new BlockFluidTechReborn(SILICON, Material.WATER, "techreborn.silicon");
|
||||||
registerBlock(BLOCK_SILICON,
|
registerBlock(BLOCK_SILICON,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_SILICON.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_SILICON.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(SODIUM);
|
FluidRegistry.registerFluid(SODIUM);
|
||||||
BLOCK_SODIUM = new BlockFluidTechReborn(SODIUM, Material.WATER, "techreborn.sodium");
|
BLOCK_SODIUM = new BlockFluidTechReborn(SODIUM, Material.WATER, "techreborn.sodium");
|
||||||
registerBlock(BLOCK_SODIUM,
|
registerBlock(BLOCK_SODIUM,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_SODIUM.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_SODIUM.getTranslationKey().substring(5));
|
||||||
|
|
||||||
|
|
||||||
FluidRegistry.registerFluid(SODIUMPERSULFATE);
|
FluidRegistry.registerFluid(SODIUMPERSULFATE);
|
||||||
BLOCK_SODIUMPERSULFATE = new BlockFluidTechReborn(SODIUMPERSULFATE, Material.WATER,
|
BLOCK_SODIUMPERSULFATE = new BlockFluidTechReborn(SODIUMPERSULFATE, Material.WATER,
|
||||||
"techreborn.sodiumpersulfate");
|
"techreborn.sodiumpersulfate");
|
||||||
registerBlock(BLOCK_SODIUMPERSULFATE,
|
registerBlock(BLOCK_SODIUMPERSULFATE,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_SODIUMPERSULFATE.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_SODIUMPERSULFATE.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(TRITIUM);
|
FluidRegistry.registerFluid(TRITIUM);
|
||||||
BLOCK_TRITIUM = new BlockFluidTechReborn(TRITIUM, Material.WATER, "techreborn.tritium");
|
BLOCK_TRITIUM = new BlockFluidTechReborn(TRITIUM, Material.WATER, "techreborn.tritium");
|
||||||
registerBlock(BLOCK_TRITIUM,
|
registerBlock(BLOCK_TRITIUM,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_TRITIUM.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_TRITIUM.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(WOLFRAMIUM);
|
FluidRegistry.registerFluid(WOLFRAMIUM);
|
||||||
BLOCK_WOLFRAMIUM = new BlockFluidTechReborn(WOLFRAMIUM, Material.WATER, "techreborn.wolframium");
|
BLOCK_WOLFRAMIUM = new BlockFluidTechReborn(WOLFRAMIUM, Material.WATER, "techreborn.wolframium");
|
||||||
registerBlock(BLOCK_WOLFRAMIUM,
|
registerBlock(BLOCK_WOLFRAMIUM,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_WOLFRAMIUM.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_WOLFRAMIUM.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(CARBON);
|
FluidRegistry.registerFluid(CARBON);
|
||||||
BLOCK_CARBON = new BlockFluidTechReborn(CARBON, Material.WATER, "techreborn.carbon");
|
BLOCK_CARBON = new BlockFluidTechReborn(CARBON, Material.WATER, "techreborn.carbon");
|
||||||
registerBlock(BLOCK_CARBON,
|
registerBlock(BLOCK_CARBON,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_CARBON.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_CARBON.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(CARBON_FIBER);
|
FluidRegistry.registerFluid(CARBON_FIBER);
|
||||||
BLOCK_CARBON_FIBER = new BlockFluidTechReborn(CARBON_FIBER, Material.WATER, "techreborn.carbonfiber");
|
BLOCK_CARBON_FIBER = new BlockFluidTechReborn(CARBON_FIBER, Material.WATER, "techreborn.carbonfiber");
|
||||||
registerBlock(BLOCK_CARBON_FIBER,
|
registerBlock(BLOCK_CARBON_FIBER,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_CARBON_FIBER.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_CARBON_FIBER.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(NITRO_CARBON);
|
FluidRegistry.registerFluid(NITRO_CARBON);
|
||||||
BLOCK_NITRO_CARBON = new BlockFluidTechReborn(NITRO_CARBON, Material.WATER, "techreborn.nitrocarbon");
|
BLOCK_NITRO_CARBON = new BlockFluidTechReborn(NITRO_CARBON, Material.WATER, "techreborn.nitrocarbon");
|
||||||
registerBlock(BLOCK_NITRO_CARBON,
|
registerBlock(BLOCK_NITRO_CARBON,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_NITRO_CARBON.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_NITRO_CARBON.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(SULFUR);
|
FluidRegistry.registerFluid(SULFUR);
|
||||||
BLOCK_SULFUR = new BlockFluidTechReborn(SULFUR, Material.WATER, "techreborn.sulfur");
|
BLOCK_SULFUR = new BlockFluidTechReborn(SULFUR, Material.WATER, "techreborn.sulfur");
|
||||||
registerBlock(BLOCK_SULFUR,
|
registerBlock(BLOCK_SULFUR,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_SULFUR.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_SULFUR.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(SODIUM_SULFIDE);
|
FluidRegistry.registerFluid(SODIUM_SULFIDE);
|
||||||
BLOCK_SODIUM_SULFIDE = new BlockFluidTechReborn(SODIUM_SULFIDE, Material.WATER, "techreborn.sodiumsulfide");
|
BLOCK_SODIUM_SULFIDE = new BlockFluidTechReborn(SODIUM_SULFIDE, Material.WATER, "techreborn.sodiumsulfide");
|
||||||
registerBlock(BLOCK_SODIUM_SULFIDE,
|
registerBlock(BLOCK_SODIUM_SULFIDE,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_SODIUM_SULFIDE.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_SODIUM_SULFIDE.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(DIESEL);
|
FluidRegistry.registerFluid(DIESEL);
|
||||||
BLOCK_DIESEL = new BlockFluidTechReborn(DIESEL, Material.WATER, "techreborn.diesel");
|
BLOCK_DIESEL = new BlockFluidTechReborn(DIESEL, Material.WATER, "techreborn.diesel");
|
||||||
registerBlock(BLOCK_DIESEL,
|
registerBlock(BLOCK_DIESEL,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_DIESEL.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_DIESEL.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(NITRO_DIESEL);
|
FluidRegistry.registerFluid(NITRO_DIESEL);
|
||||||
BLOCK_NITRO_DIESEL = new BlockFluidTechReborn(NITRO_DIESEL, Material.WATER, "techreborn.nitrodiesel");
|
BLOCK_NITRO_DIESEL = new BlockFluidTechReborn(NITRO_DIESEL, Material.WATER, "techreborn.nitrodiesel");
|
||||||
registerBlock(BLOCK_NITRO_DIESEL,
|
registerBlock(BLOCK_NITRO_DIESEL,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_NITRO_DIESEL.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_NITRO_DIESEL.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(OIL);
|
FluidRegistry.registerFluid(OIL);
|
||||||
BLOCK_OIL = new BlockFluidTechReborn(OIL, Material.WATER, "techreborn.oil");
|
BLOCK_OIL = new BlockFluidTechReborn(OIL, Material.WATER, "techreborn.oil");
|
||||||
registerBlock(BLOCK_OIL,
|
registerBlock(BLOCK_OIL,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_OIL.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_OIL.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(SULFURIC_ACID);
|
FluidRegistry.registerFluid(SULFURIC_ACID);
|
||||||
BLOCK_SULFURIC_ACID = new BlockFluidTechReborn(SULFURIC_ACID, Material.WATER, "techreborn.sulfuricacid");
|
BLOCK_SULFURIC_ACID = new BlockFluidTechReborn(SULFURIC_ACID, Material.WATER, "techreborn.sulfuricacid");
|
||||||
registerBlock(BLOCK_SULFURIC_ACID,
|
registerBlock(BLOCK_SULFURIC_ACID,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_SULFURIC_ACID.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_SULFURIC_ACID.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(COMPRESSED_AIR);
|
FluidRegistry.registerFluid(COMPRESSED_AIR);
|
||||||
BLOCK_COMPRESSED_AIR = new BlockFluidTechReborn(COMPRESSED_AIR, Material.WATER, "techreborn.compressedair");
|
BLOCK_COMPRESSED_AIR = new BlockFluidTechReborn(COMPRESSED_AIR, Material.WATER, "techreborn.compressedair");
|
||||||
registerBlock(BLOCK_COMPRESSED_AIR,
|
registerBlock(BLOCK_COMPRESSED_AIR,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_COMPRESSED_AIR.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_COMPRESSED_AIR.getTranslationKey().substring(5));
|
||||||
|
|
||||||
FluidRegistry.registerFluid(ELECTROLYZED_WATER);
|
FluidRegistry.registerFluid(ELECTROLYZED_WATER);
|
||||||
BLOCK_ELECTROLYZED_WATER = new BlockFluidTechReborn(ELECTROLYZED_WATER, Material.WATER, "techreborn.electrolyzedwater");
|
BLOCK_ELECTROLYZED_WATER = new BlockFluidTechReborn(ELECTROLYZED_WATER, Material.WATER, "techreborn.electrolyzedwater");
|
||||||
registerBlock(BLOCK_ELECTROLYZED_WATER,
|
registerBlock(BLOCK_ELECTROLYZED_WATER,
|
||||||
ModInfo.MOD_ID + "_" + BLOCK_ELECTROLYZED_WATER.getUnlocalizedName().substring(5));
|
ModInfo.MOD_ID + "_" + BLOCK_ELECTROLYZED_WATER.getTranslationKey().substring(5));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerBlock(Block block, String name) {
|
public static void registerBlock(Block block, String name) {
|
||||||
|
|
|
@ -154,7 +154,6 @@ public class ModItems {
|
||||||
@Nullable
|
@Nullable
|
||||||
public static Item PERIDOT_BOOTS;
|
public static Item PERIDOT_BOOTS;
|
||||||
public static Item UPGRADES;
|
public static Item UPGRADES;
|
||||||
public static Item MISSING_RECIPE_PLACEHOLDER;
|
|
||||||
public static Item DEBUG;
|
public static Item DEBUG;
|
||||||
public static DynamicCell CELL;
|
public static DynamicCell CELL;
|
||||||
|
|
||||||
|
@ -326,9 +325,6 @@ public class ModItems {
|
||||||
CLOAKING_DEVICE = new ItemCloakingDevice();
|
CLOAKING_DEVICE = new ItemCloakingDevice();
|
||||||
registerItem(CLOAKING_DEVICE, "cloakingdevice");
|
registerItem(CLOAKING_DEVICE, "cloakingdevice");
|
||||||
|
|
||||||
MISSING_RECIPE_PLACEHOLDER = new ItemMissingRecipe().setUnlocalizedName("missingRecipe");
|
|
||||||
registerItem(MISSING_RECIPE_PLACEHOLDER, "missingRecipe");
|
|
||||||
|
|
||||||
DEBUG = new ItemDebugTool();
|
DEBUG = new ItemDebugTool();
|
||||||
registerItem(DEBUG, "debug");
|
registerItem(DEBUG, "debug");
|
||||||
|
|
||||||
|
|
|
@ -60,14 +60,14 @@ public class ModLoot {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void lootLoad(LootTableLoadEvent event) {
|
public void lootLoad(LootTableLoadEvent event) {
|
||||||
if(!event.getName().getResourceDomain().equals("minecraft")) {
|
if(!event.getName().getNamespace().equals("minecraft")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (ResourceLocation lootTable : lootTables) {
|
for (ResourceLocation lootTable : lootTables) {
|
||||||
if (event.getName().getResourcePath().equals(lootTable.getResourcePath())) {
|
if (event.getName().getNamespace().equals(lootTable.getPath())) {
|
||||||
event.getTable().addPool(getLootPool(lootTable));
|
event.getTable().addPool(getLootPool(lootTable));
|
||||||
if (Core.DEV_FEATURES) {
|
if (Core.DEV_FEATURES) {
|
||||||
Core.logHelper.info("Loot pool injected into " + lootTable.getResourcePath());
|
Core.logHelper.info("Loot pool injected into " + lootTable.getPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -381,7 +381,7 @@ public class ModRecipes {
|
||||||
|
|
||||||
public static ItemStack getOre(String name) {
|
public static ItemStack getOre(String name) {
|
||||||
if (OreDictionary.getOres(name).isEmpty()) {
|
if (OreDictionary.getOres(name).isEmpty()) {
|
||||||
return new ItemStack(ModItems.MISSING_RECIPE_PLACEHOLDER);
|
throw new RuntimeException("Failed to get ore: " + name);
|
||||||
}
|
}
|
||||||
return OreDictionary.getOres(name).get(0).copy();
|
return OreDictionary.getOres(name).get(0).copy();
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,8 +167,8 @@ public enum ModTileEntities {
|
||||||
@Override
|
@Override
|
||||||
public NBTTagCompound fixTagCompound(NBTTagCompound compound) {
|
public NBTTagCompound fixTagCompound(NBTTagCompound compound) {
|
||||||
ResourceLocation tileEntityLocation = new ResourceLocation(compound.getString("id"));
|
ResourceLocation tileEntityLocation = new ResourceLocation(compound.getString("id"));
|
||||||
if(tileEntityLocation.getResourceDomain().equalsIgnoreCase("minecraft")){
|
if(tileEntityLocation.getNamespace().equalsIgnoreCase("minecraft")){
|
||||||
Optional<ModTileEntities> tileData = getFromOldName(tileEntityLocation.getResourcePath());
|
Optional<ModTileEntities> tileData = getFromOldName(tileEntityLocation.getPath());
|
||||||
tileData.ifPresent(modTileEntities -> compound.setString("id", modTileEntities.name.toString()));
|
tileData.ifPresent(modTileEntities -> compound.setString("id", modTileEntities.name.toString()));
|
||||||
}
|
}
|
||||||
return compound;
|
return compound;
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class ItemBlockCable extends ItemBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUnlocalizedName(ItemStack stack) {
|
public String getTranslationKey(ItemStack stack) {
|
||||||
return super.getUnlocalizedName() + "." + EnumCableType.values()[stack.getItemDamage()].getName();
|
return super.getTranslationKey() + "." + EnumCableType.values()[stack.getItemDamage()].getName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,6 @@ public class ItemBlockRubberSapling extends ItemBlock {
|
||||||
public ItemBlockRubberSapling(Block block) {
|
public ItemBlockRubberSapling(Block block) {
|
||||||
super(block);
|
super(block);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setUnlocalizedName("techreborn.rubberSapling");
|
setTranslationKey("techreborn.rubberSapling");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class DynamicCell extends Item {
|
||||||
public DynamicCell() {
|
public DynamicCell() {
|
||||||
super();
|
super();
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setUnlocalizedName("techreborn.cell");
|
setTranslationKey("techreborn.cell");
|
||||||
setMaxStackSize(64);
|
setMaxStackSize(64);
|
||||||
TRRecipeHandler.hideEntry(this);
|
TRRecipeHandler.hideEntry(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ import techreborn.utils.TechRebornCreativeTab;
|
||||||
public class ItemDestructopack extends ItemTR {
|
public class ItemDestructopack extends ItemTR {
|
||||||
|
|
||||||
public ItemDestructopack() {
|
public ItemDestructopack() {
|
||||||
this.setUnlocalizedName("techreborn.destructopack");
|
this.setTranslationKey("techreborn.destructopack");
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
this.setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class ItemDusts extends ItemTR {
|
||||||
ModItems.META_PLACEHOLDER, "andesite", "diorite", "granite" };
|
ModItems.META_PLACEHOLDER, "andesite", "diorite", "granite" };
|
||||||
|
|
||||||
public ItemDusts() {
|
public ItemDusts() {
|
||||||
setUnlocalizedName("techreborn.dust");
|
setTranslationKey("techreborn.dust");
|
||||||
setHasSubtypes(true);
|
setHasSubtypes(true);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
TRRecipeHandler.hideEntry(this);
|
TRRecipeHandler.hideEntry(this);
|
||||||
|
@ -91,13 +91,13 @@ public class ItemDusts extends ItemTR {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
// gets Unlocalized Name depending on meta data
|
// gets Unlocalized Name depending on meta data
|
||||||
public String getUnlocalizedName(ItemStack itemStack) {
|
public String getTranslationKey(ItemStack itemStack) {
|
||||||
int meta = itemStack.getItemDamage();
|
int meta = itemStack.getItemDamage();
|
||||||
if (meta < 0 || meta >= types.length) {
|
if (meta < 0 || meta >= types.length) {
|
||||||
meta = 0;
|
meta = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.getUnlocalizedName() + "." + types[meta];
|
return super.getTranslationKey() + "." + types[meta];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class ItemDustsSmall extends ItemTR {
|
||||||
ModItems.META_PLACEHOLDER, "redstone", "glowstone", "andesite", "diorite", "granite" };
|
ModItems.META_PLACEHOLDER, "redstone", "glowstone", "andesite", "diorite", "granite" };
|
||||||
|
|
||||||
public ItemDustsSmall() {
|
public ItemDustsSmall() {
|
||||||
setUnlocalizedName("techreborn.dustsmall");
|
setTranslationKey("techreborn.dustsmall");
|
||||||
setHasSubtypes(true);
|
setHasSubtypes(true);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
TRRecipeHandler.hideEntry(this);
|
TRRecipeHandler.hideEntry(this);
|
||||||
|
@ -71,13 +71,13 @@ public class ItemDustsSmall extends ItemTR {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
// gets Unlocalized Name depending on meta data
|
// gets Unlocalized Name depending on meta data
|
||||||
public String getUnlocalizedName(ItemStack itemStack) {
|
public String getTranslationKey(ItemStack itemStack) {
|
||||||
int meta = itemStack.getItemDamage();
|
int meta = itemStack.getItemDamage();
|
||||||
if (meta < 0 || meta >= types.length) {
|
if (meta < 0 || meta >= types.length) {
|
||||||
meta = 0;
|
meta = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.getUnlocalizedName() + "." + types[meta];
|
return super.getTranslationKey() + "." + types[meta];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
|
|
|
@ -51,7 +51,7 @@ import java.util.List;
|
||||||
public class ItemFrequencyTransmitter extends ItemTR {
|
public class ItemFrequencyTransmitter extends ItemTR {
|
||||||
|
|
||||||
public ItemFrequencyTransmitter() {
|
public ItemFrequencyTransmitter() {
|
||||||
setUnlocalizedName("techreborn.frequencyTransmitter");
|
setTranslationKey("techreborn.frequencyTransmitter");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
this.addPropertyOverride(new ResourceLocation("techreborn:coords"), new IItemPropertyGetter() {
|
this.addPropertyOverride(new ResourceLocation("techreborn:coords"), new IItemPropertyGetter() {
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class ItemGems extends ItemTR {
|
||||||
|
|
||||||
public ItemGems() {
|
public ItemGems() {
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setUnlocalizedName("techreborn.gem");
|
setTranslationKey("techreborn.gem");
|
||||||
setHasSubtypes(true);
|
setHasSubtypes(true);
|
||||||
TRRecipeHandler.hideEntry(this);
|
TRRecipeHandler.hideEntry(this);
|
||||||
}
|
}
|
||||||
|
@ -61,13 +61,13 @@ public class ItemGems extends ItemTR {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
// gets Unlocalized Name depending on meta data
|
// gets Unlocalized Name depending on meta data
|
||||||
public String getUnlocalizedName(ItemStack itemStack) {
|
public String getTranslationKey(ItemStack itemStack) {
|
||||||
int meta = itemStack.getItemDamage();
|
int meta = itemStack.getItemDamage();
|
||||||
if (meta < 0 || meta >= types.length) {
|
if (meta < 0 || meta >= types.length) {
|
||||||
meta = 0;
|
meta = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.getUnlocalizedName() + "." + types[meta];
|
return super.getTranslationKey() + "." + types[meta];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class ItemIngots extends ItemTR {
|
||||||
public ItemIngots() {
|
public ItemIngots() {
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setHasSubtypes(true);
|
setHasSubtypes(true);
|
||||||
setUnlocalizedName("techreborn.ingot");
|
setTranslationKey("techreborn.ingot");
|
||||||
TRRecipeHandler.hideEntry(this);
|
TRRecipeHandler.hideEntry(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,13 +70,13 @@ public class ItemIngots extends ItemTR {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
// gets Unlocalized Name depending on meta data
|
// gets Unlocalized Name depending on meta data
|
||||||
public String getUnlocalizedName(ItemStack itemStack) {
|
public String getTranslationKey(ItemStack itemStack) {
|
||||||
int meta = itemStack.getItemDamage();
|
int meta = itemStack.getItemDamage();
|
||||||
if (meta < 0 || meta >= types.length) {
|
if (meta < 0 || meta >= types.length) {
|
||||||
meta = 0;
|
meta = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.getUnlocalizedName() + "." + types[meta];
|
return super.getTranslationKey() + "." + types[meta];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of TechReborn, licensed under the MIT License (MIT).
|
|
||||||
*
|
|
||||||
* Copyright (c) 2018 TechReborn
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package techreborn.items;
|
|
||||||
|
|
||||||
import techreborn.events.TRRecipeHandler;
|
|
||||||
import techreborn.utils.TechRebornCreativeTab;
|
|
||||||
|
|
||||||
public class ItemMissingRecipe extends ItemTR {
|
|
||||||
public ItemMissingRecipe() {
|
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
|
||||||
setUnlocalizedName("techreborn.missingrecipe");
|
|
||||||
TRRecipeHandler.hideEntry(this);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -44,7 +44,7 @@ public class ItemNuggets extends ItemTR {
|
||||||
public ItemNuggets() {
|
public ItemNuggets() {
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setHasSubtypes(true);
|
setHasSubtypes(true);
|
||||||
setUnlocalizedName("techreborn.nuggets");
|
setTranslationKey("techreborn.nuggets");
|
||||||
TRRecipeHandler.hideEntry(this);
|
TRRecipeHandler.hideEntry(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,13 +64,13 @@ public class ItemNuggets extends ItemTR {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
// gets Unlocalized Name depending on meta data
|
// gets Unlocalized Name depending on meta data
|
||||||
public String getUnlocalizedName(ItemStack itemStack) {
|
public String getTranslationKey(ItemStack itemStack) {
|
||||||
int meta = itemStack.getItemDamage();
|
int meta = itemStack.getItemDamage();
|
||||||
if (meta < 0 || meta >= types.length) {
|
if (meta < 0 || meta >= types.length) {
|
||||||
meta = 0;
|
meta = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.getUnlocalizedName() + "." + types[meta];
|
return super.getTranslationKey() + "." + types[meta];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class ItemParts extends ItemTR {
|
||||||
public ItemParts() {
|
public ItemParts() {
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
this.setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
this.setHasSubtypes(true);
|
this.setHasSubtypes(true);
|
||||||
this.setUnlocalizedName("techreborn.part");
|
this.setTranslationKey("techreborn.part");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack getPartByName(String name, final int count) {
|
public static ItemStack getPartByName(String name, final int count) {
|
||||||
|
@ -84,13 +84,13 @@ public class ItemParts extends ItemTR {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
// gets Unlocalized Name depending on meta data
|
// gets Unlocalized Name depending on meta data
|
||||||
public String getUnlocalizedName(final ItemStack itemStack) {
|
public String getTranslationKey(final ItemStack itemStack) {
|
||||||
int meta = itemStack.getItemDamage();
|
int meta = itemStack.getItemDamage();
|
||||||
if (meta < 0 || meta >= ItemParts.types.length) {
|
if (meta < 0 || meta >= ItemParts.types.length) {
|
||||||
meta = 0;
|
meta = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.getUnlocalizedName() + "." + ItemParts.types[meta];
|
return super.getTranslationKey() + "." + ItemParts.types[meta];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class ItemPlates extends ItemTR {
|
||||||
};
|
};
|
||||||
|
|
||||||
public ItemPlates() {
|
public ItemPlates() {
|
||||||
setUnlocalizedName("techreborn.plate");
|
setTranslationKey("techreborn.plate");
|
||||||
setHasSubtypes(true);
|
setHasSubtypes(true);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
TRRecipeHandler.hideEntry(this);
|
TRRecipeHandler.hideEntry(this);
|
||||||
|
@ -82,13 +82,13 @@ public class ItemPlates extends ItemTR {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
// gets Unlocalized Name depending on meta data
|
// gets Unlocalized Name depending on meta data
|
||||||
public String getUnlocalizedName(ItemStack itemStack) {
|
public String getTranslationKey(ItemStack itemStack) {
|
||||||
int meta = itemStack.getItemDamage();
|
int meta = itemStack.getItemDamage();
|
||||||
if (meta < 0 || meta >= types.length) {
|
if (meta < 0 || meta >= types.length) {
|
||||||
meta = 0;
|
meta = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.getUnlocalizedName() + "." + types[meta];
|
return super.getTranslationKey() + "." + types[meta];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
|
|
|
@ -41,7 +41,7 @@ import java.util.List;
|
||||||
public class ItemScrapBox extends ItemTR {
|
public class ItemScrapBox extends ItemTR {
|
||||||
|
|
||||||
public ItemScrapBox() {
|
public ItemScrapBox() {
|
||||||
setUnlocalizedName("techreborn.scrapbox");
|
setTranslationKey("techreborn.scrapbox");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,6 @@ public class ItemUUmatter extends ItemTR {
|
||||||
|
|
||||||
public ItemUUmatter() {
|
public ItemUUmatter() {
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setUnlocalizedName("techreborn.uuMatter");
|
setTranslationKey("techreborn.uuMatter");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class ItemUpgrades extends ItemTR implements IUpgrade {
|
||||||
public static final String[] types = new String[] { "overclock", "transformer", "energy_storage"};
|
public static final String[] types = new String[] { "overclock", "transformer", "energy_storage"};
|
||||||
|
|
||||||
public ItemUpgrades() {
|
public ItemUpgrades() {
|
||||||
setUnlocalizedName("techreborn.upgrade");
|
setTranslationKey("techreborn.upgrade");
|
||||||
setHasSubtypes(true);
|
setHasSubtypes(true);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setMaxStackSize(16);
|
setMaxStackSize(16);
|
||||||
|
@ -87,13 +87,13 @@ public class ItemUpgrades extends ItemTR implements IUpgrade {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
// gets Unlocalized Name depending on meta data
|
// gets Unlocalized Name depending on meta data
|
||||||
public String getUnlocalizedName(ItemStack itemStack) {
|
public String getTranslationKey(ItemStack itemStack) {
|
||||||
int meta = itemStack.getItemDamage();
|
int meta = itemStack.getItemDamage();
|
||||||
if (meta < 0 || meta >= types.length) {
|
if (meta < 0 || meta >= types.length) {
|
||||||
meta = 0;
|
meta = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.getUnlocalizedName() + "." + types[meta];
|
return super.getTranslationKey() + "." + types[meta];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class ItemLapotronPack extends ItemArmor implements IEnergyItemInfo {
|
||||||
public ItemLapotronPack() {
|
public ItemLapotronPack() {
|
||||||
super(ItemArmor.ArmorMaterial.DIAMOND, 7, EntityEquipmentSlot.CHEST);
|
super(ItemArmor.ArmorMaterial.DIAMOND, 7, EntityEquipmentSlot.CHEST);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setUnlocalizedName("techreborn.lapotronpack");
|
setTranslationKey("techreborn.lapotronpack");
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class ItemLithiumBatpack extends ItemArmor implements IEnergyItemInfo {
|
||||||
public ItemLithiumBatpack() {
|
public ItemLithiumBatpack() {
|
||||||
super(ItemArmor.ArmorMaterial.DIAMOND, 7, EntityEquipmentSlot.CHEST);
|
super(ItemArmor.ArmorMaterial.DIAMOND, 7, EntityEquipmentSlot.CHEST);
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
setUnlocalizedName("techreborn.lithiumbatpack");
|
setTranslationKey("techreborn.lithiumbatpack");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,13 +46,13 @@ public class ItemTRArmour extends ItemArmor {
|
||||||
super(material, material.getDamageReductionAmount(slot), slot);
|
super(material, material.getDamageReductionAmount(slot), slot);
|
||||||
this.repairOreDict = repairOreDict;
|
this.repairOreDict = repairOreDict;
|
||||||
if (slot == EntityEquipmentSlot.HEAD)
|
if (slot == EntityEquipmentSlot.HEAD)
|
||||||
setUnlocalizedName(material.name().toLowerCase() + "Helmet");
|
setTranslationKey(material.name().toLowerCase() + "Helmet");
|
||||||
if (slot == EntityEquipmentSlot.CHEST)
|
if (slot == EntityEquipmentSlot.CHEST)
|
||||||
setUnlocalizedName(material.name().toLowerCase() + "Chestplate");
|
setTranslationKey(material.name().toLowerCase() + "Chestplate");
|
||||||
if (slot == EntityEquipmentSlot.LEGS)
|
if (slot == EntityEquipmentSlot.LEGS)
|
||||||
setUnlocalizedName(material.name().toLowerCase() + "Leggings");
|
setTranslationKey(material.name().toLowerCase() + "Leggings");
|
||||||
if (slot == EntityEquipmentSlot.FEET)
|
if (slot == EntityEquipmentSlot.FEET)
|
||||||
setUnlocalizedName(material.name().toLowerCase() + "Boots");
|
setTranslationKey(material.name().toLowerCase() + "Boots");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
TRRecipeHandler.hideEntry(this);
|
TRRecipeHandler.hideEntry(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class ItemBattery extends ItemTR implements IEnergyItemInfo {
|
||||||
super();
|
super();
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
setMaxDamage(1);
|
setMaxDamage(1);
|
||||||
setUnlocalizedName("techreborn." + name);
|
setTranslationKey("techreborn." + name);
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.maxEnergy = maxEnergy;
|
this.maxEnergy = maxEnergy;
|
||||||
this.maxTransfer = maxTransfer;
|
this.maxTransfer = maxTransfer;
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class ItemChainsaw extends ItemAxe implements IEnergyItemInfo {
|
||||||
super(material);
|
super(material);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
setUnlocalizedName(unlocalizedName);
|
setTranslationKey(unlocalizedName);
|
||||||
this.maxCharge = energyCapacity;
|
this.maxCharge = energyCapacity;
|
||||||
this.efficiency = unpoweredSpeed;
|
this.efficiency = unpoweredSpeed;
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class ItemCloakingDevice extends ItemTRArmour implements IEnergyItemInfo
|
||||||
|
|
||||||
public ItemCloakingDevice() {
|
public ItemCloakingDevice() {
|
||||||
super(Reference.CLOAKING_ARMOR, EntityEquipmentSlot.CHEST);
|
super(Reference.CLOAKING_ARMOR, EntityEquipmentSlot.CHEST);
|
||||||
setUnlocalizedName("techreborn.cloakingdevice");
|
setTranslationKey("techreborn.cloakingdevice");
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class ItemDebugTool extends ItemTR {
|
||||||
|
|
||||||
public ItemDebugTool() {
|
public ItemDebugTool() {
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setUnlocalizedName("techreborn.debug");
|
setTranslationKey("techreborn.debug");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class ItemDrill extends ItemPickaxe implements IEnergyItemInfo {
|
||||||
this.efficiency = efficiencyOnProperMaterial;
|
this.efficiency = efficiencyOnProperMaterial;
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
setUnlocalizedName(unlocalizedName);
|
setTranslationKey(unlocalizedName);
|
||||||
this.maxCharge = energyCapacity;
|
this.maxCharge = energyCapacity;
|
||||||
this.unpoweredSpeed = unpoweredSpeed;
|
this.unpoweredSpeed = unpoweredSpeed;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class ItemElectricTreetap extends ItemTR implements IEnergyItemInfo {
|
||||||
public int cost = 20;
|
public int cost = 20;
|
||||||
|
|
||||||
public ItemElectricTreetap() {
|
public ItemElectricTreetap() {
|
||||||
setUnlocalizedName("techreborn.electric_treetap");
|
setTranslationKey("techreborn.electric_treetap");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo {
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
setMaxDamage(240);
|
setMaxDamage(240);
|
||||||
setUnlocalizedName(unlocalizedName);
|
setTranslationKey(unlocalizedName);
|
||||||
this.maxCharge = energyCapacity;
|
this.maxCharge = energyCapacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo {
|
||||||
setNoRepair();
|
setNoRepair();
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
setUnlocalizedName("techreborn.nanosaber");
|
setTranslationKey("techreborn.nanosaber");
|
||||||
this.addPropertyOverride(new ResourceLocation("techreborn:active"), new IItemPropertyGetter() {
|
this.addPropertyOverride(new ResourceLocation("techreborn:active"), new IItemPropertyGetter() {
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo {
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
setMaxDamage(200);
|
setMaxDamage(200);
|
||||||
setUnlocalizedName("techreborn.omniTool");
|
setTranslationKey("techreborn.omniTool");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ItemPickaxe
|
// ItemPickaxe
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo {
|
||||||
|
|
||||||
public ItemRockCutter() {
|
public ItemRockCutter() {
|
||||||
super(ToolMaterial.DIAMOND);
|
super(ToolMaterial.DIAMOND);
|
||||||
setUnlocalizedName("techreborn.rockcutter");
|
setTranslationKey("techreborn.rockcutter");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
efficiency = 16F;
|
efficiency = 16F;
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class ItemTRAxe extends ItemAxe {
|
||||||
public ItemTRAxe(ToolMaterial material, String repairOreDict) {
|
public ItemTRAxe(ToolMaterial material, String repairOreDict) {
|
||||||
super(material, material.getAttackDamage() + 5.75F, (material.getAttackDamage() + 6.75F) * -0.344444F);
|
super(material, material.getAttackDamage() + 5.75F, (material.getAttackDamage() + 6.75F) * -0.344444F);
|
||||||
this.repairOreDict = repairOreDict;
|
this.repairOreDict = repairOreDict;
|
||||||
setUnlocalizedName(material.name().toLowerCase() + "Axe");
|
setTranslationKey(material.name().toLowerCase() + "Axe");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
TRRecipeHandler.hideEntry(this);
|
TRRecipeHandler.hideEntry(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class ItemTRHoe extends ItemHoe {
|
||||||
public ItemTRHoe(ToolMaterial material, String repairOreDict) {
|
public ItemTRHoe(ToolMaterial material, String repairOreDict) {
|
||||||
super(material);
|
super(material);
|
||||||
this.repairOreDict = repairOreDict;
|
this.repairOreDict = repairOreDict;
|
||||||
setUnlocalizedName(material.name().toLowerCase() + "Hoe");
|
setTranslationKey(material.name().toLowerCase() + "Hoe");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
TRRecipeHandler.hideEntry(this);
|
TRRecipeHandler.hideEntry(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class ItemTRPickaxe extends ItemPickaxe {
|
||||||
public ItemTRPickaxe(ToolMaterial material, String repairOreDict) {
|
public ItemTRPickaxe(ToolMaterial material, String repairOreDict) {
|
||||||
super(material);
|
super(material);
|
||||||
this.repairOreDict = repairOreDict;
|
this.repairOreDict = repairOreDict;
|
||||||
setUnlocalizedName(material.name().toLowerCase() + "Pickaxe");
|
setTranslationKey(material.name().toLowerCase() + "Pickaxe");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
TRRecipeHandler.hideEntry(this);
|
TRRecipeHandler.hideEntry(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class ItemTRSpade extends ItemSpade {
|
||||||
public ItemTRSpade(ToolMaterial material, String repairOreDict) {
|
public ItemTRSpade(ToolMaterial material, String repairOreDict) {
|
||||||
super(material);
|
super(material);
|
||||||
this.repairOreDict = repairOreDict;
|
this.repairOreDict = repairOreDict;
|
||||||
setUnlocalizedName(material.name().toLowerCase() + "Spade");
|
setTranslationKey(material.name().toLowerCase() + "Spade");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
TRRecipeHandler.hideEntry(this);
|
TRRecipeHandler.hideEntry(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class ItemTRSword extends ItemSword {
|
||||||
public ItemTRSword(ToolMaterial material, String repairOreDict) {
|
public ItemTRSword(ToolMaterial material, String repairOreDict) {
|
||||||
super(material);
|
super(material);
|
||||||
this.repairOreDict = repairOreDict;
|
this.repairOreDict = repairOreDict;
|
||||||
setUnlocalizedName(material.name().toLowerCase() + "Sword");
|
setTranslationKey(material.name().toLowerCase() + "Sword");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
TRRecipeHandler.hideEntry(this);
|
TRRecipeHandler.hideEntry(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class ItemTechManual extends ItemTR {
|
||||||
|
|
||||||
public ItemTechManual() {
|
public ItemTechManual() {
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
this.setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
this.setUnlocalizedName("techreborn.manual");
|
this.setTranslationKey("techreborn.manual");
|
||||||
this.setMaxStackSize(1);
|
this.setMaxStackSize(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class ItemTreeTap extends ItemTR {
|
||||||
public ItemTreeTap() {
|
public ItemTreeTap() {
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
setMaxDamage(20);
|
setMaxDamage(20);
|
||||||
setUnlocalizedName("techreborn.treetap");
|
setTranslationKey("techreborn.treetap");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class ItemWrench extends ItemTR implements IToolHandler {
|
||||||
|
|
||||||
public ItemWrench() {
|
public ItemWrench() {
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setUnlocalizedName("techreborn.wrench");
|
setTranslationKey("techreborn.wrench");
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -325,7 +325,7 @@ public class MultiBlockCasing extends RectangularMultiblockControllerBase {
|
||||||
|
|
||||||
if (block.isAir(world.getBlockState(new BlockPos(x, y, z)), world, new BlockPos(x, y, z))) {
|
if (block.isAir(world.getBlockState(new BlockPos(x, y, z)), world, new BlockPos(x, y, z))) {
|
||||||
|
|
||||||
} else if (block.getUnlocalizedName().equals("tile.lava")) {
|
} else if (block.getTranslationKey().equals("tile.lava")) {
|
||||||
hasLava = true;
|
hasLava = true;
|
||||||
} else {
|
} else {
|
||||||
super.isBlockGoodForInterior(world, x, y, z);
|
super.isBlockGoodForInterior(world, x, y, z);
|
||||||
|
|
|
@ -42,10 +42,10 @@ public class TileLSUStorage extends TileLegacyMachineBase
|
||||||
network = new LesuNetwork();
|
network = new LesuNetwork();
|
||||||
network.addElement(this);
|
network.addElement(this);
|
||||||
for (EnumFacing direction : EnumFacing.values()) {
|
for (EnumFacing direction : EnumFacing.values()) {
|
||||||
if (world.getTileEntity(new BlockPos(x + direction.getFrontOffsetX(), y + direction.getFrontOffsetY(),
|
if (world.getTileEntity(new BlockPos(x + direction.getXOffset(), y + direction.getYOffset(),
|
||||||
z + direction.getFrontOffsetZ())) instanceof TileLSUStorage) {
|
z + direction.getZOffset())) instanceof TileLSUStorage) {
|
||||||
TileLSUStorage lesu = (TileLSUStorage) world.getTileEntity(new BlockPos(x + direction.getFrontOffsetX(),
|
TileLSUStorage lesu = (TileLSUStorage) world.getTileEntity(new BlockPos(x + direction.getXOffset(),
|
||||||
y + direction.getFrontOffsetY(), z + direction.getFrontOffsetZ()));
|
y + direction.getYOffset(), z + direction.getZOffset()));
|
||||||
if (lesu.network != null) {
|
if (lesu.network != null) {
|
||||||
lesu.network.merge(network);
|
lesu.network.merge(network);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,8 +72,8 @@ public class TileLapotronicSU extends TileEnergyStorage implements IContainerPro
|
||||||
countedNetworks.clear();
|
countedNetworks.clear();
|
||||||
connectedBlocks = 0;
|
connectedBlocks = 0;
|
||||||
for (EnumFacing dir : EnumFacing.values()) {
|
for (EnumFacing dir : EnumFacing.values()) {
|
||||||
BlockPos adjucentBlockPos = new BlockPos(pos.getX() + dir.getFrontOffsetX(),
|
BlockPos adjucentBlockPos = new BlockPos(pos.getX() + dir.getXOffset(),
|
||||||
pos.getY() + dir.getFrontOffsetY(), pos.getZ() + dir.getFrontOffsetZ());
|
pos.getY() + dir.getXOffset(), pos.getZ() + dir.getXOffset());
|
||||||
TileEntity adjucentTile = world.getTileEntity(adjucentBlockPos);
|
TileEntity adjucentTile = world.getTileEntity(adjucentBlockPos);
|
||||||
if (adjucentTile == null || !(adjucentTile instanceof TileLSUStorage)) {
|
if (adjucentTile == null || !(adjucentTile instanceof TileLSUStorage)) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -95,8 +95,8 @@ public class TileIndustrialBlastFurnace extends TileGenericMachine implements IC
|
||||||
heat += casing1.getHeatFromState(world.getBlockState(part.getPos()));
|
heat += casing1.getHeatFromState(world.getBlockState(part.getPos()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (world.getBlockState(location.offset(EnumFacing.UP, 1)).getBlock().getUnlocalizedName().equals("tile.lava")
|
if (world.getBlockState(location.offset(EnumFacing.UP, 1)).getBlock().getTranslationKey().equals("tile.lava")
|
||||||
&& world.getBlockState(location.offset(EnumFacing.UP, 2)).getBlock().getUnlocalizedName().equals("tile.lava")) {
|
&& world.getBlockState(location.offset(EnumFacing.UP, 2)).getBlock().getTranslationKey().equals("tile.lava")) {
|
||||||
heat += 500;
|
heat += 500;
|
||||||
}
|
}
|
||||||
return heat;
|
return heat;
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class TechRebornCreativeTab extends CreativeTabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getTabIconItem() {
|
public ItemStack createIcon() {
|
||||||
return ItemParts.getPartByName("machine_parts");
|
return ItemParts.getPartByName("machine_parts");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,7 @@ public class RubberTreeGenerator extends WorldGenerator {
|
||||||
boolean isAddingSap = false;
|
boolean isAddingSap = false;
|
||||||
if (rand.nextInt(Core.worldGen.config.rubberTreeConfig.sapRarity) == 0) {
|
if (rand.nextInt(Core.worldGen.config.rubberTreeConfig.sapRarity) == 0) {
|
||||||
newState = newState.withProperty(BlockRubberLog.HAS_SAP, true)
|
newState = newState.withProperty(BlockRubberLog.HAS_SAP, true)
|
||||||
.withProperty(BlockRubberLog.SAP_SIDE, EnumFacing.getHorizontal(rand.nextInt(4)));
|
.withProperty(BlockRubberLog.SAP_SIDE, EnumFacing.byHorizontalIndex(rand.nextInt(4)));
|
||||||
isAddingSap = true;
|
isAddingSap = true;
|
||||||
}
|
}
|
||||||
if (isAddingSap) {
|
if (isAddingSap) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class OreConfig {
|
||||||
public OreConfig(IBlockState blockSate, int veinSize, int veinsPerChunk, int minYHeight, int maxYHeight) {
|
public OreConfig(IBlockState blockSate, int veinSize, int veinsPerChunk, int minYHeight, int maxYHeight) {
|
||||||
this.meta = blockSate.getBlock().getMetaFromState(blockSate);
|
this.meta = blockSate.getBlock().getMetaFromState(blockSate);
|
||||||
this.state = blockSate;
|
this.state = blockSate;
|
||||||
this.blockName = blockSate.getBlock().getUnlocalizedName();
|
this.blockName = blockSate.getBlock().getTranslationKey();
|
||||||
if (blockSate.getBlock() instanceof IOreNameProvider) {
|
if (blockSate.getBlock() instanceof IOreNameProvider) {
|
||||||
this.blockNiceName = ((IOreNameProvider) blockSate.getBlock()).getUserLoclisedName(blockSate);
|
this.blockNiceName = ((IOreNameProvider) blockSate.getBlock()).getUserLoclisedName(blockSate);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue