This commit is contained in:
nelle 2023-06-20 00:14:31 -06:00
parent 487496a100
commit 0d105995a9
7 changed files with 115 additions and 81 deletions

View file

@ -1,10 +1,10 @@
package xyz.limepot.stellarworks.item.tools.pig_iron;
package xyz.limepot.stellarworks.item.custom;
import net.minecraft.item.AxeItem;
import net.minecraft.item.ToolMaterial;
public class PigIronAxe extends AxeItem {
public PigIronAxe(ToolMaterial material, float attackDamage, float attackSpeed, Settings settings) {
public class ModAxeItem extends AxeItem {
public ModAxeItem(ToolMaterial material, float attackDamage, float attackSpeed, Settings settings) {
super(material, attackDamage, attackSpeed, settings);
}
}

View file

@ -1,10 +1,10 @@
package xyz.limepot.stellarworks.item.tools.pig_iron;
package xyz.limepot.stellarworks.item.custom;
import net.minecraft.item.PickaxeItem;
import net.minecraft.item.ToolMaterial;
public class PigIronHoe extends PickaxeItem {
public PigIronHoe(ToolMaterial material, int attackDamage, float attackSpeed, Settings settings) {
public class ModHoeItem extends PickaxeItem {
public ModHoeItem(ToolMaterial material, int attackDamage, float attackSpeed, Settings settings) {
super(material, attackDamage, attackSpeed, settings);
}
}

View file

@ -0,0 +1,12 @@
package xyz.limepot.stellarworks.item.custom;
import net.minecraft.item.HoeItem;
import net.minecraft.item.PickaxeItem;
import net.minecraft.item.ToolMaterial;
public class ModPickaxe extends PickaxeItem {
public ModPickaxe(ToolMaterial material, int attackDamage, float attackSpeed, Settings settings) {
super(material, attackDamage, attackSpeed, settings);
}
}

View file

@ -0,0 +1,74 @@
package xyz.limepot.stellarworks.item.custom;
import net.minecraft.item.ToolMaterial;
import net.minecraft.recipe.Ingredient;
import net.minecraft.util.Lazy;
import xyz.limepot.stellarworks.item.ModItems;
import java.util.function.Supplier;
public enum ModToolMaterials implements ToolMaterial {
/*
WOOD(0, 59, 2.0F, 0.0F, 15, () -> {
return Ingredient.ofTag(ItemTags.PLANKS);
}),
STONE(1, 131, 4.0F, 1.0F, 5, () -> {
return Ingredient.ofTag(ItemTags.STONE_TOOL_MATERIALS);
}),
IRON(2, 250, 6.0F, 2.0F, 14, () -> {
return Ingredient.ofItems(Items.IRON_INGOT);
}),
DIAMOND(3, 1561, 8.0F, 3.0F, 10, () -> {
return Ingredient.ofItems(Items.DIAMOND);
}),
GOLD(0, 32, 12.0F, 0.0F, 22, () -> {
return Ingredient.ofItems(Items.GOLD_INGOT);
}),
NETHERITE(4, 2031, 9.0F, 4.0F, 15, () -> {
return Ingredient.ofItems(Items.NETHERITE_INGOT);
});
*/
PIG_IRON(2, 560, 7.0F, 2.6F, 12, () -> {
return Ingredient.ofItems(ModItems.PIG_IRON_INGOT);
});
private final int miningLevel;
private final int itemDurability;
private final float miningSpeed;
private final float attackDamage;
private final int enchantability;
private final Lazy<Ingredient> repairIngredient;
ModToolMaterials(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier repairIngredient) {
this.miningLevel = miningLevel;
this.itemDurability = itemDurability;
this.miningSpeed = miningSpeed;
this.attackDamage = attackDamage;
this.enchantability = enchantability;
this.repairIngredient = new Lazy(repairIngredient);
}
public int getDurability() {
return this.itemDurability;
}
public float getMiningSpeedMultiplier() {
return this.miningSpeed;
}
public float getAttackDamage() {
return this.attackDamage;
}
public int getMiningLevel() {
return this.miningLevel;
}
public int getEnchantability() {
return this.enchantability;
}
public Ingredient getRepairIngredient() {
return this.repairIngredient.get();
}
}

View file

@ -1,10 +0,0 @@
package xyz.limepot.stellarworks.item.tools.pig_iron;
import net.minecraft.item.HoeItem;
import net.minecraft.item.ToolMaterial;
public class PigIronPickaxe extends HoeItem {
public PigIronPickaxe(ToolMaterial material, int attackDamage, float attackSpeed, Settings settings) {
super(material, attackDamage, attackSpeed, settings);
}
}

View file

@ -1,47 +0,0 @@
package xyz.limepot.stellarworks.item.tools.pig_iron;
import net.minecraft.item.ToolMaterial;
import net.minecraft.recipe.Ingredient;
import xyz.limepot.stellarworks.item.ModItems;
public class PigIronToolMaterial implements ToolMaterial {
//"registry" call later
public static final PigIronToolMaterial INSTANCE = new PigIronToolMaterial();
//durability
@Override
public int getDurability() {
return 650; //far below diamond, almost triple iron
}
//mining speed
@Override
public float getMiningSpeedMultiplier() {
return 7.0F; //in between diamond
}
//attack damage
@Override
public float getAttackDamage() {
return 2.6F; //kinda in between iron and diamond
}
//mining level
@Override
public int getMiningLevel() {
return 2; //iron mining level
}
//enchantability
@Override
public int getEnchantability() {
return 12; //12? 14=iron 10=diamond .... idk
}
//repair ingredient
@Override
public Ingredient getRepairIngredient() {
return Ingredient.ofItems(ModItems.PIG_IRON_INGOT); //obviously
}
}

View file

@ -1,27 +1,32 @@
{
"block.stellarworks.dev_ship": "Dev Ship",
"item.stellarworks.aluminium_ingot": "Aluminium Ingot",
"block.stellarworks.arc_furnace": "Arc Furnace",
"item.stellarworks.tin_ingot": "Tin Ingot",
"block.stellarworks.tin_ore": "Tin Ore",
"block.stellarworks.engineering_table": "Engineering Table",
"item.stellarworks.bronze_ingot": "Bronze Ingot",
"itemGroup.stellarworks": "Sine Termino",
"block.stellarworks.aluminium_ore": "Aluminium Ore",
"block.stellarworks.deepslate_aluminium_ore": "Deepslate Aluminium Ore",
"block.stellarworks.tin_ore": "Tin Ore",
"block.stellarworks.deepslate_tin_ore": "Deepslate Tin Ore",
"block.stellarworks.dev_ship": "Dev Ship",
"block.stellarworks.engineering_table": "Engineering Table",
"block.stellarworks.arc_furnace": "Arc Furnace",
"block.stellarworks.moon_dust": "Moon Dust",
"block.stellarworks.moon_rock": "Moon Rock",
"item.stellarworks.pig_iron_ingot": "Pig Iron Ingot",
"block.stellarworks.ceramic_furnace": "Ceramic Furnace",
"item.stellarworks.raw_pig_iron": "Raw Pig Iron",
"item.stellarworks.aluminium_ingot": "Aluminium Ingot",
"item.stellarworks.bronze_ingot": "Bronze Ingot",
"item.stellarworks.raw_aluminium": "Raw Aluminium",
"item.stellarworks.raw_tin": "Raw Tin",
"item.stellarworks.raw_bronze": "Raw Bronze",
"block.stellarworks.deepslate_tin_ore": "Deepslate Tin Ore",
"block.stellarworks.deepslate_aluminium_ore": "Deepslate Aluminium Ore",
"itemgroup.stellar": "Stellarworks",
"item.stellarworks.pig_iron_sword": "Pig Iron Sword",
"item.stellarworks.pig_iron_pickaxe": "Pig Iron Pickaxe",
"item.stellarworks.raw_pig_iron": "Raw Pig Iron",
"item.stellarworks.raw_tin": "Raw Tin",
"item.stellarworks.tin_ingot": "Tin Ingot",
"item.stellarworks.pig_iron_axe": "Pig Iron Axe",
"item.stellarworks.pig_iron_hoe": "Pig Iron Hoe",
"item.stellarworks.pig_iron_ingot": "Pig Iron Ingot",
"item.stellarworks.pig_iron_pickaxe": "Pig Iron Pickaxe",
"item.stellarworks.pig_iron_shovel": "Pig Iron Shovel",
"item.stellarworks.pig_iron_hoe": "Pig Iron Hoe"
"item.stellarworks.pig_iron_sword": "Pig Iron Sword",
"itemGroup.stellarworks": "Sine Termino",
"itemgroup.stellar": "Stellarworks"
}