mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 20:22:05 -07:00
Update Paper to MC 1.11
This commit is contained in:
@@ -12,10 +12,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
// CraftBukkit end
|
||||
|
||||
-public class TileEntityChest extends TileEntityLootable implements ITickable, IInventory {
|
||||
+public class TileEntityChest extends TileEntityLootable implements IInventory { // Paper - Remove ITickable
|
||||
-public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
+public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITickable
|
||||
|
||||
private ItemStack[] items = new ItemStack[27];
|
||||
private NonNullList<ItemStack> items;
|
||||
public boolean a;
|
||||
- public TileEntityChest f;
|
||||
- public TileEntityChest g;
|
||||
@@ -30,19 +30,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public float k;
|
||||
- public int l;
|
||||
+ public int l; // Paper - Number of viewers
|
||||
private int p;
|
||||
private BlockChest.Type q;
|
||||
private String r;
|
||||
@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II
|
||||
private int q;
|
||||
private BlockChest.Type r;
|
||||
|
||||
@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
}
|
||||
|
||||
public void E_() {
|
||||
public void F_() {
|
||||
+ // Paper - Disable all of this, just in case this does get ticked
|
||||
+ /*
|
||||
this.m();
|
||||
this.o();
|
||||
int i = this.position.getX();
|
||||
int j = this.position.getY();
|
||||
@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II
|
||||
@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
this.j = 0.0F;
|
||||
}
|
||||
}
|
||||
@@ -52,13 +52,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
public boolean c(int i, int j) {
|
||||
@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II
|
||||
@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added
|
||||
|
||||
++this.l;
|
||||
+
|
||||
+ // Paper start - Move chest open sound out of the tick loop
|
||||
+ this.m();
|
||||
+ this.o();
|
||||
+
|
||||
+ if (this.l > 0 && this.j == 0.0F && this.f == null && this.h == null) {
|
||||
+ this.j = 0.7F;
|
||||
@@ -74,17 +74,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ d1 += 0.5D;
|
||||
+ }
|
||||
+
|
||||
+ this.world.a((EntityHuman) null, d1, (double) this.position.getY() + 0.5D, d0, SoundEffects.X, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
|
||||
+ this.world.a((EntityHuman) null, d1, (double) this.position.getY() + 0.5D, d0, SoundEffects.Z, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
if (this.world == null) return; // CraftBukkit
|
||||
this.world.playBlockAction(this.position, this.getBlock(), 1, this.l);
|
||||
|
||||
@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II
|
||||
@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
if (!entityhuman.isSpectator() && this.getBlock() instanceof BlockChest) {
|
||||
int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added
|
||||
--this.l;
|
||||
if (this.world == null) return; // CraftBukkit
|
||||
+
|
||||
+ // Paper start - Move chest close sound out of the tick loop
|
||||
+ if (this.l == 0 && this.j > 0.0F || this.l > 0 && this.j < 1.0F) {
|
||||
@@ -108,14 +108,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ d0 += 0.5D;
|
||||
+ }
|
||||
+
|
||||
+ this.world.a((EntityHuman) null, d0, (double) yLoc + 0.5D, d2, SoundEffects.V, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
|
||||
+ this.world.a((EntityHuman) null, d0, (double) yLoc + 0.5D, d2, SoundEffects.X, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
|
||||
+ this.j = 0.0F;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
this.world.playBlockAction(this.position, this.getBlock(), 1, this.l);
|
||||
this.world.applyPhysics(this.position, this.getBlock(), false);
|
||||
|
||||
// CraftBukkit start - Call redstone event
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||
@@ -135,7 +135,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
public TileEntityEnderChest() {}
|
||||
|
||||
public void E_() {
|
||||
public void F_() {
|
||||
+ // Paper start - Disable all of this, just in case this does get ticked
|
||||
+ /*
|
||||
if (++this.h % 20 * 4 == 0) {
|
||||
@@ -152,7 +152,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
@@ -0,0 +0,0 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||
|
||||
public void d() {
|
||||
public void a() {
|
||||
++this.g;
|
||||
+
|
||||
+ // Paper start - Move enderchest open sounds out of the tick loop
|
||||
@@ -162,7 +162,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ double d1 = (double) this.getPosition().getX() + 0.5D;
|
||||
+ double d0 = (double) this.getPosition().getZ() + 0.5D;
|
||||
+
|
||||
+ this.world.a((EntityHuman) null, d1, (double) this.getPosition().getY() + 0.5D, d0, SoundEffects.aN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
|
||||
+ this.world.a((EntityHuman) null, d1, (double) this.getPosition().getY() + 0.5D, d0, SoundEffects.aQ, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@@ -177,7 +177,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ double d0 = (double) this.getPosition().getX() + 0.5D;
|
||||
+ double d2 = (double) this.getPosition().getZ() + 0.5D;
|
||||
+
|
||||
+ this.world.a((EntityHuman) null, d0, (double) this.getPosition().getY() + 0.5D, d2, SoundEffects.aM, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
|
||||
+ this.world.a((EntityHuman) null, d0, (double) this.getPosition().getY() + 0.5D, d2, SoundEffects.aP, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
|
||||
+ this.a = 0.0F;
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
Reference in New Issue
Block a user