Start migration
This commit is contained in:
parent
6630ce0cab
commit
47ed597358
491 changed files with 12045 additions and 11953 deletions
|
@ -4,27 +4,26 @@ import java.util.function.Supplier;
|
|||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.item.ArmorMaterial;
|
||||
import net.minecraft.recipe.Ingredient;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.item.ArmorMaterial;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.sound.SoundEvents;
|
||||
import net.minecraft.util.Lazy;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.util.LazyLoadedValue;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
|
||||
public enum EndArmorMaterial implements ArmorMaterial {
|
||||
THALLASIUM("thallasium", 17, new int[] { 1, 4, 5, 2 }, 12, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F, 0.0F, () -> {
|
||||
return Ingredient.ofItems(EndBlocks.THALLASIUM.ingot);
|
||||
}),
|
||||
TERMINITE("terminite", 26, new int[] { 3, 6, 7, 3 }, 14, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 1.0F, 0.05F, () -> {
|
||||
return Ingredient.ofItems(EndBlocks.TERMINITE.ingot);
|
||||
return Ingredient.of(EndBlocks.THALLASIUM.ingot);
|
||||
}), TERMINITE("terminite", 26, new int[] { 3, 6, 7, 3 }, 14, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 1.0F, 0.05F, () -> {
|
||||
return Ingredient.of(EndBlocks.TERMINITE.ingot);
|
||||
}),
|
||||
AETERNIUM("aeternium", 40, new int[] { 4, 7, 9, 4 }, 18, SoundEvents.ITEM_ARMOR_EQUIP_NETHERITE, 3.5F, 0.2F, () -> {
|
||||
return Ingredient.ofItems(EndItems.AETERNIUM_INGOT);
|
||||
return Ingredient.of(EndItems.AETERNIUM_INGOT);
|
||||
}),
|
||||
CRYSTALITE("crystalite", 30, new int[] { 3, 6, 8, 3 }, 24, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.2F, 0.1F, () -> {
|
||||
return Ingredient.ofItems(EndBlocks.TERMINITE.ingot);
|
||||
return Ingredient.of(EndBlocks.TERMINITE.ingot);
|
||||
});
|
||||
|
||||
private static final int[] BASE_DURABILITY = new int[] { 13, 15, 16, 11 };
|
||||
|
@ -35,12 +34,11 @@ public enum EndArmorMaterial implements ArmorMaterial {
|
|||
private final SoundEvent equipSound;
|
||||
private final float toughness;
|
||||
private final float knockbackResistance;
|
||||
private final Lazy<Ingredient> repairIngredient;
|
||||
|
||||
private final LazyLoadedValue<Ingredient> repairIngredient;
|
||||
|
||||
private EndArmorMaterial(String name, int durabilityMultiplier, int[] protectionAmounts, int enchantability,
|
||||
SoundEvent equipSound, float toughness, float knockbackResistance,
|
||||
Supplier<Ingredient> repairIngredient) {
|
||||
|
||||
SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<Ingredient> repairIngredient) {
|
||||
|
||||
this.name = name;
|
||||
this.durabilityMultiplier = durabilityMultiplier;
|
||||
this.protectionAmounts = protectionAmounts;
|
||||
|
@ -48,7 +46,7 @@ public enum EndArmorMaterial implements ArmorMaterial {
|
|||
this.equipSound = equipSound;
|
||||
this.toughness = toughness;
|
||||
this.knockbackResistance = knockbackResistance;
|
||||
this.repairIngredient = new Lazy<>(repairIngredient);
|
||||
this.repairIngredient = new LazyLoadedValue<>(repairIngredient);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,21 +2,19 @@ package ru.betterend.item.material;
|
|||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import net.minecraft.recipe.Ingredient;
|
||||
import net.minecraft.util.Lazy;
|
||||
import net.minecraft.util.LazyLoadedValue;
|
||||
import net.minecraft.world.item.Tier;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
|
||||
public enum EndToolMaterial implements ToolMaterial {
|
||||
public enum EndToolMaterial implements Tier {
|
||||
THALLASIUM(2, 320, 7.0F, 1.5F, 12, () -> {
|
||||
return Ingredient.ofItems(EndBlocks.THALLASIUM.ingot);
|
||||
}),
|
||||
TERMINITE(3, 1230, 8.5F, 3.0F, 14, () -> {
|
||||
return Ingredient.ofItems(EndBlocks.TERMINITE.ingot);
|
||||
}),
|
||||
AETERNIUM(5, 2196, 10.0F, 4.5F, 18, () -> {
|
||||
return Ingredient.ofItems(EndItems.AETERNIUM_INGOT);
|
||||
return Ingredient.of(EndBlocks.THALLASIUM.ingot);
|
||||
}), TERMINITE(3, 1230, 8.5F, 3.0F, 14, () -> {
|
||||
return Ingredient.of(EndBlocks.TERMINITE.ingot);
|
||||
}), AETERNIUM(5, 2196, 10.0F, 4.5F, 18, () -> {
|
||||
return Ingredient.of(EndItems.AETERNIUM_INGOT);
|
||||
});
|
||||
|
||||
private final int durability;
|
||||
|
@ -24,8 +22,8 @@ public enum EndToolMaterial implements ToolMaterial {
|
|||
private final float attackDamage;
|
||||
private final int miningLevel;
|
||||
private final int enchantability;
|
||||
private final Lazy<Ingredient> repairIngredient;
|
||||
|
||||
private final LazyLoadedValue<Ingredient> repairIngredient;
|
||||
|
||||
private EndToolMaterial(int miningLevel, int durability, float miningSpeed, float attackDamage, int enchantability,
|
||||
Supplier<Ingredient> repairIngredient) {
|
||||
|
||||
|
@ -34,32 +32,32 @@ public enum EndToolMaterial implements ToolMaterial {
|
|||
this.attackDamage = attackDamage;
|
||||
this.miningLevel = miningLevel;
|
||||
this.enchantability = enchantability;
|
||||
this.repairIngredient = new Lazy<>(repairIngredient);
|
||||
this.repairIngredient = new LazyLoadedValue<>(repairIngredient);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDurability() {
|
||||
return this.durability;
|
||||
public int getUses() {
|
||||
return durability;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMiningSpeedMultiplier() {
|
||||
return this.miningSpeed;
|
||||
public float getSpeed() {
|
||||
return miningSpeed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAttackDamage() {
|
||||
return this.attackDamage;
|
||||
public float getAttackDamageBonus() {
|
||||
return attackDamage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMiningLevel() {
|
||||
return this.miningLevel;
|
||||
public int getLevel() {
|
||||
return miningLevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnchantability() {
|
||||
return this.enchantability;
|
||||
public int getEnchantmentValue() {
|
||||
return enchantability;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue