Berserkers Pauldron
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"overrides": [
|
||||
{
|
||||
"model": "acesbs:item/berserkers_pauldron_quartz_trim",
|
||||
"predicate": {
|
||||
"trim_type": 0.1
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "acesbs:item/berserkers_pauldron_iron_trim",
|
||||
"predicate": {
|
||||
"trim_type": 0.2
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "acesbs:item/berserkers_pauldron_netherite_trim",
|
||||
"predicate": {
|
||||
"trim_type": 0.3
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "acesbs:item/berserkers_pauldron_redstone_trim",
|
||||
"predicate": {
|
||||
"trim_type": 0.4
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "acesbs:item/berserkers_pauldron_copper_trim",
|
||||
"predicate": {
|
||||
"trim_type": 0.5
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "acesbs:item/berserkers_pauldron_gold_trim",
|
||||
"predicate": {
|
||||
"trim_type": 0.6
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "acesbs:item/berserkers_pauldron_emerald_trim",
|
||||
"predicate": {
|
||||
"trim_type": 0.7
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "acesbs:item/berserkers_pauldron_diamond_trim",
|
||||
"predicate": {
|
||||
"trim_type": 0.8
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "acesbs:item/berserkers_pauldron_lapis_trim",
|
||||
"predicate": {
|
||||
"trim_type": 0.9
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "acesbs:item/berserkers_pauldron_amethyst_trim",
|
||||
"predicate": {
|
||||
"trim_type": 1.0
|
||||
}
|
||||
}
|
||||
],
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/berserkers_pauldron"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/berserkers_pauldron",
|
||||
"layer1": "minecraft:trims/items/chestplate_trim_amethyst"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/berserkers_pauldron",
|
||||
"layer1": "minecraft:trims/items/chestplate_trim_copper"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/berserkers_pauldron",
|
||||
"layer1": "minecraft:trims/items/chestplate_trim_diamond"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/berserkers_pauldron",
|
||||
"layer1": "minecraft:trims/items/chestplate_trim_emerald"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/berserkers_pauldron",
|
||||
"layer1": "minecraft:trims/items/chestplate_trim_gold"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/berserkers_pauldron",
|
||||
"layer1": "minecraft:trims/items/chestplate_trim_iron"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/berserkers_pauldron",
|
||||
"layer1": "minecraft:trims/items/chestplate_trim_lapis"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/berserkers_pauldron",
|
||||
"layer1": "minecraft:trims/items/chestplate_trim_netherite"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/berserkers_pauldron",
|
||||
"layer1": "minecraft:trims/items/chestplate_trim_quartz"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/berserkers_pauldron",
|
||||
"layer1": "minecraft:trims/items/chestplate_trim_redstone"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"acesbs:crab_rave_music_disc"
|
||||
]
|
||||
}
|
||||
@@ -74,5 +74,7 @@ public class ModModelProvider extends FabricModelProvider {
|
||||
itemModelGenerator.registerArmor((ArmorItem) ModItems.PRISMA_STEEL_CHESTPLATE);
|
||||
itemModelGenerator.registerArmor((ArmorItem) ModItems.PRISMA_STEEL_LEGGINGS);
|
||||
itemModelGenerator.registerArmor((ArmorItem) ModItems.PRISMA_STEEL_BOOTS);
|
||||
|
||||
itemModelGenerator.registerArmor((ArmorItem) ModItems.BERSERKERS_PAULDRON);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.acethewildfire.acesbs.item;
|
||||
import com.acethewildfire.acesbs.AcesBS;
|
||||
import net.minecraft.item.ArmorItem;
|
||||
import net.minecraft.item.ArmorMaterial;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.recipe.Ingredient;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
@@ -27,6 +28,16 @@ public class ModArmorMaterials {
|
||||
}), 20, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, () -> Ingredient.ofItems(ModItems.PRISMA_STEEL),
|
||||
List.of(new ArmorMaterial.Layer(Identifier.of(AcesBS.MOD_ID, "prisma_steel"))), 0, 0));
|
||||
|
||||
public static final RegistryEntry<ArmorMaterial> BERSERKERS = registerArmorMaterial("berserkers",
|
||||
() -> new ArmorMaterial(Util.make(new EnumMap<>(ArmorItem.Type.class), map -> {
|
||||
map.put(ArmorItem.Type.BOOTS, 2);
|
||||
map.put(ArmorItem.Type.LEGGINGS, 4);
|
||||
map.put(ArmorItem.Type.CHESTPLATE, 6);
|
||||
map.put(ArmorItem.Type.HELMET, 2);
|
||||
map.put(ArmorItem.Type.BODY, 4);
|
||||
}), 20, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, () -> Ingredient.ofItems(Items.LEATHER),
|
||||
List.of(new ArmorMaterial.Layer(Identifier.of(AcesBS.MOD_ID, "berserkers"))), 0, 0));
|
||||
|
||||
public static RegistryEntry<ArmorMaterial> registerArmorMaterial(String name, Supplier<ArmorMaterial> material){
|
||||
|
||||
return Registry.registerReference(Registries.ARMOR_MATERIAL, Identifier.of(AcesBS.MOD_ID, name), material.get());
|
||||
|
||||
@@ -74,6 +74,7 @@ public class ModItemGroups {
|
||||
entries.add(ModItems.PRISMA_STEEL_LEGGINGS);
|
||||
entries.add(ModItems.PRISMA_STEEL_BOOTS);
|
||||
entries.add(ModItems.KAUPEN_BOW);
|
||||
entries.add(ModItems.BERSERKERS_PAULDRON);
|
||||
|
||||
|
||||
})
|
||||
|
||||
@@ -9,7 +9,12 @@ import com.acethewildfire.acesbs.potion.ModPotions;
|
||||
import com.acethewildfire.acesbs.sounds.ModSounds;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.component.DataComponentTypes;
|
||||
import net.minecraft.component.type.AttributeModifierSlot;
|
||||
import net.minecraft.component.type.AttributeModifiersComponent;
|
||||
import net.minecraft.component.type.PotionContentsComponent;
|
||||
import net.minecraft.entity.attribute.EntityAttribute;
|
||||
import net.minecraft.entity.attribute.EntityAttributeModifier;
|
||||
import net.minecraft.entity.attribute.EntityAttributes;
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.*;
|
||||
@@ -114,7 +119,30 @@ public class ModItems {
|
||||
public static final Item CRAB_RAVE_MUSIC_DISC = registerItem("crab_rave_music_disc",
|
||||
new Item(new Item.Settings().jukeboxPlayable(ModSounds.CRAB_RAVE_KEY).maxCount(1)));
|
||||
|
||||
|
||||
public static final Item BERSERKERS_PAULDRON = registerItem("berserkers_pauldron",
|
||||
new ModArmorItem(ModArmorMaterials.BERSERKERS, ArmorItem.Type.CHESTPLATE, new Item.Settings()
|
||||
.maxDamage(ArmorItem.Type.CHESTPLATE.getMaxDamage(15)).attributeModifiers(AttributeModifiersComponent.builder()
|
||||
.add(EntityAttributes.GENERIC_MAX_HEALTH,
|
||||
new EntityAttributeModifier(Identifier.of(AcesBS.MOD_ID, "generic.max_health"), 20, EntityAttributeModifier.Operation.ADD_VALUE), AttributeModifierSlot.CHEST)
|
||||
.add(EntityAttributes.GENERIC_ARMOR,
|
||||
new EntityAttributeModifier(Identifier.of(AcesBS.MOD_ID, "generic.armor"), -20, EntityAttributeModifier.Operation.ADD_VALUE), AttributeModifierSlot.CHEST)
|
||||
.add(EntityAttributes.GENERIC_KNOCKBACK_RESISTANCE,
|
||||
new EntityAttributeModifier(Identifier.of(AcesBS.MOD_ID, "generic.knockback_resistance"), 1.0f, EntityAttributeModifier.Operation.ADD_VALUE), AttributeModifierSlot.CHEST)
|
||||
.build())){
|
||||
@Override
|
||||
public void appendTooltip(ItemStack stack, TooltipContext context, List<Text> tooltip, TooltipType type) {
|
||||
if(!Screen.hasShiftDown()){
|
||||
tooltip.add(Text.translatable("tooltip.acesbs.berserkers_pauldron_desc"));
|
||||
tooltip.add(Text.translatable("tooltip.acesbs.generic.shift_more"));
|
||||
}
|
||||
else {
|
||||
tooltip.add(Text.translatable("tooltip.acesbs.berserkers_pauldron_thanks"));
|
||||
tooltip.add(Text.translatable("tooltip.acesbs.thanks_sov"));
|
||||
}
|
||||
super.appendTooltip(stack, context, tooltip, type);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
Reference in New Issue
Block a user