mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-10-20 14:16:26 -04:00
Merge branch 'fix/1492-edible-medicinal-leek' into 'main'
Fix Medicinal Leek not being edible Closes #1492 See merge request cable-mc/cobblemon!2459
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
- Burmy changes its cloak after a battle it took part in, based on the biome: Trash Cloak in the Deep Dark, Nether and End, Plant Cloak in lush biomes such as forests, jungles, plains and swamps, and Sandy Cloak in sandy biomes, beaches and caves.
|
||||
|
||||
### Fixes
|
||||
- Medicinal Leeks can now be eaten when they aren't being planted, matching their food properties.
|
||||
- Fixed #updateMovesOnFormChange not properly initializing a form-swapped Pokemon's non-form_change moves.
|
||||
### TEST
|
||||
### Pokémon Added
|
||||
|
||||
@@ -35,14 +35,10 @@ class MedicinalLeekItem(block: MedicinalLeekBlock, settings: Properties) : ItemN
|
||||
val blockHitResult2 = blockHitResult.withPosition(blockHitResult.blockPos.above())
|
||||
val placeResult = this.place(BlockPlaceContext(UseOnContext(user, hand, blockHitResult2)))
|
||||
val stack = user.getItemInHand(hand)
|
||||
// This will always be true but just in case we change it down the line.
|
||||
/*
|
||||
if (!placeResult.isAccepted && this.isFood && user.canConsume(this.foodComponent?.isAlwaysEdible == true)) {
|
||||
user.setCurrentHand(hand)
|
||||
return TypedInteractionResult.consume(stack)
|
||||
// If the leek couldn't be planted, fall back to the default item behaviour so its food component lets it be eaten
|
||||
if (!placeResult.consumesAction()) {
|
||||
return super.use(world, user, hand)
|
||||
}
|
||||
|
||||
*/
|
||||
return InteractionResultHolder(placeResult, stack)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user