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

@ -61,7 +61,7 @@ public class DynamicCell extends Item {
public DynamicCell() {
super();
setCreativeTab(TechRebornCreativeTab.instance);
setUnlocalizedName("techreborn.cell");
setTranslationKey("techreborn.cell");
setMaxStackSize(64);
TRRecipeHandler.hideEntry(this);
}

View file

@ -37,7 +37,7 @@ import techreborn.utils.TechRebornCreativeTab;
public class ItemDestructopack extends ItemTR {
public ItemDestructopack() {
this.setUnlocalizedName("techreborn.destructopack");
this.setTranslationKey("techreborn.destructopack");
this.setCreativeTab(TechRebornCreativeTab.instance);
}

View file

@ -46,7 +46,7 @@ public class ItemDusts extends ItemTR {
ModItems.META_PLACEHOLDER, "andesite", "diorite", "granite" };
public ItemDusts() {
setUnlocalizedName("techreborn.dust");
setTranslationKey("techreborn.dust");
setHasSubtypes(true);
setCreativeTab(TechRebornCreativeTab.instance);
TRRecipeHandler.hideEntry(this);
@ -91,13 +91,13 @@ public class ItemDusts extends ItemTR {
@Override
// gets Unlocalized Name depending on meta data
public String getUnlocalizedName(ItemStack itemStack) {
public String getTranslationKey(ItemStack itemStack) {
int meta = itemStack.getItemDamage();
if (meta < 0 || meta >= types.length) {
meta = 0;
}
return super.getUnlocalizedName() + "." + types[meta];
return super.getTranslationKey() + "." + types[meta];
}
// Adds Dusts SubItems To Creative Tab

View file

@ -46,7 +46,7 @@ public class ItemDustsSmall extends ItemTR {
ModItems.META_PLACEHOLDER, "redstone", "glowstone", "andesite", "diorite", "granite" };
public ItemDustsSmall() {
setUnlocalizedName("techreborn.dustsmall");
setTranslationKey("techreborn.dustsmall");
setHasSubtypes(true);
setCreativeTab(TechRebornCreativeTab.instance);
TRRecipeHandler.hideEntry(this);
@ -71,13 +71,13 @@ public class ItemDustsSmall extends ItemTR {
@Override
// gets Unlocalized Name depending on meta data
public String getUnlocalizedName(ItemStack itemStack) {
public String getTranslationKey(ItemStack itemStack) {
int meta = itemStack.getItemDamage();
if (meta < 0 || meta >= types.length) {
meta = 0;
}
return super.getUnlocalizedName() + "." + types[meta];
return super.getTranslationKey() + "." + types[meta];
}
// Adds Dusts SubItems To Creative Tab

View file

@ -51,7 +51,7 @@ import java.util.List;
public class ItemFrequencyTransmitter extends ItemTR {
public ItemFrequencyTransmitter() {
setUnlocalizedName("techreborn.frequencyTransmitter");
setTranslationKey("techreborn.frequencyTransmitter");
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
this.addPropertyOverride(new ResourceLocation("techreborn:coords"), new IItemPropertyGetter() {

View file

@ -40,7 +40,7 @@ public class ItemGems extends ItemTR {
public ItemGems() {
setCreativeTab(TechRebornCreativeTab.instance);
setUnlocalizedName("techreborn.gem");
setTranslationKey("techreborn.gem");
setHasSubtypes(true);
TRRecipeHandler.hideEntry(this);
}
@ -61,13 +61,13 @@ public class ItemGems extends ItemTR {
@Override
// gets Unlocalized Name depending on meta data
public String getUnlocalizedName(ItemStack itemStack) {
public String getTranslationKey(ItemStack itemStack) {
int meta = itemStack.getItemDamage();
if (meta < 0 || meta >= types.length) {
meta = 0;
}
return super.getUnlocalizedName() + "." + types[meta];
return super.getTranslationKey() + "." + types[meta];
}
// Adds Dusts SubItems To Creative Tab

View file

@ -44,7 +44,7 @@ public class ItemIngots extends ItemTR {
public ItemIngots() {
setCreativeTab(TechRebornCreativeTab.instance);
setHasSubtypes(true);
setUnlocalizedName("techreborn.ingot");
setTranslationKey("techreborn.ingot");
TRRecipeHandler.hideEntry(this);
}
@ -70,13 +70,13 @@ public class ItemIngots extends ItemTR {
@Override
// gets Unlocalized Name depending on meta data
public String getUnlocalizedName(ItemStack itemStack) {
public String getTranslationKey(ItemStack itemStack) {
int meta = itemStack.getItemDamage();
if (meta < 0 || meta >= types.length) {
meta = 0;
}
return super.getUnlocalizedName() + "." + types[meta];
return super.getTranslationKey() + "." + types[meta];
}
// Adds Dusts SubItems To Creative Tab

View file

@ -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);
}
}

View file

@ -44,7 +44,7 @@ public class ItemNuggets extends ItemTR {
public ItemNuggets() {
setCreativeTab(TechRebornCreativeTab.instance);
setHasSubtypes(true);
setUnlocalizedName("techreborn.nuggets");
setTranslationKey("techreborn.nuggets");
TRRecipeHandler.hideEntry(this);
}
@ -64,13 +64,13 @@ public class ItemNuggets extends ItemTR {
@Override
// gets Unlocalized Name depending on meta data
public String getUnlocalizedName(ItemStack itemStack) {
public String getTranslationKey(ItemStack itemStack) {
int meta = itemStack.getItemDamage();
if (meta < 0 || meta >= types.length) {
meta = 0;
}
return super.getUnlocalizedName() + "." + types[meta];
return super.getTranslationKey() + "." + types[meta];
}
// Adds Dusts SubItems To Creative Tab

View file

@ -50,7 +50,7 @@ public class ItemParts extends ItemTR {
public ItemParts() {
this.setCreativeTab(TechRebornCreativeTab.instance);
this.setHasSubtypes(true);
this.setUnlocalizedName("techreborn.part");
this.setTranslationKey("techreborn.part");
}
public static ItemStack getPartByName(String name, final int count) {
@ -84,13 +84,13 @@ public class ItemParts extends ItemTR {
@Override
// gets Unlocalized Name depending on meta data
public String getUnlocalizedName(final ItemStack itemStack) {
public String getTranslationKey(final ItemStack itemStack) {
int meta = itemStack.getItemDamage();
if (meta < 0 || meta >= ItemParts.types.length) {
meta = 0;
}
return super.getUnlocalizedName() + "." + ItemParts.types[meta];
return super.getTranslationKey() + "." + ItemParts.types[meta];
}
// Adds Dusts SubItems To Creative Tab

View file

@ -43,7 +43,7 @@ public class ItemPlates extends ItemTR {
};
public ItemPlates() {
setUnlocalizedName("techreborn.plate");
setTranslationKey("techreborn.plate");
setHasSubtypes(true);
setCreativeTab(TechRebornCreativeTab.instance);
TRRecipeHandler.hideEntry(this);
@ -82,13 +82,13 @@ public class ItemPlates extends ItemTR {
@Override
// gets Unlocalized Name depending on meta data
public String getUnlocalizedName(ItemStack itemStack) {
public String getTranslationKey(ItemStack itemStack) {
int meta = itemStack.getItemDamage();
if (meta < 0 || meta >= types.length) {
meta = 0;
}
return super.getUnlocalizedName() + "." + types[meta];
return super.getTranslationKey() + "." + types[meta];
}
// Adds Dusts SubItems To Creative Tab

View file

@ -41,7 +41,7 @@ import java.util.List;
public class ItemScrapBox extends ItemTR {
public ItemScrapBox() {
setUnlocalizedName("techreborn.scrapbox");
setTranslationKey("techreborn.scrapbox");
setCreativeTab(TechRebornCreativeTab.instance);
}

View file

@ -30,6 +30,6 @@ public class ItemUUmatter extends ItemTR {
public ItemUUmatter() {
setCreativeTab(TechRebornCreativeTab.instance);
setUnlocalizedName("techreborn.uuMatter");
setTranslationKey("techreborn.uuMatter");
}
}

View file

@ -66,7 +66,7 @@ public class ItemUpgrades extends ItemTR implements IUpgrade {
public static final String[] types = new String[] { "overclock", "transformer", "energy_storage"};
public ItemUpgrades() {
setUnlocalizedName("techreborn.upgrade");
setTranslationKey("techreborn.upgrade");
setHasSubtypes(true);
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(16);
@ -87,13 +87,13 @@ public class ItemUpgrades extends ItemTR implements IUpgrade {
@Override
// gets Unlocalized Name depending on meta data
public String getUnlocalizedName(ItemStack itemStack) {
public String getTranslationKey(ItemStack itemStack) {
int meta = itemStack.getItemDamage();
if (meta < 0 || meta >= types.length) {
meta = 0;
}
return super.getUnlocalizedName() + "." + types[meta];
return super.getTranslationKey() + "." + types[meta];
}
// Adds Dusts SubItems To Creative Tab

View file

@ -55,7 +55,7 @@ public class ItemLapotronPack extends ItemArmor implements IEnergyItemInfo {
public ItemLapotronPack() {
super(ItemArmor.ArmorMaterial.DIAMOND, 7, EntityEquipmentSlot.CHEST);
setCreativeTab(TechRebornCreativeTab.instance);
setUnlocalizedName("techreborn.lapotronpack");
setTranslationKey("techreborn.lapotronpack");
setMaxStackSize(1);
}

View file

@ -57,7 +57,7 @@ public class ItemLithiumBatpack extends ItemArmor implements IEnergyItemInfo {
public ItemLithiumBatpack() {
super(ItemArmor.ArmorMaterial.DIAMOND, 7, EntityEquipmentSlot.CHEST);
setMaxStackSize(1);
setUnlocalizedName("techreborn.lithiumbatpack");
setTranslationKey("techreborn.lithiumbatpack");
setCreativeTab(TechRebornCreativeTab.instance);
}

View file

@ -46,13 +46,13 @@ public class ItemTRArmour extends ItemArmor {
super(material, material.getDamageReductionAmount(slot), slot);
this.repairOreDict = repairOreDict;
if (slot == EntityEquipmentSlot.HEAD)
setUnlocalizedName(material.name().toLowerCase() + "Helmet");
setTranslationKey(material.name().toLowerCase() + "Helmet");
if (slot == EntityEquipmentSlot.CHEST)
setUnlocalizedName(material.name().toLowerCase() + "Chestplate");
setTranslationKey(material.name().toLowerCase() + "Chestplate");
if (slot == EntityEquipmentSlot.LEGS)
setUnlocalizedName(material.name().toLowerCase() + "Leggings");
setTranslationKey(material.name().toLowerCase() + "Leggings");
if (slot == EntityEquipmentSlot.FEET)
setUnlocalizedName(material.name().toLowerCase() + "Boots");
setTranslationKey(material.name().toLowerCase() + "Boots");
setCreativeTab(TechRebornCreativeTab.instance);
TRRecipeHandler.hideEntry(this);
}

View file

@ -52,7 +52,7 @@ public class ItemBattery extends ItemTR implements IEnergyItemInfo {
super();
setMaxStackSize(1);
setMaxDamage(1);
setUnlocalizedName("techreborn." + name);
setTranslationKey("techreborn." + name);
this.name = name;
this.maxEnergy = maxEnergy;
this.maxTransfer = maxTransfer;

View file

@ -63,7 +63,7 @@ public class ItemChainsaw extends ItemAxe implements IEnergyItemInfo {
super(material);
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
setUnlocalizedName(unlocalizedName);
setTranslationKey(unlocalizedName);
this.maxCharge = energyCapacity;
this.efficiency = unpoweredSpeed;

View file

@ -65,7 +65,7 @@ public class ItemCloakingDevice extends ItemTRArmour implements IEnergyItemInfo
public ItemCloakingDevice() {
super(Reference.CLOAKING_ARMOR, EntityEquipmentSlot.CHEST);
setUnlocalizedName("techreborn.cloakingdevice");
setTranslationKey("techreborn.cloakingdevice");
setMaxStackSize(1);
setCreativeTab(TechRebornCreativeTab.instance);
}

View file

@ -46,7 +46,7 @@ public class ItemDebugTool extends ItemTR {
public ItemDebugTool() {
setCreativeTab(TechRebornCreativeTab.instance);
setUnlocalizedName("techreborn.debug");
setTranslationKey("techreborn.debug");
}
@Override

View file

@ -57,7 +57,7 @@ public class ItemDrill extends ItemPickaxe implements IEnergyItemInfo {
this.efficiency = efficiencyOnProperMaterial;
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
setUnlocalizedName(unlocalizedName);
setTranslationKey(unlocalizedName);
this.maxCharge = energyCapacity;
this.unpoweredSpeed = unpoweredSpeed;
}

View file

@ -50,7 +50,7 @@ public class ItemElectricTreetap extends ItemTR implements IEnergyItemInfo {
public int cost = 20;
public ItemElectricTreetap() {
setUnlocalizedName("techreborn.electric_treetap");
setTranslationKey("techreborn.electric_treetap");
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
}

View file

@ -59,7 +59,7 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo {
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
setMaxDamage(240);
setUnlocalizedName(unlocalizedName);
setTranslationKey(unlocalizedName);
this.maxCharge = energyCapacity;
}

View file

@ -70,7 +70,7 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo {
setNoRepair();
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
setUnlocalizedName("techreborn.nanosaber");
setTranslationKey("techreborn.nanosaber");
this.addPropertyOverride(new ResourceLocation("techreborn:active"), new IItemPropertyGetter() {
@Override
@SideOnly(Side.CLIENT)

View file

@ -66,7 +66,7 @@ public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo {
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
setMaxDamage(200);
setUnlocalizedName("techreborn.omniTool");
setTranslationKey("techreborn.omniTool");
}
// ItemPickaxe

View file

@ -59,7 +59,7 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo {
public ItemRockCutter() {
super(ToolMaterial.DIAMOND);
setUnlocalizedName("techreborn.rockcutter");
setTranslationKey("techreborn.rockcutter");
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
efficiency = 16F;

View file

@ -41,7 +41,7 @@ public class ItemTRAxe extends ItemAxe {
public ItemTRAxe(ToolMaterial material, String repairOreDict) {
super(material, material.getAttackDamage() + 5.75F, (material.getAttackDamage() + 6.75F) * -0.344444F);
this.repairOreDict = repairOreDict;
setUnlocalizedName(material.name().toLowerCase() + "Axe");
setTranslationKey(material.name().toLowerCase() + "Axe");
setCreativeTab(TechRebornCreativeTab.instance);
TRRecipeHandler.hideEntry(this);
}

View file

@ -43,7 +43,7 @@ public class ItemTRHoe extends ItemHoe {
public ItemTRHoe(ToolMaterial material, String repairOreDict) {
super(material);
this.repairOreDict = repairOreDict;
setUnlocalizedName(material.name().toLowerCase() + "Hoe");
setTranslationKey(material.name().toLowerCase() + "Hoe");
setCreativeTab(TechRebornCreativeTab.instance);
TRRecipeHandler.hideEntry(this);
}

View file

@ -41,7 +41,7 @@ public class ItemTRPickaxe extends ItemPickaxe {
public ItemTRPickaxe(ToolMaterial material, String repairOreDict) {
super(material);
this.repairOreDict = repairOreDict;
setUnlocalizedName(material.name().toLowerCase() + "Pickaxe");
setTranslationKey(material.name().toLowerCase() + "Pickaxe");
setCreativeTab(TechRebornCreativeTab.instance);
TRRecipeHandler.hideEntry(this);
}

View file

@ -41,7 +41,7 @@ public class ItemTRSpade extends ItemSpade {
public ItemTRSpade(ToolMaterial material, String repairOreDict) {
super(material);
this.repairOreDict = repairOreDict;
setUnlocalizedName(material.name().toLowerCase() + "Spade");
setTranslationKey(material.name().toLowerCase() + "Spade");
setCreativeTab(TechRebornCreativeTab.instance);
TRRecipeHandler.hideEntry(this);
}

View file

@ -41,7 +41,7 @@ public class ItemTRSword extends ItemSword {
public ItemTRSword(ToolMaterial material, String repairOreDict) {
super(material);
this.repairOreDict = repairOreDict;
setUnlocalizedName(material.name().toLowerCase() + "Sword");
setTranslationKey(material.name().toLowerCase() + "Sword");
setCreativeTab(TechRebornCreativeTab.instance);
TRRecipeHandler.hideEntry(this);
}

View file

@ -39,7 +39,7 @@ public class ItemTechManual extends ItemTR {
public ItemTechManual() {
this.setCreativeTab(TechRebornCreativeTab.instance);
this.setUnlocalizedName("techreborn.manual");
this.setTranslationKey("techreborn.manual");
this.setMaxStackSize(1);
}

View file

@ -33,7 +33,7 @@ public class ItemTreeTap extends ItemTR {
public ItemTreeTap() {
setMaxStackSize(1);
setMaxDamage(20);
setUnlocalizedName("techreborn.treetap");
setTranslationKey("techreborn.treetap");
setCreativeTab(TechRebornCreativeTab.instance);
}

View file

@ -44,7 +44,7 @@ public class ItemWrench extends ItemTR implements IToolHandler {
public ItemWrench() {
setCreativeTab(TechRebornCreativeTab.instance);
setUnlocalizedName("techreborn.wrench");
setTranslationKey("techreborn.wrench");
setMaxStackSize(1);
}