This commit is contained in:
Jason Penilla
2021-06-14 21:16:18 -07:00
parent 67663024a2
commit 6b738c8252
3 changed files with 9 additions and 4 deletions

View File

@@ -51,7 +51,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ requirePlaced();
+ if (!getTileEntity().openersCounter.opened) {
+ net.minecraft.world.level.Level world = getTileEntity().getLevel();
+ world.blockEvent(getTileEntity().getBlockPos(), getTileEntity().getBlockState().getBlock(), 1, getTileEntity().getViewerCount() + 1);
+ world.blockEvent(getTileEntity().getBlockPos(), getTileEntity().getBlockState().getBlock(), 1, getTileEntity().openersCounter.getOpenerCount() + 1);
+ world.playSound(null, getPosition(), net.minecraft.sounds.SoundEvents.ENDER_CHEST_OPEN, net.minecraft.sounds.SoundSource.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F);
+ }
+ getTileEntity().openersCounter.opened = true;