diff --git a/common/src/main/java/common/init/Items.java b/common/src/main/java/common/init/Items.java index 08084d36..bbc71e29 100755 --- a/common/src/main/java/common/init/Items.java +++ b/common/src/main/java/common/init/Items.java @@ -1246,6 +1246,112 @@ public abstract class Items { public static final Item titanium_furnace = get("titanium_furnace"); public static final Item pipe = get("pipe"); public static final Item suction_pipe = get("suction_pipe"); + public static final ItemTool ardite_axe = get("ardite_axe"); + public static final ItemAnimalArmor ardite_horse_armor = get("ardite_horse_armor"); + public static final ItemTool ardite_pickaxe = get("ardite_pickaxe"); + public static final ItemTool ardite_shears = get("ardite_shears"); + public static final ItemTool ardite_shovel = get("ardite_shovel"); + public static final ItemTool chain_axe = get("chain_axe"); + public static final ItemAnimalArmor chain_horse_armor = get("chain_horse_armor"); + public static final ItemTool chain_pickaxe = get("chain_pickaxe"); + public static final ItemTool chain_shears = get("chain_shears"); + public static final ItemTool chain_shovel = get("chain_shovel"); + public static final ItemTool chain_sword = get("chain_sword"); + public static final ItemTool charged_axe = get("charged_axe"); + public static final ItemArmor charged_boots = get("charged_boots"); + public static final ItemArmor charged_chestplate = get("charged_chestplate"); + public static final ItemArmor charged_helmet = get("charged_helmet"); + public static final ItemAnimalArmor charged_horse_armor = get("charged_horse_armor"); + public static final ItemArmor charged_leggings = get("charged_leggings"); + public static final ItemTool charged_pickaxe = get("charged_pickaxe"); + public static final ItemTool charged_shears = get("charged_shears"); + public static final ItemTool charged_shovel = get("charged_shovel"); + public static final ItemTool charged_sword = get("charged_sword"); + public static final ItemTool cinnabar_axe = get("cinnabar_axe"); + public static final ItemArmor cinnabar_boots = get("cinnabar_boots"); + public static final ItemArmor cinnabar_chestplate = get("cinnabar_chestplate"); + public static final ItemArmor cinnabar_helmet = get("cinnabar_helmet"); + public static final ItemAnimalArmor cinnabar_horse_armor = get("cinnabar_horse_armor"); + public static final ItemArmor cinnabar_leggings = get("cinnabar_leggings"); + public static final ItemTool cinnabar_pickaxe = get("cinnabar_pickaxe"); + public static final ItemTool cinnabar_shears = get("cinnabar_shears"); + public static final ItemTool cinnabar_shovel = get("cinnabar_shovel"); + public static final ItemTool cinnabar_sword = get("cinnabar_sword"); + public static final ItemTool cloth_axe = get("cloth_axe"); + public static final ItemAnimalArmor cloth_horse_armor = get("cloth_horse_armor"); + public static final ItemTool cloth_pickaxe = get("cloth_pickaxe"); + public static final ItemTool cloth_shears = get("cloth_shears"); + public static final ItemTool cloth_shovel = get("cloth_shovel"); + public static final ItemTool cloth_sword = get("cloth_sword"); + public static final ItemTool coal_axe = get("coal_axe"); + public static final ItemArmor coal_boots = get("coal_boots"); + public static final ItemArmor coal_chestplate = get("coal_chestplate"); + public static final ItemArmor coal_helmet = get("coal_helmet"); + public static final ItemAnimalArmor coal_horse_armor = get("coal_horse_armor"); + public static final ItemArmor coal_leggings = get("coal_leggings"); + public static final ItemTool coal_pickaxe = get("coal_pickaxe"); + public static final ItemTool coal_shears = get("coal_shears"); + public static final ItemTool coal_shovel = get("coal_shovel"); + public static final ItemTool coal_sword = get("coal_sword"); + public static final ItemTool emerald_axe = get("emerald_axe"); + public static final ItemArmor emerald_boots = get("emerald_boots"); + public static final ItemArmor emerald_chestplate = get("emerald_chestplate"); + public static final ItemArmor emerald_helmet = get("emerald_helmet"); + public static final ItemAnimalArmor emerald_horse_armor = get("emerald_horse_armor"); + public static final ItemArmor emerald_leggings = get("emerald_leggings"); + public static final ItemTool emerald_pickaxe = get("emerald_pickaxe"); + public static final ItemTool emerald_shears = get("emerald_shears"); + public static final ItemTool emerald_shovel = get("emerald_shovel"); + public static final ItemTool emerald_sword = get("emerald_sword"); + public static final ItemArmor gyriyn_boots = get("gyriyn_boots"); + public static final ItemArmor gyriyn_chestplate = get("gyriyn_chestplate"); + public static final ItemArmor gyriyn_helmet = get("gyriyn_helmet"); + public static final ItemAnimalArmor gyriyn_horse_armor = get("gyriyn_horse_armor"); + public static final ItemArmor gyriyn_leggings = get("gyriyn_leggings"); + public static final ItemTool gyriyn_shears = get("gyriyn_shears"); + public static final ItemTool gyriyn_sword = get("gyriyn_sword"); + public static final ItemTool lapis_axe = get("lapis_axe"); + public static final ItemArmor lapis_boots = get("lapis_boots"); + public static final ItemArmor lapis_chestplate = get("lapis_chestplate"); + public static final ItemArmor lapis_helmet = get("lapis_helmet"); + public static final ItemAnimalArmor lapis_horse_armor = get("lapis_horse_armor"); + public static final ItemArmor lapis_leggings = get("lapis_leggings"); + public static final ItemTool lapis_pickaxe = get("lapis_pickaxe"); + public static final ItemTool lapis_shears = get("lapis_shears"); + public static final ItemTool lapis_shovel = get("lapis_shovel"); + public static final ItemTool lapis_sword = get("lapis_sword"); + public static final ItemTool leather_axe = get("leather_axe"); + public static final ItemAnimalArmor leather_horse_armor = get("leather_horse_armor"); + public static final ItemTool leather_pickaxe = get("leather_pickaxe"); + public static final ItemTool leather_shears = get("leather_shears"); + public static final ItemTool leather_shovel = get("leather_shovel"); + public static final ItemTool leather_sword = get("leather_sword"); + public static final ItemAnimalArmor nichun_horse_armor = get("nichun_horse_armor"); + public static final ItemTool nichun_shears = get("nichun_shears"); + public static final ItemTool ruby_axe = get("ruby_axe"); + public static final ItemArmor ruby_boots = get("ruby_boots"); + public static final ItemArmor ruby_chestplate = get("ruby_chestplate"); + public static final ItemArmor ruby_helmet = get("ruby_helmet"); + public static final ItemAnimalArmor ruby_horse_armor = get("ruby_horse_armor"); + public static final ItemArmor ruby_leggings = get("ruby_leggings"); + public static final ItemTool ruby_pickaxe = get("ruby_pickaxe"); + public static final ItemTool ruby_shears = get("ruby_shears"); + public static final ItemTool ruby_shovel = get("ruby_shovel"); + public static final ItemTool ruby_sword = get("ruby_sword"); + public static final ItemArmor stone_boots = get("stone_boots"); + public static final ItemArmor stone_chestplate = get("stone_chestplate"); + public static final ItemArmor stone_helmet = get("stone_helmet"); + public static final ItemAnimalArmor stone_horse_armor = get("stone_horse_armor"); + public static final ItemArmor stone_leggings = get("stone_leggings"); + public static final ItemTool stone_shears = get("stone_shears"); + public static final ItemAnimalArmor thetium_horse_armor = get("thetium_horse_armor"); + public static final ItemTool thetium_shears = get("thetium_shears"); + public static final ItemArmor wood_boots = get("wood_boots"); + public static final ItemArmor wood_chestplate = get("wood_chestplate"); + public static final ItemArmor wood_helmet = get("wood_helmet"); + public static final ItemAnimalArmor wood_horse_armor = get("wood_horse_armor"); + public static final ItemArmor wood_leggings = get("wood_leggings"); + public static final ItemTool wood_shears = get("wood_shears"); private static T get(String id) { T item = (T)ItemRegistry.byName(id); diff --git a/common/src/main/java/common/init/MetalType.java b/common/src/main/java/common/init/MetalType.java index 4c1cf9c2..ccb34067 100755 --- a/common/src/main/java/common/init/MetalType.java +++ b/common/src/main/java/common/init/MetalType.java @@ -3,7 +3,7 @@ package common.init; import common.util.Color; public enum MetalType { - IRON("iron", 26, "Fe", "Eisen", 0, new ToolMaterial(2, 8.0f, 0.0f, 250, 6, 2, 14, true, 15, 9, 2, 6, 5, 2).setMagnetic()), + IRON("iron", 26, "Fe", "Eisen", 0, new ToolMaterial(2, 8.0f, 0.0f, 250, 6, 2, 14, 15, 9, 2, 6, 5, 2).setMagnetic()), COPPER("copper", 29, "Cu", "Kupfer", 0), TIN("tin", 50, "Sn", "Zinn", 0), @@ -30,7 +30,7 @@ public enum MetalType { VANADIUM("vanadium", 23, "V", "Vanadium", 4), CHROME("chrome", 24, "Cr", "Chrom", 4), PLATINUM("platinum", 78, "Pt", "Platin", 4), - GOLD("gold", 79, "Au", "Gold", 4, new ToolMaterial(0, 15.0f, 1.0f, 32, 12, 0, 22, true, 7, 25, 2, 5, 3, 1)), + GOLD("gold", 79, "Au", "Gold", 4, new ToolMaterial(0, 15.0f, 1.0f, 32, 12, 0, 22, 7, 25, 2, 5, 3, 1)), MANGANESE("manganese", 25, "Mn", "Mangan", 5), COBALT("cobalt", 27, "Co", "Cobalt", 5), diff --git a/common/src/main/java/common/init/OreType.java b/common/src/main/java/common/init/OreType.java index 86eabd03..5701ae8d 100755 --- a/common/src/main/java/common/init/OreType.java +++ b/common/src/main/java/common/init/OreType.java @@ -1,19 +1,19 @@ package common.init; public enum OreType { - COAL("coal", "Kohle", new ToolMaterial(2), 0, 1, 0) {{ + COAL("coal", "Kohle", new ToolMaterial(2, 0.0f, 0.0f, 8, 2, 0, 0, 10, 0, 1, 1, 1, 1), 0, 1, 0) {{ this.setFuel(16000).setCompressability(2); }}, - CINNABAR("cinnabar", "Zinnober", new ToolMaterial(2), 2, 1, 1), - LAPIS("lapis", "Lapislazuli", new ToolMaterial(2), "lapis_lazuli", 2, 4, 4), - EMERALD("emerald", "Smaragd", new ToolMaterial(3), 3, 1, 0), - RUBY("ruby", "Rubin", new ToolMaterial(3), 3, 1, 0), - CHARGED("charged", "Ladungs", "Geladener Staub", new ToolMaterial(3), "charged_powder", 1, 4, 2), - DIAMOND("diamond", "Diamant", new ToolMaterial(3, 12.0f, 2.0f, 1561, 8, 3, 10, true, 33, 10, 3, 8, 6, 3), 3, 1, 0), - THETIUM("thetium", "Thetium", "Thi-Fragment", new ToolMaterial(4, 20.0f, 4.0f, 3451, 11, 7, 12, false, 59, 12, 4, 9, 7, 4), "thi_fragment", 5, 1, 0), + CINNABAR("cinnabar", "Zinnober", new ToolMaterial(2, 32.0f, 8.0f, 250, 2, 1, 10, 10, 9, 1, 3, 2, 1), 2, 1, 1), + LAPIS("lapis", "Lapislazuli", new ToolMaterial(2, 8.0f, 32.0f, 250, 2, 1, 15, 15, 9, 1, 3, 2, 1), "lapis_lazuli", 2, 4, 4), + EMERALD("emerald", "Smaragd", new ToolMaterial(3, 8.0f, 0.0f, 250, 4, 2, 14, 15, 9, 2, 6, 5, 2), 3, 1, 0), + RUBY("ruby", "Rubin", new ToolMaterial(3, 8.0f, 0.0f, 250, 4, 2, 14, 15, 9, 2, 6, 5, 2), 3, 1, 0), + CHARGED("charged", "Ladungs", "Geladener Staub", new ToolMaterial(3, 80.0f, 80.0f, 1, 8, 22, 1, 1, 1, 18, 33, 21, 15), "charged_powder", 4, 4, 2), + DIAMOND("diamond", "Diamant", new ToolMaterial(3, 12.0f, 2.0f, 1561, 8, 3, 10, 33, 10, 3, 8, 6, 3), 3, 1, 0), + THETIUM("thetium", "Thetium", "Thi-Fragment", new ToolMaterial(4, 20.0f, 4.0f, 3451, 11, 7, 12, 59, 12, 4, 9, 7, 4), "thi_fragment", 5, 1, 0), ARDITE("ardite", "Ardit", "Ahrd-Fragment", new ToolMaterial(5, 30.0f, 12.0f, 7320, 15, 11, 12, 86, 12, 6, 12, 9, 5), "ahrd_fragment", 7, 1, 0), - GYRIYN("gyriyn", "Gyriyn", "Ghi-Fragment", new ToolMaterial(5, 7320, 15, 11, 12, false), "ghi_fragment", 7, 1, 0), - NICHUN("nichun", "Nichun", "Nieh-Fragment", new ToolMaterial(6, 50.0f, 40.0f, 21300, 20, 18, 15, false, 172, 15, 12, 23, 14, 11), "nieh_fragment", 10, 1, 0); + GYRIYN("gyriyn", "Gyriyn", "Ghi-Fragment", new ToolMaterial(5, 40.0f, 26.0f, 5690, 15, 11, 12, 62, 13, 8, 16, 12, 7), "ghi_fragment", 7, 1, 0), + NICHUN("nichun", "Nichun", "Nieh-Fragment", new ToolMaterial(6, 50.0f, 40.0f, 21300, 20, 18, 15, 172, 15, 12, 23, 14, 11), "nieh_fragment", 10, 1, 0); public final ToolMaterial material; public final String name; diff --git a/common/src/main/java/common/init/ToolMaterial.java b/common/src/main/java/common/init/ToolMaterial.java index 40683585..34fc8b6a 100755 --- a/common/src/main/java/common/init/ToolMaterial.java +++ b/common/src/main/java/common/init/ToolMaterial.java @@ -17,16 +17,12 @@ public class ToolMaterial { private final int maxDamageFactor; private final int[] damageReduction; private final int armorEnchantability; - private final boolean tools; - private final boolean weapons; - private final boolean extras; private final Set repair = Sets.newHashSet(); private boolean magnetic; private int defColor = 0xffffffff; - private ToolMaterial(float rad, float mag, int level, int uses, int efficiency, int damage, int ench, boolean tools, boolean weapons, - boolean extras, int auses, int aench, int r1, int r2, int r3, int r4) { + protected ToolMaterial(int level, float rad, float mag, int uses, int efficiency, int damage, int ench, int auses, int aench, int r1, int r2, int r3, int r4) { this.harvestLevel = level; this.durability = uses; this.efficiency = efficiency; @@ -37,30 +33,6 @@ public class ToolMaterial { this.armorEnchantability = aench; this.radiationResistance = rad; this.magicResistance = mag; - this.tools = tools; - this.weapons = weapons; - this.extras = extras; - } - - protected ToolMaterial(int level) { - this(0.0f, 0.0f, level, 0, 0, 0, 0, false, false, false, 0, 0, 0, 0, 0, 0); - } - - protected ToolMaterial(int level, int uses, int efficiency, int damage, int ench, boolean weapons) { - this(0.0f, 0.0f, level, uses, efficiency, damage, ench, true, weapons, false, 0, ench, 0, 0, 0, 0); - } - - protected ToolMaterial(int level, float rad, float mag, int uses, int efficiency, int damage, int ench, int auses, int aench, int r1, int r2, int r3, int r4) { - this(rad, mag, level, uses, efficiency, damage, ench, false, true, false, auses, aench, r1, r2, r3, r4); - } - - protected ToolMaterial(int level, float rad, float mag, int auses, int aench, int r1, int r2, int r3, int r4) { - this(rad, mag, 0, 0, 0, 0, 0, false, false, false, auses, aench, r1, r2, r3, r4); - } - - protected ToolMaterial(int level, float rad, float mag, int uses, int efficiency, int damage, int ench, boolean extras, int auses, int aench, - int r1, int r2, int r3, int r4) { - this(rad, mag, level, uses, efficiency, damage, ench, true, true, extras, auses, aench, r1, r2, r3, r4); } protected ToolMaterial setDyeable(int defColor) { @@ -77,22 +49,6 @@ public class ToolMaterial { this.repair.add(item); } - public boolean hasArmor() { - return this.maxDamageFactor > 0; - } - - public boolean hasTools() { - return this.tools; - } - - public boolean hasWeapons() { - return this.weapons; - } - - public boolean hasExtras() { - return this.extras; - } - public int getDurability() { return this.durability; } diff --git a/common/src/main/java/common/init/ToolType.java b/common/src/main/java/common/init/ToolType.java index 9c9359cd..9606cfb2 100755 --- a/common/src/main/java/common/init/ToolType.java +++ b/common/src/main/java/common/init/ToolType.java @@ -1,11 +1,11 @@ package common.init; public enum ToolType { - WOOD("wood", "Holz", new ToolMaterial(0, 59, 2, 0, 15, true), WoodType.getNames("planks")), - STONE("stone", "Stein", new ToolMaterial(1, 131, 4, 1, 5, true), "cobblestone"), - LEATHER("leather", "Leder", new ToolMaterial(0, 2.0f, 0.0f, 5, 15, 1, 3, 2, 1).setDyeable(0xa06540), "leather"), - CHAIN("chain", "Ketten", new ToolMaterial(0, 0.5f, 0.25f, 15, 12, 2, 5, 4, 1).setMagnetic(), "chain"), - CLOTH("cloth", null, new ToolMaterial(0, 0.0f, 0.0f, 10, 0, 0, 0, 0, 0).setDyeable(0xffffff), "string"); + WOOD("wood", "Holz", new ToolMaterial(0, 3.0f, 0.5f, 59, 2, 0, 15, 4, 10, 1, 2, 1, 1), WoodType.getNames("planks")), + STONE("stone", "Stein", new ToolMaterial(1, 10.0f, 0.1f, 131, 4, 1, 5, 3, 10, 2, 6, 4, 2), "cobblestone"), + LEATHER("leather", "Leder", new ToolMaterial(0, 2.0f, 0.0f, 12, 2, 0, 15, 5, 15, 1, 3, 2, 1).setDyeable(0xa06540), "leather"), + CHAIN("chain", "Ketten", new ToolMaterial(0, 0.5f, 0.25f, 295, 3, 2, 12, 15, 12, 2, 5, 4, 1).setMagnetic(), "chain"), + CLOTH("cloth", null, new ToolMaterial(0, 0.0f, 0.0f, 8, 1, 0, 0, 10, 0, 0, 0, 0, 0).setDyeable(0xffffff), "string"); public final ToolMaterial material; public final String name; diff --git a/common/src/main/java/common/item/CheatTab.java b/common/src/main/java/common/item/CheatTab.java index 45c42225..74fecaa5 100755 --- a/common/src/main/java/common/item/CheatTab.java +++ b/common/src/main/java/common/item/CheatTab.java @@ -57,6 +57,11 @@ public enum CheatTab { return Items.diamond_block; } }, + LIQUIDS("Flüssigkeiten", false) { + protected Item getIconItem() { + return Items.water_bucket; + } + }, VEHICLES("Fahrzeuge", false) { protected Item getIconItem() { return Items.minecart; @@ -77,11 +82,6 @@ public enum CheatTab { return Items.lighter; } }, - LIQUIDS("Flüssigkeiten", false) { - protected Item getIconItem() { - return Items.water_bucket; - } - }, WEAPONS("Waffen", false) { protected Item getIconItem() { return Items.bow; diff --git a/common/src/main/java/common/util/Equipment.java b/common/src/main/java/common/util/Equipment.java index 809f5a41..691f255e 100644 --- a/common/src/main/java/common/util/Equipment.java +++ b/common/src/main/java/common/util/Equipment.java @@ -115,8 +115,7 @@ public enum Equipment implements Identifyable, Displayable { } public boolean canRegister(ToolMaterial material) { - return !this.isAccessory() && (this.isArmor() ? material.hasArmor() && (!this.isAnimalArmor() || material.hasExtras()) - : (this.isWeapon() ? material.hasWeapons() : (this.isOptional() ? material.hasExtras() : material.hasTools()))); + return !this.isAccessory(); } public ItemType getType() {