@@ -7,3 +7,5 @@ object FantasysmpDataGenerator : DataGeneratorEntrypoint {
|
|||||||
override fun onInitializeDataGenerator(fabricDataGenerator: FabricDataGenerator) {
|
override fun onInitializeDataGenerator(fabricDataGenerator: FabricDataGenerator) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,17 +17,16 @@ import net.minecraft.world.InteractionResult
|
|||||||
import net.minecraft.world.entity.player.Player
|
import net.minecraft.world.entity.player.Player
|
||||||
import net.minecraft.world.item.Item
|
import net.minecraft.world.item.Item
|
||||||
import net.minecraft.world.item.ToolMaterial
|
import net.minecraft.world.item.ToolMaterial
|
||||||
import net.minecraft.world.item.component.BlocksAttacks
|
import net.minecraft.world.item.component.UseCooldown
|
||||||
import net.minecraft.world.item.equipment.*
|
import net.minecraft.world.item.equipment.*
|
||||||
import net.minecraft.world.level.Level
|
import net.minecraft.world.level.Level
|
||||||
import java.util.Optional
|
|
||||||
|
|
||||||
|
|
||||||
object Dragonite {
|
object Dragonite {
|
||||||
const val BASE_DURABILITY = 40;
|
const val BASE_DURABILITY = 40;
|
||||||
val witherite_material_key: ResourceKey<EquipmentAsset> = ResourceKey.create<EquipmentAsset>(
|
val MATERIAL: ResourceKey<EquipmentAsset> = ResourceKey.create<EquipmentAsset>(
|
||||||
EquipmentAssets.ROOT_ID,
|
EquipmentAssets.ROOT_ID,
|
||||||
Identifier.fromNamespaceAndPath(Fantasysmp.MOD_ID, "dragon")
|
Identifier.fromNamespaceAndPath(Fantasysmp.MOD_ID, "dragonite")
|
||||||
)
|
)
|
||||||
|
|
||||||
val armorMaterial = ArmorMaterial(
|
val armorMaterial = ArmorMaterial(
|
||||||
@@ -44,39 +43,49 @@ object Dragonite {
|
|||||||
3.0f,
|
3.0f,
|
||||||
0.1f,
|
0.1f,
|
||||||
ItemTags.REPAIRS_NETHERITE_ARMOR,
|
ItemTags.REPAIRS_NETHERITE_ARMOR,
|
||||||
witherite_material_key,
|
MATERIAL,
|
||||||
)
|
)
|
||||||
|
|
||||||
val SWORD = register("dragon_sword", ::DragoniteSword,
|
val SWORD = register("dragonite_sword", ::DragoniteSword,
|
||||||
Item.Properties()
|
Item.Properties()
|
||||||
|
.enchantable(armorMaterial.enchantmentValue)
|
||||||
|
.component(DataComponents.USE_COOLDOWN, UseCooldown(0.0f))
|
||||||
.sword(ToolMaterial.NETHERITE, 3.0F, -2.4F)
|
.sword(ToolMaterial.NETHERITE, 3.0F, -2.4F)
|
||||||
)
|
)
|
||||||
val HELMET = register(
|
val HELMET = register(
|
||||||
"dragon_helmet",
|
"dragonite_helmet",
|
||||||
::Item,
|
::Item,
|
||||||
Item.Properties().humanoidArmor(armorMaterial , ArmorType.HELMET)
|
Item.Properties()
|
||||||
|
.enchantable(Witherite.armorMaterial.enchantmentValue)
|
||||||
|
.humanoidArmor(armorMaterial , ArmorType.HELMET)
|
||||||
.durability(ArmorType.HELMET.getDurability(armorMaterial.durability))
|
.durability(ArmorType.HELMET.getDurability(armorMaterial.durability))
|
||||||
)
|
)
|
||||||
|
|
||||||
val CHESTPLATE = register(
|
val CHESTPLATE = register(
|
||||||
"dragon_chestplate",
|
"dragonite_chestplate",
|
||||||
::Item,
|
::Item,
|
||||||
Item.Properties().humanoidArmor(armorMaterial , ArmorType.CHESTPLATE)
|
Item.Properties()
|
||||||
|
.enchantable(Witherite.armorMaterial.enchantmentValue)
|
||||||
|
.humanoidArmor(armorMaterial , ArmorType.CHESTPLATE)
|
||||||
.component(DataComponents.GLIDER, Unit.INSTANCE)
|
.component(DataComponents.GLIDER, Unit.INSTANCE)
|
||||||
.durability(ArmorType.CHESTPLATE.getDurability(armorMaterial.durability))
|
.durability(ArmorType.CHESTPLATE.getDurability(armorMaterial.durability))
|
||||||
)
|
)
|
||||||
|
|
||||||
val LEGGINGS = register(
|
val LEGGINGS = register(
|
||||||
"dragon_leggings",
|
"dragonite_leggings",
|
||||||
::Item,
|
::Item,
|
||||||
Item.Properties().humanoidArmor(armorMaterial , ArmorType.LEGGINGS)
|
Item.Properties()
|
||||||
|
.enchantable(Witherite.armorMaterial.enchantmentValue)
|
||||||
|
.humanoidArmor(armorMaterial , ArmorType.LEGGINGS)
|
||||||
.durability(ArmorType.LEGGINGS.getDurability(armorMaterial.durability))
|
.durability(ArmorType.LEGGINGS.getDurability(armorMaterial.durability))
|
||||||
)
|
)
|
||||||
|
|
||||||
val BOOTS = register(
|
val BOOTS = register(
|
||||||
"dragon_boots",
|
"dragonite_boots",
|
||||||
::Item,
|
::Item,
|
||||||
Item.Properties().humanoidArmor(armorMaterial , ArmorType.BOOTS)
|
Item.Properties()
|
||||||
|
.enchantable(Witherite.armorMaterial.enchantmentValue)
|
||||||
|
.humanoidArmor(armorMaterial , ArmorType.BOOTS)
|
||||||
.durability(ArmorType.BOOTS.getDurability(armorMaterial.durability))
|
.durability(ArmorType.BOOTS.getDurability(armorMaterial.durability))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import net.minecraft.world.entity.projectile.hurtingprojectile.WitherSkull
|
|||||||
import net.minecraft.world.item.Item
|
import net.minecraft.world.item.Item
|
||||||
import net.minecraft.world.item.ToolMaterial
|
import net.minecraft.world.item.ToolMaterial
|
||||||
import net.minecraft.world.item.component.BlocksAttacks
|
import net.minecraft.world.item.component.BlocksAttacks
|
||||||
|
import net.minecraft.world.item.component.UseCooldown
|
||||||
import net.minecraft.world.item.equipment.*
|
import net.minecraft.world.item.equipment.*
|
||||||
import net.minecraft.world.level.Level
|
import net.minecraft.world.level.Level
|
||||||
import java.util.Optional
|
import java.util.Optional
|
||||||
@@ -65,37 +66,51 @@ object Witherite {
|
|||||||
)
|
)
|
||||||
|
|
||||||
val SWORD = register("witherite_sword", ::WitheriteSword,
|
val SWORD = register("witherite_sword", ::WitheriteSword,
|
||||||
Item.Properties().sword(ToolMaterial.NETHERITE, 3F, -2.4F)
|
Item.Properties()
|
||||||
|
.enchantable(armorMaterial.enchantmentValue)
|
||||||
|
.component(DataComponents.USE_COOLDOWN, UseCooldown(0.0f))
|
||||||
|
.sword(ToolMaterial.NETHERITE, 3F, -2.4F)
|
||||||
)
|
)
|
||||||
|
|
||||||
val AXE = register("witherite_axe", ::Item,
|
val AXE = register("witherite_axe", ::Item,
|
||||||
Item.Properties().axe(ToolMaterial.NETHERITE, 5F, -3F))
|
Item.Properties()
|
||||||
|
.enchantable(armorMaterial.enchantmentValue)
|
||||||
|
.axe(ToolMaterial.NETHERITE, 5F, -3F))
|
||||||
|
|
||||||
|
|
||||||
val HELMET = register(
|
val HELMET = register(
|
||||||
"witherite_helmet",
|
"witherite_helmet",
|
||||||
::Item,
|
::Item,
|
||||||
Item.Properties().humanoidArmor(armorMaterial , ArmorType.HELMET)
|
Item.Properties().humanoidArmor(armorMaterial , ArmorType.HELMET)
|
||||||
|
.enchantable(armorMaterial.enchantmentValue)
|
||||||
.durability(ArmorType.HELMET.getDurability(armorMaterial.durability))
|
.durability(ArmorType.HELMET.getDurability(armorMaterial.durability))
|
||||||
)
|
)
|
||||||
|
|
||||||
val CHESTPLATE = register(
|
val CHESTPLATE = register(
|
||||||
"witherite_chestplate",
|
"witherite_chestplate",
|
||||||
::Item,
|
::Item,
|
||||||
Item.Properties().humanoidArmor(armorMaterial , ArmorType.CHESTPLATE)
|
|
||||||
|
Item.Properties()
|
||||||
|
.enchantable(armorMaterial.enchantmentValue)
|
||||||
|
.humanoidArmor(armorMaterial , ArmorType.CHESTPLATE)
|
||||||
.durability(ArmorType.CHESTPLATE.getDurability(armorMaterial.durability))
|
.durability(ArmorType.CHESTPLATE.getDurability(armorMaterial.durability))
|
||||||
)
|
)
|
||||||
|
|
||||||
val LEGGINGS = register(
|
val LEGGINGS = register(
|
||||||
"witherite_leggings",
|
"witherite_leggings",
|
||||||
::Item,
|
::Item,
|
||||||
Item.Properties().humanoidArmor(armorMaterial , ArmorType.LEGGINGS)
|
Item.Properties()
|
||||||
|
.enchantable(armorMaterial.enchantmentValue)
|
||||||
|
.humanoidArmor(armorMaterial , ArmorType.LEGGINGS)
|
||||||
.durability(ArmorType.LEGGINGS.getDurability(armorMaterial.durability))
|
.durability(ArmorType.LEGGINGS.getDurability(armorMaterial.durability))
|
||||||
)
|
)
|
||||||
|
|
||||||
val BOOTS = register(
|
val BOOTS = register(
|
||||||
"witherite_boots",
|
"witherite_boots",
|
||||||
::Item,
|
::Item,
|
||||||
Item.Properties().humanoidArmor(armorMaterial , ArmorType.BOOTS)
|
Item.Properties()
|
||||||
|
.enchantable(armorMaterial.enchantmentValue)
|
||||||
|
.humanoidArmor(armorMaterial , ArmorType.BOOTS)
|
||||||
.durability(ArmorType.BOOTS.getDurability(armorMaterial.durability))
|
.durability(ArmorType.BOOTS.getDurability(armorMaterial.durability))
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -110,14 +125,19 @@ class WitheriteSword(properties: Properties) : Item(properties) {
|
|||||||
if (level.isClientSide) {
|
if (level.isClientSide) {
|
||||||
return InteractionResult.PASS;
|
return InteractionResult.PASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!user.isCrouching) return InteractionResult.PASS
|
if (!user.isCrouching) return InteractionResult.PASS
|
||||||
|
|
||||||
|
val stack = user.getItemInHand(hand)
|
||||||
|
if (user.cooldowns.isOnCooldown(stack)) return InteractionResult.PASS
|
||||||
|
|
||||||
val skull = WitherSkull(EntityType.WITHER_SKULL, level)
|
val skull = WitherSkull(EntityType.WITHER_SKULL, level)
|
||||||
skull.setPos(user.eyePosition)
|
skull.setPos(user.eyePosition)
|
||||||
skull.deltaMovement = user.lookAngle
|
skull.deltaMovement = user.lookAngle
|
||||||
level.addFreshEntity(skull)
|
level.addFreshEntity(skull)
|
||||||
skull.playSound(SoundEvents.WITHER_SHOOT)
|
skull.playSound(SoundEvents.WITHER_SHOOT)
|
||||||
|
|
||||||
|
user.cooldowns.addCooldown(stack, 25)
|
||||||
|
|
||||||
return InteractionResult.SUCCESS;
|
return InteractionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
"layers": {
|
"layers": {
|
||||||
"humanoid": [
|
"humanoid": [
|
||||||
{
|
{
|
||||||
"texture": "fantasysmp:dragon"
|
"texture": "fantasysmp:dragonite"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"humanoid_leggings": [
|
"humanoid_leggings": [
|
||||||
{
|
{
|
||||||
"texture": "fantasysmp:dragon"
|
"texture": "fantasysmp:dragonite"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"wings": [
|
"wings": [
|
||||||
{
|
{
|
||||||
"texture": "fantasysmp:dragon",
|
"texture": "fantasysmp:dragonite",
|
||||||
"use_player_texture": false
|
"use_player_texture": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"model": {
|
"model": {
|
||||||
"type": "minecraft:model",
|
"type": "minecraft:model",
|
||||||
"model": "fantasysmp:item/dragon_leggings"
|
"model": "fantasysmp:item/dragonite_boots"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"model": {
|
"model": {
|
||||||
"type": "minecraft:model",
|
"type": "minecraft:model",
|
||||||
"model": "fantasysmp:item/dragon_helmet"
|
"model": "fantasysmp:item/dragonite_chestplate"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"model": {
|
"model": {
|
||||||
"type": "minecraft:model",
|
"type": "minecraft:model",
|
||||||
"model": "fantasysmp:item/dragon_sword"
|
"model": "fantasysmp:item/dragonite_helmet"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"model": {
|
"model": {
|
||||||
"type": "minecraft:model",
|
"type": "minecraft:model",
|
||||||
"model": "fantasysmp:item/dragon_chestplate"
|
"model": "fantasysmp:item/dragonite_leggings"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"model": {
|
"model": {
|
||||||
"type": "minecraft:model",
|
"type": "minecraft:model",
|
||||||
"model": "fantasysmp:item/dragon_boots"
|
"model": "fantasysmp:item/dragonite_sword"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,9 +6,11 @@
|
|||||||
"item.fantasysmp.witherite_boots": "Witherite Boots",
|
"item.fantasysmp.witherite_boots": "Witherite Boots",
|
||||||
"item.fantasysmp.witherite_axe": "Witherite Axe",
|
"item.fantasysmp.witherite_axe": "Witherite Axe",
|
||||||
"item.fantasysmp.witherite_shield": "Witherite Shield",
|
"item.fantasysmp.witherite_shield": "Witherite Shield",
|
||||||
"item.fantasysmp.dragon_sword": "Dragon Sword",
|
"item.fantasysmp.dragonite_ingot": "Dragonite Ingot",
|
||||||
"item.fantasysmp.dragon_helmet": "Dragon Helmet",
|
"item.fantasysmp.dragon_scale": "Dragon Scale",
|
||||||
"item.fantasysmp.dragon_chestplate": "Dragon Chestplate",
|
"item.fantasysmp.dragonite_sword": "Dragonite Sword",
|
||||||
"item.fantasysmp.dragon_leggings": "Dragon Leggings",
|
"item.fantasysmp.dragonite_helmet": "Dragonite Helmet",
|
||||||
"item.fantasysmp.dragon_boots": "Dragon Boots"
|
"item.fantasysmp.dragonite_chestplate": "Dragonite Chestplate",
|
||||||
|
"item.fantasysmp.dragonite_leggings": "Dragonite Leggings",
|
||||||
|
"item.fantasysmp.dragonite_boots": "Dragonite Boots"
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"parent": "item/netherite_boots",
|
"parent": "item/netherite_boots",
|
||||||
"textures": {
|
"textures": {
|
||||||
"layer0": "fantasysmp:item/dragon_boots"
|
"layer0": "fantasysmp:item/dragonite_boots"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"parent": "item/netherite_chestplate",
|
"parent": "item/netherite_chestplate",
|
||||||
"textures": {
|
"textures": {
|
||||||
"layer0": "fantasysmp:item/dragon_chestplate"
|
"layer0": "fantasysmp:item/dragonite_chestplate"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"parent": "item/netherite_helmet",
|
"parent": "item/netherite_helmet",
|
||||||
"textures": {
|
"textures": {
|
||||||
"layer0": "fantasysmp:item/dragon_helmet"
|
"layer0": "fantasysmp:item/dragonite_helmet"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"parent": "item/netherite_leggings",
|
"parent": "item/netherite_leggings",
|
||||||
"textures": {
|
"textures": {
|
||||||
"layer0": "fantasysmp:item/dragon_leggings"
|
"layer0": "fantasysmp:item/dragonite_leggings"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"parent": "item/netherite_sword",
|
"parent": "item/netherite_sword",
|
||||||
"textures": {
|
"textures": {
|
||||||
"layer0": "fantasysmp:item/dragon_sword"
|
"layer0": "fantasysmp:item/dragonite_sword"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 428 B |
|
Before Width: | Height: | Size: 805 B After Width: | Height: | Size: 805 B |
|
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
|
Before Width: | Height: | Size: 290 B After Width: | Height: | Size: 290 B |
|
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 218 B |
|
Before Width: | Height: | Size: 241 B After Width: | Height: | Size: 241 B |
|
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 262 B |
@@ -4,7 +4,7 @@
|
|||||||
"base": "minecraft:netherite_boots",
|
"base": "minecraft:netherite_boots",
|
||||||
"addition": "fantasysmp:dragonite_ingot",
|
"addition": "fantasysmp:dragonite_ingot",
|
||||||
"result": {
|
"result": {
|
||||||
"id": "fantasysmp:dragon_boots"
|
"id": "fantasysmp:dragonite_boots"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4,6 +4,6 @@
|
|||||||
"base": "minecraft:netherite_chestplate",
|
"base": "minecraft:netherite_chestplate",
|
||||||
"addition": "fantasysmp:dragonite_ingot",
|
"addition": "fantasysmp:dragonite_ingot",
|
||||||
"result": {
|
"result": {
|
||||||
"id": "fantasysmp:dragon_chestplate"
|
"id": "fantasysmp:dragonite_chestplate"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,6 @@
|
|||||||
"base": "minecraft:netherite_helmet",
|
"base": "minecraft:netherite_helmet",
|
||||||
"addition": "fantasysmp:dragonite_ingot",
|
"addition": "fantasysmp:dragonite_ingot",
|
||||||
"result": {
|
"result": {
|
||||||
"id": "fantasysmp:dragon_helmet"
|
"id": "fantasysmp:dragonite_helmet"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,6 @@
|
|||||||
"base": "minecraft:netherite_leggings",
|
"base": "minecraft:netherite_leggings",
|
||||||
"addition": "fantasysmp:dragonite_ingot",
|
"addition": "fantasysmp:dragonite_ingot",
|
||||||
"result": {
|
"result": {
|
||||||
"id": "fantasysmp:dragon_leggings"
|
"id": "fantasysmp:dragonite_leggings"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,6 @@
|
|||||||
"base": "minecraft:netherite_sword",
|
"base": "minecraft:netherite_sword",
|
||||||
"addition": "fantasysmp:dragonite_ingot",
|
"addition": "fantasysmp:dragonite_ingot",
|
||||||
"result": {
|
"result": {
|
||||||
"id": "fantasysmp:dragon_sword"
|
"id": "fantasysmp:dragonite_sword"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"fantasysmp:witherite_axe"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"fantasysmp:witherite_helmet",
|
||||||
|
"fantasysmp:witherite_chestplate",
|
||||||
|
"fantasysmp:witherite_leggings",
|
||||||
|
"fantasysmp:witherite_boots",
|
||||||
|
"fantasysmp:dragonite_helmet",
|
||||||
|
"fantasysmp:dragonite_chestplate",
|
||||||
|
"fantasysmp:dragonite_leggings",
|
||||||
|
"fantasysmp:dragonite_boots"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"fantasysmp:witherite_chestplate",
|
||||||
|
"fantasysmp:dragonite_chestplate"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"fantasysmp:witherite_boots",
|
||||||
|
"fantasysmp:dragonite_boots"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"fantasysmp:witherite_helmet",
|
||||||
|
"fantasysmp:dragonite_helmet"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"fantasysmp:witherite_leggings",
|
||||||
|
"fantasysmp:dragonite_leggings"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"fantasysmp:witherite_sword",
|
||||||
|
"fantasysmp:dragonite_sword"
|
||||||
|
]
|
||||||
|
}
|
||||||