mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-10-20 22:26:24 -04:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f82f381d4 | ||
|
|
4d75103a68 |
@@ -231,8 +231,10 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, RegistryKey<Registry<It
|
||||
@JvmField val PEAT_BLOCK = noSettingsItem("peat_block")
|
||||
@JvmField val RAZOR_CLAW = noSettingsItem("razor_claw")
|
||||
@JvmField val RAZOR_FANG = noSettingsItem("razor_fang")
|
||||
// ToDo enable me when malicious armor goes in the game
|
||||
//@JvmField val AUSPICIOUS_ARMOR = heldItem("auspicious_armor")
|
||||
|
||||
// Armor
|
||||
@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
|
||||
@@ -696,6 +698,12 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, RegistryKey<Registry<It
|
||||
}
|
||||
)
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
private fun berryItem(name: String, berryBlock: BerryBlock): BerryItem {
|
||||
val finalName = "${name}_berry"
|
||||
val item = this.create(finalName, BerryItem(berryBlock))
|
||||
|
||||
@@ -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)))
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
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
|
||||
|
||||
class AuspiciousArmorMaterial : ArmorMaterial {
|
||||
override fun getDurability(type: ArmorItem.Type?): Int {
|
||||
return 240
|
||||
}
|
||||
|
||||
override fun getProtection(type: ArmorItem.Type?): Int {
|
||||
return 6
|
||||
}
|
||||
|
||||
override fun getEnchantability(): Int {
|
||||
return 15
|
||||
}
|
||||
|
||||
override fun getEquipSound(): SoundEvent {
|
||||
return CobblemonSounds.AUSPICIOUS_ARMOR_EQUIP
|
||||
}
|
||||
|
||||
override fun getRepairIngredient(): Ingredient {
|
||||
return Ingredient.ofItems(ItemConvertible { Items.FIRE_CHARGE })
|
||||
}
|
||||
|
||||
override fun getName(): String {
|
||||
return "auspicious_armor"
|
||||
}
|
||||
|
||||
override fun getToughness(): Float {
|
||||
return 0.0f
|
||||
}
|
||||
|
||||
override fun getKnockbackResistance(): Float {
|
||||
return 0.0f
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
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
|
||||
|
||||
class MaliciousArmorMaterial : ArmorMaterial {
|
||||
override fun getDurability(type: ArmorItem.Type?): Int {
|
||||
return 240
|
||||
}
|
||||
|
||||
override fun getProtection(type: ArmorItem.Type?): Int {
|
||||
return 6
|
||||
}
|
||||
|
||||
override fun getEnchantability(): Int {
|
||||
return 15
|
||||
}
|
||||
|
||||
override fun getEquipSound(): SoundEvent {
|
||||
return CobblemonSounds.MALICIOUS_ARMOR_EQUIP
|
||||
}
|
||||
|
||||
override fun getRepairIngredient(): Ingredient {
|
||||
return Ingredient.ofItems(ItemConvertible { Items.FIRE_CHARGE })
|
||||
}
|
||||
|
||||
override fun getName(): String {
|
||||
return "malicious_armor"
|
||||
}
|
||||
|
||||
override fun getToughness(): Float {
|
||||
return 0.0f
|
||||
}
|
||||
|
||||
override fun getKnockbackResistance(): Float {
|
||||
return 0.0f
|
||||
}
|
||||
}
|
||||
@@ -296,6 +296,8 @@ object CobblemonItemGroups {
|
||||
entries.add(CobblemonItems.FLOWER_SWEET)
|
||||
entries.add(CobblemonItems.STAR_SWEET)
|
||||
entries.add(CobblemonItems.RIBBON_SWEET)
|
||||
entries.add(CobblemonItems.AUSPICIOUS_ARMOR)
|
||||
entries.add(CobblemonItems.MALICIOUS_ARMOR)
|
||||
}
|
||||
|
||||
private fun heldItemEntries(displayContext: DisplayContext, entries: Entries) {
|
||||
|
||||
@@ -143,6 +143,7 @@
|
||||
"item.cobblemon.serious_mint": "Serious Mint",
|
||||
"item.cobblemon.assault_vest": "Assault Vest",
|
||||
"item.cobblemon.auspicious_armor": "Auspicious Armor",
|
||||
"item.cobblemon.malicious_armor": "Malicious Armor",
|
||||
"item.cobblemon.black_belt": "Black Belt",
|
||||
"item.cobblemon.black_glasses": "Black Glasses",
|
||||
"item.cobblemon.black_sludge": "Black Sludge",
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "cobblemon:item/evolution/malicious_armor"
|
||||
}
|
||||
}
|
||||
@@ -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.
BIN
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 454 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 449 B |
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": "false",
|
||||
"values": [
|
||||
"cobblemon:auspicious_armor",
|
||||
"cobblemon:malicious_armor"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user