Fixes missing upstream
This commit is contained in:
@@ -2,6 +2,7 @@ package net.minecraft.server;
|
|||||||
|
|
||||||
import com.destroystokyo.paper.exception.ServerInternalException;
|
import com.destroystokyo.paper.exception.ServerInternalException;
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.collect.Queues;
|
import com.google.common.collect.Queues;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -681,7 +682,9 @@ public class Chunk {
|
|||||||
entity.ac = k;
|
entity.ac = k;
|
||||||
entity.ad = this.locZ;
|
entity.ad = this.locZ;
|
||||||
this.entitySlices[k].add(entity);
|
this.entitySlices[k].add(entity);
|
||||||
// Paper start - update count
|
// Paper start
|
||||||
|
entity.setCurrentChunk(this);
|
||||||
|
entityCounts.increment(entity.entityKeyString);
|
||||||
if (entity instanceof EntityItem) {
|
if (entity instanceof EntityItem) {
|
||||||
itemCounts[k]++;
|
itemCounts[k]++;
|
||||||
} else if (entity instanceof IInventory) {
|
} else if (entity instanceof IInventory) {
|
||||||
@@ -703,10 +706,6 @@ public class Chunk {
|
|||||||
this.entityCount.adjustOrPutValue( creatureType.a(), 1, 1 );
|
this.entityCount.adjustOrPutValue( creatureType.a(), 1, 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Paper start
|
|
||||||
entity.setCurrentChunk(this);
|
|
||||||
entityCounts.increment(entity.entityKeyString);
|
|
||||||
// Paper end
|
|
||||||
// Spigot end
|
// Spigot end
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -724,8 +723,10 @@ public class Chunk {
|
|||||||
i = this.entitySlices.length - 1;
|
i = this.entitySlices.length - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.entitySlices[i].remove(entity)) { return; } // Paper
|
// Paper start
|
||||||
// Paper start - update counts
|
if (!this.entitySlices[i].remove(entity)) { return; }
|
||||||
|
entity.setCurrentChunk(null);
|
||||||
|
entityCounts.decrement(entity.entityKeyString);
|
||||||
if (entity instanceof EntityItem) {
|
if (entity instanceof EntityItem) {
|
||||||
itemCounts[i]--;
|
itemCounts[i]--;
|
||||||
} else if (entity instanceof IInventory) {
|
} else if (entity instanceof IInventory) {
|
||||||
@@ -747,10 +748,6 @@ public class Chunk {
|
|||||||
this.entityCount.adjustValue( creatureType.a(), -1 );
|
this.entityCount.adjustValue( creatureType.a(), -1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Paper start
|
|
||||||
entity.setCurrentChunk(null);
|
|
||||||
entityCounts.decrement(entity.entityKeyString);
|
|
||||||
// Paper end
|
|
||||||
// Spigot end
|
// Spigot end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1686,6 +1686,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
|
this.player.updateInventory(this.player.activeContainer); // Paper - Refresh player inventory
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|||||||
Submodule work/Paper updated: f8452c8f61...0e5eec62e7
Reference in New Issue
Block a user