mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Updated Upstream (Paper, Tuinity & Airplane)
Upstream has released updates that appear to apply and compile correctly Paper Changes: b94a99b03 Updated Upstream (CraftBukkit) (#5762) f5cb169e0 [Auto] Updated Upstream (CraftBukkit) Tuinity Changes: 3eda860f4 Updated Upstream (Paper) e9c834821 Revert entity ticking chunk map for tracker Airplane Changes: 3e07ea8cf Patch container checks for WildChests compat d04adc933 Updated Upstream (Tuinity) 489bb761c Update gradle 0d5670e62 Merge pull request #24 from HexedHero/spelling-mistake-lightning c605be6dc Fix typo
This commit is contained in:
@@ -1902,7 +1902,7 @@ index 86f156587a0939b28c5cf6f64907255c1c4f8b35..06157bb07cce3ba24087ceaca7138b56
|
||||
this.u = playerchunk_c;
|
||||
this.players = playerchunk_d;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||
index 33429be7da4d4c2b2469b8140e46e66d9921652c..c0d2b7fe726ea92e18871e3714ca9c249492ac93 100644
|
||||
index 4df1be8091af0ed9d3403f217b481645e24020e8..78e752a629bab777b45cf62e4c1aaf9efa40918a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||
@@ -705,7 +705,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1937,39 +1937,7 @@ index 33429be7da4d4c2b2469b8140e46e66d9921652c..c0d2b7fe726ea92e18871e3714ca9c24
|
||||
|
||||
return Math.max(Math.abs(k), Math.abs(l));
|
||||
}
|
||||
@@ -2170,10 +2176,13 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
private final void processTrackQueue() {
|
||||
this.world.timings.tracker1.startTiming();
|
||||
try {
|
||||
- com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Chunk> iterator = this.world.getChunkProvider().entityTickingChunks.iterator();
|
||||
+ // Airplane start - raw iterator
|
||||
+ //com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Chunk> iterator = this.world.getChunkProvider().entityTickingChunks.iterator();
|
||||
+ com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet<Chunk> chunks = this.world.getChunkProvider().entityTickingChunks;
|
||||
+ int iterator = chunks.createRawIterator();
|
||||
try {
|
||||
- while (iterator.hasNext()) {
|
||||
- Chunk chunk = iterator.next();
|
||||
+ while (iterator != -1) {
|
||||
+ Chunk chunk = chunks.rawGet(iterator);
|
||||
Entity[] entities = chunk.entities.getRawData();
|
||||
for (int i = 0, len = chunk.entities.size(); i < len; ++i) {
|
||||
Entity entity = entities[i];
|
||||
@@ -2183,10 +2192,13 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
tracker.trackerEntry.tick();
|
||||
}
|
||||
}
|
||||
+
|
||||
+ iterator = chunks.advanceRawIterator(iterator);
|
||||
}
|
||||
} finally {
|
||||
- iterator.finishedIterating();
|
||||
+ chunks.finishRawIterator();
|
||||
}
|
||||
+ // Airplane end
|
||||
} finally {
|
||||
this.world.timings.tracker1.stopTiming();
|
||||
}
|
||||
@@ -2549,11 +2561,17 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
@@ -2546,11 +2552,17 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
boolean flag1 = this.tracker.attachedToPlayer;
|
||||
|
||||
if (!flag1) {
|
||||
@@ -1989,7 +1957,7 @@ index 33429be7da4d4c2b2469b8140e46e66d9921652c..c0d2b7fe726ea92e18871e3714ca9c24
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2583,8 +2601,10 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
@@ -2580,8 +2592,10 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
}
|
||||
|
||||
private int b() {
|
||||
@@ -2001,7 +1969,7 @@ index 33429be7da4d4c2b2469b8140e46e66d9921652c..c0d2b7fe726ea92e18871e3714ca9c24
|
||||
Iterator iterator = collection.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -2596,6 +2616,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
@@ -2593,6 +2607,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
i = j;
|
||||
}
|
||||
}
|
||||
@@ -2745,7 +2713,7 @@ index 9a7bebd77302dbfd07ac802acbe2b9cb80eec26f..99cdcc9a9a7e6227a165c4ef779f8e76
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
index 9278b8546a57f21051a65d59c2c01d39afaa68cc..61eaa3e8f961a30e2dc9ae8701ba3b875176e7e0 100644
|
||||
index c29f05b6fd0664345d8d09f898777a3e44f866c4..75c3239c9869863d9653916f3656c882b798cf07 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
@@ -231,11 +231,17 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -3328,7 +3296,7 @@ index 70c32b7a53a1107cced3491ebac19b0eaf4fec2e..3f3e241f3b24d9df9d57760c5515ff02
|
||||
continue;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
|
||||
index 111f62d0e5b40e945793b8f504f2c035c0884a6a..cfabc9047cd3e972af84700725355d0fe149b221 100644
|
||||
index 111f62d0e5b40e945793b8f504f2c035c0884a6a..324b752c70e0bd7ea06caa98ec15cdd4e6ea40ae 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
|
||||
@@ -36,7 +36,7 @@ import org.bukkit.entity.HumanEntity;
|
||||
@@ -3340,8 +3308,12 @@ index 111f62d0e5b40e945793b8f504f2c035c0884a6a..cfabc9047cd3e972af84700725355d0f
|
||||
protected float a;
|
||||
protected float b;
|
||||
public int viewingCount;
|
||||
@@ -75,9 +75,31 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
|
||||
@@ -73,10 +73,34 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
+ private final boolean isNative = getClass().equals(TileEntityChest.class); // Airplane
|
||||
+
|
||||
protected TileEntityChest(TileEntityTypes<?> tileentitytypes) {
|
||||
super(tileentitytypes);
|
||||
+ // Airplane start
|
||||
@@ -3350,29 +3322,28 @@ index 111f62d0e5b40e945793b8f504f2c035c0884a6a..cfabc9047cd3e972af84700725355d0f
|
||||
+ */
|
||||
+ this.items = new gg.airplane.structs.ItemListWithBitset(27);
|
||||
+ // Airplane end
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
+ // Airplane start
|
||||
+ @Override
|
||||
+ public boolean hasEmptySlot(EnumDirection enumdirection) {
|
||||
+ return !this.items.hasFullStacks();
|
||||
+ return isNative ? !this.items.hasFullStacks() : super.hasEmptySlot(enumdirection);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCompletelyFull(EnumDirection enumdirection) {
|
||||
+ return this.items.hasFullStacks() && super.isCompletelyFull(enumdirection);
|
||||
+ return isNative ? this.items.hasFullStacks() && super.isCompletelyFull(enumdirection) : super.isCompletelyFull(enumdirection);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCompletelyEmpty(EnumDirection enumdirection) {
|
||||
+ return this.items.isCompletelyEmpty() || super.isCompletelyEmpty(enumdirection);
|
||||
+ }
|
||||
+ return isNative && this.items.isCompletelyEmpty() || super.isCompletelyEmpty(enumdirection);
|
||||
}
|
||||
+ // Airplane end
|
||||
+
|
||||
|
||||
public TileEntityChest() {
|
||||
this(TileEntityTypes.CHEST);
|
||||
}
|
||||
@@ -95,7 +117,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
|
||||
@@ -95,7 +119,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
|
||||
@Override
|
||||
public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) {
|
||||
super.load(iblockdata, nbttagcompound);
|
||||
@@ -3381,7 +3352,7 @@ index 111f62d0e5b40e945793b8f504f2c035c0884a6a..cfabc9047cd3e972af84700725355d0f
|
||||
if (!this.b(nbttagcompound)) {
|
||||
ContainerUtil.b(nbttagcompound, this.items);
|
||||
}
|
||||
@@ -295,7 +317,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
|
||||
@@ -295,7 +319,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
|
||||
|
||||
@Override
|
||||
protected void a(NonNullList<ItemStack> nonnulllist) {
|
||||
|
||||
Reference in New Issue
Block a user