Bronze armor and tools

This commit is contained in:
drcrazy 2019-03-17 23:47:21 +03:00
parent f4ef5cc2d4
commit dd6a06409e
25 changed files with 83 additions and 19 deletions

View file

@ -71,6 +71,7 @@ import techreborn.items.tool.basic.ItemElectricTreetap;
import techreborn.items.tool.industrial.*;
import techreborn.items.tool.vanilla.ItemTRAxe;
import techreborn.items.tool.vanilla.ItemTRHoe;
import techreborn.items.tool.vanilla.ItemTRPickaxe;
import techreborn.items.tool.vanilla.ItemTRSpade;
import techreborn.items.tool.vanilla.ItemTRSword;
import techreborn.utils.InitUtils;
@ -129,7 +130,7 @@ public class RegistryEventHandler {
if (ConfigTechReborn.enableGemArmorAndTools) {
//Todo: repair with tags
RebornRegistry.registerItem(TRContent.BRONZE_SWORD = InitUtils.setup(new ItemTRSword(TRToolTier.BRONZE, "ingotBronze"), "bronze_sword"));
RebornRegistry.registerItem(TRContent.BRONZE_PICKAXE = InitUtils.setup(new ItemTRSword(TRToolTier.BRONZE, "ingotBronze"), "bronze_pickaxe"));
RebornRegistry.registerItem(TRContent.BRONZE_PICKAXE = InitUtils.setup(new ItemTRPickaxe(TRToolTier.BRONZE, "ingotBronze"), "bronze_pickaxe"));
RebornRegistry.registerItem(TRContent.BRONZE_SPADE = InitUtils.setup(new ItemTRSpade(TRToolTier.BRONZE, "ingotBronze"), "bronze_spade"));
RebornRegistry.registerItem(TRContent.BRONZE_AXE = InitUtils.setup(new ItemTRAxe(TRToolTier.BRONZE, "ingotBronze"), "bronze_axe"));
RebornRegistry.registerItem(TRContent.BRONZE_HOE = InitUtils.setup(new ItemTRHoe(TRToolTier.BRONZE, "ingotBronze"), "bronze_hoe"));
@ -140,7 +141,7 @@ public class RegistryEventHandler {
RebornRegistry.registerItem(TRContent.BRONZE_BOOTS = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.BRONZE, EntityEquipmentSlot.FEET, "ingotBronze"), "bronze_boots"));
RebornRegistry.registerItem(TRContent.RUBY_SWORD = InitUtils.setup(new ItemTRSword(TRToolTier.RUBY, "gemRuby"), "ruby_sword"));
RebornRegistry.registerItem(TRContent.RUBY_PICKAXE = InitUtils.setup(new ItemTRSword(TRToolTier.RUBY, "gemRuby"), "ruby_pickaxe"));
RebornRegistry.registerItem(TRContent.RUBY_PICKAXE = InitUtils.setup(new ItemTRPickaxe(TRToolTier.RUBY, "gemRuby"), "ruby_pickaxe"));
RebornRegistry.registerItem(TRContent.RUBY_SPADE = InitUtils.setup(new ItemTRSpade(TRToolTier.RUBY, "gemRuby"), "ruby_spade"));
RebornRegistry.registerItem(TRContent.RUBY_AXE = InitUtils.setup(new ItemTRAxe(TRToolTier.RUBY, "gemRuby"), "ruby_axe"));
RebornRegistry.registerItem(TRContent.RUBY_HOE = InitUtils.setup(new ItemTRHoe(TRToolTier.RUBY, "gemRuby"), "ruby_hoe"));
@ -151,7 +152,7 @@ public class RegistryEventHandler {
RebornRegistry.registerItem(TRContent.RUBY_BOOTS = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.RUBY, EntityEquipmentSlot.FEET, "gemRuby"), "ruby_boots"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_SWORD = InitUtils.setup(new ItemTRSword(TRToolTier.SAPPHIRE, "gemSapphire"), "sapphire_sword"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_PICKAXE = InitUtils.setup(new ItemTRSword(TRToolTier.SAPPHIRE, "gemSapphire"), "sapphire_pickaxe"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_PICKAXE = InitUtils.setup(new ItemTRPickaxe(TRToolTier.SAPPHIRE, "gemSapphire"), "sapphire_pickaxe"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_SPADE = InitUtils.setup(new ItemTRSpade(TRToolTier.SAPPHIRE, "gemSapphire"), "sapphire_spade"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_AXE = InitUtils.setup(new ItemTRAxe(TRToolTier.SAPPHIRE, "gemSapphire"), "sapphire_axe"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_HOE = InitUtils.setup(new ItemTRHoe(TRToolTier.SAPPHIRE, "gemSapphire"), "sapphire_hoe"));
@ -162,7 +163,7 @@ public class RegistryEventHandler {
RebornRegistry.registerItem(TRContent.SAPPHIRE_BOOTS = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.SAPPHIRE, EntityEquipmentSlot.FEET, "gemSapphire"), "sapphire_boots"));
RebornRegistry.registerItem(TRContent.PERIDOT_SWORD = InitUtils.setup(new ItemTRSword(TRToolTier.PERIDOT, "gemPeridot"), "peridot_sword"));
RebornRegistry.registerItem(TRContent.PERIDOT_PICKAXE = InitUtils.setup(new ItemTRSword(TRToolTier.PERIDOT, "gemPeridot"), "peridot_pickaxe"));
RebornRegistry.registerItem(TRContent.PERIDOT_PICKAXE = InitUtils.setup(new ItemTRPickaxe(TRToolTier.PERIDOT, "gemPeridot"), "peridot_pickaxe"));
RebornRegistry.registerItem(TRContent.PERIDOT_SPADE = InitUtils.setup(new ItemTRSpade(TRToolTier.PERIDOT, "gemPeridot"), "peridot_spade"));
RebornRegistry.registerItem(TRContent.PERIDOT_AXE = InitUtils.setup(new ItemTRAxe(TRToolTier.PERIDOT, "gemPeridot"), "peridot_axe"));
RebornRegistry.registerItem(TRContent.PERIDOT_HOE = InitUtils.setup(new ItemTRHoe(TRToolTier.PERIDOT, "gemPeridot"), "peridot_hoe"));

View file

@ -32,6 +32,7 @@ import net.minecraft.item.IArmorMaterial;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.LazyLoadBase;
import net.minecraft.util.SoundEvent;
import techreborn.TechReborn;
public enum TRArmorMaterial implements IArmorMaterial {
@ -98,7 +99,7 @@ public enum TRArmorMaterial implements IArmorMaterial {
@Override
public String getName() {
return null;
return TechReborn.MOD_ID + ":" + this.toString().toLowerCase();
}
@Override

View file

@ -44,6 +44,7 @@ import reborncore.common.powerSystem.PowerSystem;
import reborncore.common.powerSystem.PoweredItemContainerProvider;
import reborncore.common.powerSystem.forge.ForgePowerItemManager;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
import javax.annotation.Nullable;
import java.util.Random;
@ -58,7 +59,7 @@ public class ItemChainsaw extends ItemAxe implements IEnergyItemInfo {
public boolean isBreaking = false;
public ItemChainsaw(ItemTier material, int energyCapacity, float unpoweredSpeed) {
super(material, (int) material.getAttackDamage(), unpoweredSpeed, new Item.Properties().maxStackSize(1));
super(material, (int) material.getAttackDamage(), unpoweredSpeed, new Item.Properties().group(TechReborn.ITEMGROUP).maxStackSize(1));
this.maxCharge = energyCapacity;
this.efficiency = unpoweredSpeed;

View file

@ -43,6 +43,7 @@ import reborncore.common.powerSystem.PowerSystem;
import reborncore.common.powerSystem.PoweredItemContainerProvider;
import reborncore.common.powerSystem.forge.ForgePowerItemManager;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
import javax.annotation.Nullable;
import java.util.Random;
@ -55,7 +56,7 @@ public class ItemDrill extends ItemPickaxe implements IEnergyItemInfo {
public int transferLimit = 100;
public ItemDrill(IItemTier material, int energyCapacity, float unpoweredSpeed, float efficiencyOnProperMaterial) {
super(material, (int) material.getAttackDamage(), unpoweredSpeed, new Item.Properties().maxStackSize(1));
super(material, (int) material.getAttackDamage(), unpoweredSpeed, new Item.Properties().group(TechReborn.ITEMGROUP).maxStackSize(1));
this.efficiency = efficiencyOnProperMaterial;
this.maxCharge = energyCapacity;
this.unpoweredSpeed = unpoweredSpeed;

View file

@ -44,6 +44,7 @@ import reborncore.common.powerSystem.PowerSystem;
import reborncore.common.powerSystem.PoweredItemContainerProvider;
import reborncore.common.powerSystem.forge.ForgePowerItemManager;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
import techreborn.utils.TagUtils;
import javax.annotation.Nullable;
@ -56,7 +57,7 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo {
public int transferLimit = 100;
public ItemJackhammer(ItemTier material, int energyCapacity) {
super(material, (int) material.getAttackDamage(), 1f, new Item.Properties().maxStackSize(1));
super(material, (int) material.getAttackDamage(), 1f, new Item.Properties().group(TechReborn.ITEMGROUP).maxStackSize(1));
efficiency = 20F;
this.maxCharge = energyCapacity;
}

View file

@ -45,6 +45,7 @@ import reborncore.common.powerSystem.PowerSystem;
import reborncore.common.powerSystem.PoweredItemContainerProvider;
import reborncore.common.powerSystem.forge.ForgePowerItemManager;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
import techreborn.config.ConfigTechReborn;
import techreborn.init.TRContent;
@ -59,7 +60,7 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo {
// 400k FE with 1k FE\t charge rate
public ItemRockCutter() {
super(ItemTier.DIAMOND, 1, 1, new Item.Properties().maxStackSize(1));
super(ItemTier.DIAMOND, 1, 1, new Item.Properties().group(TechReborn.ITEMGROUP).maxStackSize(1));
efficiency = 16F;
}

View file

@ -40,6 +40,7 @@ import reborncore.common.powerSystem.PowerSystem;
import reborncore.common.powerSystem.PoweredItemContainerProvider;
import reborncore.common.powerSystem.forge.ForgePowerItemManager;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
import techreborn.api.TechRebornAPI;
import techreborn.init.TRContent;
@ -54,7 +55,7 @@ public class ItemElectricTreetap extends Item implements IEnergyItemInfo {
public int cost = 20;
public ItemElectricTreetap() {
super(new Item.Properties().maxStackSize(1));
super(new Item.Properties().group(TechReborn.ITEMGROUP).maxStackSize(1));
}
// Item

View file

@ -52,6 +52,7 @@ import reborncore.common.powerSystem.PoweredItemContainerProvider;
import reborncore.common.powerSystem.forge.ForgePowerItemManager;
import reborncore.common.util.ChatUtils;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
import techreborn.config.ConfigTechReborn;
import techreborn.init.TRContent;
import techreborn.utils.MessageIDs;
@ -66,7 +67,7 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo {
// 4M FE max charge with 1k charge rate
public ItemNanosaber() {
super(ItemTier.DIAMOND, 1, 1, new Item.Properties().setNoRepair().maxStackSize(1));
super(ItemTier.DIAMOND, 1, 1, new Item.Properties().group(TechReborn.ITEMGROUP).setNoRepair().maxStackSize(1));
this.addPropertyOverride(new ResourceLocation("techreborn:active"), new IItemPropertyGetter() {
@Override
@OnlyIn(Dist.CLIENT)

View file

@ -29,6 +29,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemStack;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
public class ItemTRAxe extends ItemAxe {
@ -39,7 +40,7 @@ public class ItemTRAxe extends ItemAxe {
}
public ItemTRAxe(IItemTier material, String repairOreDict) {
super(material, material.getAttackDamage() + 5.75F, (material.getAttackDamage() + 6.75F) * -0.344444F, new Item.Properties());
super(material, material.getAttackDamage() + 5.75F, (material.getAttackDamage() + 6.75F) * -0.344444F, new Item.Properties().group(TechReborn.ITEMGROUP));
this.repairOreDict = repairOreDict;
}

View file

@ -29,6 +29,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemHoe;
import net.minecraft.item.ItemStack;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
public class ItemTRHoe extends ItemHoe {
@ -39,7 +40,7 @@ public class ItemTRHoe extends ItemHoe {
}
public ItemTRHoe(IItemTier material, String repairOreDict) {
super(material, 1F, new Item.Properties());
super(material, 1F, new Item.Properties().group(TechReborn.ITEMGROUP));
this.repairOreDict = repairOreDict;
}

View file

@ -29,6 +29,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
public class ItemTRPickaxe extends ItemPickaxe {
@ -39,7 +40,7 @@ public class ItemTRPickaxe extends ItemPickaxe {
}
public ItemTRPickaxe(IItemTier material, String repairOreDict) {
super(material, 1, (material.getAttackDamage() + 6.75F) * -0.344444F, new Item.Properties());
super(material, 1, (material.getAttackDamage() + 6.75F) * -0.344444F, new Item.Properties().group(TechReborn.ITEMGROUP));
this.repairOreDict = repairOreDict;
}

View file

@ -29,6 +29,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
public class ItemTRSpade extends ItemSpade {
@ -39,7 +40,7 @@ public class ItemTRSpade extends ItemSpade {
}
public ItemTRSpade(IItemTier material, String repairOreDict) {
super(material, material.getAttackDamage() + 5.75F, (material.getAttackDamage() + 6.75F) * -0.344444F, new Item.Properties());
super(material, material.getAttackDamage() + 5.75F, (material.getAttackDamage() + 6.75F) * -0.344444F, new Item.Properties().group(TechReborn.ITEMGROUP));
this.repairOreDict = repairOreDict;
}

View file

@ -29,6 +29,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
public class ItemTRSword extends ItemSword {
@ -39,7 +40,7 @@ public class ItemTRSword extends ItemSword {
}
public ItemTRSword(IItemTier material, String repairOreDict) {
super(material, 1, (material.getAttackDamage() + 6.75F) * -0.344444F, new Item.Properties());
super(material, 1, (material.getAttackDamage() + 6.75F) * -0.344444F, new Item.Properties().group(TechReborn.ITEMGROUP));
this.repairOreDict = repairOreDict;
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "techreborn:item/tool/bronze_axe"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "techreborn:item/armor/bronze_boots"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "techreborn:item/armor/bronze_chestplate"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "techreborn:item/armor/bronze_helmet"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "techreborn:item/tool/bronze_hoe"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "techreborn:item/armor/bronze_leggings"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "techreborn:item/tool/bronze_pickaxe"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "techreborn:item/tool/bronze_spade"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "techreborn:item/tool/bronze_sword"
}
}

View file

@ -1,3 +0,0 @@
{
"parent": "item/generated"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB