mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 03:26:44 +01:00
Fixed items being consumed in creative mode
This commit is contained in:
parent
08e1702a1a
commit
5d2478604c
1 changed files with 4 additions and 1 deletions
|
@ -155,7 +155,9 @@ public class EdibleBlock extends HayBlock {
|
|||
BooleanProperty segment = getHitCorner(hit, 1);
|
||||
|
||||
if (!state.get(segment)) {
|
||||
stack.decrement(1);
|
||||
if (!player.isCreative()) {
|
||||
stack.decrement(1);
|
||||
}
|
||||
if (!world.isClient) {
|
||||
state = state.with(segment, true);
|
||||
if (SHAPE_CACHE.apply(state) == VoxelShapes.fullCube()) {
|
||||
|
@ -195,6 +197,7 @@ public class EdibleBlock extends HayBlock {
|
|||
}
|
||||
|
||||
if (usingHoe) {
|
||||
stack.damage(1, player, p -> p.sendToolBreakStatus(hand));
|
||||
dropStack(world, pos, Registries.ITEM.get(material).getDefaultStack());
|
||||
player.playSound(USounds.Vanilla.ITEM_HOE_TILL, 1, 1);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue