added ender armour, need to polish thing and give the ingot an item model - disabled at eagerLoad for now

This commit is contained in:
2026-07-12 00:04:56 +01:00
parent fe04526040
commit e58470c0cc
23 changed files with 291 additions and 153 deletions
@@ -4,6 +4,7 @@ import dev.zxq5.items.template.ArmorSet
import dev.zxq5.items.template.GenericGearSet
import dev.zxq5.items.template.registerItem
import dev.zxq5.items.template.provideDelegate
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents
import net.minecraft.core.component.DataComponents
import net.minecraft.sounds.SoundEvents
import net.minecraft.world.InteractionHand
@@ -49,7 +50,7 @@ object Witherite: GenericGearSet() {
Optional.empty() // default disable sound
))
}
smithingUpgrade(Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE, Items.NETHERITE_SWORD, Items.WITHER_SKELETON_SKULL)
smithingUpgrade(Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE, Items.SHIELD, Items.WITHER_SKELETON_SKULL)
}
val SWORD by registerItem("witherite_sword", ::WitheriteSword) {
@@ -102,7 +103,13 @@ object Witherite: GenericGearSet() {
override val items = listOf(SWORD, AXE, SHIELD, HELMET, CHESTPLATE, LEGGINGS, BOOTS)
override fun onLoad() {
// empty function - this must be called to initialise the above properties ^
ServerTickEvents.END_SERVER_TICK.register { server ->
for (player in server.playerList.players) {
if (fullSetEquippedBy(player)) {
player.removeEffect(MobEffects.WITHER)
}
}
}
}
}