geforkt von Mirrors/Paper
Update ForgeFlower (#7857)
Dieser Commit ist enthalten in:
Ursprung
3f7fbe316d
Commit
af3b3778f6
@ -63,7 +63,7 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
paramMappings("net.fabricmc:yarn:1.18.2+build.2:mergedv2")
|
paramMappings("net.fabricmc:yarn:1.18.2+build.2:mergedv2")
|
||||||
remapper("net.fabricmc:tiny-remapper:0.8.2:fat")
|
remapper("net.fabricmc:tiny-remapper:0.8.2:fat")
|
||||||
decompiler("net.minecraftforge:forgeflower:1.5.498.29")
|
decompiler("net.minecraftforge:forgeflower:1.5.605.7")
|
||||||
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.4")
|
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.4")
|
||||||
paperclip("io.papermc:paperclip:3.0.2")
|
paperclip("io.papermc:paperclip:3.0.2")
|
||||||
}
|
}
|
||||||
|
@ -5,20 +5,20 @@ Subject: [PATCH] MC Dev fixes
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||||
index de0f7cee98ae376ebcb1a48aed5ab5375681f53b..ddef1810b4ffe4623b46157ed0505ff97648867d 100644
|
index 216431e94b25fd5a0fdfacf21e532f72d0efe2b9..c1af79f65a1a6ba970764983cf666cb4b7fe36de 100644
|
||||||
--- a/src/main/java/net/minecraft/Util.java
|
--- a/src/main/java/net/minecraft/Util.java
|
||||||
+++ b/src/main/java/net/minecraft/Util.java
|
+++ b/src/main/java/net/minecraft/Util.java
|
||||||
@@ -352,7 +352,7 @@ public class Util {
|
@@ -351,7 +351,7 @@ public class Util {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <K> Strategy<K> identityStrategy() {
|
public static <K> Hash.Strategy<K> identityStrategy() {
|
||||||
- return Util.IdentityStrategy.INSTANCE;
|
- return Util.IdentityStrategy.INSTANCE;
|
||||||
+ return (Strategy<K>) Util.IdentityStrategy.INSTANCE; // Paper - decompile fix
|
+ return (Hash.Strategy<K>) Util.IdentityStrategy.INSTANCE; // Paper - decompile fix
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <V> CompletableFuture<List<V>> sequence(List<? extends CompletableFuture<V>> futures) {
|
public static <V> CompletableFuture<List<V>> sequence(List<? extends CompletableFuture<V>> futures) {
|
||||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
index 8aecabe25510a58041194b0b798236bd652991dc..c656633870c99cc383d95fadcc0ec7b0f18a3682 100644
|
index 5311c40d9bf22b423a69bc722a6125493e616eac..79c7e30d510bdbd4def3b03474f72af0f355091c 100644
|
||||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
@@ -375,12 +375,12 @@ public class BlockPos extends Vec3i {
|
@@ -375,12 +375,12 @@ public class BlockPos extends Vec3i {
|
||||||
@ -40,7 +40,7 @@ index 8aecabe25510a58041194b0b798236bd652991dc..c656633870c99cc383d95fadcc0ec7b0
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
diff --git a/src/main/java/net/minecraft/nbt/ListTag.java b/src/main/java/net/minecraft/nbt/ListTag.java
|
diff --git a/src/main/java/net/minecraft/nbt/ListTag.java b/src/main/java/net/minecraft/nbt/ListTag.java
|
||||||
index 8c37ed1d70c5874bb1bd96fe33b087d4ddc2d68e..ea68b26e506e48d8238b7ee4266e61b211d52bd2 100644
|
index f346306d61854bdc6b395f5d8f799909537a1b50..69423244a1b6658e2c6ad4a7c5329e140b7155a8 100644
|
||||||
--- a/src/main/java/net/minecraft/nbt/ListTag.java
|
--- a/src/main/java/net/minecraft/nbt/ListTag.java
|
||||||
+++ b/src/main/java/net/minecraft/nbt/ListTag.java
|
+++ b/src/main/java/net/minecraft/nbt/ListTag.java
|
||||||
@@ -2,9 +2,12 @@ package net.minecraft.nbt;
|
@@ -2,9 +2,12 @@ package net.minecraft.nbt;
|
||||||
@ -65,10 +65,10 @@ index 8c37ed1d70c5874bb1bd96fe33b087d4ddc2d68e..ea68b26e506e48d8238b7ee4266e61b2
|
|||||||
private byte type;
|
private byte type;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
index 32445370db8392c36065fa7a7680cfe9b90653c3..994bfb175446a7d2e697ff8faef36a348ed1accd 100644
|
index 856a4d6f878ffa966a46b711458934ed5d5b5c37..d6a742066b2e5ebf3975c190cca5134abf3cf1a3 100644
|
||||||
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
@@ -40,14 +40,14 @@ import net.minecraft.world.level.material.FluidState;
|
@@ -39,14 +39,14 @@ import net.minecraft.world.level.material.FluidState;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
public final class NbtUtils {
|
public final class NbtUtils {
|
||||||
@ -85,7 +85,7 @@ index 32445370db8392c36065fa7a7680cfe9b90653c3..994bfb175446a7d2e697ff8faef36a34
|
|||||||
return nbt.getDouble(1);
|
return nbt.getDouble(1);
|
||||||
}).thenComparingDouble((nbt) -> {
|
}).thenComparingDouble((nbt) -> {
|
||||||
return nbt.getDouble(0);
|
return nbt.getDouble(0);
|
||||||
@@ -495,7 +495,7 @@ public final class NbtUtils {
|
@@ -494,7 +494,7 @@ public final class NbtUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CompoundTag update(DataFixer fixer, DataFixTypes fixTypes, CompoundTag compound, int oldVersion, int targetVersion) {
|
public static CompoundTag update(DataFixer fixer, DataFixTypes fixTypes, CompoundTag compound, int oldVersion, int targetVersion) {
|
||||||
@ -244,7 +244,7 @@ index 92650d816113a0f1c2b589691895ebba3424d661..7ef0075cc16613709e145714204a728d
|
|||||||
this.byName = Maps.newHashMap(builder.build()); // CraftBukkit
|
this.byName = Maps.newHashMap(builder.build()); // CraftBukkit
|
||||||
RecipeManager.LOGGER.info("Loaded {} recipes", map1.size());
|
RecipeManager.LOGGER.info("Loaded {} recipes", map1.size());
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||||
index 675625a5dda3ededa398da5e25c2c850ba4ef59a..438647aa32e91e35b5a6430961d1ce4d5558d3d4 100644
|
index 80a21d6f607473691c4ee3494bf5f49edf433e59..8bb59da19f2faabb980fbebc4d9825ae74a1b6c5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||||
@@ -42,7 +42,7 @@ public class PalettedContainer<T> implements PaletteResize<T> {
|
@@ -42,7 +42,7 @@ public class PalettedContainer<T> implements PaletteResize<T> {
|
||||||
|
@ -4429,10 +4429,10 @@ index 0000000000000000000000000000000000000000..4d3dc8fba51bf5c0dceb06744781d1df
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||||
index ddef1810b4ffe4623b46157ed0505ff97648867d..90d22b75fd33d8355e59b6bab79757c5b436c9d7 100644
|
index c1af79f65a1a6ba970764983cf666cb4b7fe36de..307c930d6d295012c8ec6332314b4043befbdafd 100644
|
||||||
--- a/src/main/java/net/minecraft/Util.java
|
--- a/src/main/java/net/minecraft/Util.java
|
||||||
+++ b/src/main/java/net/minecraft/Util.java
|
+++ b/src/main/java/net/minecraft/Util.java
|
||||||
@@ -105,7 +105,7 @@ public class Util {
|
@@ -104,7 +104,7 @@ public class Util {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long getNanos() {
|
public static long getNanos() {
|
||||||
@ -4442,7 +4442,7 @@ index ddef1810b4ffe4623b46157ed0505ff97648867d..90d22b75fd33d8355e59b6bab79757c5
|
|||||||
|
|
||||||
public static long getEpochMillis() {
|
public static long getEpochMillis() {
|
||||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
index c656633870c99cc383d95fadcc0ec7b0f18a3682..85bdeafd92aff5d694c4b5dff0b5796f3467a886 100644
|
index 79c7e30d510bdbd4def3b03474f72af0f355091c..d425adc1f37b9f926d6ee0c90d2237d89355e1a6 100644
|
||||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
@@ -531,6 +531,7 @@ public class BlockPos extends Vec3i {
|
@@ -531,6 +531,7 @@ public class BlockPos extends Vec3i {
|
||||||
@ -4462,10 +4462,10 @@ index c656633870c99cc383d95fadcc0ec7b0f18a3682..85bdeafd92aff5d694c4b5dff0b5796f
|
|||||||
@Override
|
@Override
|
||||||
public BlockPos immutable() {
|
public BlockPos immutable() {
|
||||||
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||||
index cbe273a012bedc3914b8cf1f5ad1fee1dfee6a7e..d0b523387a194d1649469e8d861b0b78a2f4e0b6 100644
|
index 853dd203a78537208f81b0023fdca221b6f82684..b965af563f2cb1508d138e4d48e97a44873c4bb9 100644
|
||||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||||
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||||
@@ -122,7 +122,7 @@ public class CompoundTag implements Tag {
|
@@ -121,7 +121,7 @@ public class CompoundTag implements Tag {
|
||||||
return "TAG_Compound";
|
return "TAG_Compound";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -4474,7 +4474,7 @@ index cbe273a012bedc3914b8cf1f5ad1fee1dfee6a7e..d0b523387a194d1649469e8d861b0b78
|
|||||||
|
|
||||||
protected CompoundTag(Map<String, Tag> entries) {
|
protected CompoundTag(Map<String, Tag> entries) {
|
||||||
this.tags = entries;
|
this.tags = entries;
|
||||||
@@ -185,6 +185,10 @@ public class CompoundTag implements Tag {
|
@@ -184,6 +184,10 @@ public class CompoundTag implements Tag {
|
||||||
this.tags.put(key, NbtUtils.createUUID(value));
|
this.tags.put(key, NbtUtils.createUUID(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6010,7 +6010,7 @@ index 1427b76110a02cee15865173e06e7b7bb4231ae7..de0f49f3e9134c068aa479067ee2986c
|
|||||||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, ServerLevelData iworlddataserver, ResourceKey<Level> resourcekey, Holder<DimensionType> holder, ChunkProgressListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, ServerLevelData iworlddataserver, ResourceKey<Level> resourcekey, Holder<DimensionType> holder, ChunkProgressListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||||
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 9a8c7693f53851675febc7c41f4bf3a809ea8f51..3700c14c8fe5a52ad6eb6d1ca58232beea16c2d7 100644
|
index 43e8ef374d88cc60642a3008792a8785fbefb75a..3431a70a07c08fdc20c7a8d667e6275f212b549e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -234,6 +234,8 @@ public class ServerPlayer extends Player {
|
@@ -234,6 +234,8 @@ public class ServerPlayer extends Player {
|
||||||
@ -6075,7 +6075,7 @@ index 0d33910768b111863816f84393613c0cc5142691..8fdda1e5805534d08c0a06b15e89d85b
|
|||||||
public BlockState getBlockState(BlockPos pos) {
|
public BlockState getBlockState(BlockPos pos) {
|
||||||
return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos);
|
return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos);
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 2f752027a4e4399faab9c8012264b92106961cb3..0753fdff0fe7b660af8bc09ad98a95701b1aaa01 100644
|
index 92ca91b804b8a06299b006c67006ff1f2cd44fd3..3d9a2d4ff540f02163edd023ff86815fda5a35b8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -218,9 +218,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
@@ -218,9 +218,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||||
@ -6250,7 +6250,7 @@ index 76251b5adf41f8e5bf2c07145abe3108fcde8669..8a979600b49e8a11982577fb6dd79503
|
|||||||
FluidState getFluidState(BlockPos pos);
|
FluidState getFluidState(BlockPos pos);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/ChunkPos.java b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
diff --git a/src/main/java/net/minecraft/world/level/ChunkPos.java b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||||
index bd7d159bdc21d7fcb25db1e3f07b9ad9d7eb5157..4c5f8a103b550a681178926096d5f758654c61a7 100644
|
index 788f92f1ede5a6fbf47f65d6c69a7b631c9456ac..4335132883e959f0c9649d5640b703a291d8a7aa 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/ChunkPos.java
|
--- a/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
+++ b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||||
@@ -18,6 +18,7 @@ public class ChunkPos {
|
@@ -18,6 +18,7 @@ public class ChunkPos {
|
||||||
|
@ -74,10 +74,10 @@ index 212b23a380a4bcdb1d2995ca2ccfc8a1709691bd..31bfc0c491c9a4cc6782b6c284121f96
|
|||||||
|
|
||||||
public void clientTick(Level world, BlockPos pos) {
|
public void clientTick(Level world, BlockPos pos) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||||
index 1e420c4230a326da345b2e28442ece26b44f8259..41d20c16ea165cf166c6f3b228bc8261b0ee0d9c 100644
|
index 7c5918f84d2b8f9c778258b7e7d745105effb082..cfb286020b8ee87bad7edbda4cd0b999fb607a06 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
|
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||||
@@ -71,8 +71,8 @@ public interface EntityGetter {
|
@@ -70,8 +70,8 @@ public interface EntityGetter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ index 1e420c4230a326da345b2e28442ece26b44f8259..41d20c16ea165cf166c6f3b228bc8261
|
|||||||
double d = -1.0D;
|
double d = -1.0D;
|
||||||
Player player = null;
|
Player player = null;
|
||||||
|
|
||||||
@@ -100,6 +100,27 @@ public interface EntityGetter {
|
@@ -99,6 +99,27 @@ public interface EntityGetter {
|
||||||
return this.getNearestPlayer(x, y, z, maxDistance, predicate);
|
return this.getNearestPlayer(x, y, z, maxDistance, predicate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ index 1e420c4230a326da345b2e28442ece26b44f8259..41d20c16ea165cf166c6f3b228bc8261
|
|||||||
for(Player player : this.players()) {
|
for(Player player : this.players()) {
|
||||||
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
|
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 274e4d983015a5c8a8fbfcf269e7cb2cac34333f..087c251cbf0551b6e80b7a4a296720ebabc83c62 100644
|
index bfee91a2962a2965635430e3547af283d3da1edf..2e4cbff0010e777ec5b4c774feaed981c8c8b524 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1955,8 +1955,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1955,8 +1955,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -32,10 +32,10 @@ index cad754d6b75c3c16db4fd847fdf6cb8c0ec82dde..5c70fdefeb940837950e8a9692b1ac3a
|
|||||||
|
|
||||||
this.horse.setTrap(false);
|
this.horse.setTrap(false);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||||
index 41d20c16ea165cf166c6f3b228bc8261b0ee0d9c..99f69f11e86fdee801504303fe025797f7959db8 100644
|
index cfb286020b8ee87bad7edbda4cd0b999fb607a06..1a3be6f0570c7c746eafa36544debe90d7629432 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
|
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||||
@@ -89,6 +89,28 @@ public interface EntityGetter {
|
@@ -88,6 +88,28 @@ public interface EntityGetter {
|
||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,10 +8,10 @@ Use larger initial sizes to increase bucket capacity on the BiMap
|
|||||||
BiMap.get was seen to be using a good bit of CPU time.
|
BiMap.get was seen to be using a good bit of CPU time.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/core/MappedRegistry.java b/src/main/java/net/minecraft/core/MappedRegistry.java
|
diff --git a/src/main/java/net/minecraft/core/MappedRegistry.java b/src/main/java/net/minecraft/core/MappedRegistry.java
|
||||||
index d74665f6c3aa05b9e27a712092005e3de81f18a1..a015a097b807d49f60323dacda970db260543561 100644
|
index 147a7f8114eb3b59074ad71dd26273b76f95a727..c3c0e52cfe8ef5fe9049c4582778040702131b47 100644
|
||||||
--- a/src/main/java/net/minecraft/core/MappedRegistry.java
|
--- a/src/main/java/net/minecraft/core/MappedRegistry.java
|
||||||
+++ b/src/main/java/net/minecraft/core/MappedRegistry.java
|
+++ b/src/main/java/net/minecraft/core/MappedRegistry.java
|
||||||
@@ -37,13 +37,11 @@ import org.slf4j.Logger;
|
@@ -36,13 +36,11 @@ import org.slf4j.Logger;
|
||||||
public class MappedRegistry<T> extends WritableRegistry<T> {
|
public class MappedRegistry<T> extends WritableRegistry<T> {
|
||||||
private static final Logger LOGGER = LogUtils.getLogger();
|
private static final Logger LOGGER = LogUtils.getLogger();
|
||||||
private final ObjectList<Holder.Reference<T>> byId = new ObjectArrayList<>(256);
|
private final ObjectList<Holder.Reference<T>> byId = new ObjectArrayList<>(256);
|
||||||
@ -30,7 +30,7 @@ index d74665f6c3aa05b9e27a712092005e3de81f18a1..a015a097b807d49f60323dacda970db2
|
|||||||
private Lifecycle elementsLifecycle;
|
private Lifecycle elementsLifecycle;
|
||||||
private volatile Map<TagKey<T>, HolderSet.Named<T>> tags = new IdentityHashMap<>();
|
private volatile Map<TagKey<T>, HolderSet.Named<T>> tags = new IdentityHashMap<>();
|
||||||
private boolean frozen;
|
private boolean frozen;
|
||||||
@@ -63,6 +61,7 @@ public class MappedRegistry<T> extends WritableRegistry<T> {
|
@@ -62,6 +60,7 @@ public class MappedRegistry<T> extends WritableRegistry<T> {
|
||||||
this.intrusiveHolderCache = new IdentityHashMap<>();
|
this.intrusiveHolderCache = new IdentityHashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,10 +12,10 @@ server threads
|
|||||||
Allow usage of a single thread executor by not using ForkJoin so single core CPU's.
|
Allow usage of a single thread executor by not using ForkJoin so single core CPU's.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||||
index 90d22b75fd33d8355e59b6bab79757c5b436c9d7..a8772417eb54e1a52c490b75b470a502a480f925 100644
|
index 307c930d6d295012c8ec6332314b4043befbdafd..47fcfb1e5b65ce2ae3fcdfc5eecf3a1cf4a8d67f 100644
|
||||||
--- a/src/main/java/net/minecraft/Util.java
|
--- a/src/main/java/net/minecraft/Util.java
|
||||||
+++ b/src/main/java/net/minecraft/Util.java
|
+++ b/src/main/java/net/minecraft/Util.java
|
||||||
@@ -69,8 +69,8 @@ public class Util {
|
@@ -68,8 +68,8 @@ public class Util {
|
||||||
private static final int DEFAULT_MAX_THREADS = 255;
|
private static final int DEFAULT_MAX_THREADS = 255;
|
||||||
private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads";
|
private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads";
|
||||||
private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1);
|
private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1);
|
||||||
@ -26,7 +26,7 @@ index 90d22b75fd33d8355e59b6bab79757c5b436c9d7..a8772417eb54e1a52c490b75b470a502
|
|||||||
private static final ExecutorService IO_POOL = makeIoExecutor();
|
private static final ExecutorService IO_POOL = makeIoExecutor();
|
||||||
public static LongSupplier timeSource = System::nanoTime;
|
public static LongSupplier timeSource = System::nanoTime;
|
||||||
public static final Ticker TICKER = new Ticker() {
|
public static final Ticker TICKER = new Ticker() {
|
||||||
@@ -112,14 +112,18 @@ public class Util {
|
@@ -111,14 +111,18 @@ public class Util {
|
||||||
return Instant.now().toEpochMilli();
|
return Instant.now().toEpochMilli();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ index 90d22b75fd33d8355e59b6bab79757c5b436c9d7..a8772417eb54e1a52c490b75b470a502
|
|||||||
@Override
|
@Override
|
||||||
protected void onTermination(Throwable throwable) {
|
protected void onTermination(Throwable throwable) {
|
||||||
if (throwable != null) {
|
if (throwable != null) {
|
||||||
@@ -135,6 +139,7 @@ public class Util {
|
@@ -134,6 +138,7 @@ public class Util {
|
||||||
return forkJoinWorkerThread;
|
return forkJoinWorkerThread;
|
||||||
}, Util::onThreadException, true);
|
}, Util::onThreadException, true);
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ index 90d22b75fd33d8355e59b6bab79757c5b436c9d7..a8772417eb54e1a52c490b75b470a502
|
|||||||
return executorService;
|
return executorService;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 785df5ec8a5a4e307149edd5ccf7db75f7edb1fc..de10fc8a9d08dbab245292a4291590b54b0aa609 100644
|
index 311a51f91f6f4572d56dcd700c652b2690239f75..4525b3012269a98fb825273d358d414e01119abd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -318,6 +318,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -318,6 +318,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
@ -9,7 +9,7 @@ creating too large of a packet to sed.
|
|||||||
Co authored by Spottedleaf
|
Co authored by Spottedleaf
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||||
index 4ed3b1291ac443502e9b99f83ecf02b22509451c..dba11f277f3703e1ee7f5a62f021d319e4ab18fc 100644
|
index b89965c73bb6f40e688bd29daf6630ccce054100..d004997cb94648a24135f0478be3a25393b67925 100644
|
||||||
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||||
@@ -24,6 +24,14 @@ public class ClientboundLevelChunkPacketData {
|
@@ -24,6 +24,14 @@ public class ClientboundLevelChunkPacketData {
|
||||||
@ -33,7 +33,7 @@ index 4ed3b1291ac443502e9b99f83ecf02b22509451c..dba11f277f3703e1ee7f5a62f021d319
|
|||||||
this.blockEntitiesData = Lists.newArrayList();
|
this.blockEntitiesData = Lists.newArrayList();
|
||||||
+ int totalTileEntities = 0; // Paper
|
+ int totalTileEntities = 0; // Paper
|
||||||
|
|
||||||
for(Entry<BlockPos, BlockEntity> entry2 : chunk.getBlockEntities().entrySet()) {
|
for(Map.Entry<BlockPos, BlockEntity> entry2 : chunk.getBlockEntities().entrySet()) {
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ if (++totalTileEntities > TE_LIMIT) {
|
+ if (++totalTileEntities > TE_LIMIT) {
|
||||||
+ var packet = entry2.getValue().getUpdatePacket();
|
+ var packet = entry2.getValue().getUpdatePacket();
|
||||||
|
@ -26,48 +26,48 @@ index 51cb2644aa516a59e19fecb308d519dbc7e5fb11..e548aa0ca4e1e94ab628614b44fc1156
|
|||||||
this.dataOutputStream.write(value);
|
this.dataOutputStream.write(value);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java b/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
diff --git a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java b/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
||||||
index fc368dee97eb989a30d6d6115771971d1d733b34..000918fe0cc3fde07145e027b25f148afcb0de62 100644
|
index 3ea85dc12a580001c193c4d1fb719234030e1615..61e4fe91ac8648edafd39a952939c667c2838207 100644
|
||||||
--- a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
--- a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
||||||
+++ b/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
+++ b/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
||||||
@@ -105,13 +105,32 @@ public class QueryThreadGs4 extends GenericThread {
|
@@ -105,13 +105,32 @@ public class QueryThreadGs4 extends GenericThread {
|
||||||
NetworkDataOutputStream networkDataOutputStream = new NetworkDataOutputStream(1460);
|
NetworkDataOutputStream networkDataOutputStream = new NetworkDataOutputStream(1460);
|
||||||
networkDataOutputStream.write(0);
|
networkDataOutputStream.write(0);
|
||||||
networkDataOutputStream.writeBytes(this.getIdentBytes(packet.getSocketAddress()));
|
networkDataOutputStream.writeBytes(this.getIdentBytes(packet.getSocketAddress()));
|
||||||
- networkDataOutputStream.writeString(this.serverName);
|
- networkDataOutputStream.writeString(this.serverName);
|
||||||
+
|
+
|
||||||
+ com.destroystokyo.paper.event.server.GS4QueryEvent.QueryType queryType =
|
+ com.destroystokyo.paper.event.server.GS4QueryEvent.QueryType queryType =
|
||||||
+ com.destroystokyo.paper.event.server.GS4QueryEvent.QueryType.BASIC;
|
+ com.destroystokyo.paper.event.server.GS4QueryEvent.QueryType.BASIC;
|
||||||
+ com.destroystokyo.paper.event.server.GS4QueryEvent.QueryResponse queryResponse = com.destroystokyo.paper.event.server.GS4QueryEvent.QueryResponse.builder()
|
+ com.destroystokyo.paper.event.server.GS4QueryEvent.QueryResponse queryResponse = com.destroystokyo.paper.event.server.GS4QueryEvent.QueryResponse.builder()
|
||||||
+ .motd(this.serverName)
|
+ .motd(this.serverName)
|
||||||
+ .map(this.worldName)
|
+ .map(this.worldName)
|
||||||
+ .currentPlayers(this.serverInterface.getPlayerCount())
|
+ .currentPlayers(this.serverInterface.getPlayerCount())
|
||||||
+ .maxPlayers(this.maxPlayers)
|
+ .maxPlayers(this.maxPlayers)
|
||||||
+ .port(this.serverPort)
|
+ .port(this.serverPort)
|
||||||
+ .hostname(this.hostIp)
|
+ .hostname(this.hostIp)
|
||||||
+ .gameVersion(this.serverInterface.getServerVersion())
|
+ .gameVersion(this.serverInterface.getServerVersion())
|
||||||
+ .serverVersion(org.bukkit.Bukkit.getServer().getName() + " on " + org.bukkit.Bukkit.getServer().getBukkitVersion())
|
+ .serverVersion(org.bukkit.Bukkit.getServer().getName() + " on " + org.bukkit.Bukkit.getServer().getBukkitVersion())
|
||||||
+ .build();
|
+ .build();
|
||||||
+ com.destroystokyo.paper.event.server.GS4QueryEvent queryEvent =
|
+ com.destroystokyo.paper.event.server.GS4QueryEvent queryEvent =
|
||||||
+ new com.destroystokyo.paper.event.server.GS4QueryEvent(queryType, packet.getAddress(), queryResponse);
|
+ new com.destroystokyo.paper.event.server.GS4QueryEvent(queryType, packet.getAddress(), queryResponse);
|
||||||
+ queryEvent.callEvent();
|
+ queryEvent.callEvent();
|
||||||
+ queryResponse = queryEvent.getResponse();
|
+ queryResponse = queryEvent.getResponse();
|
||||||
+
|
+
|
||||||
+ networkDataOutputStream.writeString(queryResponse.getMotd());
|
+ networkDataOutputStream.writeString(queryResponse.getMotd());
|
||||||
networkDataOutputStream.writeString("SMP");
|
networkDataOutputStream.writeString("SMP");
|
||||||
- networkDataOutputStream.writeString(this.worldName);
|
- networkDataOutputStream.writeString(this.worldName);
|
||||||
- networkDataOutputStream.writeString(Integer.toString(this.serverInterface.getPlayerCount()));
|
- networkDataOutputStream.writeString(Integer.toString(this.serverInterface.getPlayerCount()));
|
||||||
- networkDataOutputStream.writeString(Integer.toString(this.maxPlayers));
|
- networkDataOutputStream.writeString(Integer.toString(this.maxPlayers));
|
||||||
- networkDataOutputStream.writeShort((short)this.serverPort);
|
- networkDataOutputStream.writeShort((short)this.serverPort);
|
||||||
- networkDataOutputStream.writeString(this.hostIp);
|
- networkDataOutputStream.writeString(this.hostIp);
|
||||||
+ networkDataOutputStream.writeString(queryResponse.getMap());
|
+ networkDataOutputStream.writeString(queryResponse.getMap());
|
||||||
+ networkDataOutputStream.writeString(Integer.toString(queryResponse.getCurrentPlayers()));
|
+ networkDataOutputStream.writeString(Integer.toString(queryResponse.getCurrentPlayers()));
|
||||||
+ networkDataOutputStream.writeString(Integer.toString(queryResponse.getMaxPlayers()));
|
+ networkDataOutputStream.writeString(Integer.toString(queryResponse.getMaxPlayers()));
|
||||||
+ networkDataOutputStream.writeShort((short) queryResponse.getPort());
|
+ networkDataOutputStream.writeShort((short) queryResponse.getPort());
|
||||||
+ networkDataOutputStream.writeString(queryResponse.getHostname());
|
+ networkDataOutputStream.writeString(queryResponse.getHostname());
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
this.sendTo(networkDataOutputStream.toByteArray(), packet);
|
this.sendTo(networkDataOutputStream.toByteArray(), packet);
|
||||||
LOGGER.debug("Status [{}]", (Object)socketAddress);
|
LOGGER.debug("Status [{}]", (Object)socketAddress);
|
||||||
}
|
}
|
||||||
@@ -146,31 +165,75 @@ public class QueryThreadGs4 extends GenericThread {
|
@@ -146,31 +165,75 @@ public class QueryThreadGs4 extends GenericThread {
|
||||||
this.rulesResponse.writeString("splitnum");
|
this.rulesResponse.writeString("splitnum");
|
||||||
this.rulesResponse.write(128);
|
this.rulesResponse.write(128);
|
||||||
|
@ -21,10 +21,10 @@ index 711614ec2dc4d8db4be3d1270a26286c782d1d01..b68d72aa17a7c5e6fefb068c99eb8d89
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java b/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java
|
diff --git a/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java b/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java
|
||||||
index a8d422352fa21b607a77746f847f3c54ed3d5a60..61ff899aa03b5248e6f1d2bfb5167ac19927e0ad 100644
|
index 8e9be92361fbec7346e664dea35a40d26bde00f0..bce04d26335d5fb148fda77a19619e49920bc185 100644
|
||||||
--- a/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java
|
--- a/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java
|
||||||
+++ b/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java
|
+++ b/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java
|
||||||
@@ -53,6 +53,65 @@ public class SurfaceRuleData {
|
@@ -52,6 +52,65 @@ public class SurfaceRuleData {
|
||||||
return overworldLike(true, false, true);
|
return overworldLike(true, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,9 +90,9 @@ index a8d422352fa21b607a77746f847f3c54ed3d5a60..61ff899aa03b5248e6f1d2bfb5167ac1
|
|||||||
public static SurfaceRules.RuleSource overworldLike(boolean surface, boolean bedrockRoof, boolean bedrockFloor) {
|
public static SurfaceRules.RuleSource overworldLike(boolean surface, boolean bedrockRoof, boolean bedrockFloor) {
|
||||||
SurfaceRules.ConditionSource conditionSource = SurfaceRules.yBlockCheck(VerticalAnchor.absolute(97), 2);
|
SurfaceRules.ConditionSource conditionSource = SurfaceRules.yBlockCheck(VerticalAnchor.absolute(97), 2);
|
||||||
SurfaceRules.ConditionSource conditionSource2 = SurfaceRules.yBlockCheck(VerticalAnchor.absolute(256), 0);
|
SurfaceRules.ConditionSource conditionSource2 = SurfaceRules.yBlockCheck(VerticalAnchor.absolute(256), 0);
|
||||||
@@ -82,11 +141,11 @@ public class SurfaceRuleData {
|
@@ -81,11 +140,11 @@ public class SurfaceRuleData {
|
||||||
SurfaceRules.RuleSource ruleSource9 = SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.WOODED_BADLANDS), SurfaceRules.ifTrue(conditionSource, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource15, COARSE_DIRT), SurfaceRules.ifTrue(conditionSource16, COARSE_DIRT), SurfaceRules.ifTrue(conditionSource17, COARSE_DIRT), ruleSource))), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.SWAMP), SurfaceRules.ifTrue(conditionSource5, SurfaceRules.ifTrue(SurfaceRules.not(conditionSource6), SurfaceRules.ifTrue(SurfaceRules.noiseCondition(Noises.SWAMP, 0.0D), WATER)))))), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.BADLANDS, Biomes.ERODED_BADLANDS, Biomes.WOODED_BADLANDS), SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource2, ORANGE_TERRACOTTA), SurfaceRules.ifTrue(conditionSource4, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource15, TERRACOTTA), SurfaceRules.ifTrue(conditionSource16, TERRACOTTA), SurfaceRules.ifTrue(conditionSource17, TERRACOTTA), SurfaceRules.bandlands())), SurfaceRules.ifTrue(conditionSource7, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_CEILING, RED_SANDSTONE), RED_SAND)), SurfaceRules.ifTrue(SurfaceRules.not(conditionSource10), ORANGE_TERRACOTTA), SurfaceRules.ifTrue(conditionSource9, WHITE_TERRACOTTA), ruleSource3)), SurfaceRules.ifTrue(conditionSource3, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource6, SurfaceRules.ifTrue(SurfaceRules.not(conditionSource4), ORANGE_TERRACOTTA)), SurfaceRules.bandlands())), SurfaceRules.ifTrue(SurfaceRules.UNDER_FLOOR, SurfaceRules.ifTrue(conditionSource9, WHITE_TERRACOTTA)))), SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.ifTrue(conditionSource7, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource11, SurfaceRules.ifTrue(conditionSource10, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource8, AIR), SurfaceRules.ifTrue(SurfaceRules.temperature(), ICE), WATER))), ruleSource8))), SurfaceRules.ifTrue(conditionSource9, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.ifTrue(conditionSource11, SurfaceRules.ifTrue(conditionSource10, WATER))), SurfaceRules.ifTrue(SurfaceRules.UNDER_FLOOR, ruleSource7), SurfaceRules.ifTrue(conditionSource13, SurfaceRules.ifTrue(SurfaceRules.DEEP_UNDER_FLOOR, SANDSTONE)), SurfaceRules.ifTrue(conditionSource14, SurfaceRules.ifTrue(SurfaceRules.VERY_DEEP_UNDER_FLOOR, SANDSTONE)))), SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.FROZEN_PEAKS, Biomes.JAGGED_PEAKS), STONE), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.WARM_OCEAN, Biomes.LUKEWARM_OCEAN, Biomes.DEEP_LUKEWARM_OCEAN), ruleSource2), ruleSource3)));
|
SurfaceRules.RuleSource ruleSource9 = SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.WOODED_BADLANDS), SurfaceRules.ifTrue(conditionSource, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource15, COARSE_DIRT), SurfaceRules.ifTrue(conditionSource16, COARSE_DIRT), SurfaceRules.ifTrue(conditionSource17, COARSE_DIRT), ruleSource))), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.SWAMP), SurfaceRules.ifTrue(conditionSource5, SurfaceRules.ifTrue(SurfaceRules.not(conditionSource6), SurfaceRules.ifTrue(SurfaceRules.noiseCondition(Noises.SWAMP, 0.0D), WATER)))))), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.BADLANDS, Biomes.ERODED_BADLANDS, Biomes.WOODED_BADLANDS), SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource2, ORANGE_TERRACOTTA), SurfaceRules.ifTrue(conditionSource4, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource15, TERRACOTTA), SurfaceRules.ifTrue(conditionSource16, TERRACOTTA), SurfaceRules.ifTrue(conditionSource17, TERRACOTTA), SurfaceRules.bandlands())), SurfaceRules.ifTrue(conditionSource7, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_CEILING, RED_SANDSTONE), RED_SAND)), SurfaceRules.ifTrue(SurfaceRules.not(conditionSource10), ORANGE_TERRACOTTA), SurfaceRules.ifTrue(conditionSource9, WHITE_TERRACOTTA), ruleSource3)), SurfaceRules.ifTrue(conditionSource3, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource6, SurfaceRules.ifTrue(SurfaceRules.not(conditionSource4), ORANGE_TERRACOTTA)), SurfaceRules.bandlands())), SurfaceRules.ifTrue(SurfaceRules.UNDER_FLOOR, SurfaceRules.ifTrue(conditionSource9, WHITE_TERRACOTTA)))), SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.ifTrue(conditionSource7, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource11, SurfaceRules.ifTrue(conditionSource10, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource8, AIR), SurfaceRules.ifTrue(SurfaceRules.temperature(), ICE), WATER))), ruleSource8))), SurfaceRules.ifTrue(conditionSource9, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.ifTrue(conditionSource11, SurfaceRules.ifTrue(conditionSource10, WATER))), SurfaceRules.ifTrue(SurfaceRules.UNDER_FLOOR, ruleSource7), SurfaceRules.ifTrue(conditionSource13, SurfaceRules.ifTrue(SurfaceRules.DEEP_UNDER_FLOOR, SANDSTONE)), SurfaceRules.ifTrue(conditionSource14, SurfaceRules.ifTrue(SurfaceRules.VERY_DEEP_UNDER_FLOOR, SANDSTONE)))), SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.FROZEN_PEAKS, Biomes.JAGGED_PEAKS), STONE), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.WARM_OCEAN, Biomes.LUKEWARM_OCEAN, Biomes.DEEP_LUKEWARM_OCEAN), ruleSource2), ruleSource3)));
|
||||||
Builder<SurfaceRules.RuleSource> builder = ImmutableList.builder();
|
ImmutableList.Builder<SurfaceRules.RuleSource> builder = ImmutableList.builder();
|
||||||
if (bedrockRoof) {
|
if (bedrockRoof) {
|
||||||
- builder.add(SurfaceRules.ifTrue(SurfaceRules.not(SurfaceRules.verticalGradient("bedrock_roof", VerticalAnchor.belowTop(5), VerticalAnchor.top())), BEDROCK));
|
- builder.add(SurfaceRules.ifTrue(SurfaceRules.not(SurfaceRules.verticalGradient("bedrock_roof", VerticalAnchor.belowTop(5), VerticalAnchor.top())), BEDROCK));
|
||||||
+ builder.add(SurfaceRules.ifTrue(SurfaceRules.not(new PaperBedrockConditionSource("bedrock_roof", VerticalAnchor.belowTop(5), VerticalAnchor.top(), true)), BEDROCK)); // Paper
|
+ builder.add(SurfaceRules.ifTrue(SurfaceRules.not(new PaperBedrockConditionSource("bedrock_roof", VerticalAnchor.belowTop(5), VerticalAnchor.top(), true)), BEDROCK)); // Paper
|
||||||
@ -104,7 +104,7 @@ index a8d422352fa21b607a77746f847f3c54ed3d5a60..61ff899aa03b5248e6f1d2bfb5167ac1
|
|||||||
}
|
}
|
||||||
|
|
||||||
SurfaceRules.RuleSource ruleSource10 = SurfaceRules.ifTrue(SurfaceRules.abovePreliminarySurface(), ruleSource9);
|
SurfaceRules.RuleSource ruleSource10 = SurfaceRules.ifTrue(SurfaceRules.abovePreliminarySurface(), ruleSource9);
|
||||||
@@ -111,7 +170,7 @@ public class SurfaceRuleData {
|
@@ -110,7 +169,7 @@ public class SurfaceRuleData {
|
||||||
SurfaceRules.ConditionSource conditionSource11 = SurfaceRules.noiseCondition(Noises.NETHER_WART, 1.17D);
|
SurfaceRules.ConditionSource conditionSource11 = SurfaceRules.noiseCondition(Noises.NETHER_WART, 1.17D);
|
||||||
SurfaceRules.ConditionSource conditionSource12 = SurfaceRules.noiseCondition(Noises.NETHER_STATE_SELECTOR, 0.0D);
|
SurfaceRules.ConditionSource conditionSource12 = SurfaceRules.noiseCondition(Noises.NETHER_STATE_SELECTOR, 0.0D);
|
||||||
SurfaceRules.RuleSource ruleSource = SurfaceRules.ifTrue(conditionSource9, SurfaceRules.ifTrue(conditionSource3, SurfaceRules.ifTrue(conditionSource4, GRAVEL)));
|
SurfaceRules.RuleSource ruleSource = SurfaceRules.ifTrue(conditionSource9, SurfaceRules.ifTrue(conditionSource3, SurfaceRules.ifTrue(conditionSource4, GRAVEL)));
|
||||||
|
@ -180,10 +180,10 @@ index ff458abb221daaddaa734811eaaa35ea43883343..d1ab31d03ae421e628448fe2492ff138
|
|||||||
public float getWalkTargetValue(BlockPos pos) {
|
public float getWalkTargetValue(BlockPos pos) {
|
||||||
return this.getWalkTargetValue(pos, this.level);
|
return this.getWalkTargetValue(pos, this.level);
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||||
index d1a68808af3c9c35767e4be72ce1ed0f77f7a3c9..ef8fe11bcda9fb8365d2c7efb2e088727dd849d9 100644
|
index 3e981fbf81f21b40652f7a05d4a7a37065db4b00..19ee04dd92b39a775260f832ca8880335d24988b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||||
@@ -33,6 +33,7 @@ public class GoalSelector {
|
@@ -32,6 +32,7 @@ public class GoalSelector {
|
||||||
private final EnumSet<Goal.Flag> disabledFlags = EnumSet.noneOf(Goal.Flag.class);
|
private final EnumSet<Goal.Flag> disabledFlags = EnumSet.noneOf(Goal.Flag.class);
|
||||||
private int tickCount;
|
private int tickCount;
|
||||||
private int newGoalRate = 3;
|
private int newGoalRate = 3;
|
||||||
@ -191,7 +191,7 @@ index d1a68808af3c9c35767e4be72ce1ed0f77f7a3c9..ef8fe11bcda9fb8365d2c7efb2e08872
|
|||||||
|
|
||||||
public GoalSelector(Supplier<ProfilerFiller> profiler) {
|
public GoalSelector(Supplier<ProfilerFiller> profiler) {
|
||||||
this.profiler = profiler;
|
this.profiler = profiler;
|
||||||
@@ -47,6 +48,20 @@ public class GoalSelector {
|
@@ -46,6 +47,20 @@ public class GoalSelector {
|
||||||
this.availableGoals.clear();
|
this.availableGoals.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,7 +320,7 @@ index dab1b7491fff4da9f606d041536adb649bfccd9a..27bd21ec70a446537d24952cb7ea04b0
|
|||||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||||
index 6b29f66aec8a82b367a979b5b04857416b697c14..78d252b829e5c1f19532656a728620852403760c 100644
|
index 4b55b667eebfe50dfeda89015112e275e71b9777..dda0b32a4989bbead35a2219a969a30ba0e975b0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||||
@@ -140,6 +140,10 @@ public class PistonMovingBlockEntity extends BlockEntity {
|
@@ -140,6 +140,10 @@ public class PistonMovingBlockEntity extends BlockEntity {
|
||||||
|
@ -1050,7 +1050,7 @@ index 0000000000000000000000000000000000000000..80a2dfb266ae1221680a7b24fee2f7e2
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||||
index dba11f277f3703e1ee7f5a62f021d319e4ab18fc..0e75764c108c24b3e2c453f2b4f14e798add0eb4 100644
|
index d004997cb94648a24135f0478be3a25393b67925..52f68d7611862b0e904305f8a16f04422b2b5b3f 100644
|
||||||
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||||
@@ -33,7 +33,10 @@ public class ClientboundLevelChunkPacketData {
|
@@ -33,7 +33,10 @@ public class ClientboundLevelChunkPacketData {
|
||||||
@ -1064,7 +1064,7 @@ index dba11f277f3703e1ee7f5a62f021d319e4ab18fc..0e75764c108c24b3e2c453f2b4f14e79
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
this.heightmaps = new CompoundTag();
|
this.heightmaps = new CompoundTag();
|
||||||
|
|
||||||
for(Entry<Heightmap.Types, Heightmap> entry : chunk.getHeightmaps()) {
|
for(Map.Entry<Heightmap.Types, Heightmap> entry : chunk.getHeightmaps()) {
|
||||||
@@ -43,7 +46,13 @@ public class ClientboundLevelChunkPacketData {
|
@@ -43,7 +46,13 @@ public class ClientboundLevelChunkPacketData {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1271,7 +1271,7 @@ index eea6816c52e6c0329f3bea0e7789cda9dd4a5a08..8038b37bdfdd41eadb4f3cb4dd7ef245
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index 7b964beaaa66ac1c8b20dd7bda665ee30ca61b98..75dd63ffb2a7d8ec825162c66c156b07148b2f71 100644
|
index e2ecbd60ed5200589313d767a17600dca1231931..1a64618e533426147ad6ab1211afb9cc676cc185 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -93,7 +93,7 @@ public class LevelChunk extends ChunkAccess {
|
@@ -93,7 +93,7 @@ public class LevelChunk extends ChunkAccess {
|
||||||
@ -1322,7 +1322,7 @@ index c696358102086257033b55adbef84b1a259cb46e..67b06640358e04752bf149e9380f5f83
|
|||||||
|
|
||||||
public int getSerializedSize() {
|
public int getSerializedSize() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||||
index 438647aa32e91e35b5a6430961d1ce4d5558d3d4..fea05645c782969c1e949fe4d56d18c0c2159cc6 100644
|
index 8bb59da19f2faabb980fbebc4d9825ae74a1b6c5..ea7b92b9ecb99bc995ab9a6ee5a974a0810778db 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||||
@@ -29,6 +29,7 @@ public class PalettedContainer<T> implements PaletteResize<T> {
|
@@ -29,6 +29,7 @@ public class PalettedContainer<T> implements PaletteResize<T> {
|
||||||
@ -1603,7 +1603,7 @@ index f3c67a815c570beb14136905cbf5aa4046ee8394..f8f44cb6e823a0150f3abdab133f8ae2
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index e9c8eb1ca3e39840b3791d814b66ad5b5919112f..a6e7a609344f693cd0f51cfc4b122f45e24d0050 100644
|
index 669e4b41cf0751afb67d94b6a511bcfd18ce7ef4..3ff85d9d8518db712ca1d2977a5865daef86f021 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -2222,7 +2222,7 @@ public final class CraftServer implements Server {
|
@@ -2222,7 +2222,7 @@ public final class CraftServer implements Server {
|
||||||
|
@ -47,10 +47,10 @@ index 6667ecc4b7eded4e20a415cef1e1b1179e6710b8..4379b9948f1eecfe6fd7dea98e298ad5
|
|||||||
|
|
||||||
protected int adjustedTickDelay(int ticks) {
|
protected int adjustedTickDelay(int ticks) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||||
index ef8fe11bcda9fb8365d2c7efb2e088727dd849d9..c77fad612ba99663af2ec4418e3c2d68752dc2c8 100644
|
index 19ee04dd92b39a775260f832ca8880335d24988b..a910189177da0c1134c954b3d81b9e9bc4bc1420 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||||
@@ -30,10 +30,12 @@ public class GoalSelector {
|
@@ -29,10 +29,12 @@ public class GoalSelector {
|
||||||
private final Map<Goal.Flag, WrappedGoal> lockedFlags = new EnumMap<>(Goal.Flag.class);
|
private final Map<Goal.Flag, WrappedGoal> lockedFlags = new EnumMap<>(Goal.Flag.class);
|
||||||
public final Set<WrappedGoal> availableGoals = Sets.newLinkedHashSet();
|
public final Set<WrappedGoal> availableGoals = Sets.newLinkedHashSet();
|
||||||
private final Supplier<ProfilerFiller> profiler;
|
private final Supplier<ProfilerFiller> profiler;
|
||||||
@ -64,7 +64,7 @@ index ef8fe11bcda9fb8365d2c7efb2e088727dd849d9..c77fad612ba99663af2ec4418e3c2d68
|
|||||||
|
|
||||||
public GoalSelector(Supplier<ProfilerFiller> profiler) {
|
public GoalSelector(Supplier<ProfilerFiller> profiler) {
|
||||||
this.profiler = profiler;
|
this.profiler = profiler;
|
||||||
@@ -63,26 +65,32 @@ public class GoalSelector {
|
@@ -62,26 +64,32 @@ public class GoalSelector {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
public void removeGoal(Goal goal) {
|
public void removeGoal(Goal goal) {
|
||||||
@ -111,7 +111,7 @@ index ef8fe11bcda9fb8365d2c7efb2e088727dd849d9..c77fad612ba99663af2ec4418e3c2d68
|
|||||||
if (!goalsByControl.getOrDefault(flag, NO_GOAL).canBeReplacedBy(goal)) {
|
if (!goalsByControl.getOrDefault(flag, NO_GOAL).canBeReplacedBy(goal)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -96,7 +104,7 @@ public class GoalSelector {
|
@@ -95,7 +103,7 @@ public class GoalSelector {
|
||||||
profilerFiller.push("goalCleanup");
|
profilerFiller.push("goalCleanup");
|
||||||
|
|
||||||
for(WrappedGoal wrappedGoal : this.availableGoals) {
|
for(WrappedGoal wrappedGoal : this.availableGoals) {
|
||||||
@ -120,7 +120,7 @@ index ef8fe11bcda9fb8365d2c7efb2e088727dd849d9..c77fad612ba99663af2ec4418e3c2d68
|
|||||||
wrappedGoal.stop();
|
wrappedGoal.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -114,8 +122,14 @@ public class GoalSelector {
|
@@ -113,8 +121,14 @@ public class GoalSelector {
|
||||||
profilerFiller.push("goalUpdate");
|
profilerFiller.push("goalUpdate");
|
||||||
|
|
||||||
for(WrappedGoal wrappedGoal2 : this.availableGoals) {
|
for(WrappedGoal wrappedGoal2 : this.availableGoals) {
|
||||||
@ -137,7 +137,7 @@ index ef8fe11bcda9fb8365d2c7efb2e088727dd849d9..c77fad612ba99663af2ec4418e3c2d68
|
|||||||
WrappedGoal wrappedGoal3 = this.lockedFlags.getOrDefault(flag, NO_GOAL);
|
WrappedGoal wrappedGoal3 = this.lockedFlags.getOrDefault(flag, NO_GOAL);
|
||||||
wrappedGoal3.stop();
|
wrappedGoal3.stop();
|
||||||
this.lockedFlags.put(flag, wrappedGoal2);
|
this.lockedFlags.put(flag, wrappedGoal2);
|
||||||
@@ -155,11 +169,11 @@ public class GoalSelector {
|
@@ -154,11 +168,11 @@ public class GoalSelector {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disableControlFlag(Goal.Flag control) {
|
public void disableControlFlag(Goal.Flag control) {
|
||||||
|
@ -8,10 +8,10 @@ is important because we clone chunk data after reading it for safety.
|
|||||||
So, reduce the impact of the clone on GC.
|
So, reduce the impact of the clone on GC.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||||
index d0b523387a194d1649469e8d861b0b78a2f4e0b6..be2bd47a509a03e78c380cf749cd476f332ab03d 100644
|
index b965af563f2cb1508d138e4d48e97a44873c4bb9..0778fdd4f47015787f7ffbfb39c31ec0e1c039bd 100644
|
||||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||||
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||||
@@ -35,7 +35,7 @@ public class CompoundTag implements Tag {
|
@@ -34,7 +34,7 @@ public class CompoundTag implements Tag {
|
||||||
if (i > 512) {
|
if (i > 512) {
|
||||||
throw new RuntimeException("Tried to read NBT tag with too high complexity, depth > 512");
|
throw new RuntimeException("Tried to read NBT tag with too high complexity, depth > 512");
|
||||||
} else {
|
} else {
|
||||||
@ -20,7 +20,7 @@ index d0b523387a194d1649469e8d861b0b78a2f4e0b6..be2bd47a509a03e78c380cf749cd476f
|
|||||||
|
|
||||||
byte b;
|
byte b;
|
||||||
while((b = CompoundTag.readNamedTagType(dataInput, nbtAccounter)) != 0) {
|
while((b = CompoundTag.readNamedTagType(dataInput, nbtAccounter)) != 0) {
|
||||||
@@ -129,7 +129,7 @@ public class CompoundTag implements Tag {
|
@@ -128,7 +128,7 @@ public class CompoundTag implements Tag {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CompoundTag() {
|
public CompoundTag() {
|
||||||
@ -29,7 +29,7 @@ index d0b523387a194d1649469e8d861b0b78a2f4e0b6..be2bd47a509a03e78c380cf749cd476f
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -435,8 +435,16 @@ public class CompoundTag implements Tag {
|
@@ -434,8 +434,16 @@ public class CompoundTag implements Tag {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompoundTag copy() {
|
public CompoundTag copy() {
|
||||||
|
@ -20,10 +20,10 @@ index 0000000000000000000000000000000000000000..0f10c333d88f2e1c56a6c7f22d421084
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
||||||
index 22aa000ad7d44a86231fd8ad93083c972f14caa6..125d08fc4536f15604ef13636056c94f77b5df57 100644
|
index 701b9c67c01f2aa4823e2aa71db388d5c3292dc4..e98951ac056910340c498d866715e174d461f723 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
+++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
||||||
@@ -28,7 +28,7 @@ import net.minecraft.util.VisibleForDebug;
|
@@ -27,7 +27,7 @@ import net.minecraft.util.VisibleForDebug;
|
||||||
|
|
||||||
public class GossipContainer {
|
public class GossipContainer {
|
||||||
public static final int DISCARD_THRESHOLD = 2;
|
public static final int DISCARD_THRESHOLD = 2;
|
||||||
@ -32,7 +32,7 @@ index 22aa000ad7d44a86231fd8ad93083c972f14caa6..125d08fc4536f15604ef13636056c94f
|
|||||||
|
|
||||||
@VisibleForDebug
|
@VisibleForDebug
|
||||||
public Map<UUID, Object2IntMap<GossipType>> getGossipEntries() {
|
public Map<UUID, Object2IntMap<GossipType>> getGossipEntries() {
|
||||||
@@ -227,6 +227,28 @@ public class GossipContainer {
|
@@ -226,6 +226,28 @@ public class GossipContainer {
|
||||||
public void remove(GossipType gossipType) {
|
public void remove(GossipType gossipType) {
|
||||||
this.entries.removeInt(gossipType);
|
this.entries.removeInt(gossipType);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ Inline bit operations and reduce instruction count to make these hot
|
|||||||
operations faster
|
operations faster
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
index 0e39b49f603bea0f731652bac71067237b3869b4..028edb36f995316a9348133db1ed1d4cdda21aed 100644
|
index a1060bd5ee1f2f6ce34cfcf2e76a89cddc425c5f..11745a71e5b2f00417b4e7f9cbc516071bd45ed9 100644
|
||||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
@@ -30,15 +30,16 @@ public class BlockPos extends Vec3i {
|
@@ -30,15 +30,16 @@ public class BlockPos extends Vec3i {
|
||||||
@ -84,7 +84,7 @@ index 0e39b49f603bea0f731652bac71067237b3869b4..028edb36f995316a9348133db1ed1d4c
|
|||||||
|
|
||||||
public static long getFlatIndex(long y) {
|
public static long getFlatIndex(long y) {
|
||||||
diff --git a/src/main/java/net/minecraft/core/SectionPos.java b/src/main/java/net/minecraft/core/SectionPos.java
|
diff --git a/src/main/java/net/minecraft/core/SectionPos.java b/src/main/java/net/minecraft/core/SectionPos.java
|
||||||
index f9a6e9a7403d3fe8726214da981fdc599956f856..51567ca63a0d2748515d002e1f838bbb14afc162 100644
|
index 49d6eebdc66478cb4c39d360db9cc0b822839fa1..b9555911a3e9ffca3ce7053075a36eab79d725ce 100644
|
||||||
--- a/src/main/java/net/minecraft/core/SectionPos.java
|
--- a/src/main/java/net/minecraft/core/SectionPos.java
|
||||||
+++ b/src/main/java/net/minecraft/core/SectionPos.java
|
+++ b/src/main/java/net/minecraft/core/SectionPos.java
|
||||||
@@ -38,7 +38,7 @@ public class SectionPos extends Vec3i {
|
@@ -38,7 +38,7 @@ public class SectionPos extends Vec3i {
|
||||||
@ -210,4 +210,4 @@ index f9a6e9a7403d3fe8726214da981fdc599956f856..51567ca63a0d2748515d002e1f838bbb
|
|||||||
+ return betweenClosedStream(center.x - radius, 0, center.z - radius, center.x + radius, 15, center.z + radius); // Paper - simplify/inline
|
+ return betweenClosedStream(center.x - radius, 0, center.z - radius, center.x + radius, 15, center.z + radius); // Paper - simplify/inline
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Stream<SectionPos> betweenClosedStream(int minX, int minY, int minZ, int maxX, int maxY, int maxZ) {
|
public static Stream<SectionPos> betweenClosedStream(final int minX, final int minY, final int minZ, final int maxX, final int maxY, final int maxZ) {
|
||||||
|
@ -113,10 +113,10 @@ index 67ff66e232592203cf8dad605ad01eabc4dded89..f357a3473682c2d37a20fb862522c67b
|
|||||||
|
|
||||||
public void clearCache() {
|
public void clearCache() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/lighting/LayerLightSectionStorage.java b/src/main/java/net/minecraft/world/level/lighting/LayerLightSectionStorage.java
|
diff --git a/src/main/java/net/minecraft/world/level/lighting/LayerLightSectionStorage.java b/src/main/java/net/minecraft/world/level/lighting/LayerLightSectionStorage.java
|
||||||
index 99a758341d4b31cb1703fdce0a257f65ed602ca0..4f7b63f2cc8a69fa8efb3a84f6abc3d3dcf05b49 100644
|
index c899674ee24167ee3abdf1588d7396df0ab4f0aa..85175b01b1623b3bc66c65805cec26eaead48265 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/lighting/LayerLightSectionStorage.java
|
--- a/src/main/java/net/minecraft/world/level/lighting/LayerLightSectionStorage.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/lighting/LayerLightSectionStorage.java
|
+++ b/src/main/java/net/minecraft/world/level/lighting/LayerLightSectionStorage.java
|
||||||
@@ -28,7 +28,7 @@ public abstract class LayerLightSectionStorage<M extends DataLayerStorageMap<M>>
|
@@ -27,7 +27,7 @@ public abstract class LayerLightSectionStorage<M extends DataLayerStorageMap<M>>
|
||||||
protected final LongSet dataSectionSet = new LongOpenHashSet();
|
protected final LongSet dataSectionSet = new LongOpenHashSet();
|
||||||
protected final LongSet toMarkNoData = new LongOpenHashSet();
|
protected final LongSet toMarkNoData = new LongOpenHashSet();
|
||||||
protected final LongSet toMarkData = new LongOpenHashSet();
|
protected final LongSet toMarkData = new LongOpenHashSet();
|
||||||
@ -125,7 +125,7 @@ index 99a758341d4b31cb1703fdce0a257f65ed602ca0..4f7b63f2cc8a69fa8efb3a84f6abc3d3
|
|||||||
protected final M updatingSectionData;
|
protected final M updatingSectionData;
|
||||||
protected final LongSet changedSections = new LongOpenHashSet();
|
protected final LongSet changedSections = new LongOpenHashSet();
|
||||||
protected final LongSet sectionsAffectedByLightUpdates = new LongOpenHashSet();
|
protected final LongSet sectionsAffectedByLightUpdates = new LongOpenHashSet();
|
||||||
@@ -43,8 +43,8 @@ public abstract class LayerLightSectionStorage<M extends DataLayerStorageMap<M>>
|
@@ -42,8 +42,8 @@ public abstract class LayerLightSectionStorage<M extends DataLayerStorageMap<M>>
|
||||||
this.layer = lightType;
|
this.layer = lightType;
|
||||||
this.chunkSource = chunkProvider;
|
this.chunkSource = chunkProvider;
|
||||||
this.updatingSectionData = lightData;
|
this.updatingSectionData = lightData;
|
||||||
@ -136,7 +136,7 @@ index 99a758341d4b31cb1703fdce0a257f65ed602ca0..4f7b63f2cc8a69fa8efb3a84f6abc3d3
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean storingLightForSection(long sectionPos) {
|
protected boolean storingLightForSection(long sectionPos) {
|
||||||
@@ -53,7 +53,15 @@ public abstract class LayerLightSectionStorage<M extends DataLayerStorageMap<M>>
|
@@ -52,7 +52,15 @@ public abstract class LayerLightSectionStorage<M extends DataLayerStorageMap<M>>
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
protected DataLayer getDataLayer(long sectionPos, boolean cached) {
|
protected DataLayer getDataLayer(long sectionPos, boolean cached) {
|
||||||
@ -153,7 +153,7 @@ index 99a758341d4b31cb1703fdce0a257f65ed602ca0..4f7b63f2cc8a69fa8efb3a84f6abc3d3
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -343,9 +351,11 @@ public abstract class LayerLightSectionStorage<M extends DataLayerStorageMap<M>>
|
@@ -342,9 +350,11 @@ public abstract class LayerLightSectionStorage<M extends DataLayerStorageMap<M>>
|
||||||
|
|
||||||
protected void swapSectionMap() {
|
protected void swapSectionMap() {
|
||||||
if (!this.changedSections.isEmpty()) {
|
if (!this.changedSections.isEmpty()) {
|
||||||
@ -167,7 +167,7 @@ index 99a758341d4b31cb1703fdce0a257f65ed602ca0..4f7b63f2cc8a69fa8efb3a84f6abc3d3
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/lighting/SkyLightSectionStorage.java b/src/main/java/net/minecraft/world/level/lighting/SkyLightSectionStorage.java
|
diff --git a/src/main/java/net/minecraft/world/level/lighting/SkyLightSectionStorage.java b/src/main/java/net/minecraft/world/level/lighting/SkyLightSectionStorage.java
|
||||||
index 1f6ed4309f0f5e06cd2981864feaa6ea16df0350..9797254e981d08d3934f7ca8f369dd78a6ef1a48 100644
|
index 59d2af9f883541518c203302257f03dbe957aa0b..e6c857c8b4e4e65e3cf6a75ce6d844ff61acb566 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/lighting/SkyLightSectionStorage.java
|
--- a/src/main/java/net/minecraft/world/level/lighting/SkyLightSectionStorage.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/lighting/SkyLightSectionStorage.java
|
+++ b/src/main/java/net/minecraft/world/level/lighting/SkyLightSectionStorage.java
|
||||||
@@ -21,7 +21,7 @@ public class SkyLightSectionStorage extends LayerLightSectionStorage<SkyLightSec
|
@@ -21,7 +21,7 @@ public class SkyLightSectionStorage extends LayerLightSectionStorage<SkyLightSec
|
||||||
|
@ -8,10 +8,10 @@ We have stored UUID in plenty of places that did not get DFU'd
|
|||||||
So just look for old format and load it if it exists.
|
So just look for old format and load it if it exists.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||||
index be2bd47a509a03e78c380cf749cd476f332ab03d..210f81e380cb38c2d5d69849e593d2fdb54e8856 100644
|
index 0778fdd4f47015787f7ffbfb39c31ec0e1c039bd..912fd5135e89348bdd3c0a8b6c07860ebc106df3 100644
|
||||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||||
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||||
@@ -182,6 +182,12 @@ public class CompoundTag implements Tag {
|
@@ -181,6 +181,12 @@ public class CompoundTag implements Tag {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void putUUID(String key, UUID value) {
|
public void putUUID(String key, UUID value) {
|
||||||
@ -24,7 +24,7 @@ index be2bd47a509a03e78c380cf749cd476f332ab03d..210f81e380cb38c2d5d69849e593d2fd
|
|||||||
this.tags.put(key, NbtUtils.createUUID(value));
|
this.tags.put(key, NbtUtils.createUUID(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,10 +196,20 @@ public class CompoundTag implements Tag {
|
@@ -189,10 +195,20 @@ public class CompoundTag implements Tag {
|
||||||
* You must use {@link #hasUUID(String)} before or else it <b>will</b> throw an NPE.
|
* You must use {@link #hasUUID(String)} before or else it <b>will</b> throw an NPE.
|
||||||
*/
|
*/
|
||||||
public UUID getUUID(String key) {
|
public UUID getUUID(String key) {
|
||||||
@ -46,10 +46,10 @@ index be2bd47a509a03e78c380cf749cd476f332ab03d..210f81e380cb38c2d5d69849e593d2fd
|
|||||||
return tag != null && tag.getType() == IntArrayTag.TYPE && ((IntArrayTag)tag).getAsIntArray().length == 4;
|
return tag != null && tag.getType() == IntArrayTag.TYPE && ((IntArrayTag)tag).getAsIntArray().length == 4;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
index 994bfb175446a7d2e697ff8faef36a348ed1accd..7b48db30a155006a74688809155d779b88e48092 100644
|
index d6a742066b2e5ebf3975c190cca5134abf3cf1a3..fdf78f7ab15a8c81699c6c0e5d0333c482c7d0a3 100644
|
||||||
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
@@ -75,6 +75,11 @@ public final class NbtUtils {
|
@@ -74,6 +74,11 @@ public final class NbtUtils {
|
||||||
if (compound.contains("Name", 8)) {
|
if (compound.contains("Name", 8)) {
|
||||||
string = compound.getString("Name");
|
string = compound.getString("Name");
|
||||||
}
|
}
|
||||||
|
@ -9,10 +9,10 @@ growing to large sizes and preventing login.
|
|||||||
This now automatically cleans up the extra properties.
|
This now automatically cleans up the extra properties.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
index 7b48db30a155006a74688809155d779b88e48092..9865f9352ecac8175070187c2f67fedddb588864 100644
|
index fdf78f7ab15a8c81699c6c0e5d0333c482c7d0a3..050ee055b9a2a0767f58d6677ad7f2d927fbaa54 100644
|
||||||
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
@@ -93,7 +93,8 @@ public final class NbtUtils {
|
@@ -92,7 +92,8 @@ public final class NbtUtils {
|
||||||
for(String string2 : compoundTag.getAllKeys()) {
|
for(String string2 : compoundTag.getAllKeys()) {
|
||||||
ListTag listTag = compoundTag.getList(string2, 10);
|
ListTag listTag = compoundTag.getList(string2, 10);
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Remove streams from classes related villager gossip
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
||||||
index 125d08fc4536f15604ef13636056c94f77b5df57..ea9c4bf7549f6a09bd5ac35f35686391a53838b2 100644
|
index e98951ac056910340c498d866715e174d461f723..8d879cc6f8b96c7521d4b55fcf1f3abb9e669ecd 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
+++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
||||||
@@ -8,6 +8,7 @@ import com.mojang.serialization.Dynamic;
|
@@ -8,6 +8,7 @@ import com.mojang.serialization.Dynamic;
|
||||||
@ -14,9 +14,9 @@ index 125d08fc4536f15604ef13636056c94f77b5df57..ea9c4bf7549f6a09bd5ac35f35686391
|
|||||||
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
||||||
+import it.unimi.dsi.fastutil.objects.ObjectArrayList; // Paper
|
+import it.unimi.dsi.fastutil.objects.ObjectArrayList; // Paper
|
||||||
import it.unimi.dsi.fastutil.objects.ObjectIterator;
|
import it.unimi.dsi.fastutil.objects.ObjectIterator;
|
||||||
import it.unimi.dsi.fastutil.objects.Object2IntMap.Entry;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -59,8 +60,21 @@ public class GossipContainer {
|
import java.util.Collection;
|
||||||
|
@@ -58,8 +59,21 @@ public class GossipContainer {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ index 125d08fc4536f15604ef13636056c94f77b5df57..ea9c4bf7549f6a09bd5ac35f35686391
|
|||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
} else {
|
} else {
|
||||||
@@ -153,9 +167,9 @@ public class GossipContainer {
|
@@ -152,9 +166,9 @@ public class GossipContainer {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ index 125d08fc4536f15604ef13636056c94f77b5df57..ea9c4bf7549f6a09bd5ac35f35686391
|
|||||||
}).map(Dynamic::getValue)));
|
}).map(Dynamic::getValue)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,11 +194,23 @@ public class GossipContainer {
|
@@ -179,11 +193,23 @@ public class GossipContainer {
|
||||||
final Object2IntMap<GossipType> entries = new Object2IntOpenHashMap<>();
|
final Object2IntMap<GossipType> entries = new Object2IntOpenHashMap<>();
|
||||||
|
|
||||||
public int weightedValue(Predicate<GossipType> gossipTypeFilter) {
|
public int weightedValue(Predicate<GossipType> gossipTypeFilter) {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Implement TargetHitEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/TargetBlock.java b/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/TargetBlock.java b/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
||||||
index f9326e50d27cf1a1753aecfc0079d8fab8350d93..d609c60c1650a5b7f860154e0a4f4c6d84fa63fc 100644
|
index f71649338588c576cffc7fecc1e83217c529c335..20955a3944a2fcb66ad98267ef3570ddfc32980e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
||||||
@@ -35,6 +35,10 @@ public class TargetBlock extends Block {
|
@@ -35,6 +35,10 @@ public class TargetBlock extends Block {
|
||||||
@ -17,9 +17,9 @@ index f9326e50d27cf1a1753aecfc0079d8fab8350d93..d609c60c1650a5b7f860154e0a4f4c6d
|
|||||||
+ private static void awardTargetHitCriteria(Projectile projectile, BlockHitResult hit, int i) {
|
+ private static void awardTargetHitCriteria(Projectile projectile, BlockHitResult hit, int i) {
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
Entity entity = projectile.getOwner();
|
Entity entity = projectile.getOwner();
|
||||||
if (entity instanceof ServerPlayer) {
|
if (entity instanceof ServerPlayer serverPlayer) {
|
||||||
ServerPlayer serverPlayer = (ServerPlayer)entity;
|
serverPlayer.awardStat(Stats.TARGET_HIT);
|
||||||
@@ -47,6 +51,20 @@ public class TargetBlock extends Block {
|
@@ -46,6 +50,20 @@ public class TargetBlock extends Block {
|
||||||
private static int updateRedstoneOutput(LevelAccessor world, BlockState state, BlockHitResult hitResult, Entity entity) {
|
private static int updateRedstoneOutput(LevelAccessor world, BlockState state, BlockHitResult hitResult, Entity entity) {
|
||||||
int i = getRedstoneStrength(hitResult, hitResult.getLocation());
|
int i = getRedstoneStrength(hitResult, hitResult.getLocation());
|
||||||
int j = entity instanceof AbstractArrow ? 20 : 8;
|
int j = entity instanceof AbstractArrow ? 20 : 8;
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning
|
|||||||
Uses an EnumMap as well as a Set paired List for O(1) contains calls.
|
Uses an EnumMap as well as a Set paired List for O(1) contains calls.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java b/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java
|
diff --git a/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java b/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java
|
||||||
index 18a0822798205f9d687b0b98e3db37041a31c63f..c38b4deafd2e43f2021d28388228cd53b230e61b 100644
|
index 08e3a3c250056227c518a15d5df38b346abae45a..7c92decbf0f4a10cc31f821a249749009d8b1485 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java
|
--- a/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java
|
+++ b/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java
|
||||||
@@ -60,11 +60,43 @@ public class MobSpawnSettings {
|
@@ -59,11 +59,43 @@ public class MobSpawnSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Builder {
|
public static class Builder {
|
||||||
|
@ -28,7 +28,7 @@ index b47b7dce26805badd422c1867733ff4bfd00e9f4..b27021a42cbed3f0648a8d0903d00d03
|
|||||||
* Get a named timer for the specified tile entity type to track type specific timings.
|
* Get a named timer for the specified tile entity type to track type specific timings.
|
||||||
* @param entity
|
* @param entity
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index a8afdd402a0fe90ba73ae7fc60fa335f80cf267b..96895f4e14924ff23ab1b17d298dd8abf7f2493e 100644
|
index 40b3c6ef824e96747d3c01129e4dbaaaa3d3613a..3dc62c72e9d3db93d3e118814cfada6c275b8e3f 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -9,8 +9,10 @@ import it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap;
|
@@ -9,8 +9,10 @@ import it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap;
|
||||||
@ -101,10 +101,10 @@ index a8afdd402a0fe90ba73ae7fc60fa335f80cf267b..96895f4e14924ff23ab1b17d298dd8ab
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
|
||||||
index b1212e162ba938b3abe0df747a633ba9cbbe57c8..c24ff2ef1054523e58892c2b35080cffb6ab744a 100644
|
index bc4aab719d42e6d17585e6492b873f801e5d75cf..dcd76598ca41fbed8fb4e62118552659f8cb605c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
|
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
|
||||||
@@ -14,6 +14,10 @@ public abstract class Behavior<E extends LivingEntity> {
|
@@ -13,6 +13,10 @@ public abstract class Behavior<E extends LivingEntity> {
|
||||||
private long endTimestamp;
|
private long endTimestamp;
|
||||||
private final int minDuration;
|
private final int minDuration;
|
||||||
private final int maxDuration;
|
private final int maxDuration;
|
||||||
@ -115,7 +115,7 @@ index b1212e162ba938b3abe0df747a633ba9cbbe57c8..c24ff2ef1054523e58892c2b35080cff
|
|||||||
|
|
||||||
public Behavior(Map<MemoryModuleType<?>, MemoryStatus> requiredMemoryState) {
|
public Behavior(Map<MemoryModuleType<?>, MemoryStatus> requiredMemoryState) {
|
||||||
this(requiredMemoryState, 60);
|
this(requiredMemoryState, 60);
|
||||||
@@ -27,6 +31,15 @@ public abstract class Behavior<E extends LivingEntity> {
|
@@ -26,6 +30,15 @@ public abstract class Behavior<E extends LivingEntity> {
|
||||||
this.minDuration = minRunTime;
|
this.minDuration = minRunTime;
|
||||||
this.maxDuration = maxRunTime;
|
this.maxDuration = maxRunTime;
|
||||||
this.entryCondition = requiredMemoryState;
|
this.entryCondition = requiredMemoryState;
|
||||||
@ -131,7 +131,7 @@ index b1212e162ba938b3abe0df747a633ba9cbbe57c8..c24ff2ef1054523e58892c2b35080cff
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Behavior.Status getStatus() {
|
public Behavior.Status getStatus() {
|
||||||
@@ -34,11 +47,19 @@ public abstract class Behavior<E extends LivingEntity> {
|
@@ -33,11 +46,19 @@ public abstract class Behavior<E extends LivingEntity> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean tryStart(ServerLevel world, E entity, long time) {
|
public final boolean tryStart(ServerLevel world, E entity, long time) {
|
||||||
@ -151,7 +151,7 @@ index b1212e162ba938b3abe0df747a633ba9cbbe57c8..c24ff2ef1054523e58892c2b35080cff
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@@ -49,11 +70,13 @@ public abstract class Behavior<E extends LivingEntity> {
|
@@ -48,11 +69,13 @@ public abstract class Behavior<E extends LivingEntity> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void tickOrStop(ServerLevel world, E entity, long time) {
|
public final void tickOrStop(ServerLevel world, E entity, long time) {
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Improve boat collision performance
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||||
index a8772417eb54e1a52c490b75b470a502a480f925..c072819c1ebc772f524649c6c2f8b48d919bf805 100644
|
index 47fcfb1e5b65ce2ae3fcdfc5eecf3a1cf4a8d67f..c506b837d0f8b49fa65efe7ff80dd64c2d653e35 100644
|
||||||
--- a/src/main/java/net/minecraft/Util.java
|
--- a/src/main/java/net/minecraft/Util.java
|
||||||
+++ b/src/main/java/net/minecraft/Util.java
|
+++ b/src/main/java/net/minecraft/Util.java
|
||||||
@@ -85,6 +85,7 @@ public class Util {
|
@@ -84,6 +84,7 @@ public class Util {
|
||||||
}).findFirst().orElseThrow(() -> {
|
}).findFirst().orElseThrow(() -> {
|
||||||
return new IllegalStateException("No jar file system provider found");
|
return new IllegalStateException("No jar file system provider found");
|
||||||
});
|
});
|
||||||
|
@ -32,7 +32,7 @@ index e95f2222814e104bf9194a96385737dffe2cb2b5..dd6b78d94dcd16c0a708dbc1764e24e9
|
|||||||
String string = resourceKey.location().toString();
|
String string = resourceKey.location().toString();
|
||||||
if (targets.size() == 1) {
|
if (targets.size() == 1) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 3b1a7cfadd669afafe7e34a3c7c31fd913e3bbd6..58ece1e30d316a81e347f196d288292154d71bfe 100644
|
index 9e774df7b0846a8d4b22914eb5e4b09d621a9a2c..c8be2fa8c0b39e7b02d5214551e13b49af0c4730 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -1279,7 +1279,7 @@ public class ServerPlayer extends Player {
|
@@ -1279,7 +1279,7 @@ public class ServerPlayer extends Player {
|
||||||
@ -89,7 +89,7 @@ index 3b1a7cfadd669afafe7e34a3c7c31fd913e3bbd6..58ece1e30d316a81e347f196d2882921
|
|||||||
|
|
||||||
public void trackChunk(ChunkPos chunkPos, Packet<?> chunkDataPacket) {
|
public void trackChunk(ChunkPos chunkPos, Packet<?> chunkDataPacket) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 88820ba073e89638304b26e52a39a426f76fb2e9..1fad95b709bbc755e5906a93c8d2ed09b52154ce 100644
|
index c6f2ef6b12c699651aaefff0d0dbc20877ea5584..6b3ab58a4446e9ce6f91f870ef8b2511522e0da0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -895,13 +895,13 @@ public abstract class PlayerList {
|
@@ -895,13 +895,13 @@ public abstract class PlayerList {
|
||||||
@ -109,10 +109,10 @@ index 88820ba073e89638304b26e52a39a426f76fb2e9..1fad95b709bbc755e5906a93c8d2ed09
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
|
||||||
index d620f559cdd1bd0e161a99123ef6c6f64e3302df..3770313892b6e9b9ab6f9fcc200dfc0b4972e516 100644
|
index bc7859ea6e9eb9b4f82d51a228034d60d4662f62..491ad2098e982f3c947fcae6f258f0b1aa44a562 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
|
||||||
@@ -73,9 +73,14 @@ public class RespawnAnchorBlock extends Block {
|
@@ -72,9 +72,14 @@ public class RespawnAnchorBlock extends Block {
|
||||||
if (!world.isClientSide) {
|
if (!world.isClientSide) {
|
||||||
ServerPlayer serverPlayer = (ServerPlayer)player;
|
ServerPlayer serverPlayer = (ServerPlayer)player;
|
||||||
if (serverPlayer.getRespawnDimension() != world.dimension() || !pos.equals(serverPlayer.getRespawnPosition())) {
|
if (serverPlayer.getRespawnDimension() != world.dimension() || !pos.equals(serverPlayer.getRespawnPosition())) {
|
||||||
@ -129,7 +129,7 @@ index d620f559cdd1bd0e161a99123ef6c6f64e3302df..3770313892b6e9b9ab6f9fcc200dfc0b
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 56884ab0053051fca28c5ff58af55c027e296f39..f110643dd7147f0e95dd5fba8e8506407089ed19 100644
|
index 34d2f031bb1391dde9dd509e836fd3bbde990570..1cd193a0c75a96f7d368539673d1c56b07de3092 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1194,9 +1194,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1194,9 +1194,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -10,10 +10,10 @@ out due to a sync load, as the worldgen threads will be
|
|||||||
stalling on profile lookups.
|
stalling on profile lookups.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||||
index c072819c1ebc772f524649c6c2f8b48d919bf805..bbe69b5b2b1b7ccd3358325c9a65e7e197dfa7f2 100644
|
index c506b837d0f8b49fa65efe7ff80dd64c2d653e35..da55a78b28b463f737464ebc818e918425903571 100644
|
||||||
--- a/src/main/java/net/minecraft/Util.java
|
--- a/src/main/java/net/minecraft/Util.java
|
||||||
+++ b/src/main/java/net/minecraft/Util.java
|
+++ b/src/main/java/net/minecraft/Util.java
|
||||||
@@ -71,6 +71,22 @@ public class Util {
|
@@ -70,6 +70,22 @@ public class Util {
|
||||||
private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1);
|
private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1);
|
||||||
private static final ExecutorService BOOTSTRAP_EXECUTOR = makeExecutor("Bootstrap", -2); // Paper - add -2 priority
|
private static final ExecutorService BOOTSTRAP_EXECUTOR = makeExecutor("Bootstrap", -2); // Paper - add -2 priority
|
||||||
private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main", -1); // Paper - add -1 priority
|
private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main", -1); // Paper - add -1 priority
|
||||||
|
@ -785,10 +785,10 @@ index 0000000000000000000000000000000000000000..0a88c60161b04a733151c15046358f4b
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
||||||
index 84a0ee595bebcc1947c602c4c06e7437706ce37c..afbb2acd27416c801af3d718850b82a170734cd3 100644
|
index cf0df7e693ca8dabfde11616617efd97e986788e..63c997ba5e7194218e844480419c6b59a4d26e9a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
||||||
@@ -83,7 +83,11 @@ public class AcquirePoi extends Behavior<PathfinderMob> {
|
@@ -82,7 +82,11 @@ public class AcquirePoi extends Behavior<PathfinderMob> {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add more async catchers
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/entity/EntityTickList.java b/src/main/java/net/minecraft/world/level/entity/EntityTickList.java
|
diff --git a/src/main/java/net/minecraft/world/level/entity/EntityTickList.java b/src/main/java/net/minecraft/world/level/entity/EntityTickList.java
|
||||||
index f01182a0ac8a14bcd5b1deb778306e7bf1bf70ed..b27c8db914cca3ff0ea8a24acddb9cb9870ce21d 100644
|
index 2830d32bba3dc85847e3a5d9b4d98f822e34b606..a176a886235494fdc722030a93658d361bf50f03 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/entity/EntityTickList.java
|
--- a/src/main/java/net/minecraft/world/level/entity/EntityTickList.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/entity/EntityTickList.java
|
+++ b/src/main/java/net/minecraft/world/level/entity/EntityTickList.java
|
||||||
@@ -30,11 +30,13 @@ public class EntityTickList {
|
@@ -29,11 +29,13 @@ public class EntityTickList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add(Entity entity) {
|
public void add(Entity entity) {
|
||||||
@ -22,7 +22,7 @@ index f01182a0ac8a14bcd5b1deb778306e7bf1bf70ed..b27c8db914cca3ff0ea8a24acddb9cb9
|
|||||||
this.ensureActiveIsNotIterated();
|
this.ensureActiveIsNotIterated();
|
||||||
this.active.remove(entity.getId());
|
this.active.remove(entity.getId());
|
||||||
}
|
}
|
||||||
@@ -44,6 +46,7 @@ public class EntityTickList {
|
@@ -43,6 +45,7 @@ public class EntityTickList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void forEach(Consumer<Entity> action) {
|
public void forEach(Consumer<Entity> action) {
|
||||||
|
@ -1028,10 +1028,10 @@ index 9c33b2259bf741c5f891691836ad19f9200c4308..9a91de63420e5b910e37773362376d50
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||||
index 99f69f11e86fdee801504303fe025797f7959db8..f9527d1d867f93b4e0e2758485cfa1f6efa0bf8b 100644
|
index 1a3be6f0570c7c746eafa36544debe90d7629432..c0817ef8927f00e2fd3fbf3289f8041fcb494049 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
|
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||||
@@ -19,6 +19,18 @@ import net.minecraft.world.phys.shapes.Shapes;
|
@@ -18,6 +18,18 @@ import net.minecraft.world.phys.shapes.Shapes;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
|
||||||
public interface EntityGetter {
|
public interface EntityGetter {
|
||||||
|
@ -173,10 +173,10 @@ index 0000000000000000000000000000000000000000..57d0cd3ad6f972e986c72a57f1a6e360
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/StateHolder.java b/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/state/StateHolder.java b/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
|
||||||
index 5c30f43ba7db43cc2613ddaf6ea0d0810d3d08d7..5be5eabc222b9e20c083ff83fae52010b19ea854 100644
|
index ab712fd29b316e1235645bacaa79aa0a64d0bc00..340d0648fcf9b9749c4daa1c25a226b947707c3d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
|
--- a/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
|
+++ b/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
|
||||||
@@ -40,11 +40,13 @@ public abstract class StateHolder<O, S> {
|
@@ -39,11 +39,13 @@ public abstract class StateHolder<O, S> {
|
||||||
private final ImmutableMap<Property<?>, Comparable<?>> values;
|
private final ImmutableMap<Property<?>, Comparable<?>> values;
|
||||||
private Table<Property<?>, Comparable<?>, S> neighbours;
|
private Table<Property<?>, Comparable<?>, S> neighbours;
|
||||||
protected final MapCodec<S> propertiesCodec;
|
protected final MapCodec<S> propertiesCodec;
|
||||||
@ -190,7 +190,7 @@ index 5c30f43ba7db43cc2613ddaf6ea0d0810d3d08d7..5be5eabc222b9e20c083ff83fae52010
|
|||||||
}
|
}
|
||||||
|
|
||||||
public <T extends Comparable<T>> S cycle(Property<T> property) {
|
public <T extends Comparable<T>> S cycle(Property<T> property) {
|
||||||
@@ -85,11 +87,11 @@ public abstract class StateHolder<O, S> {
|
@@ -84,11 +86,11 @@ public abstract class StateHolder<O, S> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends Comparable<T>> boolean hasProperty(Property<T> property) {
|
public <T extends Comparable<T>> boolean hasProperty(Property<T> property) {
|
||||||
@ -204,7 +204,7 @@ index 5c30f43ba7db43cc2613ddaf6ea0d0810d3d08d7..5be5eabc222b9e20c083ff83fae52010
|
|||||||
if (comparable == null) {
|
if (comparable == null) {
|
||||||
throw new IllegalArgumentException("Cannot get property " + property + " as it does not exist in " + this.owner);
|
throw new IllegalArgumentException("Cannot get property " + property + " as it does not exist in " + this.owner);
|
||||||
} else {
|
} else {
|
||||||
@@ -98,24 +100,18 @@ public abstract class StateHolder<O, S> {
|
@@ -97,24 +99,18 @@ public abstract class StateHolder<O, S> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends Comparable<T>> Optional<T> getOptionalValue(Property<T> property) {
|
public <T extends Comparable<T>> Optional<T> getOptionalValue(Property<T> property) {
|
||||||
@ -236,7 +236,7 @@ index 5c30f43ba7db43cc2613ddaf6ea0d0810d3d08d7..5be5eabc222b9e20c083ff83fae52010
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void populateNeighbours(Map<Map<Property<?>, Comparable<?>>, S> states) {
|
public void populateNeighbours(Map<Map<Property<?>, Comparable<?>>, S> states) {
|
||||||
@@ -134,7 +130,7 @@ public abstract class StateHolder<O, S> {
|
@@ -133,7 +129,7 @@ public abstract class StateHolder<O, S> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,10 +11,10 @@ No it doesn't. So, allowing removal while iteration
|
|||||||
ENSURES only entities MARKED TO TICK are ticked.
|
ENSURES only entities MARKED TO TICK are ticked.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/entity/EntityTickList.java b/src/main/java/net/minecraft/world/level/entity/EntityTickList.java
|
diff --git a/src/main/java/net/minecraft/world/level/entity/EntityTickList.java b/src/main/java/net/minecraft/world/level/entity/EntityTickList.java
|
||||||
index b27c8db914cca3ff0ea8a24acddb9cb9870ce21d..4814e719e0b898464692075170889fdb2729a26a 100644
|
index a176a886235494fdc722030a93658d361bf50f03..4cdfc433df67afcd455422e9baf56f167dd712ae 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/entity/EntityTickList.java
|
--- a/src/main/java/net/minecraft/world/level/entity/EntityTickList.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/entity/EntityTickList.java
|
+++ b/src/main/java/net/minecraft/world/level/entity/EntityTickList.java
|
||||||
@@ -9,57 +9,42 @@ import javax.annotation.Nullable;
|
@@ -8,57 +8,42 @@ import javax.annotation.Nullable;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
|
|
||||||
public class EntityTickList {
|
public class EntityTickList {
|
||||||
@ -28,7 +28,7 @@ index b27c8db914cca3ff0ea8a24acddb9cb9870ce21d..4814e719e0b898464692075170889fdb
|
|||||||
- if (this.iterated == this.active) {
|
- if (this.iterated == this.active) {
|
||||||
- this.passive.clear();
|
- this.passive.clear();
|
||||||
-
|
-
|
||||||
- for(Entry<Entity> entry : Int2ObjectMaps.fastIterable(this.active)) {
|
- for(Int2ObjectMap.Entry<Entity> entry : Int2ObjectMaps.fastIterable(this.active)) {
|
||||||
- this.passive.put(entry.getIntKey(), entry.getValue());
|
- this.passive.put(entry.getIntKey(), entry.getValue());
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
|
@ -22106,10 +22106,10 @@ index c4bb280aef31c14e71337db0d6dbc5f06d9b9730..3cfc57b49fb3d85c4b9039907fc22bad
|
|||||||
|
|
||||||
for(int l = this.levelHeightAccessor.getMinSection(); l < this.levelHeightAccessor.getMaxSection(); ++l) {
|
for(int l = this.levelHeightAccessor.getMinSection(); l < this.levelHeightAccessor.getMaxSection(); ++l) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
||||||
index 22e3ac8c5df5592e31ef3f00f102aa3a25e794b4..84f04c91ca9b8dfbb8c2d3685d710cca7171d859 100644
|
index 469d3d7fb69829595abd221c700fcf79d2c42fd0..3d88c3c09712c2ebe6099c7f017eadbf7d0a71b3 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
||||||
@@ -116,7 +116,7 @@ public class StructureCheck {
|
@@ -115,7 +115,7 @@ public class StructureCheck {
|
||||||
|
|
||||||
CompoundTag compoundTag2;
|
CompoundTag compoundTag2;
|
||||||
try {
|
try {
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Reduce worldgen thread worker count for low core count CPUs
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||||
index bbe69b5b2b1b7ccd3358325c9a65e7e197dfa7f2..d5a4e7d0ba2aff89e9aec64c8545c105926dcab4 100644
|
index da55a78b28b463f737464ebc818e918425903571..ab524d5bd579ad56fd6fc7808e9060953a1c21c3 100644
|
||||||
--- a/src/main/java/net/minecraft/Util.java
|
--- a/src/main/java/net/minecraft/Util.java
|
||||||
+++ b/src/main/java/net/minecraft/Util.java
|
+++ b/src/main/java/net/minecraft/Util.java
|
||||||
@@ -131,7 +131,19 @@ public class Util {
|
@@ -130,7 +130,19 @@ public class Util {
|
||||||
|
|
||||||
private static ExecutorService makeExecutor(String s, int priorityModifier) { // Paper - add priority
|
private static ExecutorService makeExecutor(String s, int priorityModifier) { // Paper - add priority
|
||||||
// Paper start - use simpler thread pool that allows 1 thread
|
// Paper start - use simpler thread pool that allows 1 thread
|
||||||
|
@ -7,7 +7,7 @@ Subject: [PATCH] Remove client-side code using deprecated for removal
|
|||||||
Fixes warnings on build
|
Fixes warnings on build
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||||
index d5a4e7d0ba2aff89e9aec64c8545c105926dcab4..e0a77a776533e48a3f8e2165eb77d4765213b79e 100644
|
index ab524d5bd579ad56fd6fc7808e9060953a1c21c3..f09ac28a49863c02491d38342ecd6237c0511d5c 100644
|
||||||
--- a/src/main/java/net/minecraft/Util.java
|
--- a/src/main/java/net/minecraft/Util.java
|
||||||
+++ b/src/main/java/net/minecraft/Util.java
|
+++ b/src/main/java/net/minecraft/Util.java
|
||||||
@@ -23,7 +23,6 @@ import java.net.URL;
|
@@ -23,7 +23,6 @@ import java.net.URL;
|
||||||
@ -18,7 +18,7 @@ index d5a4e7d0ba2aff89e9aec64c8545c105926dcab4..e0a77a776533e48a3f8e2165eb77d476
|
|||||||
import java.security.PrivilegedActionException;
|
import java.security.PrivilegedActionException;
|
||||||
import java.security.PrivilegedExceptionAction;
|
import java.security.PrivilegedExceptionAction;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
@@ -764,21 +763,7 @@ public class Util {
|
@@ -763,21 +762,7 @@ public class Util {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openUrl(URL url) {
|
public void openUrl(URL url) {
|
||||||
|
@ -1180,7 +1180,7 @@ index 0000000000000000000000000000000000000000..d67a40e7be030142443680c89e1763fc
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index ca978f337a7cf443e6918bea2e6cae0ceef30145..6f3dcd6bd19cbd9e4c1d65c17531863b451769de 100644
|
index 6b9622c41966843411184493f42b3d4005be533e..3c13862e7ec96e7ee57c942bb2a7084f4553ae20 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -414,7 +414,7 @@ public class ServerPlayer extends Player {
|
@@ -414,7 +414,7 @@ public class ServerPlayer extends Player {
|
||||||
@ -1202,7 +1202,7 @@ index ca978f337a7cf443e6918bea2e6cae0ceef30145..6f3dcd6bd19cbd9e4c1d65c17531863b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 7fd530a901aecc49fa7fbbf3e876b0f56b665212..ca5026270a44fef244eb566695702bb3f4729367 100644
|
index 2aa31d8ad15100b3a25dd7da41bf17b126ba937e..bb4e844c77c76eb893c55844c5a814ccd337b7f4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -936,7 +936,7 @@ public abstract class PlayerList {
|
@@ -936,7 +936,7 @@ public abstract class PlayerList {
|
||||||
@ -1471,10 +1471,10 @@ index 56d94c94fb0d4dc468bb5d69be655ddd5c6b5360..d7d396ad73866a97cd9f63b34ad8c587
|
|||||||
|
|
||||||
List<VoxelShape> getEntityCollisions(@Nullable Entity entity, AABB box);
|
List<VoxelShape> getEntityCollisions(@Nullable Entity entity, AABB box);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||||
index f9527d1d867f93b4e0e2758485cfa1f6efa0bf8b..1f4b72a0aca200b2e0860449c718e6e607d2fc47 100644
|
index c0817ef8927f00e2fd3fbf3289f8041fcb494049..3f458ddd4dc04ed28510a212be76bb19e7f6a61e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
|
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||||
@@ -50,7 +50,7 @@ public interface EntityGetter {
|
@@ -49,7 +49,7 @@ public interface EntityGetter {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
for(Entity entity : this.getEntities(except, shape.bounds())) {
|
for(Entity entity : this.getEntities(except, shape.bounds())) {
|
||||||
@ -1483,7 +1483,7 @@ index f9527d1d867f93b4e0e2758485cfa1f6efa0bf8b..1f4b72a0aca200b2e0860449c718e6e6
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@ public interface EntityGetter {
|
@@ -67,7 +67,7 @@ public interface EntityGetter {
|
||||||
return List.of();
|
return List.of();
|
||||||
} else {
|
} else {
|
||||||
Predicate<Entity> predicate = entity == null ? EntitySelector.CAN_BE_COLLIDED_WITH : EntitySelector.NO_SPECTATORS.and(entity::canCollideWith);
|
Predicate<Entity> predicate = entity == null ? EntitySelector.CAN_BE_COLLIDED_WITH : EntitySelector.NO_SPECTATORS.and(entity::canCollideWith);
|
||||||
@ -1712,7 +1712,7 @@ index 120498a39b7ca7aee9763084507508d4a1c425aa..68cc6f2a78a06293a29317fda72ab3ee
|
|||||||
this((double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), (double)(pos.getX() + 1), (double)(pos.getY() + 1), (double)(pos.getZ() + 1));
|
this((double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), (double)(pos.getX() + 1), (double)(pos.getY() + 1), (double)(pos.getZ() + 1));
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/phys/shapes/ArrayVoxelShape.java b/src/main/java/net/minecraft/world/phys/shapes/ArrayVoxelShape.java
|
diff --git a/src/main/java/net/minecraft/world/phys/shapes/ArrayVoxelShape.java b/src/main/java/net/minecraft/world/phys/shapes/ArrayVoxelShape.java
|
||||||
index cdb785619b4fce3cb7f0b4a996a15fa43de5f4d1..6db47035fe940ef1f78a14cae6103e22aa1a184e 100644
|
index 9d627b8e6bf3140b894d38b9a720896e2d776369..ca5f01be5d5ccfcc56780ff93cca3824409ffc0d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/phys/shapes/ArrayVoxelShape.java
|
--- a/src/main/java/net/minecraft/world/phys/shapes/ArrayVoxelShape.java
|
||||||
+++ b/src/main/java/net/minecraft/world/phys/shapes/ArrayVoxelShape.java
|
+++ b/src/main/java/net/minecraft/world/phys/shapes/ArrayVoxelShape.java
|
||||||
@@ -6,6 +6,9 @@ import java.util.Arrays;
|
@@ -6,6 +6,9 @@ import java.util.Arrays;
|
||||||
@ -1751,7 +1751,7 @@ index cdb785619b4fce3cb7f0b4a996a15fa43de5f4d1..6db47035fe940ef1f78a14cae6103e22
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -42,4 +56,152 @@ public class ArrayVoxelShape extends VoxelShape {
|
@@ -42,4 +56,152 @@ public class ArrayVoxelShape extends VoxelShape {
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
|
@ -113,10 +113,10 @@ index 2816fd4a57fe51689daf1b4850ad3ab3c9749225..cdbe0695a29d0854d7f59c1f63a74bd0
|
|||||||
this.level = MinMaxBounds.Ints.ANY;
|
this.level = MinMaxBounds.Ints.ANY;
|
||||||
this.rotX = WrappedMinMaxBounds.ANY;
|
this.rotX = WrappedMinMaxBounds.ANY;
|
||||||
diff --git a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
|
diff --git a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
|
||||||
index ff1e8fafe55fec729b3d8da3c2cd0d6c347013dd..5a078a4ee1f5535399f70ddb2bc6559441c3daf0 100644
|
index e5a23bf6ab92bb1fa7485df1fe52f68f111bc1b1..f0bc168393ba87310d3c43b236b024c46b66ba39 100644
|
||||||
--- a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
|
--- a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
|
||||||
+++ b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
|
+++ b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
|
||||||
@@ -69,6 +69,19 @@ public class EntitySelectorOptions {
|
@@ -68,6 +68,19 @@ public class EntitySelectorOptions {
|
||||||
public static final DynamicCommandExceptionType ERROR_ENTITY_TYPE_INVALID = new DynamicCommandExceptionType((entity) -> {
|
public static final DynamicCommandExceptionType ERROR_ENTITY_TYPE_INVALID = new DynamicCommandExceptionType((entity) -> {
|
||||||
return new TranslatableComponent("argument.entity.options.type.invalid", entity);
|
return new TranslatableComponent("argument.entity.options.type.invalid", entity);
|
||||||
});
|
});
|
||||||
@ -136,7 +136,7 @@ index ff1e8fafe55fec729b3d8da3c2cd0d6c347013dd..5a078a4ee1f5535399f70ddb2bc65594
|
|||||||
|
|
||||||
private static void register(String id, EntitySelectorOptions.Modifier handler, Predicate<EntitySelectorParser> condition, Component description) {
|
private static void register(String id, EntitySelectorOptions.Modifier handler, Predicate<EntitySelectorParser> condition, Component description) {
|
||||||
OPTIONS.put(id, new EntitySelectorOptions.Option(handler, condition, description));
|
OPTIONS.put(id, new EntitySelectorOptions.Option(handler, condition, description));
|
||||||
@@ -316,6 +329,12 @@ public class EntitySelectorOptions {
|
@@ -315,6 +328,12 @@ public class EntitySelectorOptions {
|
||||||
|
|
||||||
if (reader.isTag()) {
|
if (reader.isTag()) {
|
||||||
TagKey<EntityType<?>> tagKey = TagKey.create(Registry.ENTITY_TYPE_REGISTRY, ResourceLocation.read(reader.getReader()));
|
TagKey<EntityType<?>> tagKey = TagKey.create(Registry.ENTITY_TYPE_REGISTRY, ResourceLocation.read(reader.getReader()));
|
||||||
|
@ -23,10 +23,10 @@ index 5f7c394f9cc178c9cb06c90b91296b979d61239b..e4eac546836b73b5e9c8fd68ca0d32c0
|
|||||||
this.setCatType(10);
|
this.setCatType(10);
|
||||||
this.setPersistenceRequired();
|
this.setPersistenceRequired();
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/StructureFeatureManager.java b/src/main/java/net/minecraft/world/level/StructureFeatureManager.java
|
diff --git a/src/main/java/net/minecraft/world/level/StructureFeatureManager.java b/src/main/java/net/minecraft/world/level/StructureFeatureManager.java
|
||||||
index 81bb2235bec095b9e5fa7b41dfd12c6b06b4bdf5..fa6eaf7041b6a8b17c64322307839dbd358ad3ab 100644
|
index 2825975e5b33ea13f199008c7a4abc72ebf990b3..56c4f849d92b38537602fd77e481ee60a25bc84b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/StructureFeatureManager.java
|
--- a/src/main/java/net/minecraft/world/level/StructureFeatureManager.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/StructureFeatureManager.java
|
+++ b/src/main/java/net/minecraft/world/level/StructureFeatureManager.java
|
||||||
@@ -58,7 +58,12 @@ public class StructureFeatureManager {
|
@@ -56,7 +56,12 @@ public class StructureFeatureManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<StructureStart> startsForFeature(SectionPos sectionPos, ConfiguredStructureFeature<?, ?> configuredStructureFeature) {
|
public List<StructureStart> startsForFeature(SectionPos sectionPos, ConfiguredStructureFeature<?, ?> configuredStructureFeature) {
|
||||||
@ -37,10 +37,10 @@ index 81bb2235bec095b9e5fa7b41dfd12c6b06b4bdf5..fa6eaf7041b6a8b17c64322307839dbd
|
|||||||
+ public List<StructureStart> startsForFeature(SectionPos sectionPos, ConfiguredStructureFeature<?, ?> configuredStructureFeature, ServerLevelAccessor world) {
|
+ public List<StructureStart> startsForFeature(SectionPos sectionPos, ConfiguredStructureFeature<?, ?> configuredStructureFeature, ServerLevelAccessor world) {
|
||||||
+ LongSet longSet = (world == null ? this.level : world).getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.STRUCTURE_REFERENCES).getReferencesForFeature(configuredStructureFeature);
|
+ LongSet longSet = (world == null ? this.level : world).getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.STRUCTURE_REFERENCES).getReferencesForFeature(configuredStructureFeature);
|
||||||
+ // Paper end - add world option
|
+ // Paper end - add world option
|
||||||
Builder<StructureStart> builder = ImmutableList.builder();
|
ImmutableList.Builder<StructureStart> builder = ImmutableList.builder();
|
||||||
this.fillStartsForFeature(configuredStructureFeature, longSet, builder::add);
|
this.fillStartsForFeature(configuredStructureFeature, longSet, builder::add);
|
||||||
return builder.build();
|
return builder.build();
|
||||||
@@ -108,7 +113,12 @@ public class StructureFeatureManager {
|
@@ -106,7 +111,12 @@ public class StructureFeatureManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public StructureStart getStructureWithPieceAt(BlockPos pos, ConfiguredStructureFeature<?, ?> configuredStructureFeature) {
|
public StructureStart getStructureWithPieceAt(BlockPos pos, ConfiguredStructureFeature<?, ?> configuredStructureFeature) {
|
||||||
|
@ -2223,10 +2223,10 @@ index 33bca696c1ae0a63055eea5d2e05551458da50b4..4a0e4b9c49f04d63ca0b7d0a6ce71680
|
|||||||
public int getSignal(BlockState state, BlockGetter world, BlockPos pos, Direction direction) {
|
public int getSignal(BlockState state, BlockGetter world, BlockPos pos, Direction direction) {
|
||||||
return (Integer) state.getValue(SculkSensorBlock.POWER);
|
return (Integer) state.getValue(SculkSensorBlock.POWER);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/TargetBlock.java b/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/TargetBlock.java b/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
||||||
index d609c60c1650a5b7f860154e0a4f4c6d84fa63fc..391d64b698871aa420f736a97b7b4b28c9d11da0 100644
|
index 20955a3944a2fcb66ad98267ef3570ddfc32980e..1a8064ce899a920c1b3a0cd98eb5b5c37d536ff2 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
||||||
@@ -113,6 +113,13 @@ public class TargetBlock extends Block {
|
@@ -112,6 +112,13 @@ public class TargetBlock extends Block {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren