Fix damage and speed for gem tools.

This commit is contained in:
drcrazy 2019-12-24 15:58:16 +03:00
parent 562d333be9
commit 06b4af59bc
7 changed files with 49 additions and 49 deletions

View file

@ -147,44 +147,44 @@ public class ModRegistry {
// Gem armor & tools
if (TechRebornConfig.enableGemArmorAndTools) {
// Todo: repair with tags
RebornRegistry.registerItem(TRContent.BRONZE_SWORD = InitUtils.setup(new ItemTRSword(TRToolTier.BRONZE), "bronze_sword"));
RebornRegistry.registerItem(TRContent.BRONZE_PICKAXE = InitUtils.setup(new ItemTRPickaxe(TRToolTier.BRONZE), "bronze_pickaxe"));
RebornRegistry.registerItem(TRContent.BRONZE_SPADE = InitUtils.setup(new ItemTRSpade(TRToolTier.BRONZE), "bronze_spade"));
RebornRegistry.registerItem(TRContent.BRONZE_AXE = InitUtils.setup(new ItemTRAxe(TRToolTier.BRONZE), "bronze_axe"));
RebornRegistry.registerItem(TRContent.BRONZE_HOE = InitUtils.setup(new ItemTRHoe(TRToolTier.BRONZE), "bronze_hoe"));
RebornRegistry.registerItem(TRContent.BRONZE_SWORD = InitUtils.setup(new TRSwordItem(TRToolTier.BRONZE), "bronze_sword"));
RebornRegistry.registerItem(TRContent.BRONZE_PICKAXE = InitUtils.setup(new TRPickaxeItem(TRToolTier.BRONZE), "bronze_pickaxe"));
RebornRegistry.registerItem(TRContent.BRONZE_SPADE = InitUtils.setup(new TRSpadeItem(TRToolTier.BRONZE), "bronze_spade"));
RebornRegistry.registerItem(TRContent.BRONZE_AXE = InitUtils.setup(new TRAxeItem(TRToolTier.BRONZE), "bronze_axe"));
RebornRegistry.registerItem(TRContent.BRONZE_HOE = InitUtils.setup(new TRHoeItem(TRToolTier.BRONZE), "bronze_hoe"));
RebornRegistry.registerItem(TRContent.BRONZE_HELMET = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.BRONZE, EquipmentSlot.HEAD), "bronze_helmet"));
RebornRegistry.registerItem(TRContent.BRONZE_CHESTPLATE = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.BRONZE, EquipmentSlot.CHEST), "bronze_chestplate"));
RebornRegistry.registerItem(TRContent.BRONZE_LEGGINGS = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.BRONZE, EquipmentSlot.LEGS), "bronze_leggings"));
RebornRegistry.registerItem(TRContent.BRONZE_BOOTS = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.BRONZE, EquipmentSlot.FEET), "bronze_boots"));
RebornRegistry.registerItem(TRContent.RUBY_SWORD = InitUtils.setup(new ItemTRSword(TRToolTier.RUBY), "ruby_sword"));
RebornRegistry.registerItem(TRContent.RUBY_PICKAXE = InitUtils.setup(new ItemTRPickaxe(TRToolTier.RUBY), "ruby_pickaxe"));
RebornRegistry.registerItem(TRContent.RUBY_SPADE = InitUtils.setup(new ItemTRSpade(TRToolTier.RUBY), "ruby_spade"));
RebornRegistry.registerItem(TRContent.RUBY_AXE = InitUtils.setup(new ItemTRAxe(TRToolTier.RUBY), "ruby_axe"));
RebornRegistry.registerItem(TRContent.RUBY_HOE = InitUtils.setup(new ItemTRHoe(TRToolTier.RUBY), "ruby_hoe"));
RebornRegistry.registerItem(TRContent.RUBY_SWORD = InitUtils.setup(new TRSwordItem(TRToolTier.RUBY), "ruby_sword"));
RebornRegistry.registerItem(TRContent.RUBY_PICKAXE = InitUtils.setup(new TRPickaxeItem(TRToolTier.RUBY), "ruby_pickaxe"));
RebornRegistry.registerItem(TRContent.RUBY_SPADE = InitUtils.setup(new TRSpadeItem(TRToolTier.RUBY), "ruby_spade"));
RebornRegistry.registerItem(TRContent.RUBY_AXE = InitUtils.setup(new TRAxeItem(TRToolTier.RUBY), "ruby_axe"));
RebornRegistry.registerItem(TRContent.RUBY_HOE = InitUtils.setup(new TRHoeItem(TRToolTier.RUBY), "ruby_hoe"));
RebornRegistry.registerItem(TRContent.RUBY_HELMET = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.RUBY, EquipmentSlot.HEAD), "ruby_helmet"));
RebornRegistry.registerItem(TRContent.RUBY_CHESTPLATE = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.RUBY, EquipmentSlot.CHEST), "ruby_chestplate"));
RebornRegistry.registerItem(TRContent.RUBY_LEGGINGS = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.RUBY, EquipmentSlot.LEGS), "ruby_leggings"));
RebornRegistry.registerItem(TRContent.RUBY_BOOTS = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.RUBY, EquipmentSlot.FEET), "ruby_boots"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_SWORD = InitUtils.setup(new ItemTRSword(TRToolTier.SAPPHIRE), "sapphire_sword"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_PICKAXE = InitUtils.setup(new ItemTRPickaxe(TRToolTier.SAPPHIRE), "sapphire_pickaxe"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_SPADE = InitUtils.setup(new ItemTRSpade(TRToolTier.SAPPHIRE), "sapphire_spade"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_AXE = InitUtils.setup(new ItemTRAxe(TRToolTier.SAPPHIRE), "sapphire_axe"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_HOE = InitUtils.setup(new ItemTRHoe(TRToolTier.SAPPHIRE), "sapphire_hoe"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_SWORD = InitUtils.setup(new TRSwordItem(TRToolTier.SAPPHIRE), "sapphire_sword"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_PICKAXE = InitUtils.setup(new TRPickaxeItem(TRToolTier.SAPPHIRE), "sapphire_pickaxe"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_SPADE = InitUtils.setup(new TRSpadeItem(TRToolTier.SAPPHIRE), "sapphire_spade"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_AXE = InitUtils.setup(new TRAxeItem(TRToolTier.SAPPHIRE), "sapphire_axe"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_HOE = InitUtils.setup(new TRHoeItem(TRToolTier.SAPPHIRE), "sapphire_hoe"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_HELMET = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.SAPPHIRE, EquipmentSlot.HEAD), "sapphire_helmet"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_CHESTPLATE = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.SAPPHIRE, EquipmentSlot.CHEST), "sapphire_chestplate"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_LEGGINGS = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.SAPPHIRE, EquipmentSlot.LEGS), "sapphire_leggings"));
RebornRegistry.registerItem(TRContent.SAPPHIRE_BOOTS = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.SAPPHIRE, EquipmentSlot.FEET), "sapphire_boots"));
RebornRegistry.registerItem(TRContent.PERIDOT_SWORD = InitUtils.setup(new ItemTRSword(TRToolTier.PERIDOT), "peridot_sword"));
RebornRegistry.registerItem(TRContent.PERIDOT_PICKAXE = InitUtils.setup(new ItemTRPickaxe(TRToolTier.PERIDOT), "peridot_pickaxe"));
RebornRegistry.registerItem(TRContent.PERIDOT_SPADE = InitUtils.setup(new ItemTRSpade(TRToolTier.PERIDOT), "peridot_spade"));
RebornRegistry.registerItem(TRContent.PERIDOT_AXE = InitUtils.setup(new ItemTRAxe(TRToolTier.PERIDOT), "peridot_axe"));
RebornRegistry.registerItem(TRContent.PERIDOT_HOE = InitUtils.setup(new ItemTRHoe(TRToolTier.PERIDOT), "peridot_hoe"));
RebornRegistry.registerItem(TRContent.PERIDOT_SWORD = InitUtils.setup(new TRSwordItem(TRToolTier.PERIDOT), "peridot_sword"));
RebornRegistry.registerItem(TRContent.PERIDOT_PICKAXE = InitUtils.setup(new TRPickaxeItem(TRToolTier.PERIDOT), "peridot_pickaxe"));
RebornRegistry.registerItem(TRContent.PERIDOT_SPADE = InitUtils.setup(new TRSpadeItem(TRToolTier.PERIDOT), "peridot_spade"));
RebornRegistry.registerItem(TRContent.PERIDOT_AXE = InitUtils.setup(new TRAxeItem(TRToolTier.PERIDOT), "peridot_axe"));
RebornRegistry.registerItem(TRContent.PERIDOT_HOE = InitUtils.setup(new TRHoeItem(TRToolTier.PERIDOT), "peridot_hoe"));
RebornRegistry.registerItem(TRContent.PERIDOT_HELMET = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.PERIDOT, EquipmentSlot.HEAD), "peridot_helmet"));
RebornRegistry.registerItem(TRContent.PERIDOT_CHESTPLATE = InitUtils.setup(new ItemTRArmour(TRArmorMaterial.PERIDOT, EquipmentSlot.CHEST), "peridot_chestplate"));

View file

@ -32,13 +32,13 @@ import java.util.function.Supplier;
//TODO: Use tags
public enum TRToolTier implements ToolMaterial {
BRONZE(2, 375, 6.0f, 2.25f, 8, () -> {
BRONZE(2, 375, 7.0F, 2.25f, 12, () -> {
return Ingredient.ofItems(TRContent.Ingots.BRONZE.asItem());
}), RUBY(2, 320, 6.2F, 2.7F, 10, () -> {
}), RUBY(2, 1651, 6.0F, 4.7F, 10, () -> {
return Ingredient.ofItems(TRContent.Gems.RUBY.asItem());
}), SAPPHIRE(3, 620, 5.0F, 2F, 8, () -> {
}), SAPPHIRE(3, 1651, 14.0F, 1.8F, 8, () -> {
return Ingredient.ofItems(TRContent.Gems.SAPPHIRE.asItem());
}), PERIDOT(2, 400, 7.0F, 2.4F, 16, () -> {
}), PERIDOT(2, 573, 7.0F, 2.4F, 24, () -> {
return Ingredient.ofItems(TRContent.Gems.PERIDOT.asItem());
});

View file

@ -31,16 +31,16 @@ import net.minecraft.item.ToolMaterial;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
public class ItemTRAxe extends AxeItem {
public class TRAxeItem extends AxeItem {
String repairOreDict = "";
String repairOreDict;
public ItemTRAxe(ToolMaterial material) {
public TRAxeItem(ToolMaterial material) {
this(material, "");
}
public ItemTRAxe(ToolMaterial material, String repairOreDict) {
super(material, material.getAttackDamage() + 5.75F, (material.getAttackDamage() + 6.75F) * -0.344444F, new Item.Settings().group(TechReborn.ITEMGROUP));
public TRAxeItem(ToolMaterial material, String repairOreDict) {
super(material, material.getAttackDamage(), -3.0F, new Item.Settings().group(TechReborn.ITEMGROUP));
this.repairOreDict = repairOreDict;
}

View file

@ -31,16 +31,16 @@ import net.minecraft.item.ToolMaterial;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
public class ItemTRHoe extends HoeItem {
public class TRHoeItem extends HoeItem {
String repairOreDict = "";
String repairOreDict;
public ItemTRHoe(ToolMaterial material) {
public TRHoeItem(ToolMaterial material) {
this(material, "");
}
public ItemTRHoe(ToolMaterial material, String repairOreDict) {
super(material, 1F, new Item.Settings().group(TechReborn.ITEMGROUP));
public TRHoeItem(ToolMaterial material, String repairOreDict) {
super(material, 0F, new Item.Settings().group(TechReborn.ITEMGROUP));
this.repairOreDict = repairOreDict;
}

View file

@ -31,16 +31,16 @@ import net.minecraft.item.ToolMaterial;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
public class ItemTRPickaxe extends PickaxeItem {
public class TRPickaxeItem extends PickaxeItem {
String repairOreDict = "";
String repairOreDict;
public ItemTRPickaxe(ToolMaterial material) {
public TRPickaxeItem(ToolMaterial material) {
this(material, "");
}
public ItemTRPickaxe(ToolMaterial material, String repairOreDict) {
super(material, 1, (material.getAttackDamage() + 6.75F) * -0.344444F, new Item.Settings().group(TechReborn.ITEMGROUP));
public TRPickaxeItem(ToolMaterial material, String repairOreDict) {
super(material, 1, -2.8F, new Item.Settings().group(TechReborn.ITEMGROUP));
this.repairOreDict = repairOreDict;
}

View file

@ -31,16 +31,16 @@ import net.minecraft.item.ToolMaterial;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
public class ItemTRSpade extends ShovelItem {
public class TRSpadeItem extends ShovelItem {
String repairOreDict = "";
String repairOreDict;
public ItemTRSpade(ToolMaterial material) {
public TRSpadeItem(ToolMaterial material) {
this(material, "");
}
public ItemTRSpade(ToolMaterial material, String repairOreDict) {
super(material, material.getAttackDamage() + 5.75F, (material.getAttackDamage() + 6.75F) * -0.344444F, new Item.Settings().group(TechReborn.ITEMGROUP));
public TRSpadeItem(ToolMaterial material, String repairOreDict) {
super(material, 1.5F, -3.0F, new Item.Settings().group(TechReborn.ITEMGROUP));
this.repairOreDict = repairOreDict;
}

View file

@ -31,16 +31,16 @@ import net.minecraft.item.ToolMaterial;
import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
public class ItemTRSword extends SwordItem {
public class TRSwordItem extends SwordItem {
String repairOreDict = "";
String repairOreDict;
public ItemTRSword(ToolMaterial material) {
public TRSwordItem(ToolMaterial material) {
this(material, "");
}
public ItemTRSword(ToolMaterial material, String repairOreDict) {
super(material, 1, (material.getAttackDamage() + 6.75F) * -0.344444F, new Item.Settings().group(TechReborn.ITEMGROUP));
public TRSwordItem(ToolMaterial material, String repairOreDict) {
super(material, 3, -2.4F, new Item.Settings().group(TechReborn.ITEMGROUP));
this.repairOreDict = repairOreDict;
}