mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly Paper Changes: a62238a99 Empty commands shall not be dispatched 60df44b11 Configurable door breaking difficulty Tuinity Changes: 0d63fa009 Fix skylight propagation on top of non-empty sections again
This commit is contained in:
2
Paper
2
Paper
Submodule Paper updated: 428db483a7...a62238a998
@@ -204,16 +204,6 @@ Optimise collision checking in player move packet handling
|
||||
Don't need to do another getCubes call if the move() call
|
||||
doesn't find any collisions
|
||||
|
||||
Optimise heightmap access
|
||||
|
||||
HeightMap uses DataBits for storage to reduce the memory footprint
|
||||
of the underlying heightmap. However, this reduction in memory
|
||||
footprint comes at the cost of encoding/decoding each access.
|
||||
|
||||
So we can make the tradeoff of raw array access by using a char
|
||||
array internally. For every 100,000 chunks, this will add approximately
|
||||
80MB overhead (4 heightmaps per full chunk) - which is acceptable.
|
||||
|
||||
Manually inline methods in BlockPosition
|
||||
|
||||
Separate lookup locking from state access in UserCache
|
||||
@@ -362,17 +352,6 @@ Copy passenger list in enderTeleportTo
|
||||
|
||||
Fixes https://github.com/Spottedleaf/Tuinity/issues/208
|
||||
|
||||
Revert MC-4 fix
|
||||
|
||||
When messing around with collisions, I ran into problems where
|
||||
entity position was off by ULP and that caused clipping problems.
|
||||
Now, the collision epsilon is 1.0e-7 to account for those errors.
|
||||
|
||||
But this patch is going to cause problems on the order of 1.0e-4.
|
||||
|
||||
I do not want to deal with clipping problems. The very fact it works
|
||||
shows it's causing the clipping to occur serverside.
|
||||
|
||||
Prevent light queue overfill when no players are online
|
||||
|
||||
block changes don't queue light updates (and they shouldn't)
|
||||
@@ -2059,10 +2038,10 @@ index 0000000000000000000000000000000000000000..9910dc9f1a087f5baf404a5b8ebb5a9f
|
||||
+}
|
||||
diff --git a/src/main/java/com/tuinity/tuinity/chunk/light/SkyStarLightEngine.java b/src/main/java/com/tuinity/tuinity/chunk/light/SkyStarLightEngine.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..8df35be7224c3e499c2fd46931e3ad325ec2f1b5
|
||||
index 0000000000000000000000000000000000000000..0cd48bd4032092fe1a9f12082e85195a125f0f87
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/tuinity/tuinity/chunk/light/SkyStarLightEngine.java
|
||||
@@ -0,0 +1,748 @@
|
||||
@@ -0,0 +1,738 @@
|
||||
+package com.tuinity.tuinity.chunk.light;
|
||||
+
|
||||
+import com.tuinity.tuinity.util.WorldUtil;
|
||||
@@ -2631,17 +2610,7 @@ index 0000000000000000000000000000000000000000..8df35be7224c3e499c2fd46931e3ad32
|
||||
+ final int startY = highestNonEmptySection << 4 | 15;
|
||||
+ for (int currZ = minZ; currZ <= maxZ; ++currZ) {
|
||||
+ for (int currX = minX; currX <= maxX; ++currX) {
|
||||
+ final int end = this.tryPropagateSkylight(world, currX, startY, currZ, false, false);
|
||||
+ if (end == startY) {
|
||||
+ // we need to propagate this one ourselves.
|
||||
+ this.appendToIncreaseQueue(
|
||||
+ ((currX + (currZ << 6) + (startY << (6 + 6)) + this.coordinateOffset) & ((1L << (6 + 6 + 16)) - 1))
|
||||
+ | (15L << (6 + 6 + 16)) // we know we're at full lit here
|
||||
+ | (AxisDirection.POSITIVE_Y.everythingButThisDirection << (6 + 6 + 16 + 4)) // no need to check upwards, we know it's 15.
|
||||
+ // we know this block is air because the section is empty, so it's obviously not sidedly
|
||||
+ // transparent.
|
||||
+ );
|
||||
+ }
|
||||
+ this.tryPropagateSkylight(world, currX, startY + 1, currZ, false, false);
|
||||
+ }
|
||||
+ }
|
||||
+ } // else: apparently the chunk is empty
|
||||
@@ -8370,7 +8339,7 @@ index 2d887af902a33b0e28d8f0a6ac2e59c815a7856e..2291135eaef64c403183724cb6e413cd
|
||||
@Override
|
||||
public BlockPosition immutableCopy() {
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 9c078d30afef20bd1ea5975299c5513334829b19..6ca9e373c402bf252bae6f08b88407bda48d7f0e 100644
|
||||
index 9c078d30afef20bd1ea5975299c5513334829b19..0a8173a5bcd7212ebeff204fef5efdf1633aac78 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -91,6 +91,186 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -8572,15 +8541,6 @@ index 9c078d30afef20bd1ea5975299c5513334829b19..6ca9e373c402bf252bae6f08b88407bd
|
||||
Iterator iterator = protochunk.y().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -330,7 +515,7 @@ public class Chunk implements IChunkAccess {
|
||||
Entry<HeightMap.Type, HeightMap> entry = (Entry) iterator.next();
|
||||
|
||||
if (ChunkStatus.FULL.h().contains(entry.getKey())) {
|
||||
- this.a((HeightMap.Type) entry.getKey()).a(((HeightMap) entry.getValue()).a());
|
||||
+ this.a((HeightMap.Type) entry.getKey()).copyFrom(((HeightMap) entry.getValue())); // Tuinity
|
||||
}
|
||||
}
|
||||
|
||||
@@ -547,6 +732,7 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
@Override
|
||||
@@ -9402,7 +9362,7 @@ index 6acb5f05a05c542f8257e205ef70987be2d29194..12d9b73ccc2f4406957932397746cac7
|
||||
}
|
||||
} finally {
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 8e7da2c5f3852920ec5fbcdd2bff4d299e6aa499..13553da7c37d2701854c8d824311dd7bc1a0a423 100644
|
||||
index 8e7da2c5f3852920ec5fbcdd2bff4d299e6aa499..cba943682f5ee798517bc8c3a098c100e235320b 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -24,6 +24,14 @@ public class ChunkRegionLoader {
|
||||
@@ -9425,7 +9385,7 @@ index 8e7da2c5f3852920ec5fbcdd2bff4d299e6aa499..13553da7c37d2701854c8d824311dd7b
|
||||
// Paper end
|
||||
|
||||
+ // Tuinity start - rewrite light engine
|
||||
+ private static final int STARLIGHT_LIGHT_VERSION = 2;
|
||||
+ private static final int STARLIGHT_LIGHT_VERSION = 3;
|
||||
+
|
||||
+ private static final String UNINITIALISED_SKYLIGHT_TAG = "starlight.skylight_uninit";
|
||||
+ private static final String STARLIGHT_VERSION_TAG = "starlight.light_version";
|
||||
@@ -9616,34 +9576,6 @@ index f6c9bdbf52d773d7aa601125b887b347163f9328..51ea295d66312c95685b9fe4ee502a02
|
||||
this.t = chunkstatus == null ? 0 : chunkstatus.c() + 1;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java
|
||||
index f0c9009fb808ca664a7c3ebaeb8cfa8e2ba7b97e..58f7e30da99afbfae39aedc2d708e144d4dfb128 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataBits.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataBits.java
|
||||
@@ -52,6 +52,7 @@ public class DataBits {
|
||||
return (int) ((long) i * this.g_unsigned + this.h_unsigned >> 32 >> this.i); // Paper
|
||||
}
|
||||
|
||||
+ public final int getAndSet(final int index, final int value) { return this.a(index, value); } // Tuinity - OBFHELPER
|
||||
public final int a(int i, int j) { // Paper - make final for inline
|
||||
//Validate.inclusiveBetween(0L, (long) (this.e - 1), (long) i); // Paper
|
||||
//Validate.inclusiveBetween(0L, this.d, (long) j); // Paper
|
||||
@@ -64,6 +65,7 @@ public class DataBits {
|
||||
return j1;
|
||||
}
|
||||
|
||||
+ public final void set(final int index, final int value) { this.b(index, value); } // Tuinity - OBFHELPER
|
||||
public final void b(int i, int j) { // Paper - make final for inline
|
||||
//Validate.inclusiveBetween(0L, (long) (this.e - 1), (long) i); // Paper
|
||||
//Validate.inclusiveBetween(0L, this.d, (long) j); // Paper
|
||||
@@ -74,6 +76,7 @@ public class DataBits {
|
||||
this.b[k] = l & ~(this.d << i1) | ((long) j & this.d) << i1;
|
||||
}
|
||||
|
||||
+ public final int get(final int index) { return this.a(index); } // Tuinity - OBFHELPER
|
||||
public final int a(int i) { // Paper - make final for inline
|
||||
//Validate.inclusiveBetween(0L, (long) (this.e - 1), (long) i); // Paper
|
||||
int j = this.b(i);
|
||||
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
index 95ef96286855624590b72d69514b0fc0e08fddba..73163b417af7e522a4509bf9c1ab56d6499be622 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
@@ -10154,19 +10086,6 @@ index 6d716214e756fe1326cd3d2becea969076f6fd5b..fb1d640d89258477dd1286fff929deec
|
||||
|
||||
if (entityhuman != null) {
|
||||
double d0 = entityhuman.h((Entity) this); // CraftBukkit - decompile error
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
index f41aaa7623c052b9f4044898d1bdee898c03057a..d99cecc4075338d7b8f154ab94d8ac04190ba371 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
@@ -526,7 +526,7 @@ public class EntityItem extends Entity {
|
||||
|
||||
// Paper start - fix MC-4
|
||||
public void setPositionRaw(double x, double y, double z) {
|
||||
- if (com.destroystokyo.paper.PaperConfig.fixEntityPositionDesync) {
|
||||
+ if (false && com.destroystokyo.paper.PaperConfig.fixEntityPositionDesync) { // Tuinity - revert
|
||||
// encode/decode from PacketPlayOutEntity
|
||||
x = MathHelper.floorLong(x * 4096.0D) * (1 / 4096.0D);
|
||||
y = MathHelper.floorLong(y * 4096.0D) * (1 / 4096.0D);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index c8cdce899b109a7f554fec7aaa8235df4224cd1d..1c396ec56f35d8764e3bf7b67a7984393eb94b3b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -10412,37 +10331,10 @@ index 36aafc3b71013bcec0f4d956761fc2710848b3fd..c9963c19892c3e408964b72983bc6e26
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/HeightMap.java b/src/main/java/net/minecraft/server/HeightMap.java
|
||||
index 068b92c5c4ae112771757626ea75694e59f3d255..a43c4ca3ea2e0dbf34a177592daed18c64bb14d3 100644
|
||||
index 068b92c5c4ae112771757626ea75694e59f3d255..476da43b9f0ef35b4985f88e4784b1f8c5222af3 100644
|
||||
--- a/src/main/java/net/minecraft/server/HeightMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/HeightMap.java
|
||||
@@ -19,7 +19,25 @@ public class HeightMap {
|
||||
private static final Predicate<IBlockData> b = (iblockdata) -> {
|
||||
return iblockdata.getMaterial().isSolid();
|
||||
};
|
||||
- private final DataBits c = new DataBits(9, 256);
|
||||
+ // Tuinity start
|
||||
+ private final char[] heightmap = new char[16 * 16]; // Tuinity - replace with faster access
|
||||
+ public DataBits toDataBits() {
|
||||
+ final DataBits ret = new DataBits(9, 256);
|
||||
+
|
||||
+ for (int i = 0, len = this.heightmap.length; i < len; ++i) {
|
||||
+ ret.set(i, this.heightmap[i]);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ public void copyFrom(HeightMap other) {
|
||||
+ if (other.heightmap.length != this.heightmap.length) {
|
||||
+ throw new IllegalStateException("Heightmap lengths must match");
|
||||
+ }
|
||||
+ System.arraycopy(other.heightmap, 0, this.heightmap, 0, this.heightmap.length);
|
||||
+ }
|
||||
+ // Tuinity end
|
||||
private final Predicate<IBlockData> d;
|
||||
private final IChunkAccess e;
|
||||
|
||||
@@ -101,24 +119,30 @@ public class HeightMap {
|
||||
@@ -101,6 +101,7 @@ public class HeightMap {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10450,34 +10342,7 @@ index 068b92c5c4ae112771757626ea75694e59f3d255..a43c4ca3ea2e0dbf34a177592daed18c
|
||||
public int a(int i, int j) {
|
||||
return this.a(c(i, j));
|
||||
}
|
||||
|
||||
private int a(int i) {
|
||||
- return this.c.a(i);
|
||||
+ return this.heightmap[i]; // Tuinity
|
||||
}
|
||||
|
||||
private void a(int i, int j, int k) {
|
||||
- this.c.b(c(i, j), k);
|
||||
+ this.heightmap[c(i, j)] = (char)k; // Tuinity
|
||||
}
|
||||
|
||||
public void a(long[] along) {
|
||||
- System.arraycopy(along, 0, this.c.a(), 0, along.length);
|
||||
+ // Tuinity start
|
||||
+ final DataBits databits = new DataBits(9, 256, along);
|
||||
+ for (int i = 0, len = this.heightmap.length; i < len; ++i) {
|
||||
+ this.heightmap[i] = (char)databits.get(i);
|
||||
+ }
|
||||
+ // Tuinity end
|
||||
}
|
||||
|
||||
public long[] a() {
|
||||
- return this.c.a();
|
||||
+ return this.toDataBits().a(); // Tuinity
|
||||
}
|
||||
|
||||
private static int c(int i, int j) {
|
||||
@@ -137,7 +161,7 @@ public class HeightMap {
|
||||
@@ -137,7 +138,7 @@ public class HeightMap {
|
||||
private final String h;
|
||||
private final HeightMap.Use i;
|
||||
private final Predicate<IBlockData> j;
|
||||
@@ -10486,7 +10351,7 @@ index 068b92c5c4ae112771757626ea75694e59f3d255..a43c4ca3ea2e0dbf34a177592daed18c
|
||||
HeightMap.Type[] aheightmap_type = values();
|
||||
int i = aheightmap_type.length;
|
||||
|
||||
@@ -149,7 +173,7 @@ public class HeightMap {
|
||||
@@ -149,7 +150,7 @@ public class HeightMap {
|
||||
|
||||
});
|
||||
|
||||
@@ -12185,7 +12050,7 @@ index a22f0cccecc85b4e4fe4603bcfa213f15c23db69..6cc4a035c8b1312b59685b20039d5e82
|
||||
this.d &= ~(1 << k);
|
||||
if (nibblearray != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
index b9276928a58d56ca9aac95d262d8555522946bd7..cf3fbe60722c047487abbbc5c84c9767aa47733b 100644
|
||||
index b9276928a58d56ca9aac95d262d8555522946bd7..d5a8036b764699a70a69b7dc3d45ea6d10835c44 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
@@ -19,7 +19,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
@@ -12304,7 +12169,7 @@ index b9276928a58d56ca9aac95d262d8555522946bd7..cf3fbe60722c047487abbbc5c84c9767
|
||||
+ chunkSectionBitSetCopy ^= trailingBit; // move on to the next
|
||||
+
|
||||
+ if (chunk.getSections()[sectionIndex] != null) {
|
||||
+ this.extraPackets.add(new PacketPlayOutMapChunk(chunk, trailingBit, modifyBlocks));
|
||||
+ this.extraPackets.add(new PacketPlayOutMapChunk(chunk, trailingBit));
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Skip events if there's no listeners
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
index 22d748008d24fd6ed7cd8c4914e2ceb378f32c95..cabce1a8ba5db56495628edd9bc796aee7a53356 100644
|
||||
index e56ff365118c50486f36cb15a4ca062c5a481674..17753c8a997aa286460be5d8eb6508e2eaed18ce 100644
|
||||
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
@@ -277,6 +277,7 @@ public class CommandDispatcher {
|
||||
@@ -278,6 +278,7 @@ public class CommandDispatcher {
|
||||
}
|
||||
|
||||
private void runSync(EntityPlayer entityplayer, Collection<String> bukkit, RootCommandNode<ICompletionProvider> rootcommandnode) {
|
||||
@@ -16,7 +16,7 @@ index 22d748008d24fd6ed7cd8c4914e2ceb378f32c95..cabce1a8ba5db56495628edd9bc796ae
|
||||
// Paper end - Async command map building
|
||||
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandListenerWrapper>(entityplayer.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper
|
||||
PlayerCommandSendEvent event = new PlayerCommandSendEvent(entityplayer.getBukkitEntity(), new LinkedHashSet<>(bukkit));
|
||||
@@ -289,6 +290,7 @@ public class CommandDispatcher {
|
||||
@@ -290,6 +291,7 @@ public class CommandDispatcher {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -9,12 +9,12 @@ that 5 arrows, 5 snowballs, 5 tridents, etc. will be allowed to be
|
||||
saved/loaded per chunk. The default value of -1 disables the limit.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 80409c4b52a4bb7146760070dae0e04d49bdd6b3..0bca517b4948cd55bfbf3ba4d5c1b3cd895cc086 100644
|
||||
index c46d5d6aa8246f0cecacba288ab3f51a41e112c8..5b2077c90e2a3010a6a596d7e3551e791e670d16 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -731,4 +731,9 @@ public class PaperWorldConfig {
|
||||
private void disableMobSpawnerSpawnEggTransformation() {
|
||||
disableMobSpawnerSpawnEggTransformation = getBoolean("game-mechanics.disable-mob-spawner-spawn-egg-transformation", disableMobSpawnerSpawnEggTransformation);
|
||||
@@ -759,4 +759,9 @@ public class PaperWorldConfig {
|
||||
EnumDifficulty.class
|
||||
);
|
||||
}
|
||||
+
|
||||
+ public int projectileSaveLimit = -1;
|
||||
@@ -23,7 +23,7 @@ index 80409c4b52a4bb7146760070dae0e04d49bdd6b3..0bca517b4948cd55bfbf3ba4d5c1b3cd
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 13553da7c37d2701854c8d824311dd7bc1a0a423..66058a6365fe4da8980b09904142ed44e42c5aac 100644
|
||||
index cba943682f5ee798517bc8c3a098c100e235320b..d5c0b5574f763c7191b03ff0e78e689dad6589ff 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -529,11 +529,21 @@ public class ChunkRegionLoader {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add canSaveToDisk to Entity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 66058a6365fe4da8980b09904142ed44e42c5aac..cda8847829a3a92869f0f12d74f54daa97c5e2a1 100644
|
||||
index d5c0b5574f763c7191b03ff0e78e689dad6589ff..74056592041580fd747efe874f8931fb71cb553d 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -536,6 +536,7 @@ public class ChunkRegionLoader {
|
||||
|
||||
@@ -17,7 +17,7 @@ index 2e6b621694c4bbaeb2d7e3e2773bacda8374aa0d..308cb9cfb418e63f17f8f39c3db94f93
|
||||
return this.O == tag;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
index d99cecc4075338d7b8f154ab94d8ac04190ba371..cbe03923d468bf75adc10245ebd9f63ff10987f9 100644
|
||||
index f41aaa7623c052b9f4044898d1bdee898c03057a..1ab024c19761d97d0ac81edcc3fb1d9be8c40b5f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
@@ -23,6 +23,8 @@ public class EntityItem extends Entity {
|
||||
|
||||
@@ -22,7 +22,7 @@ index 1194f91a51f87bc461af039fe0819aaf3e5c8bdd..9141976d1d6c5cef9eb4d415df2ad3b8
|
||||
List<EntityPlayer> list = ((EntitySelector) commandcontext.getArgument(s, EntitySelector.class)).d((CommandListenerWrapper) commandcontext.getSource());
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
index cabce1a8ba5db56495628edd9bc796aee7a53356..1a13eb47e07776a53fab4ca38dcb48e55fb77b21 100644
|
||||
index 17753c8a997aa286460be5d8eb6508e2eaed18ce..d080bf58ebc9c1dc9d41fae7d515547bc3f26d54 100644
|
||||
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
@@ -107,6 +107,7 @@ public class CommandDispatcher {
|
||||
@@ -33,7 +33,7 @@ index cabce1a8ba5db56495628edd9bc796aee7a53356..1a13eb47e07776a53fab4ca38dcb48e5
|
||||
}
|
||||
|
||||
if (commanddispatcher_servertype.d) {
|
||||
@@ -337,10 +338,12 @@ public class CommandDispatcher {
|
||||
@@ -338,10 +339,12 @@ public class CommandDispatcher {
|
||||
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ index cabce1a8ba5db56495628edd9bc796aee7a53356..1a13eb47e07776a53fab4ca38dcb48e5
|
||||
public static <T> RequiredArgumentBuilder<CommandListenerWrapper, T> a(String s, ArgumentType<T> argumenttype) {
|
||||
return RequiredArgumentBuilder.argument(s, argumenttype);
|
||||
}
|
||||
@@ -356,6 +359,7 @@ public class CommandDispatcher {
|
||||
@@ -357,6 +360,7 @@ public class CommandDispatcher {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ index 65bae8c9f28c23b0b5dd5d048e7fc7daf328075c..32b75f710b12efbcecec2c8d72d4d8cb
|
||||
public void setAngerTarget(@Nullable UUID uuid) {
|
||||
this.br = uuid;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index 62d202ff871cf3f3deea69931fbee84131bdda8b..a43f44bcf97b30d1cea2fb5d93e6949e41ab86fd 100644
|
||||
index 752e39ad94ea9e8254853a3fda846be2bd436918..03263b94aaeeb8667e0f82c832e4743f4c63108e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.server;
|
||||
@@ -72,7 +72,7 @@ index 62d202ff871cf3f3deea69931fbee84131bdda8b..a43f44bcf97b30d1cea2fb5d93e6949e
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
@@ -44,6 +45,20 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -45,6 +46,20 @@ public class EntityZombie extends EntityMonster {
|
||||
this(EntityTypes.ZOMBIE, world);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ index 62d202ff871cf3f3deea69931fbee84131bdda8b..a43f44bcf97b30d1cea2fb5d93e6949e
|
||||
@Override
|
||||
protected void initPathfinder() {
|
||||
if (world.paperConfig.zombiesTargetTurtleEggs) this.goalSelector.a(4, new EntityZombie.a(this, 1.0D, 3)); // Paper
|
||||
@@ -441,19 +456,19 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -442,19 +457,19 @@ public class EntityZombie extends EntityMonster {
|
||||
if (object instanceof EntityZombie.GroupDataZombie) {
|
||||
EntityZombie.GroupDataZombie entityzombie_groupdatazombie = (EntityZombie.GroupDataZombie) object;
|
||||
|
||||
@@ -119,7 +119,7 @@ index 62d202ff871cf3f3deea69931fbee84131bdda8b..a43f44bcf97b30d1cea2fb5d93e6949e
|
||||
EntityChicken entitychicken1 = (EntityChicken) EntityTypes.CHICKEN.a(this.world);
|
||||
|
||||
entitychicken1.setPositionRotation(this.locX(), this.locY(), this.locZ(), this.yaw, 0.0F);
|
||||
@@ -461,6 +476,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -462,6 +477,7 @@ public class EntityZombie extends EntityMonster {
|
||||
entitychicken1.setChickenJockey(true);
|
||||
this.startRiding(entitychicken1);
|
||||
worldaccess.addEntity(entitychicken1, CreatureSpawnEvent.SpawnReason.MOUNT); // CraftBukkit
|
||||
@@ -127,7 +127,7 @@ index 62d202ff871cf3f3deea69931fbee84131bdda8b..a43f44bcf97b30d1cea2fb5d93e6949e
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -563,7 +579,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -564,7 +580,7 @@ public class EntityZombie extends EntityMonster {
|
||||
|
||||
public static class GroupDataZombie implements GroupDataEntity {
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add vindicator johnny spawn chance
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
index c0d26aa9dcd02c44d744b10e18609857ada95889..8f812aa9133e29d1450ab210fec68b23ca4d3042 100644
|
||||
index 4761ddfedeed54e79788a6f60f06a805efd60ab1..23b350f793539672b6990327ed52e9bb3bdbf54e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
@@ -81,6 +81,12 @@ public class EntityVindicator extends EntityIllagerAbstract {
|
||||
@@ -82,6 +82,12 @@ public class EntityVindicator extends EntityIllagerAbstract {
|
||||
((Navigation) this.getNavigation()).a(true);
|
||||
this.a(difficultydamagescaler);
|
||||
this.b(difficultydamagescaler);
|
||||
|
||||
@@ -4417,10 +4417,10 @@ index 96dda6a14fd17509e9bcb72cc7e9c8532c6a036b..3ea66955df304fd13aac2cf9bb93ea15
|
||||
this.setTradingPlayer(entityhuman);
|
||||
this.openTrade(entityhuman, this.getScoreboardDisplayName(), 1);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
index 8f812aa9133e29d1450ab210fec68b23ca4d3042..9950bda50f405ce44f8fc8d95682e2522cf9e10f 100644
|
||||
index 23b350f793539672b6990327ed52e9bb3bdbf54e..f1bc6a4199d788215c2e7d5a835211d16603a6d9 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
@@ -17,14 +17,28 @@ public class EntityVindicator extends EntityIllagerAbstract {
|
||||
@@ -18,14 +18,28 @@ public class EntityVindicator extends EntityIllagerAbstract {
|
||||
super(entitytypes, world);
|
||||
}
|
||||
|
||||
@@ -4798,10 +4798,10 @@ index e76e6ebde73b93dc06e76b71cdf6371c3654160a..d92fe8013fb3b43cb7eabdf1c624291b
|
||||
this.eL();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index a43f44bcf97b30d1cea2fb5d93e6949e41ab86fd..ba9b20863c12a1ba5a55013a74a34bc2fbc37273 100644
|
||||
index 03263b94aaeeb8667e0f82c832e4743f4c63108e..d835ce3fe7c71333efeed5b9cf2a827bebae97f2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -46,6 +46,16 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -47,6 +47,16 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
|
||||
// Purpur start
|
||||
@@ -4818,7 +4818,7 @@ index a43f44bcf97b30d1cea2fb5d93e6949e41ab86fd..ba9b20863c12a1ba5a55013a74a34bc2
|
||||
public boolean jockeyOnlyBaby() {
|
||||
return world.purpurConfig.zombieJockeyOnlyBaby;
|
||||
}
|
||||
@@ -61,9 +71,11 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -62,9 +72,11 @@ public class EntityZombie extends EntityMonster {
|
||||
|
||||
@Override
|
||||
protected void initPathfinder() {
|
||||
|
||||
@@ -45,10 +45,10 @@ index 125eab60f2b4657e52a71eddf7586c574945252e..638efc67d66001ee085957d4698f51a7
|
||||
this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, true, false, EntityTurtle.bo));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index ba9b20863c12a1ba5a55013a74a34bc2fbc37273..1c1816f6f08c2b02aba6db2e78863fabe83674d9 100644
|
||||
index d835ce3fe7c71333efeed5b9cf2a827bebae97f2..556f7a3ebb5c58a87471b2d098f29ffb216aaa1d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -85,7 +85,18 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -86,7 +86,18 @@ public class EntityZombie extends EntityMonster {
|
||||
this.goalSelector.a(7, new PathfinderGoalRandomStrollLand(this, 1.0D));
|
||||
this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[0])).a(EntityPigZombie.class));
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add demo command
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
index 1a13eb47e07776a53fab4ca38dcb48e55fb77b21..ccd0be059f4d7b95d4ec58c0d4fc744a94fec3fd 100644
|
||||
index d080bf58ebc9c1dc9d41fae7d515547bc3f26d54..b5cc099746e9f05ea69bc438bda22a5ac3ebc3c5 100644
|
||||
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
@@ -107,6 +107,7 @@ public class CommandDispatcher {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] PaperPR - Config option for Piglins guarding chests
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 0bca517b4948cd55bfbf3ba4d5c1b3cd895cc086..b21da8af71fa6af82156aa83d983e99c6ac6502a 100644
|
||||
index 5b2077c90e2a3010a6a596d7e3551e791e670d16..ff5e4812819f45c57a662b8fd63c836785782bdb 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -686,6 +686,11 @@ public class PaperWorldConfig {
|
||||
@@ -695,6 +695,11 @@ public class PaperWorldConfig {
|
||||
zombiesTargetTurtleEggs = getBoolean("zombies-target-turtle-eggs", zombiesTargetTurtleEggs);
|
||||
}
|
||||
|
||||
|
||||
@@ -1181,10 +1181,10 @@ index 3ea66955df304fd13aac2cf9bb93ea156558ae57..32864e522b63d5d02c73a4df9f996c2e
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
index 9950bda50f405ce44f8fc8d95682e2522cf9e10f..894313f137578fa60faf80b36cff066d464d3897 100644
|
||||
index f1bc6a4199d788215c2e7d5a835211d16603a6d9..2a137a90828f84de15a7184203c7d0dccc0851b4 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
@@ -27,6 +27,11 @@ public class EntityVindicator extends EntityIllagerAbstract {
|
||||
@@ -28,6 +28,11 @@ public class EntityVindicator extends EntityIllagerAbstract {
|
||||
public boolean isRidableInWater() {
|
||||
return world.purpurConfig.vindicatorRidableInWater;
|
||||
}
|
||||
@@ -1245,10 +1245,10 @@ index d92fe8013fb3b43cb7eabdf1c624291b7e881889..bcc4aa1d3f09e43016d0009cd04dd6b7
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index 1c1816f6f08c2b02aba6db2e78863fabe83674d9..ea5a568509d5c44c3f15d8e813a554957784016b 100644
|
||||
index 556f7a3ebb5c58a87471b2d098f29ffb216aaa1d..a5699314be3f47ed9b27a5d21a396c5282592c7b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -67,6 +67,15 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -68,6 +68,15 @@ public class EntityZombie extends EntityMonster {
|
||||
public boolean jockeyTryExistingChickens() {
|
||||
return world.purpurConfig.zombieJockeyTryExistingChickens;
|
||||
}
|
||||
@@ -1264,7 +1264,7 @@ index 1c1816f6f08c2b02aba6db2e78863fabe83674d9..ea5a568509d5c44c3f15d8e813a55495
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
@@ -546,7 +555,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -547,7 +556,7 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
|
||||
protected void eV() {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Implement TPSBar
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
index ccd0be059f4d7b95d4ec58c0d4fc744a94fec3fd..e31f13b80aef9b410c508030c0d965ec999505e4 100644
|
||||
index b5cc099746e9f05ea69bc438bda22a5ac3ebc3c5..bbd17231a4f7ad0ddde6eb5e589a6c403366cc36 100644
|
||||
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
@@ -109,6 +109,7 @@ public class CommandDispatcher {
|
||||
|
||||
Reference in New Issue
Block a user