mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-10-27 04:26:27 -04:00
Merge branch '196-apricorn-leaves-cannot-be-composted' into 'main'
Resolve "Apricorn Leaves cannot be Composted" Closes #196 See merge request cable-mc/cobblemon!399
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
- Put Cryogonal in more snowy biomes.
|
||||
- Ditto and Eevee, Gible, and Riolu families have been made more common.
|
||||
- Lowered spawn rate of Gyarados on the surface.
|
||||
- Apricorn leaves can now be used in the [Composter](https://minecraft.fandom.com/wiki/Composter) block, these have the same chance to raise the compost pile the Minecraft leaves do.
|
||||
|
||||
### Fixes
|
||||
- Fixed killing a Dodrio killing your game.
|
||||
|
||||
@@ -20,14 +20,22 @@ import com.cobblemon.mod.common.pokemon.helditem.CobblemonHeldItemManager
|
||||
import com.cobblemon.mod.common.registry.CompletableRegistry
|
||||
import dev.architectury.registry.registries.RegistrySupplier
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.item.AliasedBlockItem
|
||||
import net.minecraft.item.BlockItem
|
||||
import net.minecraft.item.Item
|
||||
import net.minecraft.item.ItemGroup
|
||||
import net.minecraft.block.ComposterBlock
|
||||
import net.minecraft.item.*
|
||||
import net.minecraft.util.registry.Registry
|
||||
|
||||
object CobblemonItems : CompletableRegistry<Item>(Registry.ITEM_KEY) {
|
||||
|
||||
init {
|
||||
this.completed.thenRun {
|
||||
val compostChance = ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE.getFloat(Items.OAK_LEAVES)
|
||||
// Should always pass unless Mojang reworks leaves to no longer work in the Composter, in that case we already updated w.o doing anything
|
||||
if (compostChance != ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE.defaultReturnValue()) {
|
||||
ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE[APRICORN_LEAVES.get()] = compostChance
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val pokeballs = mutableListOf<RegistrySupplier<PokeBallItem>>()
|
||||
|
||||
@JvmField
|
||||
|
||||
Reference in New Issue
Block a user