mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-02 11:22:01 +01:00
Fix enderchests not playing close sound (#2190)
This commit is contained in:
parent
75b8a71f9e
commit
5968b5c6e0
@ -90,7 +90,7 @@ index 271406f8bb..85b450c054 100644
|
|||||||
int newPower = Math.max(0, Math.min(15, this.viewingCount));
|
int newPower = Math.max(0, Math.min(15, this.viewingCount));
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||||
index 340dd1dafe..422b124a6c 100644
|
index 340dd1dafe..14598d7ee9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
@ -138,15 +138,35 @@ index 340dd1dafe..422b124a6c 100644
|
|||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
|
- if (this.c == 0 && this.a > 0.0F || this.c > 0 && this.a < 1.0F) {
|
||||||
+ private void doCloseLogic() {
|
+ private void doCloseLogic() {
|
||||||
+ int i = this.position.getX();
|
+ int i = this.position.getX();
|
||||||
+ int j = this.position.getY();
|
+ int j = this.position.getY();
|
||||||
+ int k = this.position.getZ();
|
+ int k = this.position.getZ();
|
||||||
+ double d0;
|
+ double d0;
|
||||||
|
+
|
||||||
|
+ if (this.c == 0) { /* && this.a > 0.0F || this.c > 0 && this.a < 1.0F) {
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
if (this.c == 0 && this.a > 0.0F || this.c > 0 && this.a < 1.0F) {
|
|
||||||
float f1 = this.a;
|
float f1 = this.a;
|
||||||
|
|
||||||
|
if (this.c > 0) {
|
||||||
|
@@ -0,0 +0,0 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||||
|
float f2 = 0.5F;
|
||||||
|
|
||||||
|
if (this.a < 0.5F && f1 >= 0.5F) {
|
||||||
|
+ // Paper start
|
||||||
|
+ */
|
||||||
|
d0 = (double) i + 0.5D;
|
||||||
|
double d2 = (double) k + 0.5D;
|
||||||
|
|
||||||
|
+ MCUtil.scheduleTask(10, () -> {
|
||||||
|
this.world.a((EntityHuman) null, d0, (double) j + 0.5D, d2, SoundEffects.BLOCK_ENDER_CHEST_CLOSE, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
|
||||||
|
- }
|
||||||
|
+ });
|
||||||
|
+ // Paper end
|
||||||
|
|
||||||
|
if (this.a < 0.0F) {
|
||||||
|
this.a = 0.0F;
|
||||||
@@ -0,0 +0,0 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
@@ -0,0 +0,0 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||||
public void d() {
|
public void d() {
|
||||||
++this.c;
|
++this.c;
|
||||||
|
Loading…
Reference in New Issue
Block a user