mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 00:47:38 +01:00
More work work work
This commit is contained in:
parent
af1090259a
commit
95a31de306
@ -26,10 +26,10 @@ index e88af2dcc0f7fc5190654e2640f67d706e6c8c81..8b818a7cb835512c4bd2ea9641d4bfd9
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||
index 98c41e87b644f79ebfd45af2e0d7b887a3f5d00b..e8f6c34ea789136d63c0aa88aec90203ef6282b5 100644
|
||||
index 7bcd5498c734873b74bee503992ec4806ae61df7..4257f2282152aee09533c9a2e53018d3e49effa4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||
@@ -239,6 +239,11 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
|
||||
@@ -241,6 +241,11 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
|
||||
if (zoglin != null) {
|
||||
zoglin.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0));
|
||||
}
|
||||
@ -42,10 +42,10 @@ index 98c41e87b644f79ebfd45af2e0d7b887a3f5d00b..e8f6c34ea789136d63c0aa88aec90203
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
|
||||
index e7282012420da3be738ad47c2b15d7455bc2503f..ed7c5c38502781325610e4d97407024e143bb7b0 100644
|
||||
index 22c8d6233be5e4f7fb4f03176e83dbee02256b1f..4384cbf9c53b220128cd278f126466b143fab2f2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
|
||||
@@ -113,6 +113,11 @@ public abstract class AbstractPiglin extends Monster {
|
||||
@@ -120,6 +120,11 @@ public abstract class AbstractPiglin extends Monster {
|
||||
if (entitypigzombie != null) {
|
||||
entitypigzombie.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0));
|
||||
}
|
@ -39,10 +39,10 @@ index b722a207c0e745bb172d93b90e1241d7bfa173ce..792bfc7eab33b26462e76a1912bd712e
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 53e40ab7d37ef707151c165831b24737a9f3683c..bbc3724769497e7687a27d800cd7511c5f1fe667 100644
|
||||
index ffd94f9af2e39f1fdb076835c32cc7287329f6dd..c6d38178513bd54bb51640334777d4a347a93284 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -580,6 +580,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -581,6 +581,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
var supplier = net.minecraft.world.entity.ai.attributes.DefaultAttributes.getSupplier((net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.LivingEntity>) net.minecraft.core.registries.BuiltInRegistries.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(bukkitEntityKey)));
|
||||
return new io.papermc.paper.attribute.UnmodifiableAttributeMap(supplier);
|
||||
}
|
@ -5,12 +5,12 @@ Subject: [PATCH] Goat ram API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
index cf56577ca3de81d3e44eb6f65ff9890011666ac5..a3a5dbaed7a7647249747154ac0c024bddd7eb13 100644
|
||||
index 52f3f679568955b632a60d44de687c6db0e2b38a..3ec2f590dfe9410f1a9d2afb530eebfcce917798 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
@@ -385,4 +385,15 @@ public class Goat extends Animal {
|
||||
public static boolean checkGoatSpawnRules(EntityType<? extends Animal> entityType, LevelAccessor world, MobSpawnType spawnReason, BlockPos pos, RandomSource random) {
|
||||
return world.getBlockState(pos.below()).is(BlockTags.GOATS_SPAWNABLE_ON) && isBrightEnoughToSpawn(world, pos);
|
||||
@@ -392,4 +392,15 @@ public class Goat extends Animal {
|
||||
protected Vector3f getPassengerAttachmentPoint(Entity passenger, EntityDimensions dimensions, float scaleFactor) {
|
||||
return new Vector3f(0.0F, dimensions.height - 0.1875F * scaleFactor, 0.0F);
|
||||
}
|
||||
+
|
||||
+ // Paper start - Goat ram API
|
@ -7,10 +7,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
|
||||
public net.minecraft.world.entity.Entity setLevel(Lnet/minecraft/world/level/Level;)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index f7a97ac4eb851f35275cfeb4717f0f69dda4336e..0d2506350e2c57044bf7c751627b6e0d76077e82 100644
|
||||
index bcc316a8d0de827e59198ddee086d3c21b3ef7ea..d3f7541d3ddfec80464fb060051f4fefd033b41d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2138,6 +2138,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2062,6 +2062,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ index f7a97ac4eb851f35275cfeb4717f0f69dda4336e..0d2506350e2c57044bf7c751627b6e0d
|
||||
return this.isPassenger() ? false : this.saveAsPassenger(nbt);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index e29e1af97c1d50603135723a7a16fc1806718ca2..f96144b6ee8b4d1d114e38bb933dd3072191574c 100644
|
||||
index 4fe558a882e87912e408b5bbd223666969e30029..984e6fa489e6b3d833d5f83dd739a6ff8a3ec5f0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1371,5 +1371,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@ -47,10 +47,10 @@ index e29e1af97c1d50603135723a7a16fc1806718ca2..f96144b6ee8b4d1d114e38bb933dd307
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index bbc3724769497e7687a27d800cd7511c5f1fe667..e8e26cca7fc8090a3b22925ae37e2362a44ced80 100644
|
||||
index c6d38178513bd54bb51640334777d4a347a93284..e169c16626e967c30c6f9a324a40550adf5476dd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -491,6 +491,29 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -492,6 +492,29 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.of(ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.ITEM_STACK, compound, dataVersion, getDataVersion())));
|
||||
}
|
||||
|
@ -33,10 +33,10 @@ index 899008b2980d13f1be6280cd8cb959c53a29bebf..f875507241ac6769545e91cd3285232b
|
||||
private RedirectModifier<S> modifier = null;
|
||||
private boolean forks;
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 14c78028ff51fff6f24174ae16b7c42d34d6041a..7592b592a541912f729d6b99f455cd87ebcb34b8 100644
|
||||
index 5fd7e5aa0644fda8e2f7f57eef9a6f0011534cb9..b201fd131864751bea1e926c6b23f9742eae1c8e 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -231,6 +231,13 @@ public class Commands {
|
||||
@@ -237,6 +237,13 @@ public class Commands {
|
||||
}
|
||||
this.vanillaCommandNodes.addAll(this.dispatcher.getRoot().getChildren()); // Paper
|
||||
|
@ -9,10 +9,10 @@ chunk through it. This should also be OK from a leak prevention/
|
||||
state desync POV because the TE is getting unloaded anyways.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index e809a959d69197ecdec768a2d4f348c73c0d5b9a..0f6d4f80677c54a94a1bbfb861a3bcce17b83489 100644
|
||||
index 7ad3942b39f071c23c10310d71bd259df445e0da..3cb0a648ad3f101acdbcae5d0666cf3aa0f8ce2c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1553,9 +1553,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1321,9 +1321,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Spigot Start
|
||||
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
|
||||
if (tileentity instanceof net.minecraft.world.Container) {
|
||||
@ -28,10 +28,10 @@ index e809a959d69197ecdec768a2d4f348c73c0d5b9a..0f6d4f80677c54a94a1bbfb861a3bcce
|
||||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 59e02bd5b49e0c900d049a1f1927316d45910768..ce2972c62f91724f6a9e56c8103fba219f7a60bb 100644
|
||||
index 737c8fb2125d249f701d210a76b2ce781854b3b6..46101c122bd5a31b24a24769dd4450b27df23555 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1615,6 +1615,18 @@ public class ServerPlayer extends Player {
|
||||
@@ -1574,6 +1574,18 @@ public class ServerPlayer extends Player {
|
||||
this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId));
|
||||
this.doCloseContainer();
|
||||
}
|
||||
@ -51,10 +51,10 @@ index 59e02bd5b49e0c900d049a1f1927316d45910768..ce2972c62f91724f6a9e56c8103fba21
|
||||
@Override
|
||||
public void doCloseContainer() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index fd39c81ab54e07630fa12e9e451dcd9b529db446..b69e0cd17467752707a33540cd6113dc21554ca1 100644
|
||||
index 39f011a3c5e0eaa24ab95738329ba98aa07a5f36..b40961ad53437a5aa603f658ed56fca827de5716 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -503,6 +503,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -508,6 +508,11 @@ public abstract class Player extends LivingEntity {
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
// Paper end
|
@ -7,10 +7,10 @@ Separate lookup and state access locks prevent lookups
|
||||
from stalling simple state access/write calls
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
index 2456edc11b29a92b1648937cd3dd6a9a05706803..b48650c38751a925b83fb4c19ac02f87cb1bef6e 100644
|
||||
index eac9658fa4cab7a651e10e4e18c679e040e4aed0..f4d903ed4342c3100c30deda291dfd6dd4e1ef40 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
@@ -62,6 +62,11 @@ public class GameProfileCache {
|
||||
@@ -60,6 +60,11 @@ public class GameProfileCache {
|
||||
@Nullable
|
||||
private Executor executor;
|
||||
|
||||
@ -22,7 +22,7 @@ index 2456edc11b29a92b1648937cd3dd6a9a05706803..b48650c38751a925b83fb4c19ac02f87
|
||||
public GameProfileCache(GameProfileRepository profileRepository, File cacheFile) {
|
||||
this.profileRepository = profileRepository;
|
||||
this.file = cacheFile;
|
||||
@@ -69,6 +74,7 @@ public class GameProfileCache {
|
||||
@@ -67,11 +72,13 @@ public class GameProfileCache {
|
||||
}
|
||||
|
||||
private void safeAdd(GameProfileCache.GameProfileInfo entry) {
|
||||
@ -30,15 +30,13 @@ index 2456edc11b29a92b1648937cd3dd6a9a05706803..b48650c38751a925b83fb4c19ac02f87
|
||||
GameProfile gameprofile = entry.getProfile();
|
||||
|
||||
entry.setLastAccess(this.getNextOperation());
|
||||
@@ -83,6 +89,7 @@ public class GameProfileCache {
|
||||
if (uuid != null) {
|
||||
this.profilesByUUID.put(uuid, entry);
|
||||
}
|
||||
this.profilesByName.put(gameprofile.getName().toLowerCase(Locale.ROOT), entry);
|
||||
this.profilesByUUID.put(gameprofile.getId(), entry);
|
||||
+ } finally { this.stateLock.unlock(); } // Paper - allow better concurrency
|
||||
|
||||
}
|
||||
|
||||
@@ -138,17 +145,20 @@ public class GameProfileCache {
|
||||
private static Optional<GameProfile> lookupGameProfile(GameProfileRepository repository, String name) {
|
||||
@@ -126,17 +133,20 @@ public class GameProfileCache {
|
||||
|
||||
// Paper start
|
||||
public @Nullable GameProfile getProfileIfCached(String name) {
|
||||
@ -59,7 +57,7 @@ index 2456edc11b29a92b1648937cd3dd6a9a05706803..b48650c38751a925b83fb4c19ac02f87
|
||||
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
|
||||
boolean flag = false;
|
||||
|
||||
@@ -164,8 +174,12 @@ public class GameProfileCache {
|
||||
@@ -152,8 +162,12 @@ public class GameProfileCache {
|
||||
if (usercache_usercacheentry != null) {
|
||||
usercache_usercacheentry.setLastAccess(this.getNextOperation());
|
||||
optional = Optional.of(usercache_usercacheentry.getProfile());
|
||||
@ -72,15 +70,15 @@ index 2456edc11b29a92b1648937cd3dd6a9a05706803..b48650c38751a925b83fb4c19ac02f87
|
||||
if (optional.isPresent()) {
|
||||
this.add((GameProfile) optional.get());
|
||||
flag = false;
|
||||
@@ -177,6 +191,7 @@ public class GameProfileCache {
|
||||
@@ -165,6 +179,7 @@ public class GameProfileCache {
|
||||
}
|
||||
|
||||
return optional;
|
||||
+ } finally { if (stateLocked) { this.stateLock.unlock(); } } // Paper - allow better concurrency
|
||||
}
|
||||
|
||||
public void getAsync(String username, Consumer<Optional<GameProfile>> consumer) {
|
||||
@@ -203,6 +218,7 @@ public class GameProfileCache {
|
||||
public CompletableFuture<Optional<GameProfile>> getAsync(String username) {
|
||||
@@ -189,6 +204,7 @@ public class GameProfileCache {
|
||||
}
|
||||
|
||||
public Optional<GameProfile> get(UUID uuid) {
|
||||
@ -88,7 +86,7 @@ index 2456edc11b29a92b1648937cd3dd6a9a05706803..b48650c38751a925b83fb4c19ac02f87
|
||||
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByUUID.get(uuid);
|
||||
|
||||
if (usercache_usercacheentry == null) {
|
||||
@@ -211,6 +227,7 @@ public class GameProfileCache {
|
||||
@@ -197,6 +213,7 @@ public class GameProfileCache {
|
||||
usercache_usercacheentry.setLastAccess(this.getNextOperation());
|
||||
return Optional.of(usercache_usercacheentry.getProfile());
|
||||
}
|
||||
@ -96,7 +94,7 @@ index 2456edc11b29a92b1648937cd3dd6a9a05706803..b48650c38751a925b83fb4c19ac02f87
|
||||
}
|
||||
|
||||
public void setExecutor(Executor executor) {
|
||||
@@ -291,7 +308,7 @@ public class GameProfileCache {
|
||||
@@ -277,7 +294,7 @@ public class GameProfileCache {
|
||||
JsonArray jsonarray = new JsonArray();
|
||||
DateFormat dateformat = GameProfileCache.createDateFormat();
|
||||
|
||||
@ -105,7 +103,7 @@ index 2456edc11b29a92b1648937cd3dd6a9a05706803..b48650c38751a925b83fb4c19ac02f87
|
||||
jsonarray.add(GameProfileCache.writeGameProfile(usercache_usercacheentry, dateformat));
|
||||
});
|
||||
String s = this.gson.toJson(jsonarray);
|
||||
@@ -332,8 +349,19 @@ public class GameProfileCache {
|
||||
@@ -318,8 +335,19 @@ public class GameProfileCache {
|
||||
}
|
||||
|
||||
private Stream<GameProfileCache.GameProfileInfo> getTopMRUProfiles(int limit) {
|
@ -17,10 +17,10 @@ Async catch modifications to critical entity state
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 96a414a09e125ca0ea3ccf2589abf47a39fad92d..ee5cb4efcf5e63321e34cea77afa6af7b402b651 100644
|
||||
index 30cdbef6669684cac522e60a254386f23a14b407..87c9e00cf85809bb40ca043f56b6f180ae08269c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1658,6 +1658,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1536,6 +1536,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper
|
||||
@ -29,7 +29,7 @@ index 96a414a09e125ca0ea3ccf2589abf47a39fad92d..ee5cb4efcf5e63321e34cea77afa6af7
|
||||
if (player.isRemoved()) {
|
||||
LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName());
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 693fe96b508a78545c180dda8ab40d6456896db4..4e368756efce3cb31bd88a2145a97b00366fa977 100644
|
||||
index 6b80dd7cc1dcc248f7bc1ab4c3d988f8afad1b61..8ccdbfc7908f2b20f94e614009a2063e0a131d7b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1119,7 +1119,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@ -166,7 +166,7 @@ index 47bab513feec217d875192afef61f3af95b93d24..d3fb277878adb26c7d80cf21f2707038
|
||||
PersistentEntitySectionManager.LOGGER.warn("Entity {} wasn't found in section {} (destroying due to {})", new Object[]{this.entity, SectionPos.of(this.currentSectionKey), reason});
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index a235247fe0d8ec50d374ec30007fea8427de9cae..1377400a8762158fa1dd40e425bd0999a9275895 100644
|
||||
index 1a911126ccb7b7e298b66d3fec832dcd0c0e58f7..661638716cd4d1b20745f3a196f6d060b3de570c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -464,6 +464,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@ -174,16 +174,16 @@ index a235247fe0d8ec50d374ec30007fea8427de9cae..1377400a8762158fa1dd40e425bd0999
|
||||
@Override
|
||||
public boolean addPotionEffect(PotionEffect effect, boolean force) {
|
||||
+ org.spigotmc.AsyncCatcher.catchOp("effect add"); // Paper
|
||||
this.getHandle().addEffect(new MobEffectInstance(MobEffect.byId(effect.getType().getId()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()), EntityPotionEffectEvent.Cause.PLUGIN); // Paper - Don't ignore icon
|
||||
this.getHandle().addEffect(new MobEffectInstance(CraftPotionEffectType.bukkitToMinecraft(effect.getType()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()), EntityPotionEffectEvent.Cause.PLUGIN); // Paper - Don't ignore icon
|
||||
return true;
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
|
||||
index 05e94702e42b8f5c35d2a112c486d57948a3acba..d678ca116f9b81ab9d7d99a698e0ce066c132f34 100644
|
||||
index 78669fa035b7537ff7e533cf32aaf2995625424f..e8e3cc48cf1c58bd8151d1f28df28781859cd0e3 100644
|
||||
--- a/src/main/java/org/spigotmc/AsyncCatcher.java
|
||||
+++ b/src/main/java/org/spigotmc/AsyncCatcher.java
|
||||
@@ -11,6 +11,7 @@ public class AsyncCatcher
|
||||
{
|
||||
if ( !io.papermc.paper.util.TickThread.isTickThread() ) // Paper // Paper - rewrite chunk system
|
||||
if ( (AsyncCatcher.enabled || io.papermc.paper.util.TickThread.STRICT_THREAD_CHECKS) && Thread.currentThread() != MinecraftServer.getServer().serverThread ) // Paper
|
||||
{
|
||||
+ MinecraftServer.LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); // Paper
|
||||
throw new IllegalStateException( "Asynchronous " + reason + "!" );
|
@ -10,11 +10,11 @@ Also has a hover text on each mob category listing what entity types are
|
||||
in said category
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||
index a8b41d6a42e23a7cd839cc3d5e5cae84860f802c..b7fc337ab2bbe3c6d80ed70834e294ab3a7f9dc2 100644
|
||||
index a27c90ea7af63b0d42f202ed1a7dab6e42daed9f..1fd0854fb4f8ab3b5da3cda5ddd2535a0faa6adf 100644
|
||||
--- a/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||
+++ b/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||
@@ -42,6 +42,7 @@ public final class PaperCommand extends Command {
|
||||
commands.put(Set.of("debug", "chunkinfo", "holderinfo"), new ChunkDebugCommand());
|
||||
@@ -41,6 +41,7 @@ public final class PaperCommand extends Command {
|
||||
commands.put(Set.of("fixlight"), new FixLightCommand());
|
||||
commands.put(Set.of("syncloadinfo"), new SyncLoadInfoCommand());
|
||||
commands.put(Set.of("dumpitem"), new DumpItemCommand());
|
||||
+ commands.put(Set.of("mobcaps", "playermobcaps"), new MobcapsCommand());
|
||||
@ -257,7 +257,7 @@ index 0000000000000000000000000000000000000000..d3b39d88a72ca25057fd8574d32f28db
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index e57bb23ec14263b7c9dd721fefbe912963b863d0..7bfc95b2a4fd94bcb0347fd7aff9fe0e9b54daf1 100644
|
||||
index 7983f9a21251cec4857529ad1180a62668ea5037..e1c4cf4b60b810837526c888ec82acbfc8fe540c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -192,6 +192,16 @@ public final class NaturalSpawner {
|
||||
@ -278,10 +278,10 @@ index e57bb23ec14263b7c9dd721fefbe912963b863d0..7bfc95b2a4fd94bcb0347fd7aff9fe0e
|
||||
// Paper start - add parameters and int ret type
|
||||
spawnCategoryForChunk(group, world, chunk, checker, runner, Integer.MAX_VALUE, null);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 1ed8ced7f72af6a135718e4a06dd46ce352361a7..7460e45e5a9a9733824161dc9a75bf66370f816b 100644
|
||||
index 37c613e63a63a5fd32f0b2ab82e3525f8d0dad36..460350ad26df0a07fab623e404ed4eff117ead13 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2181,6 +2181,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2184,6 +2184,11 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public int getSpawnLimit(SpawnCategory spawnCategory) {
|
||||
@ -294,10 +294,10 @@ index 1ed8ced7f72af6a135718e4a06dd46ce352361a7..7460e45e5a9a9733824161dc9a75bf66
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index e5eb25bb1b29b8fa7b97da935a9189ac43c21c71..dfcf7748ef45d35538e65f655f3a892f582435ca 100644
|
||||
index 8f235460f24a7ac2e8d478bf14a3c83b8fef35df..888a60457bfbfd364e91b9e3d5c9df9dc7a2c564 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1704,9 +1704,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1709,9 +1709,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
Preconditions.checkArgument(spawnCategory != null, "SpawnCategory cannot be null");
|
||||
Preconditions.checkArgument(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory.%s are not supported", spawnCategory);
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Sanitize ResourceLocation error logging
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/resources/ResourceLocation.java b/src/main/java/net/minecraft/resources/ResourceLocation.java
|
||||
index de37a6e2edf36107a04b3707b9c5bbd608fcab20..8921b1bc2c870222d145c73bac765169099763f1 100644
|
||||
index d3300e43523429fdd0e61c5aa9aed2e6bc78e07e..38e2a8cec48bc779b8154d6d719031f457a2403e 100644
|
||||
--- a/src/main/java/net/minecraft/resources/ResourceLocation.java
|
||||
+++ b/src/main/java/net/minecraft/resources/ResourceLocation.java
|
||||
@@ -211,7 +211,7 @@ public class ResourceLocation implements Comparable<ResourceLocation> {
|
@ -879,10 +879,10 @@ index 33fbf72b440e0d164ecd4fb0fdec72e2394d0a1e..8db20db72cd51046213625fac46c3585
|
||||
BlockPos blockPos = path.getTarget();
|
||||
Optional<Holder<PoiType>> optional = poiManager.getType(blockPos);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java
|
||||
index 6f2c7baea0d1ac7813c7b85e1f5558573745762c..12a7aaeaa8b4b788b620b1985591c3b93253ccd5 100644
|
||||
index b18b896c624d5cadc02b1db9d011d82124d61d54..a0299e87bff5f86622efcc26530b9400ab928e44 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java
|
||||
@@ -127,43 +127,62 @@ public class PoiManager extends SectionStorage<PoiSection> {
|
||||
@@ -111,43 +111,62 @@ public class PoiManager extends SectionStorage<PoiSection> {
|
||||
}
|
||||
|
||||
public Optional<BlockPos> find(Predicate<Holder<PoiType>> typePredicate, Predicate<BlockPos> posPredicate, BlockPos pos, int radius, PoiManager.Occupancy occupationStatus) {
|
||||
@ -965,7 +965,7 @@ index 6f2c7baea0d1ac7813c7b85e1f5558573745762c..12a7aaeaa8b4b788b620b1985591c3b9
|
||||
|
||||
public boolean release(BlockPos pos) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java
|
||||
index 3fc17817906876e83f040f908b8b1ba6cfa37b8b..9f138bc471b5c2a4fa813ff943dbe34018b8df74 100644
|
||||
index 795a02941d7cecb58ec45b5e79c8d510ff21163a..5308c8ddb9f2413d332fe30e1c303e6260eaa1aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java
|
||||
@@ -26,7 +26,7 @@ import org.slf4j.Logger;
|
||||
@ -976,12 +976,12 @@ index 3fc17817906876e83f040f908b8b1ba6cfa37b8b..9f138bc471b5c2a4fa813ff943dbe340
|
||||
+ private final Map<Holder<PoiType>, Set<PoiRecord>> byType = Maps.newHashMap(); public final Map<Holder<PoiType>, Set<PoiRecord>> getData() { return this.byType; } // Paper - public accessor
|
||||
private final Runnable setDirty;
|
||||
private boolean isValid;
|
||||
public final Optional<PoiSection> noAllocateOptional = Optional.of(this); // Paper - rewrite chunk system
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
||||
index 0887cba39bfc4279abec21c6c316abab28beb0a3..5561b8499a0503b850974b1dc309edfb80219549 100644
|
||||
index 56f0e217276b01aed2f20a71f6849826285fc15b..087b7699c8a519923999a4bc079bf0b193ae5e7d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
||||
@@ -71,11 +71,11 @@ public class SectionStorage<R> extends RegionFileStorage implements AutoCloseabl
|
||||
@@ -70,11 +70,11 @@ public class SectionStorage<R> implements AutoCloseable {
|
||||
}
|
||||
|
||||
@Nullable
|
Loading…
Reference in New Issue
Block a user