From 1c1362d6ea2bb923bcae2d834ad1809ad77b6eab Mon Sep 17 00:00:00 2001 From: zxq5 Date: Tue, 30 Jun 2026 22:26:46 +0100 Subject: [PATCH] this might actually work --- ...kotlin-compiler-4031853294287459636.salive | 0 src/main/kotlin/dev/zxq5/Fantasysmp.kt | 47 +++++- src/main/kotlin/dev/zxq5/items/Dragonite.kt | 142 ++++++++++++++++++ src/main/kotlin/dev/zxq5/items/Items.kt | 29 ++-- src/main/kotlin/dev/zxq5/items/Witherite.kt | 47 ++++-- .../assets/fantasysmp/items/dragon_scale.json | 6 + .../fantasysmp/items/dragonite_ingot.json | 6 + .../fantasysmp/items/witherite_axe.json | 6 + .../fantasysmp/items/witherite_shield.json | 44 ++++++ .../assets/fantasysmp/lang/en_us.json | 9 +- .../fantasysmp/models/item/dragon_scale.json | 6 + .../models/item/dragonite_ingot.json | 6 + .../fantasysmp/models/item/witherite_axe.json | 6 + .../models/item/witherite_shield.json | 48 ++++++ .../item/witherite_shield_blocking.json | 33 ++++ .../textures/entity/shield/witherite.png | Bin 0 -> 411 bytes .../fantasysmp/textures/item/dragon_scale.png | Bin 0 -> 589 bytes .../textures/item/dragonite_ingot.png | Bin 0 -> 451 bytes .../textures/item/iron_nautilus_armor.png | Bin 0 -> 167 bytes .../textures/item/netherite_ingot.png | Bin 0 -> 208 bytes .../data/fantasysmp/recipe/dragon_boots.json | 10 ++ .../fantasysmp/recipe/dragon_chestplate.json | 9 ++ .../data/fantasysmp/recipe/dragon_helmet.json | 9 ++ .../fantasysmp/recipe/dragon_leggings.json | 9 ++ .../data/fantasysmp/recipe/dragon_sword.json | 9 ++ .../fantasysmp/recipe/dragonite_ingot.json | 27 ++++ .../data/fantasysmp/recipe/witherite_axe.json | 9 ++ .../fantasysmp/recipe/witherite_shield.json | 9 ++ .../fantasysmp/recipe/witherite_sword.json | 2 +- .../loot_table/entities/ender_dragon.json | 24 +++ 30 files changed, 526 insertions(+), 26 deletions(-) create mode 100644 .kotlin/sessions/kotlin-compiler-4031853294287459636.salive create mode 100644 src/main/kotlin/dev/zxq5/items/Dragonite.kt create mode 100644 src/main/resources/assets/fantasysmp/items/dragon_scale.json create mode 100644 src/main/resources/assets/fantasysmp/items/dragonite_ingot.json create mode 100644 src/main/resources/assets/fantasysmp/items/witherite_axe.json create mode 100644 src/main/resources/assets/fantasysmp/items/witherite_shield.json create mode 100644 src/main/resources/assets/fantasysmp/models/item/dragon_scale.json create mode 100644 src/main/resources/assets/fantasysmp/models/item/dragonite_ingot.json create mode 100644 src/main/resources/assets/fantasysmp/models/item/witherite_axe.json create mode 100644 src/main/resources/assets/fantasysmp/models/item/witherite_shield.json create mode 100644 src/main/resources/assets/fantasysmp/models/item/witherite_shield_blocking.json create mode 100644 src/main/resources/assets/fantasysmp/textures/entity/shield/witherite.png create mode 100644 src/main/resources/assets/fantasysmp/textures/item/dragon_scale.png create mode 100644 src/main/resources/assets/fantasysmp/textures/item/dragonite_ingot.png create mode 100644 src/main/resources/assets/fantasysmp/textures/item/iron_nautilus_armor.png create mode 100644 src/main/resources/assets/fantasysmp/textures/item/netherite_ingot.png create mode 100644 src/main/resources/data/fantasysmp/recipe/dragon_boots.json create mode 100644 src/main/resources/data/fantasysmp/recipe/dragon_chestplate.json create mode 100644 src/main/resources/data/fantasysmp/recipe/dragon_helmet.json create mode 100644 src/main/resources/data/fantasysmp/recipe/dragon_leggings.json create mode 100644 src/main/resources/data/fantasysmp/recipe/dragon_sword.json create mode 100644 src/main/resources/data/fantasysmp/recipe/dragonite_ingot.json create mode 100644 src/main/resources/data/fantasysmp/recipe/witherite_axe.json create mode 100644 src/main/resources/data/fantasysmp/recipe/witherite_shield.json create mode 100644 src/main/resources/data/minecraft/loot_table/entities/ender_dragon.json diff --git a/.kotlin/sessions/kotlin-compiler-4031853294287459636.salive b/.kotlin/sessions/kotlin-compiler-4031853294287459636.salive new file mode 100644 index 0000000..e69de29 diff --git a/src/main/kotlin/dev/zxq5/Fantasysmp.kt b/src/main/kotlin/dev/zxq5/Fantasysmp.kt index 9961210..d784d7e 100644 --- a/src/main/kotlin/dev/zxq5/Fantasysmp.kt +++ b/src/main/kotlin/dev/zxq5/Fantasysmp.kt @@ -1,12 +1,16 @@ package dev.zxq5 import dev.zxq5.items.ModItems -import dev.zxq5.items.ModItems.CUSTOM_CREATIVE_TAB -import dev.zxq5.items.ModItems.CUSTOM_CREATIVE_TAB_KEY +import dev.zxq5.items.Witherite +import dev.zxq5.items.isWearingFullSet import net.fabricmc.api.ModInitializer -import net.minecraft.core.Registry -import net.minecraft.core.registries.BuiltInRegistries -import net.minecraft.world.item.Item +import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents +import net.fabricmc.fabric.api.event.player.AttackEntityCallback +import net.minecraft.world.InteractionHand +import net.minecraft.world.InteractionResult +import net.minecraft.world.effect.MobEffectInstance +import net.minecraft.world.effect.MobEffects +import net.minecraft.world.entity.LivingEntity import org.slf4j.LoggerFactory object Fantasysmp : ModInitializer { @@ -22,5 +26,38 @@ object Fantasysmp : ModInitializer { logger.info("Hello Fabric world!") ModItems.init(); // Register the group. + registerItemEffects() + } + + private fun registerItemEffects() { + ServerTickEvents.END_SERVER_TICK.register { server -> + for (player in server.playerList.players) { + if (player.isWearingFullSet(Witherite.ARMOUR_SET)) { + player.removeEffect(MobEffects.WITHER) + } + } + } + + AttackEntityCallback.EVENT.register { player, world, hand, entity, _ -> + if (world.isClientSide) return@register InteractionResult.PASS + if (hand != InteractionHand.MAIN_HAND) return@register InteractionResult.PASS + if (player.getItemInHand(hand).item != Witherite.SWORD) return@register InteractionResult.PASS + if (entity is LivingEntity) { + entity.addEffect(MobEffectInstance(MobEffects.WITHER, 60, 1), player) + } + + InteractionResult.PASS + } + + AttackEntityCallback.EVENT.register { player, world, hand, entity, _ -> + if (world.isClientSide) return@register InteractionResult.PASS + if (hand != InteractionHand.MAIN_HAND) return@register InteractionResult.PASS + if (player.getItemInHand(hand).item != Witherite.AXE) return@register InteractionResult.PASS + if (entity is LivingEntity) { + entity.addEffect(MobEffectInstance(MobEffects.WITHER, 60, 1), player) + } + + InteractionResult.PASS + } } } \ No newline at end of file diff --git a/src/main/kotlin/dev/zxq5/items/Dragonite.kt b/src/main/kotlin/dev/zxq5/items/Dragonite.kt new file mode 100644 index 0000000..7c0cdf9 --- /dev/null +++ b/src/main/kotlin/dev/zxq5/items/Dragonite.kt @@ -0,0 +1,142 @@ +package dev.zxq5.items + +import dev.zxq5.Fantasysmp +import dev.zxq5.items.ModItems.register +import net.minecraft.core.component.DataComponents +import net.minecraft.core.particles.ParticleOptions +import net.minecraft.core.particles.ParticleTypes +import net.minecraft.resources.Identifier +import net.minecraft.resources.ResourceKey +import net.minecraft.server.level.ServerLevel +import net.minecraft.sounds.SoundEvents +import net.minecraft.sounds.SoundSource +import net.minecraft.tags.ItemTags +import net.minecraft.util.Unit +import net.minecraft.world.InteractionHand +import net.minecraft.world.InteractionResult +import net.minecraft.world.entity.player.Player +import net.minecraft.world.item.Item +import net.minecraft.world.item.ToolMaterial +import net.minecraft.world.item.component.BlocksAttacks +import net.minecraft.world.item.equipment.* +import net.minecraft.world.level.Level +import java.util.Optional + + +object Dragonite { + const val BASE_DURABILITY = 40; + val witherite_material_key: ResourceKey = ResourceKey.create( + EquipmentAssets.ROOT_ID, + Identifier.fromNamespaceAndPath(Fantasysmp.MOD_ID, "dragon") + ) + + val armorMaterial = ArmorMaterial( + BASE_DURABILITY, + mapOf( + ArmorType.HELMET to 3, + ArmorType.CHESTPLATE to 8, + ArmorType.LEGGINGS to 6, + ArmorType.BOOTS to 3, + ArmorType.BODY to 19, + ), + 5, + SoundEvents.ARMOR_EQUIP_NETHERITE, + 3.0f, + 0.1f, + ItemTags.REPAIRS_NETHERITE_ARMOR, + witherite_material_key, + ) + + val SWORD = register("dragon_sword", ::DragoniteSword, + Item.Properties() + .sword(ToolMaterial.NETHERITE, 3.0F, -2.4F) + .component(DataComponents.BLOCKS_ATTACKS, BlocksAttacks( + 0.25f, // 5 tick warmup + 1.0f, // standard disable cooldown + listOf( + BlocksAttacks.DamageReduction( + 90.0f, // horizontalBlockingAngle — 90° arc each side (180° total, same as vanilla) + Optional.empty(), // type — empty = blocks all damage types + 0.0f, // base — flat damage reduction + 1.0f // factor — multiplier (1.0 = block 100% of damage) + ) + ), // full block — check if this constant exists, else build the list manually + BlocksAttacks.ItemDamageFunction.DEFAULT, // check for this constant too + Optional.empty(), // no bypass + Optional.empty(), // default block sound + Optional.empty() // default disable sound + )) + ) + val HELMET = register( + "dragon_helmet", + ::Item, + Item.Properties().humanoidArmor(armorMaterial , ArmorType.HELMET) + .durability(ArmorType.HELMET.getDurability(armorMaterial.durability)) + ) + + val CHESTPLATE = register( + "dragon_chestplate", + ::Item, + Item.Properties().humanoidArmor(armorMaterial , ArmorType.CHESTPLATE) + .component(DataComponents.GLIDER, Unit.INSTANCE) + .durability(ArmorType.CHESTPLATE.getDurability(armorMaterial.durability)) + ) + + val LEGGINGS = register( + "dragon_leggings", + ::Item, + Item.Properties().humanoidArmor(armorMaterial , ArmorType.LEGGINGS) + .durability(ArmorType.LEGGINGS.getDurability(armorMaterial.durability)) + ) + + val BOOTS = register( + "dragon_boots", + ::Item, + Item.Properties().humanoidArmor(armorMaterial , ArmorType.BOOTS) + .durability(ArmorType.BOOTS.getDurability(armorMaterial.durability)) + ) + + val INGOT = register( + "dragonite_ingot", + ::Item, + Item.Properties() + ) + + val SCALE = register( + "dragon_scale", + ::Item, + Item.Properties() + ) + + val ITEMS = listOf(SWORD, HELMET, CHESTPLATE, LEGGINGS, BOOTS, INGOT, SCALE) + val ARMOUR_SET = ArmorSet(HELMET, CHESTPLATE, LEGGINGS, BOOTS) + + fun init() {} +} + +class DragoniteSword(properties: Properties) : Item(properties) { + override fun use(level: Level, user: Player, hand: InteractionHand): InteractionResult { + if (level.isClientSide) return InteractionResult.PASS + if (!user.isWearingFullSet(Dragonite.ARMOUR_SET)) return InteractionResult.PASS + + val stack = user.getItemInHand(hand) + if (user.cooldowns.isOnCooldown(stack)) return InteractionResult.PASS + + val dir = user.lookAngle + user.deltaMovement = dir.scale(2.0) + user.hurtMarked = true + + level.playSound(null, user.x, user.y, user.z, + SoundEvents.ENDER_DRAGON_FLAP, SoundSource.PLAYERS, 1.0f, 1.0f) + + (level as? ServerLevel)?.sendParticles( + ParticleTypes.DRAGON_BREATH as ParticleOptions, + user.x, user.y, user.z, + 100, 0.5, 0.5, 0.5, 0.5 + ) + + user.cooldowns.addCooldown(stack, 25) + + return InteractionResult.SUCCESS + } +} diff --git a/src/main/kotlin/dev/zxq5/items/Items.kt b/src/main/kotlin/dev/zxq5/items/Items.kt index 2f54c93..b997a5d 100644 --- a/src/main/kotlin/dev/zxq5/items/Items.kt +++ b/src/main/kotlin/dev/zxq5/items/Items.kt @@ -1,23 +1,19 @@ package dev.zxq5.items import dev.zxq5.Fantasysmp -import dev.zxq5.items.Witherite.WITHERITE_HELMET -import dev.zxq5.items.Witherite.WITHERITE_SWORD +import dev.zxq5.items.Witherite.SWORD import net.fabricmc.fabric.api.creativetab.v1.FabricCreativeModeTab import net.minecraft.core.Registry -import net.minecraft.core.component.DataComponents import net.minecraft.core.registries.BuiltInRegistries import net.minecraft.core.registries.Registries import net.minecraft.network.chat.Component import net.minecraft.resources.Identifier import net.minecraft.resources.ResourceKey +import net.minecraft.world.entity.EquipmentSlot +import net.minecraft.world.entity.player.Player import net.minecraft.world.item.* import net.minecraft.world.item.CreativeModeTab.DisplayItemsGenerator import net.minecraft.world.item.CreativeModeTab.ItemDisplayParameters -import net.minecraft.world.item.component.ItemLore -import net.minecraft.world.item.equipment.ArmorMaterials -import net.minecraft.world.item.equipment.ArmorType -import java.util.List import java.util.function.Supplier @@ -38,16 +34,31 @@ object ModItems { ) val CUSTOM_CREATIVE_TAB: CreativeModeTab = FabricCreativeModeTab.builder() - .icon(Supplier { ItemStack(WITHERITE_SWORD) }) + .icon(Supplier { ItemStack(SWORD) }) .title(Component.translatable("Fantasysmp")) .displayItems(DisplayItemsGenerator { params: ItemDisplayParameters, output: CreativeModeTab.Output -> Witherite.ITEMS.forEach { output.accept(it) } + Dragonite.ITEMS.forEach { output.accept(it) } }) .build() fun init() { Witherite.init(); - + Dragonite.init(); Registry.register(BuiltInRegistries.CREATIVE_MODE_TAB, CUSTOM_CREATIVE_TAB_KEY, CUSTOM_CREATIVE_TAB); } +} + +data class ArmorSet( + val helmet: Item, + val chestplate: Item, + val leggings: Item, + val boots: Item, +) + +fun Player.isWearingFullSet(set: ArmorSet): Boolean { + return getItemBySlot(EquipmentSlot.HEAD).item == set.helmet && + getItemBySlot(EquipmentSlot.CHEST).item == set.chestplate && + getItemBySlot(EquipmentSlot.LEGS).item == set.leggings && + getItemBySlot(EquipmentSlot.FEET).item == set.boots } \ No newline at end of file diff --git a/src/main/kotlin/dev/zxq5/items/Witherite.kt b/src/main/kotlin/dev/zxq5/items/Witherite.kt index e8b2d55..8e03731 100644 --- a/src/main/kotlin/dev/zxq5/items/Witherite.kt +++ b/src/main/kotlin/dev/zxq5/items/Witherite.kt @@ -2,22 +2,23 @@ package dev.zxq5.items import dev.zxq5.Fantasysmp import dev.zxq5.items.ModItems.register -import net.minecraft.network.chat.Component +import net.minecraft.core.component.DataComponents import net.minecraft.resources.Identifier import net.minecraft.resources.ResourceKey import net.minecraft.sounds.SoundEvents -import net.minecraft.sounds.SoundSource import net.minecraft.tags.ItemTags +import net.minecraft.util.Unit import net.minecraft.world.InteractionHand import net.minecraft.world.InteractionResult -import net.minecraft.world.entity.Entity import net.minecraft.world.entity.EntityType import net.minecraft.world.entity.player.Player import net.minecraft.world.entity.projectile.hurtingprojectile.WitherSkull import net.minecraft.world.item.Item import net.minecraft.world.item.ToolMaterial +import net.minecraft.world.item.component.BlocksAttacks import net.minecraft.world.item.equipment.* import net.minecraft.world.level.Level +import java.util.Optional object Witherite { @@ -44,38 +45,62 @@ object Witherite { witherite_material_key, ) - val WITHERITE_SWORD = register("witherite_sword", ::WitheriteSword, - Item.Properties().sword(ToolMaterial.NETHERITE, 3.0F, -2.4F) + val SHIELD = register("witherite_shield", ::Item, + Item.Properties().component(DataComponents.BLOCKS_ATTACKS, BlocksAttacks( + 0.25f, // 5 tick warmup + 1.0f, // standard disable cooldown + listOf( + BlocksAttacks.DamageReduction( + 90.0f, // horizontalBlockingAngle — 90° arc each side (180° total, same as vanilla) + Optional.empty(), // type — empty = blocks all damage types + 0.0f, // base — flat damage reduction + 1.0f // factor — multiplier (1.0 = block 100% of damage) + ) + ), // full block — check if this constant exists, else build the list manually + BlocksAttacks.ItemDamageFunction.DEFAULT, // check for this constant too + Optional.empty(), // no bypass + Optional.empty(), // default block sound + Optional.empty() // default disable sound + )) ) - val WITHERITE_HELMET = register( + + val SWORD = register("witherite_sword", ::WitheriteSword, + Item.Properties().sword(ToolMaterial.NETHERITE, 3F, -2.4F) + ) + + val AXE = register("witherite_axe", ::Item, + Item.Properties().axe(ToolMaterial.NETHERITE, 5F, -3F)) + + val HELMET = register( "witherite_helmet", ::Item, Item.Properties().humanoidArmor(armorMaterial , ArmorType.HELMET) .durability(ArmorType.HELMET.getDurability(armorMaterial.durability)) ) - val WITHERITE_CHESTPLATE = register( + val CHESTPLATE = register( "witherite_chestplate", ::Item, Item.Properties().humanoidArmor(armorMaterial , ArmorType.CHESTPLATE) .durability(ArmorType.CHESTPLATE.getDurability(armorMaterial.durability)) ) - val WITHERITE_LEGGINGS = register( + val LEGGINGS = register( "witherite_leggings", ::Item, Item.Properties().humanoidArmor(armorMaterial , ArmorType.LEGGINGS) .durability(ArmorType.LEGGINGS.getDurability(armorMaterial.durability)) ) - val WITHERITE_BOOTS = register( + val BOOTS = register( "witherite_boots", ::Item, Item.Properties().humanoidArmor(armorMaterial , ArmorType.BOOTS) .durability(ArmorType.BOOTS.getDurability(armorMaterial.durability)) ) - val ITEMS = listOf(WITHERITE_SWORD, WITHERITE_HELMET, WITHERITE_CHESTPLATE, WITHERITE_LEGGINGS, WITHERITE_BOOTS) + val ITEMS = listOf(SWORD, AXE, SHIELD, HELMET, CHESTPLATE, LEGGINGS, BOOTS) + val ARMOUR_SET = ArmorSet(HELMET, CHESTPLATE, LEGGINGS, BOOTS) fun init() {} } @@ -86,6 +111,8 @@ class WitheriteSword(properties: Properties) : Item(properties) { return InteractionResult.PASS; } + if (!user.isCrouching) return InteractionResult.PASS + val skull = WitherSkull(EntityType.WITHER_SKULL, level) skull.setPos(user.eyePosition) skull.deltaMovement = user.lookAngle diff --git a/src/main/resources/assets/fantasysmp/items/dragon_scale.json b/src/main/resources/assets/fantasysmp/items/dragon_scale.json new file mode 100644 index 0000000..d7d0123 --- /dev/null +++ b/src/main/resources/assets/fantasysmp/items/dragon_scale.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "fantasysmp:item/dragon_scale" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/fantasysmp/items/dragonite_ingot.json b/src/main/resources/assets/fantasysmp/items/dragonite_ingot.json new file mode 100644 index 0000000..2d7599e --- /dev/null +++ b/src/main/resources/assets/fantasysmp/items/dragonite_ingot.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "fantasysmp:item/dragonite_ingot" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/fantasysmp/items/witherite_axe.json b/src/main/resources/assets/fantasysmp/items/witherite_axe.json new file mode 100644 index 0000000..a58e24a --- /dev/null +++ b/src/main/resources/assets/fantasysmp/items/witherite_axe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "fantasysmp:item/witherite_axe" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/fantasysmp/items/witherite_shield.json b/src/main/resources/assets/fantasysmp/items/witherite_shield.json new file mode 100644 index 0000000..1b6cd0f --- /dev/null +++ b/src/main/resources/assets/fantasysmp/items/witherite_shield.json @@ -0,0 +1,44 @@ +{ + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:special", + "base": "minecraft:item/shield", + "model": { + "type": "fantasysmp:witherite_shield" + } + }, + "on_true": { + "type": "minecraft:special", + "base": "minecraft:item/shield_blocking", + "model": { + "type": "fantasysmp:witherite_shield" + } + }, + "property": "minecraft:using_item", + "transformation": { + "left_rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "right_rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "scale": [ + 1.0, + -1.0, + -1.0 + ], + "translation": [ + 0.0, + 0.0, + 0.0 + ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/fantasysmp/lang/en_us.json b/src/main/resources/assets/fantasysmp/lang/en_us.json index 2a0b71f..f48210e 100644 --- a/src/main/resources/assets/fantasysmp/lang/en_us.json +++ b/src/main/resources/assets/fantasysmp/lang/en_us.json @@ -3,5 +3,12 @@ "item.fantasysmp.witherite_helmet": "Witherite Helmet", "item.fantasysmp.witherite_chestplate": "Witherite Chestplate", "item.fantasysmp.witherite_leggings": "Witherite Leggings", - "item.fantasysmp.witherite_boots": "Witherite Boots" + "item.fantasysmp.witherite_boots": "Witherite Boots", + "item.fantasysmp.witherite_axe": "Witherite Axe", + "item.fantasysmp.witherite_shield": "Witherite Shield", + "item.fantasysmp.dragon_sword": "Dragon Sword", + "item.fantasysmp.dragon_helmet": "Dragon Helmet", + "item.fantasysmp.dragon_chestplate": "Dragon Chestplate", + "item.fantasysmp.dragon_leggings": "Dragon Leggings", + "item.fantasysmp.dragon_boots": "Dragon Boots" } \ No newline at end of file diff --git a/src/main/resources/assets/fantasysmp/models/item/dragon_scale.json b/src/main/resources/assets/fantasysmp/models/item/dragon_scale.json new file mode 100644 index 0000000..1ba3f4b --- /dev/null +++ b/src/main/resources/assets/fantasysmp/models/item/dragon_scale.json @@ -0,0 +1,6 @@ +{ + "parent": "item/netherite_ingot", + "textures": { + "layer0": "fantasysmp:item/dragon_scale" + } +} diff --git a/src/main/resources/assets/fantasysmp/models/item/dragonite_ingot.json b/src/main/resources/assets/fantasysmp/models/item/dragonite_ingot.json new file mode 100644 index 0000000..bd9e6a7 --- /dev/null +++ b/src/main/resources/assets/fantasysmp/models/item/dragonite_ingot.json @@ -0,0 +1,6 @@ +{ + "parent": "item/netherite_ingot", + "textures": { + "layer0": "fantasysmp:item/dragonite_ingot" + } +} diff --git a/src/main/resources/assets/fantasysmp/models/item/witherite_axe.json b/src/main/resources/assets/fantasysmp/models/item/witherite_axe.json new file mode 100644 index 0000000..bc50046 --- /dev/null +++ b/src/main/resources/assets/fantasysmp/models/item/witherite_axe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/netherite_axe", + "textures": { + "layer0": "fantasysmp:item/witherite_axe" + } +} diff --git a/src/main/resources/assets/fantasysmp/models/item/witherite_shield.json b/src/main/resources/assets/fantasysmp/models/item/witherite_shield.json new file mode 100644 index 0000000..3445458 --- /dev/null +++ b/src/main/resources/assets/fantasysmp/models/item/witherite_shield.json @@ -0,0 +1,48 @@ +{ + "gui_light": "front", + "textures": { + "particle": "block/dark_oak_planks" + }, + "display": { + "thirdperson_righthand": { + "rotation": [ 0, 90, 0 ], + "translation": [ 10, 6, -4 ], + "scale": [ 1, 1, 1 ] + }, + "thirdperson_lefthand": { + "rotation": [ 0, 90, 0 ], + "translation": [ 10, 6, 12 ], + "scale": [ 1, 1, 1 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 180, 5 ], + "translation": [ -10, 1.75, -10 ], + "scale": [ 1.25, 1.25, 1.25 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 180, 5 ], + "translation": [ 10, 0, -10 ], + "scale": [ 1.25, 1.25, 1.25 ] + }, + "gui": { + "rotation": [ 15, -25, -5 ], + "translation": [ 2, 3, 0 ], + "scale": [ 0.65, 0.65, 0.65 ] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ -4.5, 4.5, -5], + "scale":[ 0.55, 0.55, 0.55] + }, + "on_shelf": { + "rotation": [ 0, 0, 0 ], + "translation": [ 11, 18.5, 8.7 ], + "scale": [ 1.4, 1.4, 1.4 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 2, 4, 2], + "scale":[ 0.25, 0.25, 0.25] + } + } +} diff --git a/src/main/resources/assets/fantasysmp/models/item/witherite_shield_blocking.json b/src/main/resources/assets/fantasysmp/models/item/witherite_shield_blocking.json new file mode 100644 index 0000000..cc60ea5 --- /dev/null +++ b/src/main/resources/assets/fantasysmp/models/item/witherite_shield_blocking.json @@ -0,0 +1,33 @@ +{ + "gui_light": "front", + "textures": { + "particle": "block/dark_oak_planks" + }, + "display": { + "thirdperson_righthand": { + "rotation": [ 45, 155, 0 ], + "translation": [ -3.49, 11, -2 ], + "scale": [ 1, 1, 1 ] + }, + "thirdperson_lefthand": { + "rotation": [ 45, 155, 0 ], + "translation": [ 11.51, 7, 2.5 ], + "scale": [ 1, 1, 1 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 180, -5 ], + "translation": [ -15, 3.25, -11 ], + "scale": [ 1.25, 1.25, 1.25 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 180, -5 ], + "translation": [ 5, 5, -11 ], + "scale": [ 1.25, 1.25, 1.25 ] + }, + "gui": { + "rotation": [ 15, -25, -5 ], + "translation": [ 2, 3, 0 ], + "scale": [ 0.65, 0.65, 0.65 ] + } + } +} diff --git a/src/main/resources/assets/fantasysmp/textures/entity/shield/witherite.png b/src/main/resources/assets/fantasysmp/textures/entity/shield/witherite.png new file mode 100644 index 0000000000000000000000000000000000000000..0553eccd9697436744d545809fec701c01e71fcd GIT binary patch literal 411 zcmV;M0c8G(P)zi#t9U9Y$Kw_^rI zB9g(Ql&FV8M)`6P+yWR+#|^B}#K+$$&;V`Az6o82vH~Q8Z;6)XyEY!X7pM@>1gXjg zuHm)24FIue2yDA!V49$FR3OAbgRCJefe45~y>`c>x?DomQ3x>f8ZEE29}yHpg?Reu zh!I2yn>uRH=|Y)Z{Q(8~W~Lu_62t%i002ovPDHLk FV1lV}t0({f literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/fantasysmp/textures/item/dragon_scale.png b/src/main/resources/assets/fantasysmp/textures/item/dragon_scale.png new file mode 100644 index 0000000000000000000000000000000000000000..14d177836a79dd302ec8aaf07114ea30fb286c24 GIT binary patch literal 589 zcmV-T07Z5ytaC zAb@;6&$SDM0x61uYPBkGfljBx$&xI?`exx$GKG6h@}s= z;q`jK7BcV+e!rizISsGZE4cCQ3S2H1R^nH&l3vB``xhviCDdv)E-nZHnCNggM5ECd zIbdMq)tw|XZ5~HQU$EPK4nsY}UTqJSH6k(+19LNepE(`ao9sSXttPs57f#6yiybno~V0A1Ud^~_G$$Z{^G(f?8jLRn~ zezt7Lzw??1csw4IPRh9ZYy;QBNj_j39LHgeVEfuzJkau3{xJ^^iBRT5sH%F}JfQ13 z1%pA-&+GI=DAB^j1^&ciamvPT((KGRQiNHO1cefb#N@8<7RCsLLe%f~d0>(xv379b z`y!SGt$T}Jjl2%|fg5uXo`HT>t~WO)AKIfIIfEW`Qh z*Wmh?&<%ju1fst)GBPZCf0qG7gFw&c{UFT@hMHP%mw;uEZ4#AN04rW%x0j)KX)42I z_Tymwj~_o6Oc@;++#cmJ9AsF>a9wi)*d>f0&BoTY4C^+oV~~@TV-OP)hdT;n2ne{X z(E-!%-oFFWZ{ECN@No5Dc=_ZJ1K0~N&D=aZ3}3%}g}VU6csmJVI}EhG*}=fe%geB1 z_YQ^!z%T(DQ1D|WSbn|72?lO1ZZI3|_udgh6ulT;2>jzdvL6 z`}Z${pr9bb`}gl5@dJvMIgc(d2EaktajW#aBQLWfk8|K;qp9Z=EzTV4Y4hcunRV4mTC@H8RPQfVAC8OFRh;vUe|Kw= zhrYDVN#9*h*gX6iB)!XGiW1m#lGXiY?%igTe~DWM4fZf`qM literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/fantasysmp/textures/item/netherite_ingot.png b/src/main/resources/assets/fantasysmp/textures/item/netherite_ingot.png new file mode 100644 index 0000000000000000000000000000000000000000..9842303ea1d5c78ce8e93ab1dcddb54de3474779 GIT binary patch literal 208 zcmV;>05AWEP)Hq)$0d!JMQvg8b*k%9#09{E$ zK~#9!mCrd6z%U2|LBz2v{Qto&Bn5V8vK~l~KU4KpMerqevs12ARn43tr4bgk%UVvU zShKTOL$p-pQXM6k6962Mz=Q-G!$fwA2ow7{d-Ig!)h+D)@!|u85(63Y-F15a0000< KMNUMnLSTYJ1w)?z literal 0 HcmV?d00001 diff --git a/src/main/resources/data/fantasysmp/recipe/dragon_boots.json b/src/main/resources/data/fantasysmp/recipe/dragon_boots.json new file mode 100644 index 0000000..490222d --- /dev/null +++ b/src/main/resources/data/fantasysmp/recipe/dragon_boots.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:smithing_transform", + "template": "minecraft:crying_obsidian", + "base": "minecraft:netherite_boots", + "addition": "fantasysmp:dragonite_ingot", + "result": { + "id": "fantasysmp:dragon_boots" + } +} + diff --git a/src/main/resources/data/fantasysmp/recipe/dragon_chestplate.json b/src/main/resources/data/fantasysmp/recipe/dragon_chestplate.json new file mode 100644 index 0000000..a145c4a --- /dev/null +++ b/src/main/resources/data/fantasysmp/recipe/dragon_chestplate.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smithing_transform", + "template": "minecraft:elytra", + "base": "minecraft:netherite_chestplate", + "addition": "fantasysmp:dragonite_ingot", + "result": { + "id": "fantasysmp:dragon_chestplate" + } +} diff --git a/src/main/resources/data/fantasysmp/recipe/dragon_helmet.json b/src/main/resources/data/fantasysmp/recipe/dragon_helmet.json new file mode 100644 index 0000000..88359f7 --- /dev/null +++ b/src/main/resources/data/fantasysmp/recipe/dragon_helmet.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smithing_transform", + "template": "minecraft:dragon_head", + "base": "minecraft:netherite_helmet", + "addition": "fantasysmp:dragonite_ingot", + "result": { + "id": "fantasysmp:dragon_helmet" + } +} diff --git a/src/main/resources/data/fantasysmp/recipe/dragon_leggings.json b/src/main/resources/data/fantasysmp/recipe/dragon_leggings.json new file mode 100644 index 0000000..cdf1757 --- /dev/null +++ b/src/main/resources/data/fantasysmp/recipe/dragon_leggings.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smithing_transform", + "template": "minecraft:crying_obsidian", + "base": "minecraft:netherite_leggings", + "addition": "fantasysmp:dragonite_ingot", + "result": { + "id": "fantasysmp:dragon_leggings" + } +} diff --git a/src/main/resources/data/fantasysmp/recipe/dragon_sword.json b/src/main/resources/data/fantasysmp/recipe/dragon_sword.json new file mode 100644 index 0000000..5ca572b --- /dev/null +++ b/src/main/resources/data/fantasysmp/recipe/dragon_sword.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smithing_transform", + "template": "minecraft:end_crystal", + "base": "minecraft:netherite_sword", + "addition": "fantasysmp:dragonite_ingot", + "result": { + "id": "fantasysmp:dragon_sword" + } +} diff --git a/src/main/resources/data/fantasysmp/recipe/dragonite_ingot.json b/src/main/resources/data/fantasysmp/recipe/dragonite_ingot.json new file mode 100644 index 0000000..89a2da2 --- /dev/null +++ b/src/main/resources/data/fantasysmp/recipe/dragonite_ingot.json @@ -0,0 +1,27 @@ +{ + "type": "minecraft:crafting_shaped", + "ingredients": [ + "minecraft:dragon_breath", + "fantasysmp:dragon_scale" + ], + "pattern": [ + "SBS", + "CXC", + "SBS" + ], + "key": { + "S": [ + "minecraft:shulker_shell" + ], + "B": [ + "minecraft:dragon_breath" + ], + "C": [ + "minecraft:chorus_fruit" + ], + "X": [ + "fantasysmp:dragon_scale" + ] + }, + "result": "fantasysmp:dragonite_ingot" +} \ No newline at end of file diff --git a/src/main/resources/data/fantasysmp/recipe/witherite_axe.json b/src/main/resources/data/fantasysmp/recipe/witherite_axe.json new file mode 100644 index 0000000..7052838 --- /dev/null +++ b/src/main/resources/data/fantasysmp/recipe/witherite_axe.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smithing_transform", + "template": "minecraft:netherite_upgrade_smithing_template", + "base": "minecraft:netherite_axe", + "addition": "minecraft:wither_skeleton_skull", + "result": { + "id": "fantasysmp:witherite_axe" + } +} \ No newline at end of file diff --git a/src/main/resources/data/fantasysmp/recipe/witherite_shield.json b/src/main/resources/data/fantasysmp/recipe/witherite_shield.json new file mode 100644 index 0000000..5918860 --- /dev/null +++ b/src/main/resources/data/fantasysmp/recipe/witherite_shield.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:smithing_transform", + "template": "minecraft:netherite_upgrade_smithing_template", + "base": "minecraft:shield", + "addition": "minecraft:wither_skeleton_skull", + "result": { + "id": "fantasysmp:witherite_shield" + } +} diff --git a/src/main/resources/data/fantasysmp/recipe/witherite_sword.json b/src/main/resources/data/fantasysmp/recipe/witherite_sword.json index 13d0580..0a6e84c 100644 --- a/src/main/resources/data/fantasysmp/recipe/witherite_sword.json +++ b/src/main/resources/data/fantasysmp/recipe/witherite_sword.json @@ -6,4 +6,4 @@ "result": { "id": "fantasysmp:witherite_sword" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/minecraft/loot_table/entities/ender_dragon.json b/src/main/resources/data/minecraft/loot_table/entities/ender_dragon.json new file mode 100644 index 0000000..25c5d53 --- /dev/null +++ b/src/main/resources/data/minecraft/loot_table/entities/ender_dragon.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:entity", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "fantasysmp:dragon_scale", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1, + "max": 3 + } + } + ] + } + ] + } + ] +} \ No newline at end of file