Reformated
This commit is contained in:
parent
fc1da134e7
commit
60e8008cb7
416 changed files with 5772 additions and 4573 deletions
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.item;
|
||||
|
||||
import org.betterx.bclib.items.BaseArmorItem;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.interfaces.FallFlyingItem;
|
||||
import org.betterx.betterend.interfaces.MultiModelItem;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
|
||||
|
@ -10,12 +16,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry;
|
||||
|
||||
import org.betterx.bclib.items.BaseArmorItem;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.interfaces.FallFlyingItem;
|
||||
import org.betterx.betterend.interfaces.MultiModelItem;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
public class ArmoredElytra extends BaseArmorItem implements MultiModelItem, FallFlyingItem {
|
||||
private final ResourceLocation wingTexture;
|
||||
private final Item repairItem;
|
||||
|
@ -23,12 +23,14 @@ public class ArmoredElytra extends BaseArmorItem implements MultiModelItem, Fall
|
|||
private final float toughness;
|
||||
private final int defense;
|
||||
|
||||
public ArmoredElytra(String name,
|
||||
ArmorMaterial material,
|
||||
Item repairItem,
|
||||
int durability,
|
||||
double movementFactor,
|
||||
boolean fireproof) {
|
||||
public ArmoredElytra(
|
||||
String name,
|
||||
ArmorMaterial material,
|
||||
Item repairItem,
|
||||
int durability,
|
||||
double movementFactor,
|
||||
boolean fireproof
|
||||
) {
|
||||
super(
|
||||
material,
|
||||
EquipmentSlot.CHEST,
|
||||
|
@ -37,7 +39,7 @@ public class ArmoredElytra extends BaseArmorItem implements MultiModelItem, Fall
|
|||
.durability(durability)
|
||||
.rarity(Rarity.EPIC)
|
||||
.fireResistant() : EndItems.makeEndItemSettings().durability(durability).rarity(Rarity.EPIC)
|
||||
);
|
||||
);
|
||||
this.wingTexture = BetterEnd.makeID("textures/entity/" + name + ".png");
|
||||
this.repairItem = repairItem;
|
||||
this.movementFactor = movementFactor;
|
||||
|
@ -45,20 +47,22 @@ public class ArmoredElytra extends BaseArmorItem implements MultiModelItem, Fall
|
|||
this.toughness = material.getToughness() / 1.75F;
|
||||
addAttributeModifier(
|
||||
Attributes.ARMOR,
|
||||
new AttributeModifier(ARMOR_MODIFIER_UUID_PER_SLOT[2],
|
||||
"Armor modifier",
|
||||
defense,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
new AttributeModifier(
|
||||
ARMOR_MODIFIER_UUID_PER_SLOT[2],
|
||||
"Armor modifier",
|
||||
defense,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
)
|
||||
);
|
||||
);
|
||||
addAttributeModifier(
|
||||
Attributes.ARMOR_TOUGHNESS,
|
||||
new AttributeModifier(ARMOR_MODIFIER_UUID_PER_SLOT[2],
|
||||
"Armor toughness",
|
||||
toughness,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
new AttributeModifier(
|
||||
ARMOR_MODIFIER_UUID_PER_SLOT[2],
|
||||
"Armor toughness",
|
||||
toughness,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
)
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -94,6 +98,6 @@ public class ArmoredElytra extends BaseArmorItem implements MultiModelItem, Fall
|
|||
this,
|
||||
new ResourceLocation("broken"),
|
||||
(itemStack, clientLevel, livingEntity, id) -> ElytraItem.isFlyEnabled(itemStack) ? 0.0F : 1.0F
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.item;
|
||||
|
||||
import org.betterx.bclib.items.BaseArmorItem;
|
||||
import org.betterx.betterend.effects.EndStatusEffects;
|
||||
import org.betterx.betterend.item.material.EndArmorMaterial;
|
||||
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
|
@ -9,10 +13,6 @@ import net.minecraft.world.entity.EquipmentSlot;
|
|||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
import org.betterx.bclib.items.BaseArmorItem;
|
||||
import org.betterx.betterend.effects.EndStatusEffects;
|
||||
import org.betterx.betterend.item.material.EndArmorMaterial;
|
||||
|
||||
public class CrystaliteArmor extends BaseArmorItem {
|
||||
|
||||
public final static MutableComponent CHEST_DESC;
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.item;
|
||||
|
||||
import org.betterx.betterend.effects.EndStatusEffects;
|
||||
import org.betterx.betterend.interfaces.MobEffectApplier;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.effect.MobEffectInstance;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
|
@ -12,10 +16,6 @@ import net.minecraft.world.level.Level;
|
|||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import org.betterx.betterend.effects.EndStatusEffects;
|
||||
import org.betterx.betterend.interfaces.MobEffectApplier;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.List;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.item;
|
||||
|
||||
import org.betterx.betterend.effects.EndStatusEffects;
|
||||
import org.betterx.betterend.interfaces.MobEffectApplier;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.effect.MobEffectInstance;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
|
@ -12,10 +16,6 @@ import net.minecraft.world.level.Level;
|
|||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import org.betterx.betterend.effects.EndStatusEffects;
|
||||
import org.betterx.betterend.interfaces.MobEffectApplier;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.List;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.item;
|
||||
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.interfaces.FallFlyingItem;
|
||||
import org.betterx.betterend.interfaces.MultiModelItem;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
|
||||
|
@ -12,11 +17,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry;
|
||||
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.interfaces.FallFlyingItem;
|
||||
import org.betterx.betterend.interfaces.MultiModelItem;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
public class CrystaliteElytra extends CrystaliteArmor implements MultiModelItem, FallFlyingItem {
|
||||
|
||||
private final ResourceLocation wingTexture;
|
||||
|
@ -32,20 +32,22 @@ public class CrystaliteElytra extends CrystaliteArmor implements MultiModelItem,
|
|||
this.toughness = material.getToughness() / 1.75F;
|
||||
addAttributeModifier(
|
||||
Attributes.ARMOR,
|
||||
new AttributeModifier(ARMOR_MODIFIER_UUID_PER_SLOT[2],
|
||||
"Armor modifier",
|
||||
defense,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
new AttributeModifier(
|
||||
ARMOR_MODIFIER_UUID_PER_SLOT[2],
|
||||
"Armor modifier",
|
||||
defense,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
)
|
||||
);
|
||||
);
|
||||
addAttributeModifier(
|
||||
Attributes.ARMOR_TOUGHNESS,
|
||||
new AttributeModifier(ARMOR_MODIFIER_UUID_PER_SLOT[2],
|
||||
"Armor toughness",
|
||||
toughness,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
new AttributeModifier(
|
||||
ARMOR_MODIFIER_UUID_PER_SLOT[2],
|
||||
"Armor toughness",
|
||||
toughness,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
)
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,6 +82,6 @@ public class CrystaliteElytra extends CrystaliteArmor implements MultiModelItem,
|
|||
this,
|
||||
new ResourceLocation("broken"),
|
||||
(itemStack, clientLevel, livingEntity, i) -> ElytraItem.isFlyEnabled(itemStack) ? 0.0F : 1.0F
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.betterx.betterend.item;
|
||||
|
||||
import org.betterx.betterend.registry.EndAttributes;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.world.item.Rarity;
|
||||
|
||||
import org.betterx.betterend.registry.EndAttributes;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class CrystaliteHelmet extends CrystaliteArmor {
|
||||
|
@ -17,6 +17,6 @@ public class CrystaliteHelmet extends CrystaliteArmor {
|
|||
addAttributeModifier(
|
||||
EndAttributes.BLINDNESS_RESISTANCE,
|
||||
new AttributeModifier(uuid, "Helmet blindness resistance", 1.0, AttributeModifier.Operation.ADDITION)
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.betterx.betterend.item;
|
||||
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||
import net.minecraft.world.item.Rarity;
|
||||
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class CrystaliteLeggings extends CrystaliteArmor {
|
||||
|
@ -17,6 +17,6 @@ public class CrystaliteLeggings extends CrystaliteArmor {
|
|||
addAttributeModifier(
|
||||
Attributes.MAX_HEALTH,
|
||||
new AttributeModifier(uuid, "Armor health boost", 4.0, AttributeModifier.Operation.ADDITION)
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.item;
|
||||
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.items.ModelProviderItem;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -10,10 +14,6 @@ import net.minecraft.world.item.Rarity;
|
|||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.items.ModelProviderItem;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
public class EnchantedItem extends ModelProviderItem {
|
||||
|
||||
private final Item source;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.betterx.betterend.item;
|
||||
|
||||
import org.betterx.bclib.interfaces.ItemModelProvider;
|
||||
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.entity.ai.attributes.Attribute;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
|
||||
|
@ -9,7 +11,6 @@ import net.minecraft.world.item.ArmorMaterial;
|
|||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import org.betterx.bclib.interfaces.ItemModelProvider;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -31,20 +32,21 @@ public class EndArmorItem extends ArmorItem implements ItemModelProvider {
|
|||
addAttributeModifier(
|
||||
Attributes.ARMOR,
|
||||
new AttributeModifier(uuid, "Armor modifier", getDefense(), AttributeModifier.Operation.ADDITION)
|
||||
);
|
||||
);
|
||||
addAttributeModifier(
|
||||
Attributes.ARMOR_TOUGHNESS,
|
||||
new AttributeModifier(uuid, "Armor toughness", getToughness(), AttributeModifier.Operation.ADDITION)
|
||||
);
|
||||
);
|
||||
if (knockbackResistance > 0.0F) {
|
||||
addAttributeModifier(
|
||||
Attributes.KNOCKBACK_RESISTANCE,
|
||||
new AttributeModifier(uuid,
|
||||
"Armor knockback resistance",
|
||||
knockbackResistance,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
new AttributeModifier(
|
||||
uuid,
|
||||
"Armor knockback resistance",
|
||||
knockbackResistance,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
)
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.betterx.betterend.item;
|
||||
|
||||
import org.betterx.bclib.interfaces.ItemModelProvider;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.item.MobBucketItem;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
|
||||
import org.betterx.bclib.interfaces.ItemModelProvider;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
public class EndBucketItem extends MobBucketItem implements ItemModelProvider {
|
||||
public EndBucketItem(EntityType<?> type) {
|
||||
super(type, Fluids.WATER, SoundEvents.BUCKET_EMPTY, EndItems.makeEndItemSettings().stacksTo(1));
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.betterx.betterend.item;
|
||||
|
||||
import net.minecraft.world.item.Rarity;
|
||||
|
||||
import org.betterx.bclib.items.ModelProviderItem;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.world.item.Rarity;
|
||||
|
||||
public class EternalCrystalItem extends ModelProviderItem {
|
||||
public EternalCrystalItem() {
|
||||
super(EndItems.makeEndItemSettings().stacksTo(16).rarity(Rarity.EPIC));
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.item;
|
||||
|
||||
import org.betterx.bclib.items.ModelProviderItem;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
import org.betterx.betterend.util.LangUtil;
|
||||
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -12,11 +17,6 @@ import net.minecraft.world.item.ItemStack;
|
|||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
||||
import org.betterx.bclib.items.ModelProviderItem;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
import org.betterx.betterend.util.LangUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GuideBookItem extends ModelProviderItem {
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.item.material;
|
||||
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.util.LazyLoadedValue;
|
||||
|
@ -7,9 +10,6 @@ import net.minecraft.world.entity.EquipmentSlot;
|
|||
import net.minecraft.world.item.ArmorMaterial;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public enum EndArmorMaterial implements ArmorMaterial {
|
||||
|
@ -35,14 +35,16 @@ public enum EndArmorMaterial implements ArmorMaterial {
|
|||
private final LazyLoadedValue<Ingredient> repairIngredient;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
EndArmorMaterial(String name,
|
||||
int durabilityMultiplier,
|
||||
int[] protectionAmounts,
|
||||
int enchantability,
|
||||
SoundEvent equipSound,
|
||||
float toughness,
|
||||
float knockbackResistance,
|
||||
Supplier<Ingredient> repairIngredient) {
|
||||
EndArmorMaterial(
|
||||
String name,
|
||||
int durabilityMultiplier,
|
||||
int[] protectionAmounts,
|
||||
int enchantability,
|
||||
SoundEvent equipSound,
|
||||
float toughness,
|
||||
float knockbackResistance,
|
||||
Supplier<Ingredient> repairIngredient
|
||||
) {
|
||||
this.name = name;
|
||||
this.durabilityMultiplier = durabilityMultiplier;
|
||||
this.protectionAmounts = protectionAmounts;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.betterx.betterend.item.material;
|
||||
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.util.LazyLoadedValue;
|
||||
import net.minecraft.world.item.Tier;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public enum EndToolMaterial implements Tier {
|
||||
|
@ -27,12 +27,14 @@ public enum EndToolMaterial implements Tier {
|
|||
private final LazyLoadedValue<Ingredient> repairIngredient;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
EndToolMaterial(int miningLevel,
|
||||
int durability,
|
||||
float miningSpeed,
|
||||
float attackDamage,
|
||||
int enchantability,
|
||||
Supplier<Ingredient> repairIngredient) {
|
||||
EndToolMaterial(
|
||||
int miningLevel,
|
||||
int durability,
|
||||
float miningSpeed,
|
||||
float attackDamage,
|
||||
int enchantability,
|
||||
Supplier<Ingredient> repairIngredient
|
||||
) {
|
||||
this.durability = durability;
|
||||
this.miningSpeed = miningSpeed;
|
||||
this.attackDamage = attackDamage;
|
||||
|
|
|
@ -25,13 +25,13 @@ public class ArmoredElytraModel<T extends LivingEntity> extends AgeableListModel
|
|||
PartNames.LEFT_WING,
|
||||
CubeListBuilder.create().texOffs(22, 0).addBox(-10.0f, 0.0f, 0.0f, 10.0f, 20.0f, 2.0f),
|
||||
PartPose.ZERO
|
||||
);
|
||||
);
|
||||
|
||||
modelPartData.addOrReplaceChild(
|
||||
PartNames.RIGHT_WING,
|
||||
CubeListBuilder.create().mirror().texOffs(22, 0).addBox(0.0f, 0.0f, 0.0f, 10.0f, 20.0f, 2.0f),
|
||||
PartPose.ZERO
|
||||
);
|
||||
);
|
||||
|
||||
return LayerDefinition.create(modelData, 64, 32);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.item.model;
|
||||
|
||||
import org.betterx.betterend.item.CrystaliteArmor;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.client.model.HumanoidModel;
|
||||
import net.minecraft.client.player.AbstractClientPlayer;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -12,8 +15,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.betterend.item.CrystaliteArmor;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
import shadow.fabric.api.client.rendering.v1.ArmorRenderingRegistry;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -33,22 +34,26 @@ public class CrystaliteArmorProvider implements ArmorRenderingRegistry.ModelProv
|
|||
private final static CrystaliteBootsModel BOOTS_MODEL = CrystaliteBootsModel.createModel(null);
|
||||
|
||||
//@Override
|
||||
public @NotNull ResourceLocation getArmorTexture(LivingEntity entity,
|
||||
ItemStack stack,
|
||||
EquipmentSlot slot,
|
||||
boolean secondLayer,
|
||||
@Nullable String suffix,
|
||||
ResourceLocation defaultTexture) {
|
||||
public @NotNull ResourceLocation getArmorTexture(
|
||||
LivingEntity entity,
|
||||
ItemStack stack,
|
||||
EquipmentSlot slot,
|
||||
boolean secondLayer,
|
||||
@Nullable String suffix,
|
||||
ResourceLocation defaultTexture
|
||||
) {
|
||||
if (!isStackValid(stack)) return defaultTexture;
|
||||
if (secondLayer) return SECOND_LAYER;
|
||||
return FIRST_LAYER;
|
||||
}
|
||||
|
||||
//@Override
|
||||
public @NotNull HumanoidModel<LivingEntity> getArmorModel(LivingEntity entity,
|
||||
ItemStack stack,
|
||||
EquipmentSlot slot,
|
||||
HumanoidModel<LivingEntity> defaultModel) {
|
||||
public @NotNull HumanoidModel<LivingEntity> getArmorModel(
|
||||
LivingEntity entity,
|
||||
ItemStack stack,
|
||||
EquipmentSlot slot,
|
||||
HumanoidModel<LivingEntity> defaultModel
|
||||
) {
|
||||
if (!isStackValid(stack)) return defaultModel;
|
||||
switch (slot) {
|
||||
case HEAD: {
|
||||
|
@ -83,7 +88,7 @@ public class CrystaliteArmorProvider implements ArmorRenderingRegistry.ModelProv
|
|||
EndItems.CRYSTALITE_ELYTRA,
|
||||
EndItems.CRYSTALITE_LEGGINGS,
|
||||
EndItems.CRYSTALITE_BOOTS
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
private boolean isStackValid(ItemStack stack) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.betterx.betterend.item.model;
|
||||
|
||||
import org.betterx.betterend.registry.EndEntitiesRenders;
|
||||
|
||||
import net.minecraft.client.model.HumanoidModel;
|
||||
import net.minecraft.client.model.geom.EntityModelSet;
|
||||
import net.minecraft.client.model.geom.ModelPart;
|
||||
|
@ -9,7 +11,6 @@ import net.minecraft.client.renderer.RenderType;
|
|||
import net.minecraft.world.entity.LivingEntity;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.betterend.registry.EndEntitiesRenders;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
|
@ -39,22 +40,22 @@ public class CrystaliteBootsModel extends HumanoidModel<LivingEntity> {
|
|||
"leftBoot",
|
||||
CubeListBuilder.create().texOffs(0, 32).addBox(-2.0f, 0.0f, -2.0f, 4.0f, 12.0f, 4.0f, deformation),
|
||||
PartPose.offset(1.9f, 12.0f, 0.0f)
|
||||
);
|
||||
);
|
||||
|
||||
modelPartData.addOrReplaceChild(
|
||||
"rightBoot",
|
||||
CubeListBuilder.create().texOffs(0, 16).addBox(-2.0f, 0.0f, -2.0f, 4.0f, 12.0f, 4.0f, deformation),
|
||||
PartPose.offset(-1.9f, 12.0f, 0.0f)
|
||||
);
|
||||
);
|
||||
|
||||
return LayerDefinition.create(modelData, 64, 48);
|
||||
}
|
||||
|
||||
public static CrystaliteBootsModel createModel(EntityModelSet entityModelSet) {
|
||||
return new CrystaliteBootsModel(entityModelSet == null
|
||||
? getTexturedModelData().bakeRoot()
|
||||
: entityModelSet.bakeLayer(
|
||||
EndEntitiesRenders.CRYSTALITE_BOOTS));
|
||||
? getTexturedModelData().bakeRoot()
|
||||
: entityModelSet.bakeLayer(
|
||||
EndEntitiesRenders.CRYSTALITE_BOOTS));
|
||||
}
|
||||
|
||||
public CrystaliteBootsModel(ModelPart modelPart) {
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.item.model;
|
||||
|
||||
import org.betterx.betterend.registry.EndEntitiesRenders;
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import net.minecraft.client.model.HumanoidModel;
|
||||
import net.minecraft.client.model.geom.EntityModelSet;
|
||||
import net.minecraft.client.model.geom.ModelPart;
|
||||
|
@ -11,8 +14,6 @@ import net.minecraft.world.entity.HumanoidArm;
|
|||
import net.minecraft.world.entity.LivingEntity;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import org.betterx.betterend.registry.EndEntitiesRenders;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
|
@ -50,7 +51,7 @@ public class CrystaliteChestplateModel extends HumanoidModel<LivingEntity> {
|
|||
PartNames.BODY,
|
||||
CubeListBuilder.create().texOffs(16, 16).addBox(-4.0f, 0.0f, -2.0f, 8.0f, 12.0f, 4.0f, deformation),
|
||||
PartPose.ZERO
|
||||
);
|
||||
);
|
||||
|
||||
if (thinArms) {
|
||||
deformation = new CubeDeformation(scale + 0.45F);
|
||||
|
@ -61,7 +62,7 @@ public class CrystaliteChestplateModel extends HumanoidModel<LivingEntity> {
|
|||
.texOffs(40, 32)
|
||||
.addBox(-1.0f, -2.5f, -2.0f, 4.0f, 12.0f, 4.0f, deformation),
|
||||
PartPose.offset(5.0f, 2.0f, 0.0f)
|
||||
);
|
||||
);
|
||||
|
||||
PartDefinition rightShoulder = modelPartData.addOrReplaceChild(
|
||||
"rightShoulder",
|
||||
|
@ -69,7 +70,7 @@ public class CrystaliteChestplateModel extends HumanoidModel<LivingEntity> {
|
|||
.texOffs(40, 16)
|
||||
.addBox(-3.0f, -2.5f, -2.0f, 4.0f, 12.0f, 4.0f, deformation),
|
||||
PartPose.offset(-5.0f, 2.0f, 10.0f)
|
||||
);
|
||||
);
|
||||
} else {
|
||||
deformation = new CubeDeformation(scale + 0.45F);
|
||||
PartDefinition leftShoulder = modelPartData.addOrReplaceChild(
|
||||
|
@ -79,7 +80,7 @@ public class CrystaliteChestplateModel extends HumanoidModel<LivingEntity> {
|
|||
.texOffs(40, 32)
|
||||
.addBox(-1.0f, -2.5f, -2.0f, 4.0f, 12.0f, 4.0f, deformation),
|
||||
PartPose.offset(5.0f, 2.0f, 0.0f)
|
||||
);
|
||||
);
|
||||
|
||||
PartDefinition rightShoulder = modelPartData.addOrReplaceChild(
|
||||
"rightShoulder",
|
||||
|
@ -87,7 +88,7 @@ public class CrystaliteChestplateModel extends HumanoidModel<LivingEntity> {
|
|||
.texOffs(40, 16)
|
||||
.addBox(-3.0f, -2.5f, -2.0f, 4.0f, 12.0f, 4.0f, deformation),
|
||||
PartPose.offset(-5.0f, 2.0f, 10.0f)
|
||||
);
|
||||
);
|
||||
}
|
||||
return LayerDefinition.create(modelData, 64, 48);
|
||||
}
|
||||
|
@ -95,19 +96,23 @@ public class CrystaliteChestplateModel extends HumanoidModel<LivingEntity> {
|
|||
final ModelPart localBody;
|
||||
|
||||
public static CrystaliteChestplateModel createRegularModel(EntityModelSet entityModelSet) {
|
||||
return new CrystaliteChestplateModel(entityModelSet == null
|
||||
? getRegularTexturedModelData().bakeRoot()
|
||||
: entityModelSet
|
||||
.bakeLayer(EndEntitiesRenders.CRYSTALITE_CHESTPLATE),
|
||||
false);
|
||||
return new CrystaliteChestplateModel(
|
||||
entityModelSet == null
|
||||
? getRegularTexturedModelData().bakeRoot()
|
||||
: entityModelSet
|
||||
.bakeLayer(EndEntitiesRenders.CRYSTALITE_CHESTPLATE),
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
public static CrystaliteChestplateModel createThinModel(EntityModelSet entityModelSet) {
|
||||
return new CrystaliteChestplateModel(entityModelSet == null
|
||||
? getThinTexturedModelData().bakeRoot()
|
||||
: entityModelSet
|
||||
.bakeLayer(EndEntitiesRenders.CRYSTALITE_CHESTPLATE_THIN),
|
||||
true);
|
||||
return new CrystaliteChestplateModel(
|
||||
entityModelSet == null
|
||||
? getThinTexturedModelData().bakeRoot()
|
||||
: entityModelSet
|
||||
.bakeLayer(EndEntitiesRenders.CRYSTALITE_CHESTPLATE_THIN),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
protected CrystaliteChestplateModel(ModelPart modelPart, boolean thinArms) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.betterx.betterend.item.model;
|
||||
|
||||
import org.betterx.betterend.registry.EndEntitiesRenders;
|
||||
|
||||
import net.minecraft.client.model.HumanoidModel;
|
||||
import net.minecraft.client.model.geom.EntityModelSet;
|
||||
import net.minecraft.client.model.geom.ModelPart;
|
||||
|
@ -13,7 +15,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.betterend.registry.EndEntitiesRenders;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
|
@ -42,16 +43,16 @@ public class CrystaliteHelmetModel extends HumanoidModel<LivingEntity> {
|
|||
PartNames.HAT,
|
||||
CubeListBuilder.create().texOffs(0, 0).addBox(-4.0f, -8.0f, -4.0f, 8.0f, 8.0f, 8.0f, deformation_hat),
|
||||
PartPose.ZERO
|
||||
);
|
||||
);
|
||||
|
||||
return LayerDefinition.create(modelData, 64, 48);
|
||||
}
|
||||
|
||||
public static CrystaliteHelmetModel createModel(EntityModelSet entityModelSet) {
|
||||
return new CrystaliteHelmetModel(entityModelSet == null
|
||||
? getTexturedModelData().bakeRoot()
|
||||
: entityModelSet.bakeLayer(
|
||||
EndEntitiesRenders.CRYSTALITE_HELMET));
|
||||
? getTexturedModelData().bakeRoot()
|
||||
: entityModelSet.bakeLayer(
|
||||
EndEntitiesRenders.CRYSTALITE_HELMET));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.betterx.betterend.item.model;
|
||||
|
||||
import org.betterx.betterend.registry.EndEntitiesRenders;
|
||||
|
||||
import net.minecraft.client.model.HumanoidModel;
|
||||
import net.minecraft.client.model.geom.EntityModelSet;
|
||||
import net.minecraft.client.model.geom.ModelPart;
|
||||
|
@ -10,7 +12,6 @@ import net.minecraft.client.renderer.RenderType;
|
|||
import net.minecraft.world.entity.LivingEntity;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.betterend.registry.EndEntitiesRenders;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
|
@ -36,19 +37,19 @@ public class CrystaliteLeggingsModel extends HumanoidModel<LivingEntity> {
|
|||
PartNames.BODY,
|
||||
CubeListBuilder.create().texOffs(16, 16).addBox(-4.0f, 0.0f, -2.0f, 8.0f, 12.0f, 4.0f, deformation),
|
||||
PartPose.ZERO
|
||||
);
|
||||
);
|
||||
|
||||
modelPartData.addOrReplaceChild(
|
||||
PartNames.LEFT_LEG,
|
||||
CubeListBuilder.create().texOffs(0, 32).addBox(-2.0f, 0.0f, -2.0f, 4.0f, 12.0f, 4.0f, deformation),
|
||||
PartPose.offset(1.9f, 12.0f, 0.0f)
|
||||
);
|
||||
);
|
||||
|
||||
modelPartData.addOrReplaceChild(
|
||||
PartNames.RIGHT_LEG,
|
||||
CubeListBuilder.create().texOffs(0, 16).addBox(-2.0f, 0.0f, -2.0f, 4.0f, 12.0f, 4.0f, deformation),
|
||||
PartPose.offset(-1.9f, 12.0f, 0.0f)
|
||||
);
|
||||
);
|
||||
|
||||
return LayerDefinition.create(modelData, 64, 48);
|
||||
}
|
||||
|
@ -59,9 +60,9 @@ public class CrystaliteLeggingsModel extends HumanoidModel<LivingEntity> {
|
|||
|
||||
public static CrystaliteLeggingsModel createModel(EntityModelSet entityModelSet) {
|
||||
return new CrystaliteLeggingsModel(entityModelSet == null
|
||||
? getTexturedModelData().bakeRoot()
|
||||
: entityModelSet.bakeLayer(
|
||||
EndEntitiesRenders.CRYSTALITE_LEGGINGS));
|
||||
? getTexturedModelData().bakeRoot()
|
||||
: entityModelSet.bakeLayer(
|
||||
EndEntitiesRenders.CRYSTALITE_LEGGINGS));
|
||||
}
|
||||
|
||||
public CrystaliteLeggingsModel(ModelPart modelPart) {
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
package org.betterx.betterend.item.tool;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.api.v2.tag.CommonItemTags;
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.interfaces.ItemModelProvider;
|
||||
import org.betterx.bclib.interfaces.TagProvider;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -27,12 +34,6 @@ import net.fabricmc.api.Environment;
|
|||
import com.google.common.collect.ImmutableMultimap;
|
||||
import com.google.common.collect.ImmutableMultimap.Builder;
|
||||
import com.google.common.collect.Multimap;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.api.v2.tag.CommonItemTags;
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.interfaces.ItemModelProvider;
|
||||
import org.betterx.bclib.interfaces.TagProvider;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
@ -48,28 +49,31 @@ public class EndHammerItem extends DiggerItem implements ItemModelProvider, TagP
|
|||
Builder<Attribute, AttributeModifier> builder = ImmutableMultimap.builder();
|
||||
builder.put(
|
||||
Attributes.ATTACK_DAMAGE,
|
||||
new AttributeModifier(BASE_ATTACK_DAMAGE_UUID,
|
||||
"Weapon modifier",
|
||||
attackDamage + material.getAttackDamageBonus(),
|
||||
AttributeModifier.Operation.ADDITION
|
||||
new AttributeModifier(
|
||||
BASE_ATTACK_DAMAGE_UUID,
|
||||
"Weapon modifier",
|
||||
attackDamage + material.getAttackDamageBonus(),
|
||||
AttributeModifier.Operation.ADDITION
|
||||
)
|
||||
);
|
||||
);
|
||||
builder.put(
|
||||
Attributes.ATTACK_SPEED,
|
||||
new AttributeModifier(BASE_ATTACK_SPEED_UUID,
|
||||
"Weapon modifier",
|
||||
attackSpeed,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
new AttributeModifier(
|
||||
BASE_ATTACK_SPEED_UUID,
|
||||
"Weapon modifier",
|
||||
attackSpeed,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
)
|
||||
);
|
||||
);
|
||||
builder.put(
|
||||
Attributes.ATTACK_KNOCKBACK,
|
||||
new AttributeModifier(ATTACK_KNOCKBACK_MODIFIER_ID,
|
||||
"Weapon modifier",
|
||||
knockback,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
new AttributeModifier(
|
||||
ATTACK_KNOCKBACK_MODIFIER_ID,
|
||||
"Weapon modifier",
|
||||
knockback,
|
||||
AttributeModifier.Operation.ADDITION
|
||||
)
|
||||
);
|
||||
);
|
||||
this.attributeModifiers = builder.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.betterx.betterend.item.tool;
|
||||
|
||||
import org.betterx.bclib.items.tool.BasePickaxeItem;
|
||||
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Tier;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.items.tool.BasePickaxeItem;
|
||||
|
||||
public class EndPickaxe extends BasePickaxeItem {
|
||||
public EndPickaxe(Tier material, int attackDamage, float attackSpeed, Properties settings) {
|
||||
super(material, attackDamage, attackSpeed, settings);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue