mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-10-27 04:26:27 -04:00
- added custom equip sounds
- tweaked armor material values - made fireproof - made trimmable
This commit is contained in:
@@ -233,8 +233,8 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, RegistryKey<Registry<It
|
||||
@JvmField val RAZOR_FANG = noSettingsItem("razor_fang")
|
||||
|
||||
// Armor
|
||||
@JvmField val AUSPICIOUS_ARMOR = armorItem("auspicious_armor", AuspiciousArmorMaterial(), ArmorItem.Type.CHESTPLATE)
|
||||
@JvmField val MALICIOUS_ARMOR = armorItem("malicious_armor", MaliciousArmorMaterial(), ArmorItem.Type.CHESTPLATE)
|
||||
@JvmField val AUSPICIOUS_ARMOR = armorItem("auspicious_armor", AuspiciousArmorMaterial(), ArmorItem.Type.CHESTPLATE, Item.Settings().fireproof())
|
||||
@JvmField val MALICIOUS_ARMOR = armorItem("malicious_armor", MaliciousArmorMaterial(), ArmorItem.Type.CHESTPLATE, Item.Settings().fireproof())
|
||||
|
||||
private val berries = mutableMapOf<Identifier, BerryItem>()
|
||||
// Plants
|
||||
@@ -698,8 +698,8 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, RegistryKey<Registry<It
|
||||
}
|
||||
)
|
||||
|
||||
private fun armorItem(name: String, type: ArmorMaterial, slot: ArmorItem.Type): ArmorItem {
|
||||
val armor = ArmorItem(type, slot, Item.Settings())
|
||||
private fun armorItem(name: String, type: ArmorMaterial, slot: ArmorItem.Type, settings: Item.Settings): ArmorItem {
|
||||
val armor = ArmorItem(type, slot, settings)
|
||||
val item = create(name, armor)
|
||||
return item
|
||||
}
|
||||
|
||||
@@ -86,6 +86,11 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, RegistryKey<Regi
|
||||
@JvmField
|
||||
val MULCH_REMOVE = this.create("mulch.remove")
|
||||
|
||||
@JvmField
|
||||
val AUSPICIOUS_ARMOR_EQUIP = this.create("auspicious_armor.equip")
|
||||
@JvmField
|
||||
val MALICIOUS_ARMOR_EQUIP = this.create("malicious_armor.equip")
|
||||
|
||||
|
||||
private fun create(name: String): SoundEvent = this.create(name, SoundEvent.of(cobblemonResource(name)))
|
||||
}
|
||||
@@ -1,30 +1,32 @@
|
||||
package com.cobblemon.mod.common.item
|
||||
|
||||
import com.cobblemon.mod.common.CobblemonSounds
|
||||
import net.minecraft.item.ArmorItem
|
||||
import net.minecraft.item.ArmorMaterial
|
||||
import net.minecraft.item.ItemConvertible
|
||||
import net.minecraft.item.Items
|
||||
import net.minecraft.recipe.Ingredient
|
||||
import net.minecraft.sound.SoundEvent
|
||||
import net.minecraft.sound.SoundEvents
|
||||
|
||||
class AuspiciousArmorMaterial : ArmorMaterial {
|
||||
override fun getDurability(type: ArmorItem.Type?): Int {
|
||||
return 300
|
||||
return 240
|
||||
}
|
||||
|
||||
override fun getProtection(type: ArmorItem.Type?): Int {
|
||||
return 1
|
||||
return 6
|
||||
}
|
||||
|
||||
override fun getEnchantability(): Int {
|
||||
return 5
|
||||
return 15
|
||||
}
|
||||
|
||||
override fun getEquipSound(): SoundEvent {
|
||||
return SoundEvents.ITEM_ARMOR_EQUIP_IRON
|
||||
return CobblemonSounds.AUSPICIOUS_ARMOR_EQUIP
|
||||
}
|
||||
|
||||
override fun getRepairIngredient(): Ingredient {
|
||||
return Ingredient.EMPTY
|
||||
return Ingredient.ofItems(ItemConvertible { Items.FIRE_CHARGE })
|
||||
}
|
||||
|
||||
override fun getName(): String {
|
||||
|
||||
@@ -1,30 +1,32 @@
|
||||
package com.cobblemon.mod.common.item
|
||||
|
||||
import com.cobblemon.mod.common.CobblemonSounds
|
||||
import net.minecraft.item.ArmorItem
|
||||
import net.minecraft.item.ArmorMaterial
|
||||
import net.minecraft.item.ItemConvertible
|
||||
import net.minecraft.item.Items
|
||||
import net.minecraft.recipe.Ingredient
|
||||
import net.minecraft.sound.SoundEvent
|
||||
import net.minecraft.sound.SoundEvents
|
||||
|
||||
class MaliciousArmorMaterial : ArmorMaterial {
|
||||
override fun getDurability(type: ArmorItem.Type?): Int {
|
||||
return 300
|
||||
return 240
|
||||
}
|
||||
|
||||
override fun getProtection(type: ArmorItem.Type?): Int {
|
||||
return 1
|
||||
return 6
|
||||
}
|
||||
|
||||
override fun getEnchantability(): Int {
|
||||
return 5
|
||||
return 15
|
||||
}
|
||||
|
||||
override fun getEquipSound(): SoundEvent {
|
||||
return SoundEvents.ITEM_ARMOR_EQUIP_IRON
|
||||
return CobblemonSounds.MALICIOUS_ARMOR_EQUIP
|
||||
}
|
||||
|
||||
override fun getRepairIngredient(): Ingredient {
|
||||
return Ingredient.EMPTY
|
||||
return Ingredient.ofItems(ItemConvertible { Items.FIRE_CHARGE })
|
||||
}
|
||||
|
||||
override fun getName(): String {
|
||||
|
||||
@@ -84,6 +84,12 @@
|
||||
"berry.eat": {
|
||||
"sounds": [ "cobblemon:berry_eat" ]
|
||||
},
|
||||
"auspicious_armor.equip": {
|
||||
"sounds": [ "cobblemon:auspicious_armor_equip" ]
|
||||
},
|
||||
"malicious_armor.equip": {
|
||||
"sounds": [ "cobblemon:malicious_armor_equip" ]
|
||||
},
|
||||
"pokemon.bulbasaur.ambient": {
|
||||
"sounds": [ "cobblemon:pokemon/bulbasaur/bulbasaur_ambient" ]
|
||||
},
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": "false",
|
||||
"values": [
|
||||
"cobblemon:auspicious_armor",
|
||||
"cobblemon:malicious_armor"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user