Current progress - Leaf, tag your it
This commit is contained in:
parent
e27149bff4
commit
6800c77f75
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add FastUtil to Bukkit
|
|||
Doesn't expose to plugins, just allows Paper-API to use it for optimization
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 9975ba9ae19f6217bec206fee247fac1a30d58fc..e8d9982bdbf9f66a54db16bf920e8106b81b034f 100644
|
||||
index 6953bd86915f6c7a0afb0b87abd38053cb7766d5..04781abaf6ec21f2f19f366c3d1b27687f502743 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -49,6 +49,12 @@
|
||||
|
|
|
@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size()
|
|||
which creates copy of the collections.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index cd8a09576a99f03f5ef9926d55fa3a1193ba0da6..808c3b4a4f494e05542f29324db655ee6166021e 100644
|
||||
index 9c7c74eb30d2f54843f5e103530f5b2592e8414e..75d62402181934d316582023fdc012ea3c74306a 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -40,6 +40,33 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
|
|
@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..7b2af1bd72dfbcf4e962a982940fc49b
|
|||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index cb7d9f055193618c8a7e80796c2ba52651baca55..9398f303f191c57ee3e2bd33f205a881be6543f4 100644
|
||||
index 28faaa29bde457e539c99d7ebe59a661e1841680..8afa4db2d47b3941055d045ff351eb8b0a35fffa 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -30,7 +30,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's
|
|||
Provides more methods to get nearby entities, and filter by types and predicates
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 3b027f67c1763ee0a4f7b02490d3cee1c3eff369..fbe7e76c0f3122dd47c7ca4562b5ac3577a71ffc 100644
|
||||
index a636956c4772f4e38eaa71553d3dfbd7ef36f0cd..3150f7d81c87b57944231bd95bb2e49af51f7eca 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1,6 +1,9 @@
|
||||
|
|
|
@ -106,7 +106,7 @@ index 4cf22afc3c1f1cc19b6e5350043431215908a612..ac3c8eef58872c2de840a4b7ba7d77c2
|
|||
* Returns a list of entities within a bounding box centered around a Location.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 085c7a42c3e758770d5883e3cddf896ac6b7645b..08985f77dce71ebd76510be873043e34ac34a821 100644
|
||||
index c478db22ade86ca58551ba94043dd1c2fd08004e..42129f705a3e821872538183ec38bbd179a4cfae 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1354,6 +1354,88 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add World.getEntity(UUID) API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 08985f77dce71ebd76510be873043e34ac34a821..889756b1c8d5e413a6ebe3623e128a737f88d48c 100644
|
||||
index 42129f705a3e821872538183ec38bbd179a4cfae..f321f7a3b7afc3969edf2675a7872ffe31fb657f 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -914,6 +914,17 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
|
|
@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
|||
to "confirm" things based on if it was player triggered close or not.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 2d413d720c828c7f334abde7eb02935317e2fd17..79569a329aa19ed954b9b65b78ef5d6d313501a1 100644
|
||||
index 863cdf7408cb6b42e7927505e34a2a93017e06ff..1f94cbee36b6a952b2ecca8efbeaf7deee640a81 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -152,6 +152,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
|
|
|
@ -44,7 +44,7 @@ index 95e485eea693e7648e63d198c8591d89e02e6755..0bbef14a9fc2a3ec03b4db59c8d8e1ee
|
|||
* Gets the world containing this chunk
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 889756b1c8d5e413a6ebe3623e128a737f88d48c..e5b76d59fdcc85344cf3932b38ab096155d2eec3 100644
|
||||
index f321f7a3b7afc3969edf2675a7872ffe31fb657f..008fb638b5b0601109c72c322caa7669403ae273 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -207,6 +207,22 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
|
|
@ -8,7 +8,7 @@ Adds API's to load or generate chunks asynchronously.
|
|||
Also adds utility methods to Entity to teleport asynchronously.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index e5b76d59fdcc85344cf3932b38ab096155d2eec3..8fe496ad8f566183e2280582d00c3b7751f06d75 100644
|
||||
index 008fb638b5b0601109c72c322caa7669403ae273..fbd9546731aaf5673603646136c668dbc59821b1 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -221,6 +221,467 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
|
|
@ -48,7 +48,7 @@ index f87ecd0a753b0f730ee33c0dd699b7388e8c6697..07e532cde37255ffb2db368453bb69ee
|
|||
* @return A new location where X/Y/Z are the center of the block
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 8fe496ad8f566183e2280582d00c3b7751f06d75..08aebaedce935faa1a2c54c5abc02b85896df216 100644
|
||||
index fbd9546731aaf5673603646136c668dbc59821b1..85bd7d8926d313a313f17c5dea644615daf72c62 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -90,6 +90,38 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
|
|
@ -34,7 +34,7 @@ index 07e532cde37255ffb2db368453bb69ee0a410931..6e1a1124a6e528c1a94ccb1d09bc5dcc
|
|||
/**
|
||||
* Sets the position of this Location and returns itself
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 08aebaedce935faa1a2c54c5abc02b85896df216..42b91634a131f8705cbde96b6068d5881a393fb7 100644
|
||||
index 85bd7d8926d313a313f17c5dea644615daf72c62..933f2729276b37b4c82cda986e39292cc2e86c4e 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -254,6 +254,17 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add sun related API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 42b91634a131f8705cbde96b6068d5881a393fb7..f9a5ea4fcdb87e741cf04b47d469e05f8a786155 100644
|
||||
index 933f2729276b37b4c82cda986e39292cc2e86c4e..e3d4da353e5f876f0456106b350838917f492051 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1755,6 +1755,16 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
|
|
@ -89,7 +89,7 @@ index 77d9cd0a1f54b5eb233eddbcff1bfa76bc182e9a..5904750329a5c7061de6e4fe32335b0d
|
|||
* Creates explosion at this location with given power
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index f9a5ea4fcdb87e741cf04b47d469e05f8a786155..0a5865d85dfc28cb68f753878608b12afd74bc99 100644
|
||||
index e3d4da353e5f876f0456106b350838917f492051..143fcbcdbfad551cd4392f54cf189fe3bee41706 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -160,6 +160,87 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Spawn Reason API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index be4d6ca8e8ec4c2e6643eaecc19f11466e14658c..9518da825ed752c5a477ca9132de50f923f9192d 100644
|
||||
index ec719d5c0741f3489884709169fee93ef02244bb..920f3eb82f1492bd59896e03b65a4df2e46c854d 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1,6 +1,8 @@
|
||||
|
|
|
@ -50,65 +50,154 @@ index a3afe60b0d85cf90bf7a170dc0a0b61a796381a7..85f799a713db0c822d46b689010f9f6b
|
|||
System.arraycopy(this.b, 0, au, 0, this.c);
|
||||
if (au.length > this.c) {
|
||||
diff --git a/src/main/java/net/minecraft/server/BehaviorFindPosition.java b/src/main/java/net/minecraft/server/BehaviorFindPosition.java
|
||||
index 37006ec1bbb8fa285257edacdf337591595852a2..35eb3a5a61145e94d5b0c77c0eb13bfa46fac23b 100644
|
||||
index 84a872dfd35249972129130083d51d71d75bff1e..b4976b9e00e631c1431543c0cb2064e153f3a2ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/BehaviorFindPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BehaviorFindPosition.java
|
||||
@@ -53,7 +53,7 @@ public class BehaviorFindPosition extends Behavior<EntityCreature> {
|
||||
villageplace.a(this.a.c(), (blockposition1) -> {
|
||||
@@ -81,7 +81,7 @@ public class BehaviorFindPosition extends Behavior<EntityCreature> {
|
||||
villageplace.a(this.b.c(), (blockposition1) -> {
|
||||
return blockposition1.equals(blockposition);
|
||||
}, blockposition, 1);
|
||||
- entitycreature.getBehaviorController().setMemory(this.b, (Object) GlobalPos.create(worldserver.getWorldProvider().getDimensionManager(), blockposition));
|
||||
+ entitycreature.getBehaviorController().setMemory(this.b, GlobalPos.create(worldserver.getWorldProvider().getDimensionManager(), blockposition));
|
||||
- entitycreature.getBehaviorController().setMemory(this.c, (Object) GlobalPos.create(worldserver.getDimensionKey(), blockposition));
|
||||
+ entitycreature.getBehaviorController().setMemory(this.c, GlobalPos.create(worldserver.getDimensionKey(), blockposition)); // Paper - decompile fix
|
||||
this.f.clear();
|
||||
PacketDebug.c(worldserver, blockposition);
|
||||
});
|
||||
} else if (this.f < 5) {
|
||||
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
index 960dce23072bbb5fad36760677f0fe2efb661552..253890e53702f9ba1c6628cc860a4ca10756626a 100644
|
||||
index 6c2ed9c1b8567abcdb11bdc3dbaeed217a2f61e7..ae0ac8d383ca11a683465d8c83a8b8a66e567079 100644
|
||||
--- a/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
@@ -54,7 +54,7 @@ public abstract class BiomeBase {
|
||||
@@ -26,76 +26,31 @@ import org.apache.logging.log4j.Logger;
|
||||
public class BiomeBase {
|
||||
|
||||
public static final Logger LOGGER = LogManager.getLogger();
|
||||
- public static final Codec<BiomeBase> b = RecordCodecBuilder.create((instance) -> {
|
||||
- RecordCodecBuilder recordcodecbuilder = BiomeBase.Precipitation.d.fieldOf("precipitation").forGetter((biomebase) -> {
|
||||
- return biomebase.o;
|
||||
- });
|
||||
- RecordCodecBuilder recordcodecbuilder1 = BiomeBase.Geography.r.fieldOf("category").forGetter((biomebase) -> {
|
||||
- return biomebase.n;
|
||||
- });
|
||||
- RecordCodecBuilder recordcodecbuilder2 = Codec.FLOAT.fieldOf("depth").forGetter((biomebase) -> {
|
||||
- return biomebase.h;
|
||||
- });
|
||||
- RecordCodecBuilder recordcodecbuilder3 = Codec.FLOAT.fieldOf("scale").forGetter((biomebase) -> {
|
||||
- return biomebase.i;
|
||||
- });
|
||||
- RecordCodecBuilder recordcodecbuilder4 = Codec.FLOAT.fieldOf("temperature").forGetter((biomebase) -> {
|
||||
- return biomebase.j;
|
||||
- });
|
||||
- RecordCodecBuilder recordcodecbuilder5 = Codec.FLOAT.fieldOf("downfall").forGetter((biomebase) -> {
|
||||
- return biomebase.k;
|
||||
- });
|
||||
- RecordCodecBuilder recordcodecbuilder6 = BiomeFog.a.fieldOf("effects").forGetter((biomebase) -> {
|
||||
- return biomebase.p;
|
||||
- });
|
||||
- RecordCodecBuilder recordcodecbuilder7 = Codec.INT.fieldOf("sky_color").forGetter((biomebase) -> {
|
||||
- return biomebase.t;
|
||||
- });
|
||||
- RecordCodecBuilder recordcodecbuilder8 = WorldGenSurfaceComposite.a.fieldOf("surface_builder").forGetter((biomebase) -> {
|
||||
- return biomebase.m;
|
||||
- });
|
||||
- Codec codec = WorldGenStage.Features.c;
|
||||
- Codec codec1 = WorldGenCarverWrapper.a.listOf();
|
||||
- Logger logger = BiomeBase.LOGGER;
|
||||
-
|
||||
- logger.getClass();
|
||||
- RecordCodecBuilder recordcodecbuilder9 = Codec.simpleMap(codec, codec1.promotePartial(SystemUtils.a("Carver: ", logger::error)), INamable.a(WorldGenStage.Features.values())).fieldOf("carvers").forGetter((biomebase) -> {
|
||||
- return biomebase.q;
|
||||
- });
|
||||
-
|
||||
- codec1 = WorldGenStage.Decoration.k;
|
||||
- Codec codec2 = WorldGenFeatureConfigured.b.listOf();
|
||||
- Logger logger1 = BiomeBase.LOGGER;
|
||||
-
|
||||
- logger1.getClass();
|
||||
- RecordCodecBuilder recordcodecbuilder10 = Codec.simpleMap(codec1, codec2.promotePartial(SystemUtils.a("Feature: ", logger1::error)), INamable.a(WorldGenStage.Decoration.values())).fieldOf("features").forGetter((biomebase) -> {
|
||||
- return biomebase.r;
|
||||
- });
|
||||
-
|
||||
- codec2 = StructureFeature.a.listOf();
|
||||
- logger1 = BiomeBase.LOGGER;
|
||||
- logger1.getClass();
|
||||
- RecordCodecBuilder recordcodecbuilder11 = codec2.promotePartial(SystemUtils.a("Structure start: ", logger1::error)).fieldOf("starts").forGetter((biomebase) -> {
|
||||
- return (List) biomebase.u.values().stream().sorted(Comparator.comparing((structurefeature) -> {
|
||||
- return IRegistry.STRUCTURE_FEATURE.getKey(structurefeature.b);
|
||||
- })).collect(Collectors.toList());
|
||||
- });
|
||||
- Codec codec3 = EnumCreatureType.g;
|
||||
- Codec codec4 = BiomeBase.BiomeMeta.b.listOf();
|
||||
- Logger logger2 = BiomeBase.LOGGER;
|
||||
-
|
||||
- logger2.getClass();
|
||||
- return instance.group(recordcodecbuilder, recordcodecbuilder1, recordcodecbuilder2, recordcodecbuilder3, recordcodecbuilder4, recordcodecbuilder5, recordcodecbuilder6, recordcodecbuilder7, recordcodecbuilder8, recordcodecbuilder9, recordcodecbuilder10, recordcodecbuilder11, Codec.simpleMap(codec3, codec4.promotePartial(SystemUtils.a("Spawn data: ", logger2::error)), INamable.a(EnumCreatureType.values())).fieldOf("spawners").forGetter((biomebase) -> {
|
||||
- return biomebase.v;
|
||||
- }), BiomeBase.d.a.listOf().fieldOf("climate_parameters").forGetter((biomebase) -> {
|
||||
- return biomebase.x;
|
||||
- }), Codec.STRING.optionalFieldOf("parent").forGetter((biomebase) -> {
|
||||
- return Optional.ofNullable(biomebase.l);
|
||||
- })).apply(instance, BiomeBase::new);
|
||||
+ // Paper decompile error - Spigots stupid decompiler
|
||||
+ public static final Codec<BiomeBase> b = RecordCodecBuilder.create(i -> {
|
||||
+ Codec k1 = WorldGenStage.Decoration.k; // Erase type - WorldGenstage.Decoration has wrong type
|
||||
+ return i.group(
|
||||
+ Precipitation.d.fieldOf("precipitation").forGetter(biome -> biome.o),
|
||||
+ Geography.r.fieldOf("category").forGetter(biome -> biome.n),
|
||||
+ Codec.FLOAT.fieldOf("depth").forGetter(biome -> biome.h),
|
||||
+ Codec.FLOAT.fieldOf("scale").forGetter(biome -> biome.i),
|
||||
+ Codec.FLOAT.fieldOf("temperature").forGetter(biome -> biome.j),
|
||||
+ Codec.FLOAT.fieldOf("downfall").forGetter(biome -> biome.k),
|
||||
+ BiomeFog.a.fieldOf("effects").forGetter(biome -> biome.p),
|
||||
+ Codec.INT.fieldOf("sky_color").forGetter(biome -> biome.t),
|
||||
+ WorldGenSurfaceComposite.a.fieldOf("surface_builder").forGetter(biome -> biome.m),
|
||||
+ Codec.simpleMap(WorldGenStage.Features.c, WorldGenCarverWrapper.a.listOf().promotePartial(SystemUtils.a("Carver: ", LOGGER::error)), INamable.a(WorldGenStage.Features.values())).fieldOf("carvers").forGetter(biome -> biome.q),
|
||||
+ Codec.simpleMap((Codec<WorldGenStage.Decoration>) k1, WorldGenFeatureConfigured.b.listOf().promotePartial(SystemUtils.a("Feature: ", LOGGER::error)), INamable.a(WorldGenStage.Decoration.values())).fieldOf("features").forGetter(biome -> biome.r),
|
||||
+ StructureFeature.a.listOf().promotePartial(SystemUtils.a("Structure start: ", LOGGER::error)).fieldOf("starts").forGetter(biome -> biome.u.values().stream().sorted(Comparator.comparing(cf -> IRegistry.STRUCTURE_FEATURE.getKey(cf.b))).collect(Collectors.toList())),
|
||||
+ Codec.simpleMap(EnumCreatureType.g, BiomeMeta.b.listOf().promotePartial(SystemUtils.a("Spawn data: ", LOGGER::error)), INamable.a(EnumCreatureType.values())).fieldOf("spawners").forGetter(biome -> biome.v),
|
||||
+ d.a.listOf().fieldOf("climate_parameters").forGetter(biome -> biome.x),
|
||||
+ Codec.STRING.optionalFieldOf("parent").forGetter(biome -> Optional.ofNullable(biome.l))
|
||||
+ ).apply(i, BiomeBase::new);
|
||||
+ // Paper end
|
||||
});
|
||||
public static final Set<BiomeBase> c = Sets.newHashSet();
|
||||
- public static final RegistryBlockID<BiomeBase> d = new RegistryBlockID<>();
|
||||
- protected static final NoiseGenerator3 e = new NoiseGenerator3(new SeededRandom(1234L), ImmutableList.of(0));
|
||||
+ public static final RegistryBlockID<BiomeBase> reg = new RegistryBlockID<>(); // Paper - decompile error - rename
|
||||
+ protected static final NoiseGenerator3 NOISE_GENERATOR_3 = new NoiseGenerator3(new SeededRandom(1234L), ImmutableList.of(0)); // Paper - decompile error - rename
|
||||
public static final NoiseGenerator3 f = new NoiseGenerator3(new SeededRandom(2345L), ImmutableList.of(0));
|
||||
@Nullable
|
||||
protected String g;
|
||||
@@ -130,7 +85,7 @@ public class BiomeBase {
|
||||
|
||||
@Nullable
|
||||
public static BiomeBase a(BiomeBase biomebase) {
|
||||
- return (BiomeBase) BiomeBase.c.fromId(IRegistry.BIOME.a((Object) biomebase));
|
||||
+ return (BiomeBase) BiomeBase.c.fromId(IRegistry.BIOME.a(biomebase)); // Paper - decompile fix
|
||||
- return (BiomeBase) BiomeBase.d.fromId(IRegistry.BIOME.a((Object) biomebase));
|
||||
+ return (BiomeBase) BiomeBase.reg.fromId(IRegistry.BIOME.a(biomebase)); // Paper - decompile fix / rename
|
||||
}
|
||||
|
||||
public static <C extends WorldGenCarverConfiguration> WorldGenCarverWrapper<C> a(WorldGenCarverAbstract<C> worldgencarverabstract, C c0) {
|
||||
@@ -236,7 +236,7 @@ public abstract class BiomeBase {
|
||||
@@ -197,7 +152,7 @@ public class BiomeBase {
|
||||
}, Function.identity()));
|
||||
this.v = map2;
|
||||
this.x = list1;
|
||||
- this.l = (String) optional.orElse((Object) null);
|
||||
+ this.l = (String) optional.orElse(null); // Paper - decompile fix
|
||||
Stream stream = map1.values().stream().flatMap(Collection::stream).filter((worldgenfeatureconfigured) -> {
|
||||
return worldgenfeatureconfigured.d == WorldGenerator.DECORATED_FLOWER;
|
||||
});
|
||||
@@ -250,7 +205,7 @@ public class BiomeBase {
|
||||
|
||||
@Nullable
|
||||
public <C extends WorldGenFeatureConfiguration> C b(StructureGenerator<C> structuregenerator) {
|
||||
- return (WorldGenFeatureConfiguration) this.t.get(structuregenerator);
|
||||
+ return (C) this.t.get(structuregenerator); // Paper - decompile fix
|
||||
}
|
||||
protected float a(BlockPosition blockposition) {
|
||||
if (blockposition.getY() > 64) {
|
||||
- float f = (float) (BiomeBase.e.a((double) ((float) blockposition.getX() / 8.0F), (double) ((float) blockposition.getZ() / 8.0F), false) * 4.0D);
|
||||
+ float f = (float) (BiomeBase.NOISE_GENERATOR_3.a((double) ((float) blockposition.getX() / 8.0F), (double) ((float) blockposition.getZ() / 8.0F), false) * 4.0D); // Paper - decompile error - rename
|
||||
|
||||
public List<WorldGenFeatureConfigured<?, ?>> g() {
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index e40f9c153b4f1f8f11ea467e6bd8e670959282d6..c88a62f6b72a8851b95587bb49c898569d74e0c6 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -57,12 +57,12 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
OfInt ofint = dynamic.asIntStream().spliterator();
|
||||
int[] aint = new int[3];
|
||||
|
||||
- if (ofint.tryAdvance((i) -> {
|
||||
+ if (ofint.tryAdvance((Consumer<? super Integer>) (i) -> { // Paper - decomile fix
|
||||
aint[0] = i;
|
||||
- }) && ofint.tryAdvance((i) -> {
|
||||
+ }) && ofint.tryAdvance((Consumer<? super Integer>) (i) -> { // Paper - decompile fix
|
||||
aint[1] = i;
|
||||
})) {
|
||||
- ofint.tryAdvance((i) -> {
|
||||
+ ofint.tryAdvance((Consumer<? super Integer>) (i) -> { // Paper - decompile fix
|
||||
aint[2] = i;
|
||||
});
|
||||
}
|
||||
return this.getTemperature() - (f + (float) blockposition.getY() - 64.0F) * 0.05F / 30.0F;
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java
|
||||
index 28cfbaae287653d21e06f0017396b937e99fc3ad..1486d460c8ec3d117b4dc3d28b2c3f1b632e187b 100644
|
||||
index 771841e08591955e61c7bcc5b09c8457652c1b9c..8162c11d14b8e88c2b572f9ddf6b7a15977047f8 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockStateEnum.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockStateEnum.java
|
||||
@@ -20,10 +20,10 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T>
|
||||
@@ -20,10 +20,10 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends IBlockState<T>
|
||||
protected BlockStateEnum(String s, Class<T> oclass, Collection<T> collection) {
|
||||
super(s, oclass);
|
||||
this.a = ImmutableSet.copyOf(collection);
|
||||
|
@ -122,10 +211,10 @@ index 28cfbaae287653d21e06f0017396b937e99fc3ad..1486d460c8ec3d117b4dc3d28b2c3f1b
|
|||
|
||||
if (this.b.containsKey(s1)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java
|
||||
index 68a601bac587294b46a79be6df7ee4e6e38e5f28..efdf611e66ffd782291de749d8a48f3bf08f2129 100644
|
||||
index 026c51b5ce80ff4161d2f126e8df9dc493a46957..fb3ddcc5d5a1154a7e0583135ecd541e8f67ff0b 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkStatus.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkStatus.java
|
||||
@@ -84,7 +84,7 @@ public class ChunkStatus {
|
||||
@@ -90,7 +90,7 @@ public class ChunkStatus {
|
||||
return (CompletableFuture) function.apply(ichunkaccess);
|
||||
});
|
||||
private static final List<ChunkStatus> q = ImmutableList.of(ChunkStatus.FULL, ChunkStatus.FEATURES, ChunkStatus.LIQUID_CARVERS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS, ChunkStatus.STRUCTURE_STARTS);
|
||||
|
@ -135,10 +224,10 @@ index 68a601bac587294b46a79be6df7ee4e6e38e5f28..efdf611e66ffd782291de749d8a48f3b
|
|||
|
||||
for (int j = a().size() - 1; j >= 0; --j) {
|
||||
diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java
|
||||
index ca9ed573914558d51318c713b14665480efdc5bf..f0d7a91fa06632d5731e277a9199aa9804d3a96a 100644
|
||||
index fbb708f5f7e4d2da9d96b595498da436b088a408..f27c7041cdc2f062f0abb222b02026194ab33c60 100644
|
||||
--- a/src/main/java/net/minecraft/server/CraftingManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/CraftingManager.java
|
||||
@@ -63,7 +63,7 @@ public class CraftingManager extends ResourceDataJson {
|
||||
@@ -64,7 +64,7 @@ public class CraftingManager extends ResourceDataJson {
|
||||
}
|
||||
|
||||
this.recipes = (Map) map1.entrySet().stream().collect(ImmutableMap.toImmutableMap(Entry::getKey, (entry1) -> {
|
||||
|
@ -148,7 +237,7 @@ index ca9ed573914558d51318c713b14665480efdc5bf..f0d7a91fa06632d5731e277a9199aa98
|
|||
CraftingManager.LOGGER.info("Loaded {} recipes", map1.size());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
index 7d44348c78b0e468cef5c137d3a69aeb5704d881..73ecdd22ea1157abe00795d90c3e7b748650dbc8 100644
|
||||
index 4ab6e82a1415c40f3e2eee7414bf7de97f53b420..9c152b79164710d3d4175d0acbc9548d61390097 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
@@ -25,7 +25,7 @@ public class EntityVindicator extends EntityIllagerAbstract {
|
||||
|
@ -160,21 +249,8 @@ index 7d44348c78b0e468cef5c137d3a69aeb5704d881..73ecdd22ea1157abe00795d90c3e7b74
|
|||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
||||
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, true));
|
||||
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true));
|
||||
diff --git a/src/main/java/net/minecraft/server/Fluid.java b/src/main/java/net/minecraft/server/Fluid.java
|
||||
index 035f05e82769445f213c225a731db6d95626f6cd..7c9ba128620f54c9cd691d350d1ee225d867fe70 100644
|
||||
--- a/src/main/java/net/minecraft/server/Fluid.java
|
||||
+++ b/src/main/java/net/minecraft/server/Fluid.java
|
||||
@@ -74,7 +74,7 @@ public interface Fluid extends IBlockDataHolder<Fluid> {
|
||||
if (immutablemap.isEmpty()) {
|
||||
object = dynamicops.createMap(ImmutableMap.of(dynamicops.createString("Name"), dynamicops.createString(IRegistry.FLUID.getKey(fluid.getType()).toString())));
|
||||
} else {
|
||||
- object = dynamicops.createMap(ImmutableMap.of(dynamicops.createString("Name"), dynamicops.createString(IRegistry.FLUID.getKey(fluid.getType()).toString()), dynamicops.createString("Properties"), dynamicops.createMap((Map) immutablemap.entrySet().stream().map((entry) -> {
|
||||
+ object = dynamicops.createMap(ImmutableMap.of(dynamicops.createString("Name"), dynamicops.createString(IRegistry.FLUID.getKey(fluid.getType()).toString()), dynamicops.createString("Properties"), dynamicops.createMap(immutablemap.entrySet().stream().map((entry) -> { // Paper - decompile fix
|
||||
return Pair.of(dynamicops.createString(((IBlockState) entry.getKey()).a()), dynamicops.createString(IBlockDataHolder.b((IBlockState) entry.getKey(), (Comparable) entry.getValue())));
|
||||
}).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||
index 447f6a55b619402447b5cf4db9b22ea8cfc7d51d..1890c760f9ffd7628d6ae3db40c36f5272379227 100644
|
||||
index 8886cedfe8809fe4711b5f2451e3e6456d2a6513..b77a0f0c2ee30df44b113aa6c8d4fa9206d3e2ba 100644
|
||||
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||
@@ -55,7 +55,7 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
|
||||
|
@ -203,68 +279,11 @@ index 447f6a55b619402447b5cf4db9b22ea8cfc7d51d..1890c760f9ffd7628d6ae3db40c36f52
|
|||
return true;
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
|
||||
index 3be9efd22c1cc659265a80c843b543ca771505d3..3a1ad2346b4cae833de90dafb716c56e6e2f606d 100644
|
||||
--- a/src/main/java/net/minecraft/server/IBlockData.java
|
||||
+++ b/src/main/java/net/minecraft/server/IBlockData.java
|
||||
@@ -281,12 +281,12 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
|
||||
|
||||
public static <T> Dynamic<T> a(DynamicOps<T> dynamicops, IBlockData iblockdata) {
|
||||
ImmutableMap<IBlockState<?>, Comparable<?>> immutablemap = iblockdata.getStateMap();
|
||||
- Object object;
|
||||
+ T object; // Paper - decompile fix
|
||||
|
||||
if (immutablemap.isEmpty()) {
|
||||
object = dynamicops.createMap(ImmutableMap.of(dynamicops.createString("Name"), dynamicops.createString(IRegistry.BLOCK.getKey(iblockdata.getBlock()).toString())));
|
||||
} else {
|
||||
- object = dynamicops.createMap(ImmutableMap.of(dynamicops.createString("Name"), dynamicops.createString(IRegistry.BLOCK.getKey(iblockdata.getBlock()).toString()), dynamicops.createString("Properties"), dynamicops.createMap((Map) immutablemap.entrySet().stream().map((entry) -> {
|
||||
+ object = dynamicops.createMap(ImmutableMap.of(dynamicops.createString("Name"), dynamicops.createString(IRegistry.BLOCK.getKey(iblockdata.getBlock()).toString()), dynamicops.createString("Properties"), dynamicops.createMap(immutablemap.entrySet().stream().map((entry) -> { // Paper - decompile fix
|
||||
return Pair.of(dynamicops.createString(((IBlockState) entry.getKey()).a()), dynamicops.createString(IBlockDataHolder.b((IBlockState) entry.getKey(), (Comparable) entry.getValue())));
|
||||
}).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))));
|
||||
}
|
||||
@@ -348,9 +348,9 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
|
||||
if (!iblockdata.o()) {
|
||||
this.f = null;
|
||||
} else {
|
||||
- this.f = new VoxelShape[IBlockData.a.a.length];
|
||||
+ this.f = new VoxelShape[a.length]; // Paper - decompile fix
|
||||
VoxelShape voxelshape = block.i(iblockdata, BlockAccessAir.INSTANCE, BlockPosition.ZERO);
|
||||
- EnumDirection[] aenumdirection = IBlockData.a.a;
|
||||
+ EnumDirection[] aenumdirection = a; // Paper - decompile fix
|
||||
|
||||
i = aenumdirection.length;
|
||||
|
||||
@@ -366,7 +366,7 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
|
||||
return this.g.b(enumdirection_enumaxis) < 0.0D || this.g.c(enumdirection_enumaxis) > 1.0D;
|
||||
});
|
||||
this.i = new boolean[6];
|
||||
- EnumDirection[] aenumdirection1 = IBlockData.a.a;
|
||||
+ EnumDirection[] aenumdirection1 = a; // Paper - decompile fix
|
||||
int k = aenumdirection1.length;
|
||||
|
||||
for (i = 0; i < k; ++i) {
|
||||
diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java
|
||||
index 534e70671a624e58ed98df9dd62bd7f5ffdf91af..d5c284cdd10d33f5f1b7f456d6a384a44eafb139 100644
|
||||
index 2517b70ddeb985ae7d708c6a1708b42c6a67dd00..c469b5db81fb040fc27cd2e4f7cd61797f56a62d 100644
|
||||
--- a/src/main/java/net/minecraft/server/IEntityAccess.java
|
||||
+++ b/src/main/java/net/minecraft/server/IEntityAccess.java
|
||||
@@ -47,7 +47,7 @@ public interface IEntityAccess {
|
||||
return Stream.empty();
|
||||
} else {
|
||||
AxisAlignedBB axisalignedbb1 = axisalignedbb.g(1.0E-7D);
|
||||
- Stream stream = this.getEntities(entity, axisalignedbb1).stream().filter((entity1) -> {
|
||||
+ Stream<AxisAlignedBB> stream = this.getEntities(entity, axisalignedbb1).stream().filter((entity1) -> { // Paper - decompile fix
|
||||
return !set.contains(entity1);
|
||||
}).filter((entity1) -> {
|
||||
return entity == null || !entity.isSameVehicle(entity1);
|
||||
@@ -55,7 +55,6 @@ public interface IEntityAccess {
|
||||
return Stream.of(entity1.au(), entity == null ? null : entity.j(entity1));
|
||||
}).filter(Objects::nonNull);
|
||||
|
||||
- axisalignedbb1.getClass();
|
||||
return stream.filter(axisalignedbb1::c).map(VoxelShapes::a);
|
||||
}
|
||||
}
|
||||
@@ -157,22 +156,22 @@ public interface IEntityAccess {
|
||||
@@ -150,22 +150,22 @@ public interface IEntityAccess {
|
||||
|
||||
@Nullable
|
||||
default <T extends EntityLiving> T a(Class<? extends T> oclass, PathfinderTargetCondition pathfindertargetcondition, @Nullable EntityLiving entityliving, double d0, double d1, double d2, AxisAlignedBB axisalignedbb) {
|
||||
|
@ -291,7 +310,7 @@ index 534e70671a624e58ed98df9dd62bd7f5ffdf91af..d5c284cdd10d33f5f1b7f456d6a384a4
|
|||
|
||||
if (pathfindertargetcondition.a(entityliving, t1)) {
|
||||
double d4 = t1.g(d0, d1, d2);
|
||||
@@ -205,10 +204,10 @@ public interface IEntityAccess {
|
||||
@@ -198,10 +198,10 @@ public interface IEntityAccess {
|
||||
default <T extends EntityLiving> List<T> a(Class<? extends T> oclass, PathfinderTargetCondition pathfindertargetcondition, EntityLiving entityliving, AxisAlignedBB axisalignedbb) {
|
||||
List<T> list = this.a(oclass, axisalignedbb, (Predicate) null);
|
||||
List<T> list1 = Lists.newArrayList();
|
||||
|
@ -305,45 +324,34 @@ index 534e70671a624e58ed98df9dd62bd7f5ffdf91af..d5c284cdd10d33f5f1b7f456d6a384a4
|
|||
if (pathfindertargetcondition.a(entityliving, t0)) {
|
||||
list1.add(t0);
|
||||
diff --git a/src/main/java/net/minecraft/server/IOWorker.java b/src/main/java/net/minecraft/server/IOWorker.java
|
||||
index a986f2912fc04a7fdd49d648cbcd570464597937..c5658c0779b0e0d51fd4921456b6fef0711d7be3 100644
|
||||
index c5a95f51ba43b94fd07f8df6576f45c3dd0216a3..38ccfd78639a85abcefb915c5c231be5881cebc1 100644
|
||||
--- a/src/main/java/net/minecraft/server/IOWorker.java
|
||||
+++ b/src/main/java/net/minecraft/server/IOWorker.java
|
||||
@@ -46,7 +46,7 @@ public class IOWorker implements AutoCloseable {
|
||||
if (throwable != null) {
|
||||
completablefuture.completeExceptionally(throwable);
|
||||
} else {
|
||||
- completablefuture.complete((Object) null);
|
||||
+ completablefuture.complete(null); // Paper - Decompile fix
|
||||
}
|
||||
@@ -83,7 +83,7 @@ public class IOWorker implements AutoCloseable {
|
||||
return this.a(() -> {
|
||||
try {
|
||||
this.d.a();
|
||||
- return Either.left((Object) null);
|
||||
+ return Either.left(null); // Paper - decompile error
|
||||
} catch (Exception exception) {
|
||||
IOWorker.LOGGER.warn("Failed to synchronized chunks", exception);
|
||||
return Either.right(exception);
|
||||
@@ -117,13 +117,13 @@ public class IOWorker implements AutoCloseable {
|
||||
}
|
||||
|
||||
});
|
||||
@@ -106,7 +106,7 @@ public class IOWorker implements AutoCloseable {
|
||||
}));
|
||||
private void c() {
|
||||
- this.c.a((Object) (new PairedQueue.b(IOWorker.Priority.LOW.ordinal(), this::b)));
|
||||
+ this.c.a((new PairedQueue.b(IOWorker.Priority.LOW.ordinal(), this::b))); // Paper - decompile error
|
||||
}
|
||||
|
||||
completablefuture1.whenComplete((object, throwable) -> {
|
||||
- completablefuture.complete((Object) null);
|
||||
+ completablefuture.complete(null); // Paper - decompile fix
|
||||
});
|
||||
};
|
||||
});
|
||||
@@ -165,7 +165,7 @@ public class IOWorker implements AutoCloseable {
|
||||
private void a(ChunkCoordIntPair chunkcoordintpair, IOWorker.a ioworker_a) {
|
||||
try {
|
||||
this.e.write(chunkcoordintpair, ioworker_a.a);
|
||||
this.d.write(chunkcoordintpair, ioworker_a.a);
|
||||
- ioworker_a.b.complete((Object) null);
|
||||
+ ioworker_a.b.complete(null); // Paper - decompile fix
|
||||
} catch (Exception exception) {
|
||||
IOWorker.LOGGER.error("Failed to store chunk {}", chunkcoordintpair, exception);
|
||||
ioworker_a.b.completeExceptionally(exception);
|
||||
@@ -176,7 +176,7 @@ public class IOWorker implements AutoCloseable {
|
||||
private void g() {
|
||||
try {
|
||||
this.e.close();
|
||||
- this.h.complete((Object) null);
|
||||
+ this.h.complete(null); // Paper - decompile fix
|
||||
} catch (Exception exception) {
|
||||
IOWorker.LOGGER.error("Failed to close storage", exception);
|
||||
this.h.completeExceptionally(exception);
|
||||
diff --git a/src/main/java/net/minecraft/server/LightEngineStorageSky.java b/src/main/java/net/minecraft/server/LightEngineStorageSky.java
|
||||
index 1e1f7ec6e6e6fc698a8a5118ce21321d104dc5eb..75d9065b32731dc635d9d09c48fb9643172381a9 100644
|
||||
--- a/src/main/java/net/minecraft/server/LightEngineStorageSky.java
|
||||
|
@ -362,18 +370,9 @@ index 1e1f7ec6e6e6fc698a8a5118ce21321d104dc5eb..75d9065b32731dc635d9d09c48fb9643
|
|||
++k;
|
||||
if (k >= l) {
|
||||
diff --git a/src/main/java/net/minecraft/server/LightEngineThreaded.java b/src/main/java/net/minecraft/server/LightEngineThreaded.java
|
||||
index ef315377579ca425ecb8d41aaf59eb1dd5b39e12..8776799de033f02b0f87e9ea7e4a4ce912e94dd4 100644
|
||||
index 8b1f9116afd92b13426eb0e97066297705d202fb..a9dc8466278f9ec2becbcb643e6e1c973df72b82 100644
|
||||
--- a/src/main/java/net/minecraft/server/LightEngineThreaded.java
|
||||
+++ b/src/main/java/net/minecraft/server/LightEngineThreaded.java
|
||||
@@ -110,7 +110,7 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
|
||||
}
|
||||
|
||||
private void a(int i, int j, IntSupplier intsupplier, LightEngineThreaded.Update lightenginethreaded_update, Runnable runnable) {
|
||||
- this.e.a((Object) ChunkTaskQueueSorter.a(() -> {
|
||||
+ this.e.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile error
|
||||
this.c.add(Pair.of(lightenginethreaded_update, runnable));
|
||||
if (this.c.size() >= this.f) {
|
||||
this.b();
|
||||
@@ -167,7 +167,7 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
|
||||
|
||||
public void queueUpdate() {
|
||||
|
@ -384,23 +383,23 @@ index ef315377579ca425ecb8d41aaf59eb1dd5b39e12..8776799de033f02b0f87e9ea7e4a4ce9
|
|||
this.g.set(false);
|
||||
}));
|
||||
diff --git a/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java b/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java
|
||||
index fa11b2fc6364dc6fb6a951e092ea01f5e74c2c1d..5fe0da76bd172c2c552b2dd210e89be214c4385c 100644
|
||||
index 3aa5cc4281cdba8738890e9ffd5c7a129e60c310..32a98e758b9df48005ddc5283eacdc5123a32c39 100644
|
||||
--- a/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/LootItemFunctionExplorationMap.java
|
||||
@@ -69,7 +69,7 @@ public class LootItemFunctionExplorationMap extends LootItemFunctionConditional
|
||||
}
|
||||
@@ -73,7 +73,7 @@ public class LootItemFunctionExplorationMap extends LootItemFunctionConditional
|
||||
public b() {}
|
||||
|
||||
public void a(JsonObject jsonobject, LootItemFunctionExplorationMap lootitemfunctionexplorationmap, JsonSerializationContext jsonserializationcontext) {
|
||||
- super.a(jsonobject, (LootItemFunctionConditional) lootitemfunctionexplorationmap, jsonserializationcontext);
|
||||
+ super.a(jsonobject, lootitemfunctionexplorationmap, jsonserializationcontext); // Paper - decompile fix
|
||||
if (!lootitemfunctionexplorationmap.d.equals("Buried_Treasure")) {
|
||||
jsonobject.add("destination", jsonserializationcontext.serialize(lootitemfunctionexplorationmap.d));
|
||||
if (!lootitemfunctionexplorationmap.e.equals(LootItemFunctionExplorationMap.a)) {
|
||||
jsonobject.add("destination", jsonserializationcontext.serialize(lootitemfunctionexplorationmap.e.i()));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||
index 59bb53543113660cd2514350a24a4908a8464f24..3ed6a1e785f68c4bb6c5afe024c43150915968a3 100644
|
||||
index 998101592723abb26c91d1f92e98be1cf24c954d..ee9069c744df63cbb7f21dd9d28d6d554593674c 100644
|
||||
--- a/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||
@@ -125,7 +125,7 @@ public abstract class LootSelectorEntry extends LootEntryAbstract {
|
||||
@@ -123,7 +123,7 @@ public abstract class LootSelectorEntry extends LootEntryAbstract {
|
||||
@Override
|
||||
public T b(LootItemFunction.a lootitemfunction_a) {
|
||||
this.c.add(lootitemfunction_a.b());
|
||||
|
@ -409,7 +408,7 @@ index 59bb53543113660cd2514350a24a4908a8464f24..3ed6a1e785f68c4bb6c5afe024c43150
|
|||
}
|
||||
|
||||
protected LootItemFunction[] a() {
|
||||
@@ -134,12 +134,12 @@ public abstract class LootSelectorEntry extends LootEntryAbstract {
|
||||
@@ -132,12 +132,12 @@ public abstract class LootSelectorEntry extends LootEntryAbstract {
|
||||
|
||||
public T a(int i) {
|
||||
this.a = i;
|
||||
|
@ -438,7 +437,7 @@ index 829a7ae0a2b77205fb8e8c5754d0d4333afa224d..8b9e47b4c7f5dc464fa617a59583df9e
|
|||
default String asString() {
|
||||
return this.toString();
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
index 22035b6c0b76687404e4df92f5796dbf244c50bc..5406f4c40f86e74f8ed4e7e986b23d19141ddc30 100644
|
||||
index b8bb5027ecccfc9b664145a1bfe3755f1a8af3eb..ad8a506bb430b26fe147a657a2f826daf9bf4d45 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
@@ -51,7 +51,7 @@ public class NBTTagList extends NBTList<NBTBase> {
|
||||
|
@ -472,31 +471,6 @@ index 8471920b8b92f0bbd0d3ee827e1b0a120f405f6c..e9c405fb5376c5733b9b0191cd530917
|
|||
});
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/RegionFileSection.java b/src/main/java/net/minecraft/server/RegionFileSection.java
|
||||
index 737afc7d71f415e942602efb4bd91fba6c6baa72..db9f0196bda4c987de6cf63eea437b7154d47b57 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegionFileSection.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegionFileSection.java
|
||||
@@ -83,9 +83,9 @@ public class RegionFileSection<R extends MinecraftSerializable> implements AutoC
|
||||
Optional<R> optional = this.d(i);
|
||||
|
||||
if (optional.isPresent()) {
|
||||
- return (MinecraftSerializable) optional.get();
|
||||
+ return optional.get(); // Paper - decompile fix
|
||||
} else {
|
||||
- R r0 = (MinecraftSerializable) this.f.apply(() -> {
|
||||
+ R r0 = this.f.apply(() -> { // Paper - decompile fix
|
||||
this.a(i);
|
||||
});
|
||||
|
||||
@@ -124,7 +124,7 @@ public class RegionFileSection<R extends MinecraftSerializable> implements AutoC
|
||||
for (int l = 0; l < 16; ++l) {
|
||||
long i1 = SectionPosition.a(chunkcoordintpair, l).v();
|
||||
Optional<R> optional = optionaldynamic.get(Integer.toString(l)).get().map((dynamic2) -> {
|
||||
- return (MinecraftSerializable) this.e.apply(() -> {
|
||||
+ return this.e.apply(() -> { // Paper - decompile fix
|
||||
this.a(i1);
|
||||
}, dynamic2);
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
index 7f89562e90ede1bdd06b71c0798d986ccbb7886e..4efcb8b595750891b421e524812542f0f67e9f3f 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
|
@ -511,7 +485,7 @@ index 7f89562e90ede1bdd06b71c0798d986ccbb7886e..4efcb8b595750891b421e524812542f0
|
|||
|
||||
this.c.set(i, t0);
|
||||
diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java
|
||||
index 4cb78c6a3feb15eb15f76f967e724829655e8617..e15d286710ed66a01bfb6b60f8735b837efb3fd7 100644
|
||||
index 2dc20b5c930c6845af41b35d69cdb03db639d63e..6cdd4d46d987132c3c241800b5d59cee2dfa25e2 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegistryID.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegistryID.java
|
||||
@@ -17,9 +17,9 @@ public class RegistryID<K> implements Registry<K> {
|
||||
|
@ -526,7 +500,7 @@ index 4cb78c6a3feb15eb15f76f967e724829655e8617..e15d286710ed66a01bfb6b60f8735b83
|
|||
}
|
||||
|
||||
public int getId(@Nullable K k0) {
|
||||
@@ -55,9 +55,9 @@ public class RegistryID<K> implements Registry<K> {
|
||||
@@ -59,9 +59,9 @@ public class RegistryID<K> implements Registry<K> {
|
||||
K[] ak = this.b;
|
||||
int[] aint = this.c;
|
||||
|
||||
|
@ -539,10 +513,10 @@ index 4cb78c6a3feb15eb15f76f967e724829655e8617..e15d286710ed66a01bfb6b60f8735b83
|
|||
this.f = 0;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
index 8534585eb17cd46f1e392d8f09bb671abe27ef52..7b92ecfff94e3c4a69269139ebed75fc59bbd4f1 100644
|
||||
index a1a5460e429356b52a75037c809cec85bd99084a..80ee8d196436e271833503a0e123401d1b3314a9 100644
|
||||
--- a/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
@@ -45,8 +45,8 @@ public class SystemUtils {
|
||||
@@ -55,8 +55,8 @@ public class SystemUtils {
|
||||
return Collectors.toMap(Entry::getKey, Entry::getValue);
|
||||
}
|
||||
|
||||
|
@ -553,7 +527,7 @@ index 8534585eb17cd46f1e392d8f09bb671abe27ef52..7b92ecfff94e3c4a69269139ebed75fc
|
|||
}
|
||||
|
||||
public static String a(String s, @Nullable MinecraftKey minecraftkey) {
|
||||
@@ -168,8 +168,8 @@ public class SystemUtils {
|
||||
@@ -224,8 +224,8 @@ public class SystemUtils {
|
||||
public static <T> T b(Iterable<T> iterable, @Nullable T t0) {
|
||||
Iterator<T> iterator = iterable.iterator();
|
||||
|
||||
|
@ -564,16 +538,16 @@ index 8534585eb17cd46f1e392d8f09bb671abe27ef52..7b92ecfff94e3c4a69269139ebed75fc
|
|||
|
||||
for (object1 = null; iterator.hasNext(); object1 = object) {
|
||||
object = iterator.next();
|
||||
@@ -194,7 +194,7 @@ public class SystemUtils {
|
||||
@@ -250,7 +250,7 @@ public class SystemUtils {
|
||||
}
|
||||
|
||||
public static <K> Strategy<K> i() {
|
||||
public static <K> Strategy<K> k() {
|
||||
- return SystemUtils.IdentityHashingStrategy.INSTANCE;
|
||||
+ return (Strategy<K>) SystemUtils.IdentityHashingStrategy.INSTANCE; // Paper - decompile fix
|
||||
}
|
||||
|
||||
public static <V> CompletableFuture<List<V>> b(List<? extends CompletableFuture<? extends V>> list) {
|
||||
@@ -205,7 +205,7 @@ public class SystemUtils {
|
||||
@@ -261,7 +261,7 @@ public class SystemUtils {
|
||||
list.forEach((completablefuture1) -> {
|
||||
int i = list1.size();
|
||||
|
||||
|
@ -583,10 +557,10 @@ index 8534585eb17cd46f1e392d8f09bb671abe27ef52..7b92ecfff94e3c4a69269139ebed75fc
|
|||
if (throwable != null) {
|
||||
completablefuture.completeExceptionally(throwable);
|
||||
diff --git a/src/main/java/net/minecraft/server/ThreadedMailbox.java b/src/main/java/net/minecraft/server/ThreadedMailbox.java
|
||||
index 8dbb33e749a282ab1e41bfdc616a22744dc7b162..8082569022384a3ba03fb4a6f1ae12b443598dcb 100644
|
||||
index b64fc6e3dc8f628ead2c243baa48f2872bd8da0c..35f4d2d9591e625ab0bbeab7b606761e74965eec 100644
|
||||
--- a/src/main/java/net/minecraft/server/ThreadedMailbox.java
|
||||
+++ b/src/main/java/net/minecraft/server/ThreadedMailbox.java
|
||||
@@ -83,7 +83,7 @@ public class ThreadedMailbox<T> implements Mailbox<T>, AutoCloseable, Runnable {
|
||||
@@ -99,7 +99,7 @@ public class ThreadedMailbox<T> implements Mailbox<T>, AutoCloseable, Runnable {
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
|
@ -609,10 +583,10 @@ index ee2059cf8ef0a0372e02b91a4bf6fa8a0ab31bca..77bb6b092a0763ff27f90f0401a8a81b
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityPiston.java b/src/main/java/net/minecraft/server/TileEntityPiston.java
|
||||
index 79df42f5e53464f07e76d22cd1317637145e2056..489175abd8e582a3c082364fec357c4f061a22d7 100644
|
||||
index dc52856856796524e4519c34ab92e37031013759..5b941321a7fdc561e6b794a1dce5d600083c505d 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityPiston.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityPiston.java
|
||||
@@ -137,7 +137,7 @@ public class TileEntityPiston extends TileEntity implements ITickable {
|
||||
@@ -140,7 +140,7 @@ public class TileEntityPiston extends TileEntity implements ITickable {
|
||||
private static void a(EnumDirection enumdirection, Entity entity, double d0, EnumDirection enumdirection1) {
|
||||
TileEntityPiston.h.set(enumdirection);
|
||||
entity.move(EnumMoveType.PISTON, new Vec3D(d0 * (double) enumdirection1.getAdjacentX(), d0 * (double) enumdirection1.getAdjacentY(), d0 * (double) enumdirection1.getAdjacentZ()));
|
||||
|
@ -622,28 +596,31 @@ index 79df42f5e53464f07e76d22cd1317637145e2056..489175abd8e582a3c082364fec357c4f
|
|||
|
||||
private void g(float f) {
|
||||
diff --git a/src/main/java/net/minecraft/server/VillagePlace.java b/src/main/java/net/minecraft/server/VillagePlace.java
|
||||
index c137484f66a022f7f4581d0657210d60c619c5fa..c999f8c9bf8a59e19b3d6d1b7ad8b5fb6e48b928 100644
|
||||
index bc2fab806ee1cc7628841a065436f0339f17ecce..b8c15047771bd4527b86e514a3b950b2ffc6eef0 100644
|
||||
--- a/src/main/java/net/minecraft/server/VillagePlace.java
|
||||
+++ b/src/main/java/net/minecraft/server/VillagePlace.java
|
||||
@@ -165,7 +165,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
|
||||
@@ -170,9 +170,9 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
|
||||
}
|
||||
|
||||
private static boolean a(ChunkSection chunksection) {
|
||||
- Stream stream = VillagePlaceType.e();
|
||||
+ Stream<IBlockData> stream = VillagePlaceType.e(); // Paper - decompile fix
|
||||
- Set set = VillagePlaceType.x;
|
||||
+ Set<IBlockData> set = VillagePlaceType.x; // Paper - decompile error
|
||||
|
||||
chunksection.getClass();
|
||||
return stream.anyMatch(chunksection::a);
|
||||
@@ -185,7 +185,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
|
||||
- set.getClass();
|
||||
+ //set.getClass(); // Paper - decompile error
|
||||
return chunksection.a(set::contains);
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
|
||||
SectionPosition.b(new ChunkCoordIntPair(blockposition), Math.floorDiv(i, 16)).map((sectionposition) -> {
|
||||
return Pair.of(sectionposition, this.d(sectionposition.v()));
|
||||
return Pair.of(sectionposition, this.d(sectionposition.s()));
|
||||
}).filter((pair) -> {
|
||||
- return !(Boolean) ((Optional) pair.getSecond()).map(VillagePlaceSection::a).orElse(false);
|
||||
+ return !(Boolean) (pair.getSecond()).map(VillagePlaceSection::a).orElse(false); // Paper - decompile fix
|
||||
}).map((pair) -> {
|
||||
return ((SectionPosition) pair.getFirst()).u();
|
||||
return ((SectionPosition) pair.getFirst()).r();
|
||||
}).filter((chunkcoordintpair) -> {
|
||||
@@ -237,7 +237,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
|
||||
@@ -242,7 +242,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
|
||||
|
||||
private final Predicate<? super VillagePlaceRecord> d;
|
||||
|
||||
|
@ -653,25 +630,25 @@ index c137484f66a022f7f4581d0657210d60c619c5fa..c999f8c9bf8a59e19b3d6d1b7ad8b5fb
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/VillagerTrades.java b/src/main/java/net/minecraft/server/VillagerTrades.java
|
||||
index a06a31534e5bdfddcd3914f68e5b60ae0ec43117..3bcf0b385d1f707176dae9c3ee49370e2e6dd481 100644
|
||||
index b0ec371c058c428a909faafe027e58e9c7f0cb38..532460e7549192dfe6170e2bf489edb46b8b5737 100644
|
||||
--- a/src/main/java/net/minecraft/server/VillagerTrades.java
|
||||
+++ b/src/main/java/net/minecraft/server/VillagerTrades.java
|
||||
@@ -15,12 +15,12 @@ import javax.annotation.Nullable;
|
||||
@@ -14,12 +14,12 @@ import javax.annotation.Nullable;
|
||||
|
||||
public class VillagerTrades {
|
||||
|
||||
- public static final Map<VillagerProfession, Int2ObjectMap<VillagerTrades.IMerchantRecipeOption[]>> a = (Map) SystemUtils.a((Object) Maps.newHashMap(), (hashmap) -> {
|
||||
+ public static final Map<VillagerProfession, Int2ObjectMap<VillagerTrades.IMerchantRecipeOption[]>> a = SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // Paper - decompile fix
|
||||
hashmap.put(VillagerProfession.FARMER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WHEAT, 20, 16, 2), new VillagerTrades.b(Items.POTATO, 26, 16, 2), new VillagerTrades.b(Items.CARROT, 22, 16, 2), new VillagerTrades.b(Items.BEETROOT, 15, 16, 2), new VillagerTrades.h(Items.BREAD, 1, 6, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Blocks.PUMPKIN, 6, 12, 10), new VillagerTrades.h(Items.PUMPKIN_PIE, 1, 4, 5), new VillagerTrades.h(Items.APPLE, 1, 4, 16, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.COOKIE, 3, 18, 10), new VillagerTrades.b(Blocks.MELON, 4, 12, 20)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Blocks.CAKE, 1, 1, 12, 15), new VillagerTrades.i(MobEffects.NIGHT_VISION, 100, 15), new VillagerTrades.i(MobEffects.JUMP, 160, 15), new VillagerTrades.i(MobEffects.WEAKNESS, 140, 15), new VillagerTrades.i(MobEffects.BLINDNESS, 120, 15), new VillagerTrades.i(MobEffects.POISON, 280, 15), new VillagerTrades.i(MobEffects.SATURATION, 7, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GOLDEN_CARROT, 3, 3, 30), new VillagerTrades.h(Items.GLISTERING_MELON_SLICE, 4, 3, 30)})));
|
||||
- hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.pT, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())})));
|
||||
+ hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.pT, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.<VillagerType, Item>builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())}))); // Paper - decompile fix
|
||||
- hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.rm, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())})));
|
||||
+ hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.rm, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.<VillagerType, Item>builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())}))); // <VillagerType, Item>
|
||||
hashmap.put(VillagerProfession.SHEPHERD, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Blocks.WHITE_WOOL, 18, 16, 2), new VillagerTrades.b(Blocks.BROWN_WOOL, 18, 16, 2), new VillagerTrades.b(Blocks.BLACK_WOOL, 18, 16, 2), new VillagerTrades.b(Blocks.GRAY_WOOL, 18, 16, 2), new VillagerTrades.h(Items.SHEARS, 2, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WHITE_DYE, 12, 16, 10), new VillagerTrades.b(Items.GRAY_DYE, 12, 16, 10), new VillagerTrades.b(Items.BLACK_DYE, 12, 16, 10), new VillagerTrades.b(Items.LIGHT_BLUE_DYE, 12, 16, 10), new VillagerTrades.b(Items.LIME_DYE, 12, 16, 10), new VillagerTrades.h(Blocks.WHITE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.ORANGE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.MAGENTA_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.LIGHT_BLUE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.YELLOW_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.LIME_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.PINK_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.GRAY_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.LIGHT_GRAY_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.CYAN_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.PURPLE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.BLUE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.BROWN_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.GREEN_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.RED_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.BLACK_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.WHITE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.ORANGE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.MAGENTA_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.LIGHT_BLUE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.YELLOW_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.LIME_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.PINK_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.GRAY_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.LIGHT_GRAY_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.CYAN_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.PURPLE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.BLUE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.BROWN_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.GREEN_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.RED_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.BLACK_CARPET, 1, 4, 16, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.YELLOW_DYE, 12, 16, 20), new VillagerTrades.b(Items.LIGHT_GRAY_DYE, 12, 16, 20), new VillagerTrades.b(Items.ORANGE_DYE, 12, 16, 20), new VillagerTrades.b(Items.RED_DYE, 12, 16, 20), new VillagerTrades.b(Items.PINK_DYE, 12, 16, 20), new VillagerTrades.h(Blocks.WHITE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.YELLOW_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.RED_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.BLACK_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.BLUE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.BROWN_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.CYAN_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.GRAY_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.GREEN_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.LIGHT_BLUE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.LIGHT_GRAY_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.LIME_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.MAGENTA_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.ORANGE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.PINK_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.PURPLE_BED, 3, 1, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BROWN_DYE, 12, 16, 30), new VillagerTrades.b(Items.PURPLE_DYE, 12, 16, 30), new VillagerTrades.b(Items.BLUE_DYE, 12, 16, 30), new VillagerTrades.b(Items.GREEN_DYE, 12, 16, 30), new VillagerTrades.b(Items.MAGENTA_DYE, 12, 16, 30), new VillagerTrades.b(Items.CYAN_DYE, 12, 16, 30), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 12, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.PAINTING, 2, 3, 30)})));
|
||||
hashmap.put(VillagerProfession.FLETCHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STICK, 32, 16, 2), new VillagerTrades.h(Items.ARROW, 1, 16, 1), new VillagerTrades.g(Blocks.GRAVEL, 10, Items.FLINT, 10, 12, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FLINT, 26, 12, 10), new VillagerTrades.h(Items.BOW, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 14, 16, 20), new VillagerTrades.h(Items.CROSSBOW, 3, 1, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FEATHER, 24, 16, 30), new VillagerTrades.e(Items.BOW, 2, 3, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.dE, 8, 12, 30), new VillagerTrades.e(Items.CROSSBOW, 3, 3, 15), new VillagerTrades.j(Items.ARROW, 5, Items.TIPPED_ARROW, 5, 2, 12, 30)})));
|
||||
- hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 9, 1, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pR, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build()));
|
||||
+ hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.<Integer, VillagerTrades.IMerchantRecipeOption[]>builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 9, 1, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pR, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build())); // Paper - decompile fix
|
||||
hashmap.put(VillagerProfession.CARTOGRAPHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.h(Items.MAP, 7, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.df, 11, 16, 10), new VillagerTrades.k(13, "Monument", MapIcon.Type.MONUMENT, 12, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COMPASS, 1, 12, 20), new VillagerTrades.k(14, "Mansion", MapIcon.Type.MANSION, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.ITEM_FRAME, 7, 1, 15), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GLOBE_BANNER_PATTERN, 8, 1, 30)})));
|
||||
hashmap.put(VillagerProfession.FLETCHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STICK, 32, 16, 2), new VillagerTrades.h(Items.ARROW, 1, 16, 1), new VillagerTrades.g(Blocks.GRAVEL, 10, Items.FLINT, 10, 12, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FLINT, 26, 12, 10), new VillagerTrades.h(Items.BOW, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 14, 16, 20), new VillagerTrades.h(Items.CROSSBOW, 3, 1, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FEATHER, 24, 16, 30), new VillagerTrades.e(Items.BOW, 2, 3, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.es, 8, 12, 30), new VillagerTrades.e(Items.CROSSBOW, 3, 3, 15), new VillagerTrades.j(Items.ARROW, 5, Items.TIPPED_ARROW, 5, 2, 12, 30)})));
|
||||
- hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 9, 1, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.rj, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.az, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build()));
|
||||
+ hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.<Integer, IMerchantRecipeOption[]>builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 9, 1, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.rj, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.az, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build())); // Integer, IMerchantRecipeOption[]
|
||||
hashmap.put(VillagerProfession.CARTOGRAPHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.h(Items.MAP, 7, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.dP, 11, 16, 10), new VillagerTrades.k(13, StructureGenerator.MONUMENT, MapIcon.Type.MONUMENT, 12, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COMPASS, 1, 12, 20), new VillagerTrades.k(14, StructureGenerator.MANSION, MapIcon.Type.MANSION, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.ITEM_FRAME, 7, 1, 15), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GLOBE_BANNER_PATTERN, 8, 1, 30)})));
|
||||
hashmap.put(VillagerProfession.CLERIC, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.ROTTEN_FLESH, 32, 16, 2), new VillagerTrades.h(Items.REDSTONE, 1, 2, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.GOLD_INGOT, 3, 12, 10), new VillagerTrades.h(Items.LAPIS_LAZULI, 1, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.RABBIT_FOOT, 2, 12, 20), new VillagerTrades.h(Blocks.GLOWSTONE, 4, 1, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SCUTE, 4, 12, 30), new VillagerTrades.b(Items.GLASS_BOTTLE, 9, 12, 30), new VillagerTrades.h(Items.ENDER_PEARL, 5, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.NETHER_WART, 22, 12, 30), new VillagerTrades.h(Items.EXPERIENCE_BOTTLE, 3, 1, 30)})));
|
||||
hashmap.put(VillagerProfession.ARMORER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COAL, 15, 16, 2), new VillagerTrades.h(new ItemStack(Items.IRON_LEGGINGS), 7, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_BOOTS), 4, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_HELMET), 5, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_CHESTPLATE), 9, 1, 12, 1, 0.2F)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.IRON_INGOT, 4, 12, 10), new VillagerTrades.h(new ItemStack(Items.pQ), 36, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_BOOTS), 1, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_LEGGINGS), 3, 1, 12, 5, 0.2F)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.LAVA_BUCKET, 1, 12, 20), new VillagerTrades.b(Items.DIAMOND, 1, 12, 20), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_HELMET), 1, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_CHESTPLATE), 4, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.SHIELD), 5, 1, 12, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_LEGGINGS, 14, 3, 15, 0.2F), new VillagerTrades.e(Items.DIAMOND_BOOTS, 8, 3, 15, 0.2F)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_HELMET, 8, 3, 30, 0.2F), new VillagerTrades.e(Items.DIAMOND_CHESTPLATE, 16, 3, 30, 0.2F)})));
|
||||
hashmap.put(VillagerProfession.ARMORER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COAL, 15, 16, 2), new VillagerTrades.h(new ItemStack(Items.IRON_LEGGINGS), 7, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_BOOTS), 4, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_HELMET), 5, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_CHESTPLATE), 9, 1, 12, 1, 0.2F)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.IRON_INGOT, 4, 12, 10), new VillagerTrades.h(new ItemStack(Items.ri), 36, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_BOOTS), 1, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_LEGGINGS), 3, 1, 12, 5, 0.2F)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.LAVA_BUCKET, 1, 12, 20), new VillagerTrades.b(Items.DIAMOND, 1, 12, 20), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_HELMET), 1, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_CHESTPLATE), 4, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.SHIELD), 5, 1, 12, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_LEGGINGS, 14, 3, 15, 0.2F), new VillagerTrades.e(Items.DIAMOND_BOOTS, 8, 3, 15, 0.2F)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_HELMET, 8, 3, 30, 0.2F), new VillagerTrades.e(Items.DIAMOND_CHESTPLATE, 16, 3, 30, 0.2F)})));
|
||||
diff --git a/src/main/java/net/minecraft/server/VoxelShapeMergerList.java b/src/main/java/net/minecraft/server/VoxelShapeMergerList.java
|
||||
index e8daa74986f07163fd5318f431398b4f0efde6e8..71d2ae2a9c5a05351241b5a313e66ca15b0624ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/VoxelShapeMergerList.java
|
||||
|
@ -685,18 +662,6 @@ index e8daa74986f07163fd5318f431398b4f0efde6e8..71d2ae2a9c5a05351241b5a313e66ca1
|
|||
this.b.add(i - 1);
|
||||
this.c.add(j - 1);
|
||||
this.a.add(d1);
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java b/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java
|
||||
index 555cf6be79985b686eb71cffe25453648f4cbc17..22e14fe1e98c8439f8db74c9464137a497fdaf7c 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java
|
||||
@@ -40,6 +40,6 @@ public class WorldGenFeatureStateProviderWeighted extends WorldGenFeatureStatePr
|
||||
builder.put(dynamicops.createString("type"), dynamicops.createString(IRegistry.t.getKey(this.a).toString())).put(dynamicops.createString("entries"), this.b.a(dynamicops, (iblockdata) -> {
|
||||
return IBlockData.a(dynamicops, iblockdata);
|
||||
}));
|
||||
- return (new Dynamic(dynamicops, dynamicops.createMap(builder.build()))).getValue();
|
||||
+ return (new Dynamic<T>(dynamicops, dynamicops.createMap(builder.build()))).getValue(); // Paper - decompile fix
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
|
||||
index 55fe7625af2207062f69188e9ab345ea68fac6ca..19e68a78310de787bca701bc2597c64e34a77d7c 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -19,10 +19,10 @@ index 41c79650b169b87fbc70cf502438a5453a04f23d..b839769ceae8932bb121a0b96fde1e7d
|
|||
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
|
||||
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 7e01f6a1807f9885a7f4b163ce6bb626d8786a9a..6c7816fdc1ef476969cb70c8ea697b60746d6ab4 100644
|
||||
index 1512b23034b0ec95e2c72b9dd1c7b0a80d611e15..06165a668c96d25f3a863f5c98eae93240fd56fc 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
@@ -50,7 +50,7 @@ import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -31,7 +31,7 @@ index 7e01f6a1807f9885a7f4b163ce6bb626d8786a9a..6c7816fdc1ef476969cb70c8ea697b60
|
|||
|
||||
// CraftBukkit start
|
||||
private static final int CURRENT_LEVEL = 2;
|
||||
@@ -1708,12 +1708,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
||||
@@ -1671,12 +1671,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -63,18 +63,18 @@ index 7e01f6a1807f9885a7f4b163ce6bb626d8786a9a..6c7816fdc1ef476969cb70c8ea697b60
|
|||
+ // Paper end
|
||||
}
|
||||
|
||||
protected abstract void a(NBTTagCompound nbttagcompound);
|
||||
protected abstract void loadData(NBTTagCompound nbttagcompound);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index 4328273b1fca165320097dbac0650b31fae4e5ca..8427ee2ee8b90d5deb686412bb2eefb9a574b75a 100644
|
||||
index 9a772e40ad8f9858e6278b99d9d1ff5dc54513cb..b9fe08301409bc1f0d61a7566c26e720ff720d80 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -237,6 +237,7 @@ public class EntityTypes<T extends Entity> {
|
||||
@@ -248,6 +248,7 @@ public class EntityTypes<T extends Entity> {
|
||||
}
|
||||
}
|
||||
|
||||
+ public boolean isPersistable() { return a(); } // Paper - OBFHELPER
|
||||
public boolean a() {
|
||||
return this.bc;
|
||||
return this.bh;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java
|
||||
new file mode 100644
|
||||
|
@ -92,7 +92,7 @@ index 0000000000000000000000000000000000000000..743142d0303fa25fe48a2abb07040d12
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index 40752f7617d5aa6b5ae55cd9a1b2eeb57c276adb..9071bb7ece6d38d85b4ea11e53671f3ec5210b28 100644
|
||||
index 6d06812f5fb6366ccd2673e9155be869b9bc0f6d..3cae7ef750371cee741c2f27799c1bb5864a278a 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -11,7 +11,7 @@ import org.bukkit.inventory.InventoryHolder;
|
||||
|
|
|
@ -8,19 +8,10 @@ This enables us a fast reference to the entities current chunk instead
|
|||
of having to look it up by hashmap lookups.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 9397b58f047c837f8a9146723e4cd9a4d6b787a7..e1ac0c479ebfa2da69575db2032dd1415c4a41a5 100644
|
||||
index 7c7826cf3adb19814984ab627e4c4726d8933244..bd92ed2e6d4766f4f16ec3002c41b36b5a7e0358 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -29,7 +29,7 @@ public class Chunk implements IChunkAccess {
|
||||
private final ChunkSection[] sections;
|
||||
private BiomeStorage d;
|
||||
private final Map<BlockPosition, NBTTagCompound> e;
|
||||
- public boolean loaded;
|
||||
+ public boolean loaded; public boolean isLoaded() { return loaded; } // Paper - OBFHELPER
|
||||
public final World world;
|
||||
public final Map<HeightMap.Type, HeightMap> heightMap;
|
||||
private final ChunkConverter i;
|
||||
@@ -55,11 +55,36 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -56,11 +56,36 @@ public class Chunk implements IChunkAccess {
|
||||
this(world, chunkcoordintpair, biomestorage, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null);
|
||||
}
|
||||
|
||||
|
@ -58,7 +49,7 @@ index 9397b58f047c837f8a9146723e4cd9a4d6b787a7..e1ac0c479ebfa2da69575db2032dd141
|
|||
this.l = Maps.newHashMap();
|
||||
this.m = Maps.newHashMap();
|
||||
this.n = new ShortList[16];
|
||||
@@ -465,6 +490,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -466,6 +491,7 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
|
||||
entity.inChunk = true;
|
||||
|
@ -66,7 +57,7 @@ index 9397b58f047c837f8a9146723e4cd9a4d6b787a7..e1ac0c479ebfa2da69575db2032dd141
|
|||
entity.chunkX = this.loc.x;
|
||||
entity.chunkY = k;
|
||||
entity.chunkZ = this.loc.z;
|
||||
@@ -477,6 +503,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -478,6 +504,7 @@ public class Chunk implements IChunkAccess {
|
||||
((HeightMap) this.heightMap.get(heightmap_type)).a(along);
|
||||
}
|
||||
|
||||
|
@ -74,7 +65,7 @@ index 9397b58f047c837f8a9146723e4cd9a4d6b787a7..e1ac0c479ebfa2da69575db2032dd141
|
|||
public void b(Entity entity) {
|
||||
this.a(entity, entity.chunkY);
|
||||
}
|
||||
@@ -490,7 +517,12 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -491,7 +518,12 @@ public class Chunk implements IChunkAccess {
|
||||
i = this.entitySlices.length - 1;
|
||||
}
|
||||
|
||||
|
@ -89,28 +80,19 @@ index 9397b58f047c837f8a9146723e4cd9a4d6b787a7..e1ac0c479ebfa2da69575db2032dd141
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 6c7816fdc1ef476969cb70c8ea697b60746d6ab4..0d8262b1d2722e716f95db4c9a8a132c54b613cf 100644
|
||||
index 06165a668c96d25f3a863f5c98eae93240fd56fc..62814197d32f9daf4e6b6aad26920589589efd75 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -134,7 +134,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
private static final DataWatcherObject<Boolean> aB = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
|
||||
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
|
||||
protected static final DataWatcherObject<EntityPose> POSE = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
|
||||
- public boolean inChunk;
|
||||
+ public boolean inChunk; public boolean isAddedToChunk() { return inChunk; } // Paper - OBFHELPER
|
||||
public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER
|
||||
public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER
|
||||
public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER
|
||||
@@ -178,7 +178,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -179,7 +179,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
public boolean isChunkLoaded() {
|
||||
- return world.isChunkLoaded((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4);
|
||||
- return world.isChunkLoaded((int) Math.floor(this.locX()) >> 4, (int) Math.floor(this.locZ()) >> 4);
|
||||
+ return getCurrentChunk() != null;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -1709,6 +1709,43 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1672,6 +1672,23 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
// Paper start
|
||||
|
@ -124,38 +106,18 @@ index 6c7816fdc1ef476969cb70c8ea697b60746d6ab4..0d8262b1d2722e716f95db4c9a8a132c
|
|||
+ */
|
||||
+ public Chunk getCurrentChunk() {
|
||||
+ final Chunk chunk = currentChunk != null ? currentChunk.get() : null;
|
||||
+ if (chunk != null && chunk.isLoaded()) {
|
||||
+ if (chunk != null && chunk.loaded) {
|
||||
+ return chunk;
|
||||
+ }
|
||||
+
|
||||
+ return !isAddedToChunk() ? null : ((ChunkProviderServer) world.chunkProvider).getChunkAtIfLoadedMainThreadNoCache(getChunkX(), getChunkZ());
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the chunk at the location, using the entities local cache if avail
|
||||
+ * Will only return null if the location specified is not loaded
|
||||
+ */
|
||||
+ public Chunk getCurrentChunkAt(int x, int z) {
|
||||
+ Chunk chunk = getCurrentChunk();
|
||||
+ if (chunk != null && getChunkX() == chunk.getPos().x && getChunkZ() == chunk.getPos().z) {
|
||||
+ return chunk;
|
||||
+ }
|
||||
+ return ((ChunkProviderServer) world.chunkProvider).getChunkAtIfLoadedMainThreadNoCache(getChunkX(), getChunkZ());
|
||||
+ }
|
||||
+ /**
|
||||
+ * Returns the chunk at the entities current location, using the entities local cache if avail
|
||||
+ * Ideally this is always the same as getCurrentChunk, but only becomes different in registration issues.
|
||||
+ * Will only return null if the location specified is not loaded
|
||||
+ */
|
||||
+ public Chunk getChunkAtLocation() {
|
||||
+ return getCurrentChunkAt((int)Math.floor(locX) >> 4, (int)Math.floor(locZ) >> 4);
|
||||
+ return !inChunk ? null : ((WorldServer)world).getChunkProvider().getChunkAtIfLoadedMainThreadNoCache(getChunkX(), getChunkZ());
|
||||
+ }
|
||||
+
|
||||
private MinecraftKey entityKey;
|
||||
private String entityKeyString;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index 9071bb7ece6d38d85b4ea11e53671f3ec5210b28..820180ab3f7053c348caa80cc21f15dfa3d26afd 100644
|
||||
index 3cae7ef750371cee741c2f27799c1bb5864a278a..f4d88de468e7843585eb5c722c9e94f5d2b47e6a 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -51,6 +51,15 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||
|
@ -175,10 +137,10 @@ index 9071bb7ece6d38d85b4ea11e53671f3ec5210b28..820180ab3f7053c348caa80cc21f15df
|
|||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 27e2379f2dd6e9e06ae7a973ab8654cdcacf66c0..9672dd7c2166bba88832b1743b97e16561fe434c 100644
|
||||
index 305de86630b442fe1fa27431fca1ac989d16dc61..e867168be3c17548490f30944ca56a635cc3b054 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -137,6 +137,7 @@ import net.minecraft.server.EntityZombieHusk;
|
||||
@@ -141,6 +141,7 @@ import net.minecraft.server.EntityZombieHusk;
|
||||
import net.minecraft.server.EntityZombieVillager;
|
||||
import net.minecraft.server.IChatBaseComponent;
|
||||
import net.minecraft.server.NBTTagCompound;
|
||||
|
@ -186,7 +148,7 @@ index 27e2379f2dd6e9e06ae7a973ab8654cdcacf66c0..9672dd7c2166bba88832b1743b97e165
|
|||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Server;
|
||||
@@ -178,6 +179,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -182,6 +183,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type
|
|||
Opens door for future patches to optimize performance
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index e1ac0c479ebfa2da69575db2032dd1415c4a41a5..f1b9b937e8ced0c718db463c94d716422113c396 100644
|
||||
index bd92ed2e6d4766f4f16ec3002c41b36b5a7e0358..eb08c7467595394fff9adf4f162aba9d71d7a7c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -56,15 +56,19 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -57,15 +57,19 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
|
||||
// Paper start
|
||||
|
@ -29,7 +29,7 @@ index e1ac0c479ebfa2da69575db2032dd1415c4a41a5..f1b9b937e8ced0c718db463c94d71642
|
|||
}
|
||||
return replaced;
|
||||
}
|
||||
@@ -74,6 +78,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -75,6 +79,7 @@ public class Chunk implements IChunkAccess {
|
||||
TileEntity removed = super.remove(key);
|
||||
if (removed != null) {
|
||||
removed.setCurrentChunk(null);
|
||||
|
@ -37,7 +37,7 @@ index e1ac0c479ebfa2da69575db2032dd1415c4a41a5..f1b9b937e8ced0c718db463c94d71642
|
|||
}
|
||||
return removed;
|
||||
}
|
||||
@@ -489,6 +494,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -490,6 +495,7 @@ public class Chunk implements IChunkAccess {
|
||||
k = this.entitySlices.length - 1;
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ index e1ac0c479ebfa2da69575db2032dd1415c4a41a5..f1b9b937e8ced0c718db463c94d71642
|
|||
entity.inChunk = true;
|
||||
entity.setCurrentChunk(this); // Paper
|
||||
entity.chunkX = this.loc.x;
|
||||
@@ -522,6 +528,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -523,6 +529,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (!this.entitySlices[i].remove(entity)) {
|
||||
return;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -23,23 +23,23 @@ index a738657394bcccd859ef260a801736d44b234469..098bd3fba867c0e4c6c58748aa6e2e63
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
index 1e1d02dc73ea193fca69b26e4c51efd845713d2f..e0974e256f0f10e047b9eb8e362982c6578d2d98 100644
|
||||
index 4a3049575ad78e1c75d1b43a35311974c1d489de..13e4517bd04096001ca1caf32b9949abb3cf9c7f 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
@@ -30,7 +30,7 @@ public class BlockCactus extends Block {
|
||||
;
|
||||
}
|
||||
@@ -35,7 +35,7 @@ public class BlockCactus extends Block {
|
||||
;
|
||||
}
|
||||
|
||||
- if (i < 3) {
|
||||
- if (i < 3) {
|
||||
+ if (i < worldserver.paperConfig.cactusMaxHeight) { // Paper - Configurable growth height
|
||||
int j = (Integer) iblockdata.get(BlockCactus.AGE);
|
||||
int j = (Integer) iblockdata.get(BlockCactus.AGE);
|
||||
|
||||
if (j >= (byte) range(3, ((100.0F / worldserver.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
|
||||
if (j >= (byte) range(3, ((100.0F / worldserver.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
|
||||
index 2106b0b49f19f56fd446c2c6cec63526eb74fdb7..55b07444e1d769952f2a411b1b5d1032565af8a1 100644
|
||||
index 30282f73d263a96a14bd7bf7d3ac520e315b093a..c051decd19ff763a061822bc2a4b03289dfe3ac7 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockReed.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockReed.java
|
||||
@@ -29,7 +29,7 @@ public class BlockReed extends Block {
|
||||
@@ -35,7 +35,7 @@ public class BlockReed extends Block {
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,27 +25,27 @@ index 098bd3fba867c0e4c6c58748aa6e2e632737a948..912611cf1aeccf5a82a789aab07d7672
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index 95d238c82114621cb4e24b4488bba36cb828c241..83d5731b7f964136edf7cfabb96421e0788d067a 100644
|
||||
index 5bc0a591ab359785e46648604000eac116e7e37e..b808477cea6bf704edfaf08a2d0366bf263e69aa 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -21,7 +21,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -21,7 +21,7 @@ import org.bukkit.event.entity.EntityTransformEvent;
|
||||
public class EntityZombie extends EntityMonster {
|
||||
|
||||
protected static final IAttribute d = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
|
||||
private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
|
||||
- private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, AttributeModifier.Operation.MULTIPLY_BASE);
|
||||
+ private final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", world.paperConfig.babyZombieMovementModifier, AttributeModifier.Operation.MULTIPLY_BASE); private final AttributeModifier babyModifier = this.c; // Paper - remove static - Make baby speed configurable
|
||||
private static final DataWatcherObject<Boolean> bw = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
||||
private static final DataWatcherObject<Integer> bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
|
||||
+ private final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, AttributeModifier.Operation.MULTIPLY_BASE); private final AttributeModifier babyModifier = this.c; // Paper - remove static - Make baby speed configurable
|
||||
private static final DataWatcherObject<Boolean> d = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
||||
private static final DataWatcherObject<Integer> bv = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
|
||||
public static final DataWatcherObject<Boolean> DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
||||
@@ -129,9 +129,9 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -123,9 +123,9 @@ public class EntityZombie extends EntityMonster {
|
||||
if (this.world != null && !this.world.isClientSide) {
|
||||
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
||||
AttributeModifiable attributemodifiable = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
||||
|
||||
- attributeinstance.removeModifier(EntityZombie.c);
|
||||
+ attributeinstance.removeModifier(this.babyModifier); // Paper
|
||||
- attributemodifiable.removeModifier(EntityZombie.c);
|
||||
+ attributemodifiable.removeModifier(this.babyModifier); // Paper
|
||||
if (flag) {
|
||||
- attributeinstance.addModifier(EntityZombie.c);
|
||||
+ attributeinstance.addModifier(this.babyModifier); // Paper
|
||||
- attributemodifiable.b(EntityZombie.c);
|
||||
+ attributemodifiable.b(this.babyModifier); // Paper
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,17 +22,17 @@ index 912611cf1aeccf5a82a789aab07d76723d4357cc..7d9976ce6bf86e6fdfd0c7770104cee0
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
index 7be189f7428886058982774028de6adbd384fafd..40bdcf4e75bb36385e82ba8b8f2471760072705a 100644
|
||||
index b0f3b30944b7741ef1d9af21e919ff2df9c510a3..ab8f67c11419cc788fc3cb814d2224e65217dd08 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
@@ -326,8 +326,9 @@ public class EntityFishingHook extends Entity {
|
||||
this.aq = MathHelper.nextInt(this.random, 20, 80);
|
||||
@@ -338,8 +338,9 @@ public class EntityFishingHook extends IProjectile {
|
||||
this.ap = MathHelper.nextInt(this.random, 20, 80);
|
||||
}
|
||||
} else {
|
||||
- this.ap = MathHelper.nextInt(this.random, 100, 600);
|
||||
+ this.ap = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper
|
||||
this.ap -= this.au * 20 * 5;
|
||||
+ this.ap = Math.max(0, this.ap); // Paper - Don't allow negative values
|
||||
- this.ao = MathHelper.nextInt(this.random, 100, 600);
|
||||
+ this.ao = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper
|
||||
this.ao -= this.av * 20 * 5;
|
||||
+ this.ao = Math.max(0, this.ao); // Paper - Don't allow negative values;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,43 +31,30 @@ index 2e869004c8c6b8bfbb002fb4eda04519d50390c8..8a6856e0fd7b9b515d98f45aaabefbc3
|
|||
this.b.setJumping(this.a);
|
||||
this.a = false;
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 19d68aa4585ccfc156e9db6024b7a99bbeca4de4..2a449ec40a725b01a7bf572ae119c2197944ecbc 100644
|
||||
index a25e9ce6d536c8c276750bfd56ac73a2dbaf7202..748193697235755ba778126dd693526ece0bf46d 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1104,6 +1104,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1025,6 +1025,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return this.isInWater() || this.isInRain();
|
||||
}
|
||||
|
||||
+ public boolean isInWaterOrRainOrBubble() { return ay(); } // Paper - OBFHELPER
|
||||
public boolean ay() {
|
||||
return this.isInWater() || this.isInRain() || this.l();
|
||||
+ public boolean isInWaterOrRainOrBubble() { return aC(); } // Paper - OBFHELPER
|
||||
public boolean aC() {
|
||||
return this.isInWater() || this.isInRain() || this.k();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
index 1cc66108d0f799eef6ee984e8f65a9a46e337785..538c2169cd53d364b941ad1251df3731f77b3a2c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
@@ -171,7 +171,7 @@ public class EntityEnderman extends EntityMonster {
|
||||
@Override
|
||||
protected void mobTick() {
|
||||
if (this.ay()) {
|
||||
- this.damageEntity(DamageSource.DROWN, 1.0F);
|
||||
+ this.damageEntity(DamageSource.DROWN, 1.0F); // Paper - copied in patch 13 (allow nerfed mobs to jump, float and take water damage)
|
||||
}
|
||||
|
||||
if (this.world.isDay() && this.ticksLived >= this.bA + 600) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 0b06fa2b664830d40cdb93968bc2f8c98415d1bf..70cd0801dc62dc0b15a75869b375353db8a9ae46 100644
|
||||
index e5455d99e3f5607a5754e5760d42853a62dddb82..b9732287ba16d90bed33929348a223f6dbdbfb45 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -32,6 +32,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -33,6 +33,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
private final EntityAIBodyControl c;
|
||||
protected NavigationAbstract navigation;
|
||||
public PathfinderGoalSelector goalSelector;
|
||||
+ @Nullable public PathfinderGoalFloat goalFloat; // Paper
|
||||
public PathfinderGoalSelector targetSelector;
|
||||
private EntityLiving goalTarget;
|
||||
private final EntitySenses bw;
|
||||
@@ -648,7 +649,17 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
private final EntitySenses bv;
|
||||
@@ -719,7 +720,17 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@Override
|
||||
protected final void doTick() {
|
||||
++this.ticksFarFromPlayer;
|
||||
|
@ -84,13 +71,13 @@ index 0b06fa2b664830d40cdb93968bc2f8c98415d1bf..70cd0801dc62dc0b15a75869b375353d
|
|||
+ }
|
||||
+ // Paper end
|
||||
this.world.getMethodProfiler().enter("sensing");
|
||||
this.bw.a();
|
||||
this.bv.a();
|
||||
this.world.getMethodProfiler().exit();
|
||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||
index 0f0dc7277f28a96711ab81e6bbf2dd7d1c212f25..43908b0400933119de9bcfe4240853e4fce7ec6f 100644
|
||||
index d0281a98a318376922b5bd8fcad7ba7db2012b54..e2b23978e347fe63e8bc900b72da6cbaf27bf652 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||
@@ -8,10 +8,12 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
||||
@@ -8,15 +8,18 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
||||
|
||||
public PathfinderGoalFloat(EntityInsentient entityinsentient) {
|
||||
this.a = entityinsentient;
|
||||
|
@ -102,9 +89,7 @@ index 0f0dc7277f28a96711ab81e6bbf2dd7d1c212f25..43908b0400933119de9bcfe4240853e4
|
|||
+ public final boolean validConditions() { return this.a(); } // Paper - OBFHELPER
|
||||
@Override
|
||||
public boolean a() {
|
||||
double d0 = (double) this.a.getHeadHeight() < 0.4D ? 0.2D : 0.4D;
|
||||
@@ -19,6 +21,7 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
||||
return this.a.isInWater() && this.a.co() > d0 || this.a.aH();
|
||||
return this.a.isInWater() && this.a.b((Tag) TagsFluid.WATER) > this.a.cw() || this.a.aN();
|
||||
}
|
||||
|
||||
+ public void update() { this.e(); } // Paper - OBFHELPER
|
||||
|
|
|
@ -30,20 +30,23 @@ index 6d6a68cb1b952da8308ac9ce5b54694bc9ba0e30..2845686411615245137cfe1a155088a8
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 70cd0801dc62dc0b15a75869b375353db8a9ae46..23995b68a17b87b90962c4c12aa37e3a254073b5 100644
|
||||
index b9732287ba16d90bed33929348a223f6dbdbfb45..885b97f9397753e7561f113f588b4ca2d5edb0fe 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -630,11 +630,11 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
if (entityhuman != null) {
|
||||
double d0 = entityhuman.h(this);
|
||||
@@ -698,14 +698,14 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
int i = this.getEntityType().e().f();
|
||||
int j = i * i;
|
||||
|
||||
- if (d0 > 16384.0D) { // CraftBukkit - remove isTypeNotPersistent() check
|
||||
+ if (d0 > world.paperConfig.hardDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances
|
||||
- if (d0 > (double) j) { // CraftBukkit - remove isTypeNotPersistent() check
|
||||
+ if (d0 > (double) world.paperConfig.hardDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances
|
||||
this.die();
|
||||
}
|
||||
|
||||
- if (this.ticksFarFromPlayer > 600 && this.random.nextInt(800) == 0 && d0 > 1024.0D) { // CraftBukkit - remove isTypeNotPersistent() check
|
||||
int k = this.getEntityType().e().g();
|
||||
int l = k * k;
|
||||
|
||||
- if (this.ticksFarFromPlayer > 600 && this.random.nextInt(800) == 0 && d0 > (double) l) { // CraftBukkit - remove isTypeNotPersistent() check
|
||||
+ if (this.ticksFarFromPlayer > 600 && this.random.nextInt(800) == 0 && d0 > world.paperConfig.softDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances
|
||||
this.die();
|
||||
} else if (d0 < 1024.0D) {
|
||||
} else if (d0 < (double) l) {
|
||||
this.ticksFarFromPlayer = 0;
|
||||
|
|
|
@ -20,10 +20,10 @@ index 2845686411615245137cfe1a155088a865a4d3a0..8ee2b9bb1bce698fce50ac1b3fc477fc
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index a126a6d22ccee90d0aadb8513bda60455a703bf6..13a759bc823f12daba3de367255079095b2b6df3 100644
|
||||
index 8a7ce347c35e0527471b3b586a248d6497c3b75d..39b276166b1b20804821bd64fff3b7c942e0cfcf 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -142,6 +142,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -157,6 +157,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
});
|
||||
// CraftBukkit end
|
||||
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
|
||||
|
|
|
@ -24,10 +24,10 @@ index 8ee2b9bb1bce698fce50ac1b3fc477fcafd0542c..d59b82b7bb1f6d1b231f4e394e0a67a3
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 2a449ec40a725b01a7bf572ae119c2197944ecbc..0d617c8e09cf0adf0d7aa8c95fc69c641f91b795 100644
|
||||
index 748193697235755ba778126dd693526ece0bf46d..0f40d8505edda1bb01b5212e2d2fdf07fbfa302b 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1819,6 +1819,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1762,6 +1762,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return this.a(itemstack, 0.0F);
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ index 2a449ec40a725b01a7bf572ae119c2197944ecbc..0d617c8e09cf0adf0d7aa8c95fc69c64
|
|||
public EntityItem a(ItemStack itemstack, float f) {
|
||||
if (itemstack.isEmpty()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index 4b4e71bf700f13d9719556d4c07316b93aac0fd2..2097ec535e8a4427fc08da02726044b837d5a716 100644
|
||||
index d3e25e3503670804fba67c922c63e0e7f5a9543b..8c51b3060114a24249962c2d6142166ac8600a0a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -85,6 +85,17 @@ public class EntityFallingBlock extends Entity {
|
||||
|
@ -55,10 +55,10 @@ index 4b4e71bf700f13d9719556d4c07316b93aac0fd2..2097ec535e8a4427fc08da02726044b8
|
|||
+ }
|
||||
+ // Paper end
|
||||
if (!this.world.isClientSide) {
|
||||
blockposition = new BlockPosition(this);
|
||||
blockposition = this.getChunkCoordinates();
|
||||
boolean flag = this.block.getBlock() instanceof BlockConcretePowder;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
index d042124362e02a6ec634a16610d4a1ed5ef83284..d9fd4448c707aca8e2040a5848387ce76bbee1df 100644
|
||||
index 5fca541ca8af4a8ed9ec6dacb3d551048b9efbf4..b5900e1cad8137954d5fa4fde10b4afb64fb6412 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
@@ -54,6 +54,12 @@ public class EntityTNTPrimed extends Entity {
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
|
||||
index 3f35a28ba15f4d0dfe1cb2b56f621e81b1fb8c99..cf00f35a5b7c2d2f6b6989e0855de8b882dcef50 100644
|
||||
index aab33df7a36eb69300fedfce733985d6c239ca01..550232cb3819138b3bae0fa1c51429485e8bc593 100644
|
||||
--- a/src/main/java/net/minecraft/server/EULA.java
|
||||
+++ b/src/main/java/net/minecraft/server/EULA.java
|
||||
@@ -70,7 +70,7 @@ public class EULA {
|
||||
|
@ -19,10 +19,10 @@ index 3f35a28ba15f4d0dfe1cb2b56f621e81b1fb8c99..cf00f35a5b7c2d2f6b6989e0855de8b8
|
|||
throwable = throwable1;
|
||||
throw throwable1;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 5429d8eee93980a01cdf008b57e88e1dccc1ef67..b6912f97c2240b0524735e0f8d1937f2e76dba5b 100644
|
||||
index a7579b01d27e367603ba643c390b316bcd9b492b..bcf84fb1edda703f263a96d5ae2f3c7a3707c1ae 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1348,7 +1348,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1222,7 +1222,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
|
@ -32,10 +32,10 @@ index 5429d8eee93980a01cdf008b57e88e1dccc1ef67..b6912f97c2240b0524735e0f8d1937f2
|
|||
|
||||
public CrashReport b(CrashReport crashreport) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 1ceba5f7eae58426834d7042af17f7e3b1990a56..ee749863730cb2228712ceddd4e405a798f73c5e 100644
|
||||
index e7a8d0d02b49863ee3ad325b8be23bae6d3b861c..14f9fe011d45b7339c6475fcadff451126c5b1dc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -199,7 +199,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
@@ -223,7 +223,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
|
@ -45,11 +45,11 @@ index 1ceba5f7eae58426834d7042af17f7e3b1990a56..ee749863730cb2228712ceddd4e405a7
|
|||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index daa65aaf8c9616e5e058f3337fc4fc0895d13364..524c1d4c6d8a45620d534f23f67d75fd8988918b 100644
|
||||
index 3d15661eb1f15f74213ecb7e8eceb1f231ad2c1c..a111987658a6d89fc3fe970b1db37a7f3517b9bd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -200,12 +200,25 @@ public class Main {
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -21);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
System.err.println("*** Error, this build is outdated ***");
|
||||
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
|
||||
|
@ -73,7 +73,7 @@ index daa65aaf8c9616e5e058f3337fc4fc0895d13364..524c1d4c6d8a45620d534f23f67d75fd
|
|||
+ // Paper end
|
||||
+
|
||||
System.out.println("Loading libraries, please wait...");
|
||||
MinecraftServer.main(options);
|
||||
net.minecraft.server.Main.main(options);
|
||||
} catch (Throwable t) {
|
||||
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
index 54fa83c127bf2f8fe30295864f5f73cf6248ad28..73fa74e3cc0239a38cd2ba41b3e9e991a5c4ebf9 100644
|
||||
|
|
|
@ -126,7 +126,7 @@ index 0000000000000000000000000000000000000000..5deed3e25ff41ab0a4015a5fd0c1e952
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index f647450b8c6977b4a6bb1819b34052c4ae2fe0f4..79ddf03c7f3afc868cb73ee4c000fc879ede90d8 100644
|
||||
index 9beaa1574ede9893f3adf782b52c9a70c1a19e09..9f2903c8623976ae71802ab56ff2e0e3ee9089b7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -309,6 +309,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
|
|
@ -192,14 +192,14 @@ index 0000000000000000000000000000000000000000..aac3f66cb23d260729c2a48d8710a9de
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index d6646d7e61b63c116fa87951b0ef3131b68ebe97..4b1f8c53737f998fa57859146d5ddb999cdc8d41 100644
|
||||
index 4cf4ef11ce295aec3b7d0bf07b64a1ecdca3c39a..b091db5901d75769e406c454b205f102c82ca021 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -180,6 +180,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@@ -156,6 +156,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
return false;
|
||||
}
|
||||
com.destroystokyo.paper.PaperConfig.registerCommands();
|
||||
+ com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
// Paper end
|
||||
|
||||
this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals);
|
||||
this.setPVP(dedicatedserverproperties.pvp);
|
||||
|
|
|
@ -5,11 +5,11 @@ Subject: [PATCH] Player affects spawning API
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index 1228b73bd433c59b0b1503f3be270a9af6aadaa5..1f20fbbf92c9d2937594c924837fff0bb9ee9238 100644
|
||||
index 475a3bcabcb829b04124fe2c3393ec70fe90f4b2..94eab21f0defe90e7ad169c45de1fdd002f35f7a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -71,6 +71,9 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
private final ItemCooldown bW;
|
||||
@@ -70,6 +70,9 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
private final ItemCooldown bT;
|
||||
@Nullable
|
||||
public EntityFishingHook hookedFish;
|
||||
+ // Paper start
|
||||
|
@ -19,23 +19,23 @@ index 1228b73bd433c59b0b1503f3be270a9af6aadaa5..1f20fbbf92c9d2937594c924837fff0b
|
|||
// CraftBukkit start
|
||||
public boolean fauxSleeping;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 23995b68a17b87b90962c4c12aa37e3a254073b5..1732c1ae9537957c51da5e484b55febb6e9f0091 100644
|
||||
index 885b97f9397753e7561f113f588b4ca2d5edb0fe..9715f10c790c0210435622ab9997ac40f98da185 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -627,7 +627,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
} else if (!this.isPersistent() && !this.I()) {
|
||||
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
|
||||
@@ -691,7 +691,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
if (this.world.getDifficulty() == EnumDifficulty.PEACEFUL && this.L()) {
|
||||
this.die();
|
||||
} else if (!this.isPersistent() && !this.isSpecialPersistence()) {
|
||||
- EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
|
||||
+ EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D, IEntitySelector.affectsSpawning); // Paper
|
||||
|
||||
- if (entityhuman != null) {
|
||||
+ if (entityhuman != null && entityhuman.affectsSpawning) { // Paper - Affects Spawning API
|
||||
double d0 = entityhuman.h(this);
|
||||
|
||||
if (d0 > world.paperConfig.hardDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances
|
||||
if (entityhuman != null) {
|
||||
double d0 = entityhuman.h((Entity) this); // CraftBukkit - decompile error
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
|
||||
index 102b3a3c48799e44de760da48425fef9c5278771..08c2a22f7a01df21532e1949ea9d51f78a611cee 100644
|
||||
index f9ae1ffbff3a813226b2081c79abf3b92d07754d..29c0a9c36a1f6727fb9485ab41e04f7dc9db1fe5 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
|
||||
@@ -99,7 +99,7 @@ public class EntitySilverfish extends EntityMonster {
|
||||
@@ -95,7 +95,7 @@ public class EntitySilverfish extends EntityMonster {
|
||||
if (d(entitytypes, generatoraccess, enummobspawn, blockposition, random)) {
|
||||
EntityHuman entityhuman = generatoraccess.a((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, 5.0D, true);
|
||||
|
||||
|
@ -44,11 +44,85 @@ index 102b3a3c48799e44de760da48425fef9c5278771..08c2a22f7a01df21532e1949ea9d51f7
|
|||
} else {
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java
|
||||
index c469b5db81fb040fc27cd2e4f7cd61797f56a62d..48e8b005bd9589135eff03a110ecce8776ab208a 100644
|
||||
--- a/src/main/java/net/minecraft/server/IEntityAccess.java
|
||||
+++ b/src/main/java/net/minecraft/server/IEntityAccess.java
|
||||
@@ -75,8 +75,9 @@ public interface IEntityAccess {
|
||||
}
|
||||
}
|
||||
|
||||
- @Nullable
|
||||
- default EntityHuman a(double d0, double d1, double d2, double d3, @Nullable Predicate<Entity> predicate) {
|
||||
+ default EntityHuman findNearbyPlayer(Entity entity, double d0, @Nullable Predicate<Entity> predicate) { return this.findNearbyPlayer(entity.locX(), entity.locY(), entity.locZ(), d0, predicate); } // Paper
|
||||
+ @Nullable default EntityHuman findNearbyPlayer(double d0, double d1, double d2, double d3, @Nullable Predicate<Entity> predicate) { return a(d0, d1, d2, d3, predicate); } // Paper - OBFHELPER
|
||||
+ @Nullable default EntityHuman a(double d0, double d1, double d2, double d3, @Nullable Predicate<Entity> predicate) { // Paper
|
||||
double d4 = -1.0D;
|
||||
EntityHuman entityhuman = null;
|
||||
Iterator iterator = this.getPlayers().iterator();
|
||||
@@ -109,6 +110,27 @@ public interface IEntityAccess {
|
||||
return this.a(d0, d1, d2, d3, predicate);
|
||||
}
|
||||
|
||||
+ // Paper end
|
||||
+ default boolean isAffectsSpawningPlayerNearby(double d0, double d1, double d2, double d3) {
|
||||
+ Iterator iterator = this.getPlayers().iterator();
|
||||
+ double d4;
|
||||
+ do {
|
||||
+ EntityHuman entityhuman;
|
||||
+ do {
|
||||
+ if (!iterator.hasNext()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ entityhuman = (EntityHuman) iterator.next();
|
||||
+ } while (!IEntitySelector.affectsSpawning.test(entityhuman));
|
||||
+
|
||||
+ d4 = entityhuman.g(d0, d1, d2);
|
||||
+ } while (d3 >= 0.0D && d4 >= d3 * d3);
|
||||
+
|
||||
+ return true;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
default boolean isPlayerNearby(double d0, double d1, double d2, double d3) {
|
||||
Iterator iterator = this.getPlayers().iterator();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
index 37ece74b4265a6f555d2550df7dade416bc7ef84..ed7566591bac72d17b40a940531b7feb1cb8f392 100644
|
||||
--- a/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
@@ -24,6 +24,12 @@ public final class IEntitySelector {
|
||||
return !entity.isSpectator();
|
||||
};
|
||||
|
||||
+ // Paper start
|
||||
+ public static final Predicate<Entity> affectsSpawning = (entity) -> {
|
||||
+ return !entity.isSpectator() && entity.isAlive() && (entity instanceof EntityPlayer) && ((EntityPlayer) entity).affectsSpawning;
|
||||
+ };
|
||||
+ // Paper end
|
||||
+
|
||||
public static Predicate<Entity> a(double d0, double d1, double d2, double d3) {
|
||||
double d4 = d3 * d3;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
index 4f7dc23d67e97f9a2b8983750299fc43b0ed6db9..a4a48dbee002e96a5644d9a033f9f233cc9a6b46 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
@@ -49,7 +49,7 @@ public abstract class MobSpawnerAbstract {
|
||||
private boolean h() {
|
||||
BlockPosition blockposition = this.b();
|
||||
|
||||
- return this.a().isPlayerNearby((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (double) this.requiredPlayerRange);
|
||||
+ return this.a().isAffectsSpawningPlayerNearby((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (double) this.requiredPlayerRange); // Paper
|
||||
}
|
||||
|
||||
public void c() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 48d1397a6846c64dfa372390783ce66827153bf9..2d3f3a2b7f4e6acdf8043befb584fc0752b1ba3a 100644
|
||||
index a86883ad21710f5f550695dd4a8ef826e2e92240..f6da0875d944d89d047bb44c47b51337b15f91a7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1625,7 +1625,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1665,7 +1665,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@Override
|
||||
public String getLocale() {
|
||||
return getHandle().locale;
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove invalid mob spawner tile entities
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 43dc791191cdf2aa3e5cb2768c25e6be4b2cf6b1..ef779879e33c2f64c325afd3cd411032fb0d63f9 100644
|
||||
index 09b4594ae6750252b4b13ed4735dad0d00e2aeec..a803d1093dfa7c7421eda913679766224fda6dcf 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -607,6 +607,10 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -608,6 +608,10 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Optimize TileEntity Ticking
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
|
||||
index 35f4dc75fbc7cccc80453f279a08b286ab32a25a..eb2b6ff8fd86233c434882c69a8890adc9861d4b 100644
|
||||
index 58b1fd7415fdc67be7dc33e7f55c59df83bc996a..cc15686573f3a54ff0145b3486679b772157d191 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
|
||||
@@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||
|
@ -91,7 +91,7 @@ index 35f4dc75fbc7cccc80453f279a08b286ab32a25a..eb2b6ff8fd86233c434882c69a8890ad
|
|||
int newPower = Math.max(0, Math.min(15, this.viewingCount));
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||
index 68737be5e67b52cb1f9f526b58b589ecba14dd6b..ea2d5cdd38b305563e9f979887eb455095928ec9 100644
|
||||
index b37a705e49f64b46c2256a1b6b077c67fa240b0f..9d03a9ae7fe85fdd0550f737246eef2688a51c8e 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||
@@ -1,6 +1,6 @@
|
||||
|
|
|
@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
|
|||
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b6912f97c2240b0524735e0f8d1937f2e76dba5b..c61037c837e29544e3afeb0b23f422073d3f5166 100644
|
||||
index bcf84fb1edda703f263a96d5ae2f3c7a3707c1ae..a0055b2c27179fea9f09d6a70931a8f00d03413a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -160,7 +160,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -143,7 +143,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
public org.bukkit.command.ConsoleCommandSender console;
|
||||
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
|
||||
public ConsoleReader reader;
|
||||
|
@ -24,7 +24,7 @@ index b6912f97c2240b0524735e0f8d1937f2e76dba5b..c61037c837e29544e3afeb0b23f42207
|
|||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
public File bukkitDataPackFolder;
|
||||
@@ -170,7 +170,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -153,7 +153,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// Spigot start
|
||||
public static final int TPS = 20;
|
||||
public static final int TICK_TIME = 1000000000 / TPS;
|
||||
|
@ -33,7 +33,7 @@ index b6912f97c2240b0524735e0f8d1937f2e76dba5b..c61037c837e29544e3afeb0b23f42207
|
|||
public final double[] recentTps = new double[ 3 ];
|
||||
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
|
||||
// Spigot end
|
||||
@@ -781,6 +781,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -805,6 +805,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
{
|
||||
return ( avg * exp ) + ( tps * ( 1 - exp ) );
|
||||
}
|
||||
|
@ -90,8 +90,8 @@ index b6912f97c2240b0524735e0f8d1937f2e76dba5b..c61037c837e29544e3afeb0b23f42207
|
|||
+ // Paper End
|
||||
// Spigot End
|
||||
|
||||
public void run() {
|
||||
@@ -793,30 +844,38 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
protected void v() {
|
||||
@@ -817,30 +868,38 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
// Spigot start
|
||||
Arrays.fill( recentTps, 20 );
|
||||
|
@ -137,13 +137,13 @@ index b6912f97c2240b0524735e0f8d1937f2e76dba5b..c61037c837e29544e3afeb0b23f42207
|
|||
+ //MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
||||
+ lastTick = curTime;
|
||||
this.nextTick += 50L;
|
||||
if (this.T) {
|
||||
this.T = false;
|
||||
GameProfilerTick gameprofilertick = GameProfilerTick.a("Server");
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ee749863730cb2228712ceddd4e405a798f73c5e..99083a1f36f95a4fb3d67f903d02b84d6ebae3d2 100644
|
||||
index 14f9fe011d45b7339c6475fcadff451126c5b1dc..40019f276abea084b15386f00bde1bfdd5fdae77 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1970,6 +1970,17 @@ public final class CraftServer implements Server {
|
||||
@@ -2021,6 +2021,17 @@ public final class CraftServer implements Server {
|
||||
return CraftMagicNumbers.INSTANCE;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Only refresh abilities if needed
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 2d3f3a2b7f4e6acdf8043befb584fc0752b1ba3a..690d150aa9117be315d624bf5e8131d70c7c59bf 100644
|
||||
index f6da0875d944d89d047bb44c47b51337b15f91a7..5697c624148cf654e68153f08b688842eff3a207 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1314,12 +1314,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1355,12 +1355,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void setFlying(boolean value) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 0d617c8e09cf0adf0d7aa8c95fc69c641f91b795..7e400f4c281a02f038834ac984df4ce35a6a7ec3 100644
|
||||
index 0f40d8505edda1bb01b5212e2d2fdf07fbfa302b..15a7c8c01ad27ad25eec8cb59c20e9fe4e0f0ba6 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -167,6 +167,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -168,6 +168,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
|
||||
public boolean forceExplosionKnockback; // SPIGOT-949
|
||||
public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper
|
||||
|
@ -16,7 +16,7 @@ index 0d617c8e09cf0adf0d7aa8c95fc69c641f91b795..7e400f4c281a02f038834ac984df4ce3
|
|||
// Spigot start
|
||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
@@ -1581,6 +1582,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1542,6 +1543,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.bukkitEntity.storeBukkitValues(nbttagcompound);
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -28,7 +28,7 @@ index 0d617c8e09cf0adf0d7aa8c95fc69c641f91b795..7e400f4c281a02f038834ac984df4ce3
|
|||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
||||
@@ -1695,6 +1701,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1658,6 +1664,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.getBukkitEntity().readBukkitValues(nbttagcompound);
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -42,16 +42,16 @@ index 0d617c8e09cf0adf0d7aa8c95fc69c641f91b795..7e400f4c281a02f038834ac984df4ce3
|
|||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
|
||||
@@ -1776,6 +1789,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1719,6 +1732,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
protected abstract void b(NBTTagCompound nbttagcompound);
|
||||
protected abstract void saveData(NBTTagCompound nbttagcompound);
|
||||
|
||||
+ protected NBTTagList createList(double... adouble) { return a(adouble); } // Paper - OBFHELPER
|
||||
protected NBTTagList a(double... adouble) {
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
double[] adouble1 = adouble;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index 2097ec535e8a4427fc08da02726044b837d5a716..e64722f63bab6bc1ce97ca63d4fde7599f6c1296 100644
|
||||
index 8c51b3060114a24249962c2d6142166ac8600a0a..7c308e0912fb60f8dcdfb36c8a8c8718231858bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -254,6 +254,14 @@ public class EntityFallingBlock extends Entity {
|
||||
|
@ -70,12 +70,12 @@ index 2097ec535e8a4427fc08da02726044b837d5a716..e64722f63bab6bc1ce97ca63d4fde759
|
|||
|
||||
public void a(boolean flag) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
index d9fd4448c707aca8e2040a5848387ce76bbee1df..7f8b8f5a365d44f03cb4dd60a7403721f9859446 100644
|
||||
index b5900e1cad8137954d5fa4fde10b4afb64fb6412..0f4923bce392c8e46f6b256f47d23e15b08e6d62 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
@@ -104,6 +104,14 @@ public class EntityTNTPrimed extends Entity {
|
||||
@Override
|
||||
protected void a(NBTTagCompound nbttagcompound) {
|
||||
protected void loadData(NBTTagCompound nbttagcompound) {
|
||||
this.setFuseTicks(nbttagcompound.getShort("Fuse"));
|
||||
+ // Paper start - Try and load origin location from the old NBT tags for backwards compatibility
|
||||
+ if (nbttagcompound.hasKey("SourceLoc_x")) {
|
||||
|
@ -89,7 +89,7 @@ index d9fd4448c707aca8e2040a5848387ce76bbee1df..7f8b8f5a365d44f03cb4dd60a7403721
|
|||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
index 5406f4c40f86e74f8ed4e7e986b23d19141ddc30..d778eac45de775cf4058621fadb55b1b4e1f3457 100644
|
||||
index ad8a506bb430b26fe147a657a2f826daf9bf4d45..ad4807e0bdd6409bd798f995da8f43cec1d0b385 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
@@ -188,6 +188,7 @@ public class NBTTagList extends NBTList<NBTBase> {
|
||||
|
@ -101,10 +101,10 @@ index 5406f4c40f86e74f8ed4e7e986b23d19141ddc30..d778eac45de775cf4058621fadb55b1b
|
|||
if (i >= 0 && i < this.list.size()) {
|
||||
NBTBase nbtbase = (NBTBase) this.list.get(i);
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 4ab77e8dc0f918bd4f069a0f886d04dea473f046..f8c9e90d2e5bb60795f7957786e56168ff7bf11c 100644
|
||||
index 2b39fb903c1cf6ded8aa170f5bd25f4fadb1195a..db3b35eac5584b8319fc0d4cbb28408b2d0f620b 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1166,6 +1166,11 @@ public class WorldServer extends World {
|
||||
@@ -1088,6 +1088,11 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
this.navigators.add(((EntityInsentient) entity).getNavigation());
|
||||
}
|
||||
entity.valid = true; // CraftBukkit
|
||||
|
@ -117,10 +117,10 @@ index 4ab77e8dc0f918bd4f069a0f886d04dea473f046..f8c9e90d2e5bb60795f7957786e56168
|
|||
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 9672dd7c2166bba88832b1743b97e16561fe434c..3e8ea3a94d0547afc7de4f7b5cd901e93028808d 100644
|
||||
index e867168be3c17548490f30944ca56a635cc3b054..19669d7354d8cfa723e614ac3b471e703ee7feee 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1008,4 +1008,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1016,4 +1016,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return spigot;
|
||||
}
|
||||
// Spigot end
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Prevent tile entity and entity crashes
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index fa6400dccd4df635d696e0858c0c164a0f19b4a4..e2f3cec7420edbd284b531ca7d1d121459fc098c 100644
|
||||
index 03c6a1c95daaa25208917d6985594eb5f182e8e1..ab0f9a9d69c801e47002039c41c7c3393fc2f403 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -194,7 +194,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||
|
@ -23,10 +23,10 @@ index fa6400dccd4df635d696e0858c0c164a0f19b4a4..e2f3cec7420edbd284b531ca7d1d1214
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 13a759bc823f12daba3de367255079095b2b6df3..12e57818687fe359e752f29f2c7d038c2e4a512f 100644
|
||||
index 39b276166b1b20804821bd64fff3b7c942e0cfcf..56d7cf4478a544677a1c537bcd1955913ab83ec5 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -665,11 +665,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -718,11 +718,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
gameprofilerfiller.exit();
|
||||
} catch (Throwable throwable) {
|
||||
|
@ -45,7 +45,7 @@ index 13a759bc823f12daba3de367255079095b2b6df3..12e57818687fe359e752f29f2c7d038c
|
|||
}
|
||||
// Spigot start
|
||||
finally {
|
||||
@@ -735,11 +737,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -788,11 +790,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
try {
|
||||
consumer.accept(entity);
|
||||
} catch (Throwable throwable) {
|
||||
|
|
|
@ -29,10 +29,10 @@ index d59b82b7bb1f6d1b231f4e394e0a67a3d154d7be..f7a0a33e49cadf9b2bd43f118c106937
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 7e400f4c281a02f038834ac984df4ce35a6a7ec3..94b74e0c0eb9495f9b2cb066c86bdedbe247a0cd 100644
|
||||
index 15a7c8c01ad27ad25eec8cb59c20e9fe4e0f0ba6..71f2234fd430ee219da6b3d10b8e679aeac9455c 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -406,9 +406,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -421,9 +421,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.fallDistance *= 0.5F;
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ index 7e400f4c281a02f038834ac984df4ce35a6a7ec3..94b74e0c0eb9495f9b2cb066c86bdedb
|
|||
+ // Extracted to own function
|
||||
+ /*
|
||||
if (this.locY() < -64.0D) {
|
||||
this.af();
|
||||
this.ai();
|
||||
}
|
||||
+ */
|
||||
+ this.performVoidDamage();
|
||||
|
@ -49,15 +49,15 @@ index 7e400f4c281a02f038834ac984df4ce35a6a7ec3..94b74e0c0eb9495f9b2cb066c86bdedb
|
|||
|
||||
if (!this.world.isClientSide) {
|
||||
this.setFlag(0, this.fireTicks > 0);
|
||||
@@ -418,6 +425,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -433,6 +440,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.world.getMethodProfiler().exit();
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ protected void performVoidDamage() {
|
||||
+ if (this.locY < -64.0D || (this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
|
||||
+ if (this.locY() < -64.0D || (this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
|
||||
+ && world.paperConfig.doNetherTopVoidDamage()
|
||||
+ && this.locY >= world.paperConfig.netherVoidTopDamageHeight)) {
|
||||
+ && this.locY() >= world.paperConfig.netherVoidTopDamageHeight)) {
|
||||
+
|
||||
+ this.doVoidDamage();
|
||||
+ }
|
||||
|
@ -67,19 +67,19 @@ index 7e400f4c281a02f038834ac984df4ce35a6a7ec3..94b74e0c0eb9495f9b2cb066c86bdedb
|
|||
protected void E() {
|
||||
if (this.portalCooldown > 0) {
|
||||
--this.portalCooldown;
|
||||
@@ -493,6 +511,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.fireTicks = 0;
|
||||
@@ -508,6 +526,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.setFireTicks(0);
|
||||
}
|
||||
|
||||
+ protected final void doVoidDamage() { this.af(); } // Paper - OBFHELPER
|
||||
protected void af() {
|
||||
+ protected final void doVoidDamage() { this.ai(); } // Paper - OBFHELPER
|
||||
protected void ai() {
|
||||
this.die();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
index e4d1f37f9f93a62602753e82caa128111abeec4d..c2843d5d607c3d19806b673c76289a8bee035e70 100644
|
||||
index cb25cf3bb7be041d9b135165b6f66b5c232a2553..9124d00521463157df6348b84260f91a47e1f076 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
@@ -210,9 +210,15 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
@@ -285,9 +285,15 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
this.setDamage(this.getDamage() - 1.0F);
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ index e4d1f37f9f93a62602753e82caa128111abeec4d..c2843d5d607c3d19806b673c76289a8b
|
|||
+ // Extracted to own function
|
||||
+ /*
|
||||
if (this.locY() < -64.0D) {
|
||||
this.af();
|
||||
this.ai();
|
||||
}
|
||||
+ */
|
||||
+ this.performVoidDamage();
|
||||
|
|
|
@ -5,15 +5,15 @@ Subject: [PATCH] Check online mode before converting and renaming player data
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
||||
index 97bac7d2579a8b895d76082c6575491b83411298..a0254d8e519fa8b19dc282f3abf33b8ebe4f0aba 100644
|
||||
index 240f9331dca65990f5e724b88050342831868e72..ef9719bf20db92a7e6690bccb00cc54293d392a9 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
||||
@@ -164,7 +164,7 @@ public class WorldNBTStorage implements IPlayerFileData {
|
||||
@@ -50,7 +50,7 @@ public class WorldNBTStorage {
|
||||
File file = new File(this.playerDir, entityhuman.getUniqueIDString() + ".dat");
|
||||
// Spigot Start
|
||||
boolean usingWrongFile = false;
|
||||
- if ( !file.exists() )
|
||||
+ if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first
|
||||
{
|
||||
file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
|
||||
file = new File( this.playerDir, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
|
||||
if ( file.exists() )
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Always tick falling blocks
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 4423839697987e255e5a93bdd6742186dde2e4c4..f86404f83ae605159307a3ad2cca6c6c314a01af 100644
|
||||
index 2b00258ccd808e3332af5ab3f7e4967f03dd4aa3..78f0fb5d97b077673ec542cd70bbc3ffa13f916c 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.server.EntityCreature;
|
||||
|
|
|
@ -20,23 +20,23 @@ index f7a0a33e49cadf9b2bd43f118c106937760da762..50dec5cb5e924301842300e8fc80cb67
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 26e32aa1dbd6de0ba971c32f8daef0d92d65b683..cd09b207c963d81c9302067e0294db57e3ffd0f7 100644
|
||||
index 2f3fe374070a3743931ac0c68c949cded4da085a..f768c6450f5224507fd6b2251de14cc59227d1a9 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
private long cj = SystemUtils.getMonotonicMillis();
|
||||
private long ch = SystemUtils.getMonotonicMillis();
|
||||
private Entity spectatedEntity;
|
||||
public boolean worldChangeInvuln;
|
||||
- private boolean cm;
|
||||
+ private boolean cm; private void setHasSeenCredits(boolean has) { this.cm = has; } // Paper - OBFHELPER
|
||||
private final RecipeBookServer recipeBook;
|
||||
private Vec3D co;
|
||||
private int cp;
|
||||
@@ -695,6 +695,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
- private boolean ck;
|
||||
+ private boolean ck; private void setHasSeenCredits(boolean has) { this.ck = has; } // Paper - OBFHELPER
|
||||
private final RecipeBookServer recipeBook = new RecipeBookServer();
|
||||
private Vec3D cm;
|
||||
private int cn;
|
||||
@@ -752,6 +752,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.getWorldServer().removePlayer(this);
|
||||
if (!this.viewingCredits) {
|
||||
this.viewingCredits = true;
|
||||
+ if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits
|
||||
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cm ? 0.0F : 1.0F));
|
||||
this.cm = true;
|
||||
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.e, this.ck ? 0.0F : 1.0F));
|
||||
this.ck = true;
|
||||
}
|
||||
|
|
|
@ -5,27 +5,20 @@ Subject: [PATCH] Fix lag from explosions processing dead entities
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index eb7b8d94c83c3f3be0a7f019dad7dd87da5347fe..a063d1bfaa1acd20a5de9701eef028a543235d5e 100644
|
||||
index 692625d9f80b6e98ba4bb6c94c71e6b59ba36d6a..bf156897acfe25c16a1b09a83a00ba3ab647a2dd 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -151,7 +151,14 @@ public class Explosion {
|
||||
int i1 = MathHelper.floor(this.posY + (double) f3 + 1.0D);
|
||||
int j1 = MathHelper.floor(this.posZ - (double) f3 - 1.0D);
|
||||
int k1 = MathHelper.floor(this.posZ + (double) f3 + 1.0D);
|
||||
@@ -153,7 +153,7 @@ public class Explosion {
|
||||
int i1 = MathHelper.floor(this.posY + (double) f2 + 1.0D);
|
||||
int j1 = MathHelper.floor(this.posZ - (double) f2 - 1.0D);
|
||||
int k1 = MathHelper.floor(this.posZ + (double) f2 + 1.0D);
|
||||
- List<Entity> list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1));
|
||||
+ // Paper start - Fix lag from explosions processing dead entities
|
||||
+ List<Entity> list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate<Entity>() {
|
||||
+ @Override
|
||||
+ public boolean apply(Entity entity) {
|
||||
+ return IEntitySelector.canAITarget().test(entity) && !entity.dead;
|
||||
+ }
|
||||
+ });
|
||||
+ // Paper end
|
||||
+ List<Entity> list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), (com.google.common.base.Predicate<Entity>) entity -> IEntitySelector.canAITarget().test(entity) && !entity.dead); // Paper - Fix lag from explosions processing dead entities
|
||||
Vec3D vec3d = new Vec3D(this.posX, this.posY, this.posZ);
|
||||
|
||||
for (int l1 = 0; l1 < list.size(); ++l1) {
|
||||
diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
index c75ed9ddc14e1fd3b57a7c989267bf5a0bb6157a..c1f462d9d3eefdab767bea28da484bfb1dfda06a 100644
|
||||
index ed7566591bac72d17b40a940531b7feb1cb8f392..d7e3580067bcbca09b66f05f02e8736863bd7ef5 100644
|
||||
--- a/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
@@ -14,6 +14,7 @@ public final class IEntitySelector {
|
||||
|
|
|
@ -25,10 +25,10 @@ index 50dec5cb5e924301842300e8fc80cb671b6b9173..f038d3f7dc7d1034a3ee9f2384a85642
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index a063d1bfaa1acd20a5de9701eef028a543235d5e..5583860f152aadcbe74bf7b99e7efd8e47cefa35 100644
|
||||
index bf156897acfe25c16a1b09a83a00ba3ab647a2dd..842563f2030382659a62a3a63d9af9d5a58e3d85 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -177,7 +177,7 @@ public class Explosion {
|
||||
@@ -172,7 +172,7 @@ public class Explosion {
|
||||
d8 /= d11;
|
||||
d9 /= d11;
|
||||
d10 /= d11;
|
||||
|
@ -37,7 +37,7 @@ index a063d1bfaa1acd20a5de9701eef028a543235d5e..5583860f152aadcbe74bf7b99e7efd8e
|
|||
double d13 = (1.0D - d7) * d12;
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -384,4 +384,84 @@ public class Explosion {
|
||||
@@ -391,4 +391,84 @@ public class Explosion {
|
||||
|
||||
private Effect() {}
|
||||
}
|
||||
|
@ -123,22 +123,22 @@ index a063d1bfaa1acd20a5de9701eef028a543235d5e..5583860f152aadcbe74bf7b99e7efd8e
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c61037c837e29544e3afeb0b23f422073d3f5166..a67c31a6021d881b49cfdb75f514404c342eea45 100644
|
||||
index a0055b2c27179fea9f09d6a70931a8f00d03413a..cc3718765ed54f8042a2687e409a51098ebc67a0 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1184,6 +1184,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1206,6 +1206,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
this.methodProfiler.exit();
|
||||
this.methodProfiler.exit();
|
||||
+ worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
|
||||
}
|
||||
this.methodProfiler.exit();
|
||||
this.methodProfiler.exit();
|
||||
+ worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
|
||||
}
|
||||
|
||||
this.methodProfiler.exitEnter("connection");
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 12e57818687fe359e752f29f2c7d038c2e4a512f..ea27e1fd62ff38fc92e914eb659e29ac836c2b45 100644
|
||||
index 56d7cf4478a544677a1c537bcd1955913ab83ec5..6a13f4a4d40177e5ef8c0ae00ca54d1ffb9b221c 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -80,6 +80,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -83,6 +83,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
private org.spigotmc.TickLimiter tileLimiter;
|
||||
private int tileTickPosition;
|
||||
|
|
|
@ -19,39 +19,38 @@ index f038d3f7dc7d1034a3ee9f2384a85642f224836e..25e0717186366af580e512eedfd403b8
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 3fdd7132d483155a574d12b56a2bc3432d16ac63..b3a1199d736798c295c695aea1152ac9d0a30d29 100644
|
||||
index 96a95413f74592ef0a8e9367fd3ed81fc0a2c2fe..8fc632b4b0d79efaced83ea9b39b5727f6f5ebef 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -1073,6 +1073,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1183,6 +1183,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
+ boolean knockbackCancelled = world.paperConfig.disableExplosionKnockback && damagesource.isExplosion() && this instanceof EntityHuman; // Paper - Disable explosion knockback
|
||||
+ boolean knockbackCancelled = world.paperConfig.disableExplosionKnockback && damagesource.isExplosion() && this instanceof EntityHuman; // Paper - Disable explosion knockback
|
||||
if (flag1) {
|
||||
if (flag) {
|
||||
this.world.broadcastEntityEffect(this, (byte) 29);
|
||||
@@ -1091,6 +1092,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1201,6 +1202,7 @@ public abstract class EntityLiving extends Entity {
|
||||
b0 = 2;
|
||||
}
|
||||
|
||||
+ if (!knockbackCancelled) // Paper - Disable explosion knockback
|
||||
+ if (!knockbackCancelled) // Paper - Disable explosion knockback
|
||||
this.world.broadcastEntityEffect(this, b0);
|
||||
}
|
||||
|
||||
@@ -1114,6 +1116,8 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1224,6 +1226,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
+ if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback
|
||||
+
|
||||
if (this.getHealth() <= 0.0F) {
|
||||
+ if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback
|
||||
if (this.dk()) {
|
||||
if (!this.f(damagesource)) {
|
||||
SoundEffect soundeffect = this.getSoundDeath();
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index 5583860f152aadcbe74bf7b99e7efd8e47cefa35..d99d2defe9916e191ba7a2bfbd94bd72a2f5872a 100644
|
||||
index 842563f2030382659a62a3a63d9af9d5a58e3d85..1b738260fb06446713ceab159eb7fa3df70fb611 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -193,14 +193,14 @@ public class Explosion {
|
||||
@@ -188,14 +188,14 @@ public class Explosion {
|
||||
double d14 = d13;
|
||||
|
||||
if (entity instanceof EntityLiving) {
|
||||
|
@ -64,7 +63,7 @@ index 5583860f152aadcbe74bf7b99e7efd8e47cefa35..d99d2defe9916e191ba7a2bfbd94bd72
|
|||
EntityHuman entityhuman = (EntityHuman) entity;
|
||||
|
||||
- if (!entityhuman.isSpectator() && (!entityhuman.isCreative() || !entityhuman.abilities.isFlying)) {
|
||||
+ if (!entityhuman.isSpectator() && (!entityhuman.isCreative() && !world.paperConfig.disableExplosionKnockback || !entityhuman.abilities.isFlying)) { // Paper - Disable explosion knockback
|
||||
this.l.put(entityhuman, new Vec3D(d8 * d13, d9 * d13, d10 * d13));
|
||||
+ if (!entityhuman.isSpectator() && (!entityhuman.isCreative() || !entityhuman.abilities.isFlying) && !world.paperConfig.disableExplosionKnockback) { // Paper - Disable explosion knockback
|
||||
this.m.put(entityhuman, new Vec3D(d8 * d13, d9 * d13, d10 * d13));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,15 +19,15 @@ index 25e0717186366af580e512eedfd403b8efc64a75..41436a4ead736dc925ca77d4cabf925f
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index f8c9e90d2e5bb60795f7957786e56168ff7bf11c..e4ac7dbc5303078fd2fb5ecefab7665c14586bc5 100644
|
||||
index db3b35eac5584b8319fc0d4cbb28408b2d0f620b..0ec10ad5caa86b5c5e84084aeec0ccb0113b3f10 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -445,7 +445,7 @@ public class WorldServer extends World {
|
||||
@@ -471,7 +471,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
gameprofilerfiller.enter("thunder");
|
||||
BlockPosition blockposition;
|
||||
|
||||
- if (flag && this.U() && this.random.nextInt(100000) == 0) {
|
||||
+ if (!this.paperConfig.disableThunder && flag && this.U() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder
|
||||
- if (flag && this.T() && this.random.nextInt(100000) == 0) {
|
||||
+ if (!this.paperConfig.disableThunder && flag && this.T() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder
|
||||
blockposition = this.a(this.a(j, 0, k, 15));
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
|
||||
|
|
|
@ -19,10 +19,10 @@ index 41436a4ead736dc925ca77d4cabf925f4e492d68..f53d8b96757cbedc5fbb16195952a7da
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index e4ac7dbc5303078fd2fb5ecefab7665c14586bc5..d744daeb7c678d9f073d848be50a0f6eee721f0e 100644
|
||||
index 0ec10ad5caa86b5c5e84084aeec0ccb0113b3f10..ac66ee26861ffa4795a00f328deefab5962fad88 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -465,7 +465,7 @@ public class WorldServer extends World {
|
||||
@@ -495,7 +495,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
|
||||
gameprofilerfiller.exitEnter("iceandsnow");
|
||||
|
|
|
@ -19,7 +19,7 @@ index f53d8b96757cbedc5fbb16195952a7da5c07164f..428deed56dae597291670bea8c8a6a67
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
index 0f23313e89fade91eea97e44a5b707cdee3988ad..b249af20c4712a89e5f340eb922291557099058a 100644
|
||||
index a4a48dbee002e96a5644d9a033f9f233cc9a6b46..2b7f020e00fc1ea456d0155e7e383969aee318b7 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
@@ -24,6 +24,7 @@ public abstract class MobSpawnerAbstract {
|
||||
|
|
|
@ -5,18 +5,18 @@ Subject: [PATCH] Send absolute position the first time an entity is seen
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
index a75e0ec54e9dfd98c1bcbd13cb022ab05d8410b9..a13fd9b3404381879663c1f694a5d1903d1fd884 100644
|
||||
index bad775d9a5d761c5accff1d408366f1a9f028762..10821c2b631b4c0e91abb0b05cfc696f1fda36c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
@@ -2,6 +2,7 @@ package net.minecraft.server;
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.google.common.collect.Lists;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
+import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -21,7 +22,7 @@ public class EntityTrackerEntry {
|
||||
@@ -23,7 +24,7 @@ public class EntityTrackerEntry {
|
||||
private final Entity tracker;
|
||||
private final int d;
|
||||
private final boolean e;
|
||||
|
@ -25,7 +25,7 @@ index a75e0ec54e9dfd98c1bcbd13cb022ab05d8410b9..a13fd9b3404381879663c1f694a5d190
|
|||
private long xLoc;
|
||||
private long yLoc;
|
||||
private long zLoc;
|
||||
@@ -36,8 +37,23 @@ public class EntityTrackerEntry {
|
||||
@@ -38,8 +39,23 @@ public class EntityTrackerEntry {
|
||||
private boolean r;
|
||||
// CraftBukkit start
|
||||
private final Set<EntityPlayer> trackedPlayers;
|
||||
|
@ -49,7 +49,7 @@ index a75e0ec54e9dfd98c1bcbd13cb022ab05d8410b9..a13fd9b3404381879663c1f694a5d190
|
|||
this.trackedPlayers = trackedPlayers;
|
||||
// CraftBukkit end
|
||||
this.m = Vec3D.a;
|
||||
@@ -159,7 +175,25 @@ public class EntityTrackerEntry {
|
||||
@@ -161,7 +177,25 @@ public class EntityTrackerEntry {
|
||||
}
|
||||
|
||||
if (packet1 != null) {
|
||||
|
@ -77,10 +77,10 @@ index a75e0ec54e9dfd98c1bcbd13cb022ab05d8410b9..a13fd9b3404381879663c1f694a5d190
|
|||
|
||||
this.c();
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 65134c87772cb6d4d732fc223929cfda7524dde2..eece2f689cce58a35d33c6e8d9d56ea4e9dfd88c 100644
|
||||
index d40d7f18a44bb70f8867617b5afec8492e1fbfcb..0bff7dbbb717b51208f581c129d1cc1ff417969f 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -1220,10 +1220,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1249,10 +1249,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
private final Entity tracker;
|
||||
private final int trackingDistance;
|
||||
private SectionPosition e;
|
||||
|
@ -97,7 +97,7 @@ index 65134c87772cb6d4d732fc223929cfda7524dde2..eece2f689cce58a35d33c6e8d9d56ea4
|
|||
this.tracker = entity;
|
||||
this.trackingDistance = i;
|
||||
this.e = SectionPosition.a(entity);
|
||||
@@ -1305,7 +1309,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1334,7 +1338,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId()));
|
||||
// CraftBukkit end
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add BeaconEffectEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java
|
||||
index 536afe531278e8f6f1ab730c875346c8a624486b..df2d6c3b070c2fc106fa2942959ef21b3511f0ee 100644
|
||||
index b9aa63e6c38f6b023da5e9865ba1f74f931cc7af..2858ea1f3eb44ea2cc6b11454b8e94bca4ab0568 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityBeacon.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java
|
||||
@@ -14,6 +14,11 @@ import org.bukkit.craftbukkit.potion.CraftPotionUtil;
|
||||
|
@ -20,7 +20,7 @@ index 536afe531278e8f6f1ab730c875346c8a624486b..df2d6c3b070c2fc106fa2942959ef21b
|
|||
|
||||
public class TileEntityBeacon extends TileEntity implements ITileInventory, ITickable {
|
||||
|
||||
@@ -242,14 +247,31 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
|
||||
@@ -240,14 +245,31 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
|
||||
}
|
||||
|
||||
private void applyEffect(List list, MobEffectList effects, int i, int b0) {
|
||||
|
@ -53,7 +53,7 @@ index 536afe531278e8f6f1ab730c875346c8a624486b..df2d6c3b070c2fc106fa2942959ef21b
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -272,10 +294,10 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
|
||||
@@ -270,10 +292,10 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
|
||||
int i = getLevel();
|
||||
List list = getHumansInRange();
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ index 428deed56dae597291670bea8c8a6a67ce4d940f..a4da22ea65d5fdba38f8dc331919088f
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index cd09b207c963d81c9302067e0294db57e3ffd0f7..64635fe70f37cecdf4344661c28768f6ac16fdd2 100644
|
||||
index f768c6450f5224507fd6b2251de14cc59227d1a9..4027dc7159d3ef93b6123e548520b45534589933 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -72,6 +72,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -76,6 +76,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public boolean e;
|
||||
public int ping;
|
||||
public boolean viewingCredits;
|
||||
|
@ -30,7 +30,7 @@ index cd09b207c963d81c9302067e0294db57e3ffd0f7..64635fe70f37cecdf4344661c28768f6
|
|||
|
||||
// CraftBukkit start
|
||||
public String displayName;
|
||||
@@ -355,7 +356,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -398,7 +399,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
--this.noDamageTicks;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable spigot tick limiters
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index ea27e1fd62ff38fc92e914eb659e29ac836c2b45..8c0cabd9b3d5315c319a4ef7eda9fce688c22584 100644
|
||||
index 6a13f4a4d40177e5ef8c0ae00ca54d1ffb9b221c..54143a64c4c41d7bdc3476f676ea45143b3e98ca 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -635,9 +635,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -688,9 +688,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
// Spigot start
|
||||
// Iterator iterator = this.tileEntityListTick.iterator();
|
||||
int tilesThisCycle = 0;
|
||||
|
|
|
@ -9,10 +9,10 @@ This is a duplicate API from spigot, so use our duplicate subclass and
|
|||
improve setPosition to use raw
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index c759dd0f9a66dc2fa30746132564a0981037f265..6f11111f413914856e6a3622512f00f8a49cdfa2 100644
|
||||
index 7464ef739bf673baab8661e561abbe9266b888c4..80fec11079b71569dbfcfd399df325a1e942e8ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -119,14 +119,14 @@ public abstract class PlayerList {
|
||||
@@ -143,14 +143,14 @@ public abstract class PlayerList {
|
||||
|
||||
// Spigot start - spawn location event
|
||||
Player bukkitPlayer = entityplayer.getBukkitEntity();
|
||||
|
|
|
@ -20,10 +20,10 @@ index a4da22ea65d5fdba38f8dc331919088f9ca99aed..345ac63e281bb3372b2ae879d587d658
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
|
||||
index 033cb78d91d522b356fea85e66b33de2224f8fe2..72fb92f7c379cb84425b6b03ddf8aad29388c0ae 100644
|
||||
index 1441d096d44ea653539ba20ccda94eb62ffc32df..eddf67805ad472cfdd45c1f3c6068b0530cae97d 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockChest.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockChest.java
|
||||
@@ -267,6 +267,11 @@ public class BlockChest extends BlockChestAbstract<TileEntityChest> implements I
|
||||
@@ -268,6 +268,11 @@ public class BlockChest extends BlockChestAbstract<TileEntityChest> implements I
|
||||
}
|
||||
|
||||
private static boolean b(GeneratorAccess generatoraccess, BlockPosition blockposition) {
|
||||
|
|
|
@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
|
|||
that it is happening so that plugin authors can fix their code to stop executing commands async.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 87119b4fe5ae27c63d272c8e436e3734eddd8f68..2e24d5ba85d7938a9ffe2339fa22c19ee5362b5f 100644
|
||||
index 890b0fc7baf51ed6896d979021b3956c5c279c40..b468182266c39b9defa1aa287290f75f7db44b9a 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1570,6 +1570,29 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1614,6 +1614,29 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
if (!async && s.startsWith("/")) {
|
||||
|
@ -48,10 +48,10 @@ index 87119b4fe5ae27c63d272c8e436e3734eddd8f68..2e24d5ba85d7938a9ffe2339fa22c19e
|
|||
} else if (this.player.getChatFlags() == EnumChatVisibility.SYSTEM) {
|
||||
// Do nothing, this is coming from a plugin
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 99083a1f36f95a4fb3d67f903d02b84d6ebae3d2..697246492a4bf31e84ce3d9f4e35c46f54b7eb7d 100644
|
||||
index 40019f276abea084b15386f00bde1bfdd5fdae77..c63d1468d2908db75176c5926a46293f5b94b6b2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -720,6 +720,29 @@ public final class CraftServer implements Server {
|
||||
@@ -744,6 +744,29 @@ public final class CraftServer implements Server {
|
||||
Validate.notNull(commandLine, "CommandLine cannot be null");
|
||||
org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot
|
||||
|
||||
|
|
|
@ -19,15 +19,15 @@ index 345ac63e281bb3372b2ae879d587d658243581ba..62e793b71b313146b86b466421e7a5f8
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
|
||||
index 8e8526f371ec967862891e371faa0e4b9c2c11c3..3ecf732192f7f1bd20b9d766bedef08e64434fda 100644
|
||||
index 8e958367fb0873b26cb01c5a38e24650b0527be8..9c83389c56083d9febf604bf30da47c89330902e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySlime.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
|
||||
@@ -289,7 +289,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
}
|
||||
@@ -285,7 +285,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
}
|
||||
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition);
|
||||
- boolean flag = SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), generatoraccess.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot
|
||||
+ boolean flag = generatoraccess.getMinecraftWorld().paperConfig.allChunksAreSlimeChunks || SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), generatoraccess.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition);
|
||||
- boolean flag = SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, ((GeneratorAccessSeed) generatoraccess).getSeed(), generatoraccess.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot
|
||||
+ boolean flag = generatoraccess.getMinecraftWorld().paperConfig.allChunksAreSlimeChunks || SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, ((GeneratorAccessSeed) generatoraccess).getSeed(), generatoraccess.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper
|
||||
|
||||
if (random.nextInt(10) == 0 && flag && blockposition.getY() < 40) {
|
||||
return a(entitytypes, generatoraccess, enummobspawn, blockposition, random);
|
||||
if (random.nextInt(10) == 0 && flag && blockposition.getY() < 40) {
|
||||
return a(entitytypes, generatoraccess, enummobspawn, blockposition, random);
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 697246492a4bf31e84ce3d9f4e35c46f54b7eb7d..1cf8fd93a45fb76fc1638c7fd8751314d4c813e3 100644
|
||||
index c63d1468d2908db75176c5926a46293f5b94b6b2..15ee6ee6e96bb48f73cbb2944eeee8f726914e2d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1629,6 +1629,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1680,6 +1680,7 @@ public final class CraftServer implements Server {
|
||||
return helpMap;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Be a bit more informative in maxHealth exception
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 6146db18416785a06f86a3118329b33adde9c5f8..966d23add13a3139adead8f8969c0a4ff34929c6 100644
|
||||
index 28151d15372ea30d308fedda502427a4ba161cd0..20ada1ab2bea9fa5bde19cb4768d64f73a4154d2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -106,7 +106,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -107,7 +107,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public void setHealth(double health) {
|
||||
health = (float) health;
|
||||
if ((health < 0) || (health > getMaxHealth())) {
|
||||
|
|
|
@ -5,17 +5,17 @@ Subject: [PATCH] Player Tab List and Title APIs
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java
|
||||
index cf89622a8b56ddcff1ba09dfb3fbd1b4c3c4677e..fb97c51bb1a4cabc6b67d8f74a5f0b6e0fb6052c 100644
|
||||
index 89dae553392206abb8b3a7be6c807f97cb60ddac..fd3e6cda6a0e7154c50608ba9a4b70f3c43c8f2a 100644
|
||||
--- a/src/main/java/net/minecraft/server/IChatBaseComponent.java
|
||||
+++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java
|
||||
@@ -439,6 +439,7 @@ public interface IChatBaseComponent extends Message, Iterable<IChatBaseComponent
|
||||
@@ -352,6 +352,7 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IC
|
||||
return IChatBaseComponent.ChatSerializer.a.toJsonTree(ichatbasecomponent);
|
||||
}
|
||||
|
||||
+ @Nullable public static IChatBaseComponent jsonToComponent(String json) { return a(json);} // Paper - OBFHELPER
|
||||
@Nullable
|
||||
public static IChatBaseComponent a(String s) {
|
||||
return (IChatBaseComponent) ChatDeserializer.a(IChatBaseComponent.ChatSerializer.a, s, IChatBaseComponent.class, false);
|
||||
public static IChatMutableComponent a(String s) {
|
||||
return (IChatMutableComponent) ChatDeserializer.a(IChatBaseComponent.ChatSerializer.a, s, IChatMutableComponent.class, false);
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
||||
index 3a6e780007bc1b1fa799166daa01d3a9e15c7ab0..535056c64ef866e645b1bfbd149b50c53cb64485 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
||||
|
@ -52,7 +52,7 @@ index 3a6e780007bc1b1fa799166daa01d3a9e15c7ab0..535056c64ef866e645b1bfbd149b50c5
|
|||
|
||||
if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 690d150aa9117be315d624bf5e8131d70c7c59bf..c0937138a31077244e39b1154cd7838e26aa1205 100644
|
||||
index 5697c624148cf654e68153f08b688842eff3a207..682dd0d53f393c326e3da9b99fbff21953535161 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -62,7 +62,7 @@ index 690d150aa9117be315d624bf5e8131d70c7c59bf..c0937138a31077244e39b1154cd7838e
|
|||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.io.BaseEncoding;
|
||||
@@ -209,6 +210,96 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -213,6 +214,96 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Ensure inv drag is in bounds
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Container.java b/src/main/java/net/minecraft/server/Container.java
|
||||
index e38438db6ef46d30c63f13610e9e636b8bf5b66c..0c3a2f080ce71ac88a90e6c74fd3497d27a2c7c6 100644
|
||||
index d336760a8983b1c6d57be0d965debc42544cc4b0..4effcc860f9b1cf9f13f4c6ae02a6b16df459259 100644
|
||||
--- a/src/main/java/net/minecraft/server/Container.java
|
||||
+++ b/src/main/java/net/minecraft/server/Container.java
|
||||
@@ -201,7 +201,7 @@ public abstract class Container {
|
||||
@@ -223,7 +223,7 @@ public abstract class Container {
|
||||
this.d();
|
||||
}
|
||||
} else if (this.h == 1) {
|
||||
|
|
|
@ -6,15 +6,15 @@ Subject: [PATCH] Change implementation of (tile)entity removal list
|
|||
use sets for faster removal
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 8c0cabd9b3d5315c319a4ef7eda9fce688c22584..9a9a7ae659dd1aea5111603852fbda9fad707be2 100644
|
||||
index 54143a64c4c41d7bdc3476f676ea45143b3e98ca..5197cdb3219638b499f0eb2a25f35e789983a3e8 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -36,7 +36,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -37,7 +37,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
public final List<TileEntity> tileEntityList = Lists.newArrayList();
|
||||
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
|
||||
protected final List<TileEntity> tileEntityListPending = Lists.newArrayList();
|
||||
- protected final List<TileEntity> tileEntityListUnload = Lists.newArrayList();
|
||||
+ protected final java.util.Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet();
|
||||
public final Thread serverThread;
|
||||
private int c;
|
||||
protected int i = (new Random()).nextInt();
|
||||
private final boolean debugWorld;
|
||||
private int d;
|
||||
|
|
|
@ -7,10 +7,10 @@ Establishes base extension of profile systems for future edits too
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..00b7630ccb2be7a78ab5471c8e8bdcd5a92209a0
|
||||
index 0000000000000000000000000000000000000000..d73de9eb89c4e3a748907f2da21a3072cc6b7f41
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
|
||||
@@ -0,0 +1,294 @@
|
||||
@@ -0,0 +1,296 @@
|
||||
+package com.destroystokyo.paper.profile;
|
||||
+
|
||||
+import com.destroystokyo.paper.PaperConfig;
|
||||
|
@ -194,13 +194,15 @@ index 0000000000000000000000000000000000000000..00b7630ccb2be7a78ab5471c8e8bdcd5
|
|||
+ public boolean complete(boolean textures, boolean onlineMode) {
|
||||
+ MinecraftServer server = MinecraftServer.getServer();
|
||||
+
|
||||
+ boolean isCompleteFromCache = this.completeFromCache(false, onlineMode);
|
||||
+ boolean isCompleteFromCache = this.completeFromCache(true, onlineMode);
|
||||
+ if (onlineMode && (!isCompleteFromCache || textures && !hasTextures())) {
|
||||
+ GameProfile result = server.getSessionService().fillProfileProperties(profile, true);
|
||||
+ if (result != null) {
|
||||
+ copyProfileProperties(result, this.profile, true);
|
||||
+ }
|
||||
+ server.getUserCache().saveProfile(this.profile);
|
||||
+ if (this.profile.isComplete()) {
|
||||
+ server.getUserCache().saveProfile(this.profile);
|
||||
+ }
|
||||
+ }
|
||||
+ return profile.isComplete() && (!onlineMode || !textures || hasTextures());
|
||||
+ }
|
||||
|
|
Loading…
Reference in New Issue