Update to Minecraft 1.16.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-08-12 07:00:00 +10:00
parent 5e5f7f19dc
commit 6a9e00d4b6
208 changed files with 2144 additions and 2455 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/TileEntityShulkerBox.java
+++ b/net/minecraft/server/TileEntityShulkerBox.java
@@ -3,12 +3,16 @@
@@ -3,6 +3,10 @@
import java.util.List;
import java.util.stream.IntStream;
import javax.annotation.Nullable;
@@ -11,13 +11,6 @@
public class TileEntityShulkerBox extends TileEntityLootable implements IWorldInventory, ITickable {
private static final int[] a = IntStream.range(0, 27).toArray();
private NonNullList<ItemStack> contents;
- private int c;
+ public int c; // PAIL private -> public, rename viewerCount
private TileEntityShulkerBox.AnimationPhase i;
private float j;
private float k;
@@ -16,6 +20,37 @@
private EnumColor l;
private boolean m;
@@ -59,16 +52,16 @@
@@ -178,6 +213,7 @@
}
++this.c;
++this.viewingCount;
+ if (opened) return; // CraftBukkit - only animate if the ShulkerBox hasn't been forced open already by an API call.
this.world.playBlockAction(this.position, this.getBlock().getBlock(), 1, this.c);
if (this.c == 1) {
this.world.playBlockAction(this.position, this.getBlock().getBlock(), 1, this.viewingCount);
if (this.viewingCount == 1) {
this.world.playSound((EntityHuman) null, this.position, SoundEffects.BLOCK_SHULKER_BOX_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
@@ -190,6 +226,7 @@
public void closeContainer(EntityHuman entityhuman) {
if (!entityhuman.isSpectator()) {
--this.c;
--this.viewingCount;
+ if (opened) return; // CraftBukkit - only animate if the ShulkerBox hasn't been forced open already by an API call.
this.world.playBlockAction(this.position, this.getBlock().getBlock(), 1, this.c);
if (this.c <= 0) {
this.world.playBlockAction(this.position, this.getBlock().getBlock(), 1, this.viewingCount);
if (this.viewingCount <= 0) {
this.world.playSound((EntityHuman) null, this.position, SoundEffects.BLOCK_SHULKER_BOX_CLOSE, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);