Continue mapping migration

This commit is contained in:
Aleksey 2021-04-12 21:38:22 +03:00
parent 99ade39404
commit f03fd03bd0
499 changed files with 12567 additions and 12723 deletions

View file

@ -4,25 +4,26 @@ import java.util.function.Supplier;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ArmorMaterial;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.util.LazyLoadedValue;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ArmorMaterial;
import net.minecraft.world.item.crafting.Ingredient;
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, () -> {
THALLASIUM("thallasium", 17, new int[] { 1, 4, 5, 2 }, 12, SoundEvents.ARMOR_EQUIP_IRON, 0.0F, 0.0F, () -> {
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, () -> {
}),
TERMINITE("terminite", 26, new int[] { 3, 6, 7, 3 }, 14, SoundEvents.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, () -> {
AETERNIUM("aeternium", 40, new int[] { 4, 7, 9, 4 }, 18, SoundEvents.ARMOR_EQUIP_NETHERITE, 3.5F, 0.2F, () -> {
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, () -> {
CRYSTALITE("crystalite", 30, new int[] { 3, 6, 8, 3 }, 24, SoundEvents.ARMOR_EQUIP_DIAMOND, 1.2F, 0.1F, () -> {
return Ingredient.of(EndBlocks.TERMINITE.ingot);
});
@ -35,10 +36,11 @@ public enum EndArmorMaterial implements ArmorMaterial {
private final float toughness;
private final float knockbackResistance;
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;
@ -50,17 +52,17 @@ public enum EndArmorMaterial implements ArmorMaterial {
}
@Override
public int getDurability(EquipmentSlot slot) {
return BASE_DURABILITY[slot.getEntitySlotId()] * this.durabilityMultiplier;
public int getDurabilityForSlot(EquipmentSlot slot) {
return BASE_DURABILITY[slot.getIndex()] * this.durabilityMultiplier;
}
@Override
public int getProtectionAmount(EquipmentSlot slot) {
return this.protectionAmounts[slot.getEntitySlotId()];
public int getDefenseForSlot(EquipmentSlot slot) {
return this.protectionAmounts[slot.getIndex()];
}
@Override
public int getEnchantability() {
public int getEnchantmentValue() {
return this.enchantability;
}

View file

@ -1,7 +1,6 @@
package ru.betterend.item.material;
import java.util.function.Supplier;
import net.minecraft.util.LazyLoadedValue;
import net.minecraft.world.item.Tier;
import net.minecraft.world.item.crafting.Ingredient;
@ -11,9 +10,11 @@ import ru.betterend.registry.EndItems;
public enum EndToolMaterial implements Tier {
THALLASIUM(2, 320, 7.0F, 1.5F, 12, () -> {
return Ingredient.of(EndBlocks.THALLASIUM.ingot);
}), TERMINITE(3, 1230, 8.5F, 3.0F, 14, () -> {
}),
TERMINITE(3, 1230, 8.5F, 3.0F, 14, () -> {
return Ingredient.of(EndBlocks.TERMINITE.ingot);
}), AETERNIUM(5, 2196, 10.0F, 4.5F, 18, () -> {
}),
AETERNIUM(5, 2196, 10.0F, 4.5F, 18, () -> {
return Ingredient.of(EndItems.AETERNIUM_INGOT);
});
@ -23,7 +24,7 @@ public enum EndToolMaterial implements Tier {
private final int miningLevel;
private final int enchantability;
private final LazyLoadedValue<Ingredient> repairIngredient;
private EndToolMaterial(int miningLevel, int durability, float miningSpeed, float attackDamage, int enchantability,
Supplier<Ingredient> repairIngredient) {
@ -37,27 +38,27 @@ public enum EndToolMaterial implements Tier {
@Override
public int getUses() {
return durability;
return this.durability;
}
@Override
public float getSpeed() {
return miningSpeed;
return this.miningSpeed;
}
@Override
public float getAttackDamageBonus() {
return attackDamage;
return this.attackDamage;
}
@Override
public int getLevel() {
return miningLevel;
return this.miningLevel;
}
@Override
public int getEnchantmentValue() {
return enchantability;
return this.enchantability;
}
@Override