2021-12-04 02:50:35 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
|
|
Date: Tue, 30 Nov 2021 05:30:35 +0000
|
|
|
|
Subject: [PATCH] Prevent ContainerOpenersCounter openCount from going negative
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java b/src/main/java/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java
|
2022-06-08 12:33:46 +00:00
|
|
|
index 76bdce9c1555c57f8cde6d4701ee1846ea3b67d8..bb34a517a32185c53f7d769a3b3661e6d5d49f09 100644
|
2021-12-04 02:50:35 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java
|
|
|
|
@@ -50,6 +50,7 @@ public abstract class ContainerOpenersCounter {
|
|
|
|
|
|
|
|
public void decrementOpeners(Player player, Level world, BlockPos pos, BlockState state) {
|
|
|
|
int oldPower = Math.max(0, Math.min(15, this.openCount)); // CraftBukkit - Get power before new viewer is added
|
|
|
|
+ if (this.openCount == 0) return; // Paper
|
|
|
|
int i = this.openCount--;
|
|
|
|
|
|
|
|
// CraftBukkit start - Call redstone event
|