@@ -20,7 +20,7 @@
|
||||
IBlockData iblockdata = this.getPlacementState(blockactioncontext1);
|
||||
+ // CraftBukkit start - special case for handling block placement with water lilies and snow buckets
|
||||
+ org.bukkit.block.BlockState blockstate = null;
|
||||
+ if (this instanceof ItemWaterLily || this instanceof SolidBucketItem) {
|
||||
+ if (this instanceof PlaceOnWaterBlockItem || this instanceof SolidBucketItem) {
|
||||
+ blockstate = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(blockactioncontext1.getLevel(), blockactioncontext1.getClickedPos());
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
- world.playSound(entityhuman, blockposition, this.getPlaceSound(iblockdata1), SoundCategory.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F);
|
||||
+ // world.playSound(entityhuman, blockposition, this.getPlaceSound(iblockdata1), SoundCategory.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F);
|
||||
world.gameEvent(entityhuman, GameEvent.BLOCK_PLACE, blockposition);
|
||||
world.gameEvent(GameEvent.BLOCK_PLACE, blockposition, GameEvent.a.of(entityhuman, iblockdata1));
|
||||
- if (entityhuman == null || !entityhuman.getAbilities().instabuild) {
|
||||
+ if ((entityhuman == null || !entityhuman.getAbilities().instabuild) && itemstack != ItemStack.EMPTY) { // CraftBukkit
|
||||
itemstack.shrink(1);
|
||||
|
||||
Reference in New Issue
Block a user