mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 21:47:55 +01:00
[ci skip] Add more identifying patch comments
This commit is contained in:
parent
5e73c555bc
commit
3e20d3a275
@ -10,7 +10,7 @@ just looking at the LevelStem key, look at the DimensionType key which
|
||||
is one level below that. Defaults to off to keep vanilla behavior.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 396cbd1a0a94e913475bad65faf8e871b7105895..67bda174adb74e6176e81f986382b3bbbfe6b95f 100644
|
||||
index 396cbd1a0a94e913475bad65faf8e871b7105895..41fae37f785191fa3314fcc5724c9b31ef953816 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -623,7 +623,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -26,7 +26,7 @@ index 396cbd1a0a94e913475bad65faf8e871b7105895..67bda174adb74e6176e81f986382b3bb
|
||||
+ spawners = Collections.emptyList();
|
||||
+ }
|
||||
+ world = new ServerLevel(this, this.executor, worldSession, iworlddataserver, worldKey, worlddimension, worldloadlistener, flag, j, spawners, true, this.overworld().getRandomSequences(), org.bukkit.World.Environment.getEnvironment(dimension), gen, biomeProvider);
|
||||
+ // Paper end
|
||||
+ // Paper end - option to use the dimension_type to check if spawners should be added
|
||||
}
|
||||
|
||||
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
|
||||
|
@ -7,35 +7,35 @@ Some parts of legacy conversion will need the overworld
|
||||
to get the legacy structure data storage
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 67bda174adb74e6176e81f986382b3bbbfe6b95f..4f43e306d70bc733ceba2b375c8732f330abc0e4 100644
|
||||
index 41fae37f785191fa3314fcc5724c9b31ef953816..15828a88b8b31f4b622a1395eda5cc195d616479 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -635,9 +635,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
|
||||
+ this.addLevel(world); // Paper - move up
|
||||
+ this.addLevel(world); // Paper - Put world into worldlist before initing the world; move up
|
||||
this.initWorld(world, worlddata, this.worldData, worldoptions);
|
||||
|
||||
- this.addLevel(world);
|
||||
+ // Paper - move up
|
||||
+ // Paper - Put world into worldlist before initing the world; move up
|
||||
this.getPlayerList().addWorldborderListener(world);
|
||||
|
||||
if (worlddata.getCustomBossEvents() != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a3eaa58625d96df5beb00b69b0c7c902f63865db..316a901f5d943209d94ba6631cfaa9be43fdae3b 100644
|
||||
index a3eaa58625d96df5beb00b69b0c7c902f63865db..546b510e8ed683007c1dbcc1ab66374ce0944e70 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1288,10 +1288,11 @@ public final class CraftServer implements Server {
|
||||
return null;
|
||||
}
|
||||
|
||||
+ this.console.addLevel(internal); // Paper - move up
|
||||
+ this.console.addLevel(internal); // Paper - Put world into worldlist before initing the world; move up
|
||||
this.console.initWorld(internal, worlddata, worlddata, worlddata.worldGenOptions());
|
||||
|
||||
internal.setSpawnSettings(true, true);
|
||||
- this.console.addLevel(internal);
|
||||
+ // Paper - move up
|
||||
+ // Paper - Put world into worldlist before initing the world; move up
|
||||
|
||||
this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
|
||||
//internal.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API // Paper - rewrite chunk system
|
||||
|
@ -9,7 +9,7 @@ This excludes hanging entities, as this fix caused problematic behavior due to t
|
||||
position field.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index 0cbb5dd17c5b37ad90ce11a31b64470722026d06..9d5d32705f9d8aadb51019f17b4db76a9bc6a04b 100644
|
||||
index 0cbb5dd17c5b37ad90ce11a31b64470722026d06..ff57dbd34874e020edd7074c71cfa635eab0287b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -171,7 +171,7 @@ public class ServerEntity {
|
||||
@ -17,7 +17,7 @@ index 0cbb5dd17c5b37ad90ce11a31b64470722026d06..9d5d32705f9d8aadb51019f17b4db76a
|
||||
boolean flag5 = false;
|
||||
|
||||
- if (this.tickCount > 0 || this.entity instanceof AbstractArrow) {
|
||||
+ if (!(this.entity instanceof net.minecraft.world.entity.decoration.HangingEntity) || this.tickCount > 0 || this.entity instanceof AbstractArrow) { // Paper - Always update position
|
||||
+ if (!(this.entity instanceof net.minecraft.world.entity.decoration.HangingEntity) || this.tickCount > 0 || this.entity instanceof AbstractArrow) { // Paper - Always update position to fix first-tick teleports
|
||||
long k = this.positionCodec.encodeX(vec3d);
|
||||
long l = this.positionCodec.encodeY(vec3d);
|
||||
long i1 = this.positionCodec.encodeZ(vec3d);
|
||||
|
@ -32,19 +32,19 @@ index 0000000000000000000000000000000000000000..7ea357ac2f3a93db4ebdf24b5072be7d
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 4f43e306d70bc733ceba2b375c8732f330abc0e4..d8eb1dbc1601c1f76183ddd78b88d0ee6df68bed 100644
|
||||
index 15828a88b8b31f4b622a1395eda5cc195d616479..e5dccd330cbf3301a60b65453e87a4005f954716 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2213,6 +2213,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
this.worldData.setDataConfiguration(worlddataconfiguration);
|
||||
this.resources.managers.updateRegistryTags(this.registryAccess());
|
||||
+ net.minecraft.world.item.alchemy.PotionBrewing.reload(); // Paper
|
||||
+ net.minecraft.world.item.alchemy.PotionBrewing.reload(); // Paper - Custom Potion Mixes
|
||||
// Paper start
|
||||
if (Thread.currentThread() != this.serverThread) {
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java b/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java
|
||||
index ad012400d76c263bf26cfa07e2e24f26dc32276b..82311188348d673d83b70bf4d5357ecee562b6d6 100644
|
||||
index ad012400d76c263bf26cfa07e2e24f26dc32276b..054555c6b9c61243b1f14139b5c0eb2579403707 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java
|
||||
@@ -169,7 +169,7 @@ public class BrewingStandMenu extends AbstractContainerMenu {
|
||||
@ -52,19 +52,19 @@ index ad012400d76c263bf26cfa07e2e24f26dc32276b..82311188348d673d83b70bf4d5357ece
|
||||
|
||||
public static boolean mayPlaceItem(ItemStack stack) {
|
||||
- return stack.is(Items.POTION) || stack.is(Items.SPLASH_POTION) || stack.is(Items.LINGERING_POTION) || stack.is(Items.GLASS_BOTTLE);
|
||||
+ return stack.is(Items.POTION) || stack.is(Items.SPLASH_POTION) || stack.is(Items.LINGERING_POTION) || stack.is(Items.GLASS_BOTTLE) || PotionBrewing.isCustomInput(stack); // Paper
|
||||
+ return stack.is(Items.POTION) || stack.is(Items.SPLASH_POTION) || stack.is(Items.LINGERING_POTION) || stack.is(Items.GLASS_BOTTLE) || PotionBrewing.isCustomInput(stack); // Paper - Custom Potion Mixes
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/alchemy/PotionBrewing.java b/src/main/java/net/minecraft/world/item/alchemy/PotionBrewing.java
|
||||
index 25e909b90293855321b8f05ab3488bad8c064853..ef798adc296ae1595cfcd33fed5aa71b9ad00037 100644
|
||||
index 25e909b90293855321b8f05ab3488bad8c064853..0bba74bd22d66881fc6851797d29c1442f509445 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/alchemy/PotionBrewing.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/alchemy/PotionBrewing.java
|
||||
@@ -14,6 +14,7 @@ public class PotionBrewing {
|
||||
public static final int BREWING_TIME_SECONDS = 20;
|
||||
private static final List<PotionBrewing.Mix<Potion>> POTION_MIXES = Lists.newArrayList();
|
||||
private static final List<PotionBrewing.Mix<Item>> CONTAINER_MIXES = Lists.newArrayList();
|
||||
+ private static final it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<org.bukkit.NamespacedKey, io.papermc.paper.potion.PaperPotionMix> CUSTOM_MIXES = new it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<>(); // Paper
|
||||
+ private static final it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<org.bukkit.NamespacedKey, io.papermc.paper.potion.PaperPotionMix> CUSTOM_MIXES = new it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<>(); // Paper - Custom Potion Mixes
|
||||
private static final List<Ingredient> ALLOWED_CONTAINERS = Lists.newArrayList();
|
||||
private static final Predicate<ItemStack> ALLOWED_CONTAINER = (stack) -> {
|
||||
for(Ingredient ingredient : ALLOWED_CONTAINERS) {
|
||||
@ -73,7 +73,7 @@ index 25e909b90293855321b8f05ab3488bad8c064853..ef798adc296ae1595cfcd33fed5aa71b
|
||||
|
||||
public static boolean isIngredient(ItemStack stack) {
|
||||
- return isContainerIngredient(stack) || isPotionIngredient(stack);
|
||||
+ return isContainerIngredient(stack) || isPotionIngredient(stack) || isCustomIngredient(stack); // Paper
|
||||
+ return isContainerIngredient(stack) || isPotionIngredient(stack) || isCustomIngredient(stack); // Paper - Custom Potion Mixes
|
||||
}
|
||||
|
||||
protected static boolean isContainerIngredient(ItemStack stack) {
|
||||
@ -81,11 +81,11 @@ index 25e909b90293855321b8f05ab3488bad8c064853..ef798adc296ae1595cfcd33fed5aa71b
|
||||
}
|
||||
|
||||
public static boolean hasMix(ItemStack input, ItemStack ingredient) {
|
||||
+ // Paper start
|
||||
+ // Paper start - Custom Potion Mixes
|
||||
+ if (hasCustomMix(input, ingredient)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Custom Potion Mixes
|
||||
if (!ALLOWED_CONTAINER.test(input)) {
|
||||
return false;
|
||||
} else {
|
||||
@ -93,13 +93,13 @@ index 25e909b90293855321b8f05ab3488bad8c064853..ef798adc296ae1595cfcd33fed5aa71b
|
||||
|
||||
public static ItemStack mix(ItemStack ingredient, ItemStack input) {
|
||||
if (!input.isEmpty()) {
|
||||
+ // Paper start
|
||||
+ // Paper start - Custom Potion Mixes
|
||||
+ for (var mix : CUSTOM_MIXES.values()) {
|
||||
+ if (mix.input().test(input) && mix.ingredient().test(ingredient)) {
|
||||
+ return mix.result().copy();
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Custom Potion Mixes
|
||||
Potion potion = PotionUtils.getPotion(input);
|
||||
Item item = input.getItem();
|
||||
|
||||
@ -107,7 +107,7 @@ index 25e909b90293855321b8f05ab3488bad8c064853..ef798adc296ae1595cfcd33fed5aa71b
|
||||
return input;
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ // Paper start - Custom Potion Mixes
|
||||
+ public static boolean isCustomIngredient(ItemStack stack) {
|
||||
+ for (var mix : CUSTOM_MIXES.values()) {
|
||||
+ if (mix.ingredient().test(stack)) {
|
||||
@ -153,13 +153,13 @@ index 25e909b90293855321b8f05ab3488bad8c064853..ef798adc296ae1595cfcd33fed5aa71b
|
||||
+ CUSTOM_MIXES.clear();
|
||||
+ bootStrap();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Custom Potion Mixes
|
||||
+
|
||||
public static void bootStrap() {
|
||||
addContainer(Items.POTION);
|
||||
addContainer(Items.SPLASH_POTION);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||
index 424406d2692856cfd82b6f3b7b6228fa3bd20c2f..c57efcb9a79337ec791e4e8f6671612f0a82b441 100644
|
||||
index 424406d2692856cfd82b6f3b7b6228fa3bd20c2f..bc01481ac5990ad1cfd1def5a16dd0ed2f9de8c9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||
@@ -341,7 +341,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
@ -167,19 +167,19 @@ index 424406d2692856cfd82b6f3b7b6228fa3bd20c2f..c57efcb9a79337ec791e4e8f6671612f
|
||||
@Override
|
||||
public boolean canPlaceItem(int slot, ItemStack stack) {
|
||||
- return slot == 3 ? PotionBrewing.isIngredient(stack) : (slot == 4 ? stack.is(Items.BLAZE_POWDER) : (stack.is(Items.POTION) || stack.is(Items.SPLASH_POTION) || stack.is(Items.LINGERING_POTION) || stack.is(Items.GLASS_BOTTLE)) && this.getItem(slot).isEmpty());
|
||||
+ return slot == 3 ? PotionBrewing.isIngredient(stack) : (slot == 4 ? stack.is(Items.BLAZE_POWDER) : (stack.is(Items.POTION) || stack.is(Items.SPLASH_POTION) || stack.is(Items.LINGERING_POTION) || stack.is(Items.GLASS_BOTTLE) || PotionBrewing.isCustomInput(stack)) && this.getItem(slot).isEmpty()); // Paper
|
||||
+ return slot == 3 ? PotionBrewing.isIngredient(stack) : (slot == 4 ? stack.is(Items.BLAZE_POWDER) : (stack.is(Items.POTION) || stack.is(Items.SPLASH_POTION) || stack.is(Items.LINGERING_POTION) || stack.is(Items.GLASS_BOTTLE) || PotionBrewing.isCustomInput(stack)) && this.getItem(slot).isEmpty()); // Paper - Custom Potion Mixes
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 316a901f5d943209d94ba6631cfaa9be43fdae3b..536057656dfb7af96977b692b854e5a4fff98dd9 100644
|
||||
index 546b510e8ed683007c1dbcc1ab66374ce0944e70..ead1161020064ceea6d04857de5bdbce460fd59e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -304,6 +304,7 @@ public final class CraftServer implements Server {
|
||||
private final io.papermc.paper.datapack.PaperDatapackManager datapackManager; // Paper
|
||||
public static Exception excessiveVelEx; // Paper - Velocity warnings
|
||||
private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher(); // Paper
|
||||
+ private final CraftPotionBrewer potionBrewer = new CraftPotionBrewer(); // Paper
|
||||
+ private final CraftPotionBrewer potionBrewer = new CraftPotionBrewer(); // Paper - Custom Potion Mixes
|
||||
|
||||
static {
|
||||
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
||||
@ -188,7 +188,7 @@ index 316a901f5d943209d94ba6631cfaa9be43fdae3b..536057656dfb7af96977b692b854e5a4
|
||||
CraftRegistry.setMinecraftRegistry(console.registryAccess());
|
||||
|
||||
- Potion.setPotionBrewer(new CraftPotionBrewer());
|
||||
+ Potion.setPotionBrewer(potionBrewer); // Paper
|
||||
+ Potion.setPotionBrewer(potionBrewer); // Paper - Custom Potion Mixes
|
||||
// Ugly hack :(
|
||||
|
||||
if (!Main.useConsole) {
|
||||
|
@ -10,7 +10,7 @@ so we do not need that. The client only needs the chunk it is currently in to
|
||||
be loaded to close the loading screen, so we just send an empty one.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 1038bdb761c4b413cb92e08aa7ef634b2e8237d4..e79748938395c79fcb6c2c164e35a191781b7c2f 100644
|
||||
index 1038bdb761c4b413cb92e08aa7ef634b2e8237d4..8bf39ebc7c04e54fc46ca267af06a3a84b240fbb 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -398,6 +398,16 @@ public abstract class PlayerList {
|
||||
@ -26,7 +26,7 @@ index 1038bdb761c4b413cb92e08aa7ef634b2e8237d4..e79748938395c79fcb6c2c164e35a191
|
||||
+ worldserver1.getLightEngine(), (java.util.BitSet)null, (java.util.BitSet) null, false)
|
||||
+ );
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Send empty chunk
|
||||
}
|
||||
private void mountSavedVehicle(ServerPlayer player, ServerLevel worldserver1, CompoundTag nbttagcompound) {
|
||||
// Paper end
|
||||
|
@ -11,7 +11,7 @@ Restores the API behavior from previous versions of the server
|
||||
public net.minecraft.world.entity.item.FallingBlockEntity <init>(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index d41cd3075a5f59f271ddee7009a3ed26a34d3041..719d2ac5907b4c96828460daae9f254c2cd3e840 100644
|
||||
index d41cd3075a5f59f271ddee7009a3ed26a34d3041..3cf9aafb3ce75c0340605fa29c2a55ff237b843b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1453,7 +1453,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@ -24,7 +24,7 @@ index d41cd3075a5f59f271ddee7009a3ed26a34d3041..719d2ac5907b4c96828460daae9f254c
|
||||
+ entity.time = 1;
|
||||
+
|
||||
+ this.world.addFreshEntity(entity, SpawnReason.CUSTOM);
|
||||
+ // Paper end
|
||||
+ // Paper end - restore API behavior for spawning falling blocks
|
||||
return (FallingBlock) entity.getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ index d41cd3075a5f59f271ddee7009a3ed26a34d3041..719d2ac5907b4c96828460daae9f254c
|
||||
+ entity.time = 1;
|
||||
+
|
||||
+ this.world.addFreshEntity(entity, SpawnReason.CUSTOM);
|
||||
+ // Paper end
|
||||
+ // Paper end - restore API behavior for spawning falling blocks
|
||||
return (FallingBlock) entity.getBukkitEntity();
|
||||
}
|
||||
|
||||
|
@ -15,14 +15,14 @@ piercing arrows to avoid duplicate damage being applied.
|
||||
protected net.minecraft.world.entity.projectile.Projectile hitCancelled
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
index ae4319c2532855315bc45995a39d7eb98961b939..6272b0e1e332789b983a486ee25226e2a1c9fdda 100644
|
||||
index ae4319c2532855315bc45995a39d7eb98961b939..2b2ff2a187410ef9431b0396c05935ffd17fd108 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -297,6 +297,19 @@ public abstract class AbstractArrow extends Projectile {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ // Paper start - Fix cancelling ProjectileHitEvent for piercing arrows
|
||||
+ @Override
|
||||
+ public void preOnHit(HitResult hitResult) {
|
||||
+ super.preOnHit(hitResult);
|
||||
@ -33,7 +33,7 @@ index ae4319c2532855315bc45995a39d7eb98961b939..6272b0e1e332789b983a486ee25226e2
|
||||
+ this.piercingIgnoreEntityIds.add(entityHitResult.getEntity().getId());
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Fix cancelling ProjectileHitEvent for piercing arrows
|
||||
+
|
||||
private boolean shouldFall() {
|
||||
return this.inGround && this.level().noCollision((new AABB(this.position(), this.position())).inflate(0.06D));
|
||||
|
@ -20,7 +20,7 @@ public net.minecraft.world.entity.projectile.Projectile canHitEntity(Lnet/minecr
|
||||
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||
index 40307233e5bc67d538f580bc514a033c64d1316a..2886f4437d8361cde39922b87e9cc8e5d386e0ad 100644
|
||||
index 40307233e5bc67d538f580bc514a033c64d1316a..3f256b87cb4d5ecb745a949e6714682be805e72f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||
@@ -100,6 +100,11 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
|
||||
@ -40,7 +40,7 @@ index 40307233e5bc67d538f580bc514a033c64d1316a..2886f4437d8361cde39922b87e9cc8e5
|
||||
showParticles = this.makeAreaOfEffectCloud(itemstack, potionregistry, hitResult); // CraftBukkit - Pass MovingObjectPosition // Paper
|
||||
} else {
|
||||
- showParticles = this.applySplash(list, hitResult.getType() == HitResult.Type.ENTITY ? ((EntityHitResult) hitResult).getEntity() : null, hitResult); // CraftBukkit - Pass MovingObjectPosition // Paper
|
||||
+ showParticles = this.applySplash(list, hitResult != null && hitResult.getType() == HitResult.Type.ENTITY ? ((EntityHitResult) hitResult).getEntity() : null, hitResult); // CraftBukkit - Pass MovingObjectPosition // Paper - nullable hitResult
|
||||
+ showParticles = this.applySplash(list, hitResult != null && hitResult.getType() == HitResult.Type.ENTITY ? ((EntityHitResult) hitResult).getEntity() : null, hitResult); // CraftBukkit - Pass MovingObjectPosition // Paper - More projectile API
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ index 40307233e5bc67d538f580bc514a033c64d1316a..2886f4437d8361cde39922b87e9cc8e5
|
||||
}
|
||||
|
||||
- private boolean applySplash(List<MobEffectInstance> list, @Nullable Entity entity, HitResult position) { // CraftBukkit - Pass MovingObjectPosition // Paper - return boolean
|
||||
+ private boolean applySplash(List<MobEffectInstance> list, @Nullable Entity entity, @Nullable HitResult position) { // CraftBukkit - Pass MovingObjectPosition // Paper - return boolean & nullable hitResult
|
||||
+ private boolean applySplash(List<MobEffectInstance> list, @Nullable Entity entity, @Nullable HitResult position) { // CraftBukkit - Pass MovingObjectPosition // Paper - return boolean & More projectile API
|
||||
AABB axisalignedbb = this.getBoundingBox().inflate(4.0D, 2.0D, 4.0D);
|
||||
List<net.minecraft.world.entity.LivingEntity> list1 = this.level().getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, axisalignedbb);
|
||||
Map<LivingEntity, Double> affected = new HashMap<LivingEntity, Double>(); // CraftBukkit
|
||||
@ -58,19 +58,19 @@ index 40307233e5bc67d538f580bc514a033c64d1316a..2886f4437d8361cde39922b87e9cc8e5
|
||||
}
|
||||
|
||||
- private boolean makeAreaOfEffectCloud(ItemStack itemstack, Potion potionregistry, HitResult position) { // CraftBukkit - Pass MovingObjectPosition // Paper - return boolean
|
||||
+ private boolean makeAreaOfEffectCloud(ItemStack itemstack, Potion potionregistry, @Nullable HitResult position) { // CraftBukkit - Pass MovingObjectPosition // Paper - return boolean & nullable hitResult
|
||||
+ private boolean makeAreaOfEffectCloud(ItemStack itemstack, Potion potionregistry, @Nullable HitResult position) { // CraftBukkit - Pass MovingObjectPosition // Paper - return boolean & More projectile API
|
||||
AreaEffectCloud entityareaeffectcloud = new AreaEffectCloud(this.level(), this.getX(), this.getY(), this.getZ());
|
||||
Entity entity = this.getOwner();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java
|
||||
index 91c2d0b40d3fca86938cd454e1415a4eea3df7c7..2c376687349825833e6d9a5ca92ce6afb98c36a3 100644
|
||||
index 91c2d0b40d3fca86938cd454e1415a4eea3df7c7..c1c52f4fc5f900fac4098e5e37c52dfc4e82b8bb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java
|
||||
@@ -17,4 +17,65 @@ public abstract class AbstractProjectile extends CraftEntity implements Projecti
|
||||
@Override
|
||||
public void setBounce(boolean doesBounce) {}
|
||||
|
||||
+ // Paper start
|
||||
+ // Paper start - More projectile API
|
||||
+ @Override
|
||||
+ public boolean hasLeftShooter() {
|
||||
+ return this.getHandle().leftOwner;
|
||||
@ -130,7 +130,7 @@ index 91c2d0b40d3fca86938cd454e1415a4eea3df7c7..2c376687349825833e6d9a5ca92ce6af
|
||||
+ public java.util.UUID getOwnerUniqueId() {
|
||||
+ return this.getHandle().ownerUUID;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - More projectile API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
|
||||
index 762c395e45a681a11f3fe9d10e7f0ba310786e80..6d2fe30742f8b41d53dd2cbff120fcc042ea0e0c 100644
|
||||
|
@ -10,7 +10,7 @@ indefinitely. Instead of using the world state, we use the already
|
||||
supplied ServerLevelAccessor which will always have the chunk available.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
index 534630b0161c8d869e49e7a59572193550be0671..a744cb70ac719eae376fb2ab2271e4f8ac7b12f2 100644
|
||||
index 534630b0161c8d869e49e7a59572193550be0671..7dfd2b17e82a80683af28779d0bd8f64a909c3b6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
@@ -364,7 +364,7 @@ public class Cat extends TamableAnimal implements VariantHolder<CatVariant> {
|
||||
@ -18,12 +18,12 @@ index 534630b0161c8d869e49e7a59572193550be0671..a744cb70ac719eae376fb2ab2271e4f8
|
||||
ServerLevel worldserver = world.getLevel();
|
||||
|
||||
- if (worldserver.structureManager().getStructureWithPieceAt(this.blockPosition(), StructureTags.CATS_SPAWN_AS_BLACK).isValid()) {
|
||||
+ if (worldserver.structureManager().getStructureWithPieceAt(this.blockPosition(), StructureTags.CATS_SPAWN_AS_BLACK, world).isValid()) { // Paper - fix deadlock
|
||||
+ if (worldserver.structureManager().getStructureWithPieceAt(this.blockPosition(), StructureTags.CATS_SPAWN_AS_BLACK, world).isValid()) { // Paper - Fix swamp hut cat generation deadlock
|
||||
this.setVariant((CatVariant) BuiltInRegistries.CAT_VARIANT.getOrThrow(CatVariant.ALL_BLACK));
|
||||
this.setPersistenceRequired();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/StructureManager.java b/src/main/java/net/minecraft/world/level/StructureManager.java
|
||||
index b33a015b834873f279bf33a64974ef440a37df79..09c85ed428b8eaf51f8b3c6e45cce925f05ab354 100644
|
||||
index b33a015b834873f279bf33a64974ef440a37df79..b59581b92aed0bc1b09008c695b0b112c3e65743 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/StructureManager.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/StructureManager.java
|
||||
@@ -44,7 +44,12 @@ public class StructureManager {
|
||||
@ -31,12 +31,12 @@ index b33a015b834873f279bf33a64974ef440a37df79..09c85ed428b8eaf51f8b3c6e45cce925
|
||||
|
||||
public List<StructureStart> startsForStructure(ChunkPos pos, Predicate<Structure> predicate) {
|
||||
- Map<Structure, LongSet> map = this.level.getChunk(pos.x, pos.z, ChunkStatus.STRUCTURE_REFERENCES).getAllReferences();
|
||||
+ // Paper start
|
||||
+ // Paper start - Fix swamp hut cat generation deadlock
|
||||
+ return this.startsForStructure(pos, predicate, null);
|
||||
+ }
|
||||
+ public List<StructureStart> startsForStructure(ChunkPos pos, Predicate<Structure> predicate, @Nullable ServerLevelAccessor levelAccessor) {
|
||||
+ Map<Structure, LongSet> map = (levelAccessor == null ? this.level : levelAccessor).getChunk(pos.x, pos.z, ChunkStatus.STRUCTURE_REFERENCES).getAllReferences();
|
||||
+ // Paper end
|
||||
+ // Paper end - Fix swamp hut cat generation deadlock
|
||||
ImmutableList.Builder<StructureStart> builder = ImmutableList.builder();
|
||||
|
||||
for(Map.Entry<Structure, LongSet> entry : map.entrySet()) {
|
||||
@ -44,11 +44,11 @@ index b33a015b834873f279bf33a64974ef440a37df79..09c85ed428b8eaf51f8b3c6e45cce925
|
||||
}
|
||||
|
||||
public StructureStart getStructureWithPieceAt(BlockPos pos, TagKey<Structure> structureTag) {
|
||||
+ // Paper start
|
||||
+ // Paper start - Fix swamp hut cat generation deadlock
|
||||
+ return this.getStructureWithPieceAt(pos, structureTag, null);
|
||||
+ }
|
||||
+ public StructureStart getStructureWithPieceAt(BlockPos pos, TagKey<Structure> structureTag, @Nullable ServerLevelAccessor levelAccessor) {
|
||||
+ // Paper end
|
||||
+ // Paper end - Fix swamp hut cat generation deadlock
|
||||
Registry<Structure> registry = this.registryAccess().registryOrThrow(Registries.STRUCTURE);
|
||||
|
||||
for(StructureStart structureStart : this.startsForStructure(new ChunkPos(pos), (structure) -> {
|
||||
@ -56,7 +56,7 @@ index b33a015b834873f279bf33a64974ef440a37df79..09c85ed428b8eaf51f8b3c6e45cce925
|
||||
return reference.is(structureTag);
|
||||
}).orElse(false);
|
||||
- })) {
|
||||
+ }, levelAccessor)) { // Paper
|
||||
+ }, levelAccessor)) { // Paper - Fix swamp hut cat generation deadlock
|
||||
if (this.structureHasPieceAt(pos, structureStart)) {
|
||||
return structureStart;
|
||||
}
|
||||
|
@ -7,18 +7,18 @@ Bring the vehicle move packet behavior in line with the
|
||||
regular player move packet.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 554b0cd2f61005b57e1b0f68730354a8753fb0b7..ab64ffed96e0f8a3293254105d63b934133407e8 100644
|
||||
index 554b0cd2f61005b57e1b0f68730354a8753fb0b7..33356ffc634549560adc24c40e58152e5482949d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -465,6 +465,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.disconnect(Component.translatable("multiplayer.disconnect.invalid_vehicle_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_VEHICLE_MOVEMENT); // Paper - kick event cause
|
||||
} else {
|
||||
Entity entity = this.player.getRootVehicle();
|
||||
+ // Paper start
|
||||
+ // Paper start - Don't allow vehicle movement from players while teleporting
|
||||
+ if (this.awaitingPositionFromClient != null || this.player.isImmobile() || entity.isRemoved()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Don't allow vehicle movement from players while teleporting
|
||||
|
||||
if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) {
|
||||
ServerLevel worldserver = this.player.serverLevel();
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Fix saving in unloadWorld
|
||||
Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 536057656dfb7af96977b692b854e5a4fff98dd9..f9b994a024be198a26d0213b9c98fc46987549a4 100644
|
||||
index ead1161020064ceea6d04857de5bdbce460fd59e..8802d28c71d3ebc74690ad5c53c7dd77436e1a9f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1336,7 +1336,7 @@ public final class CraftServer implements Server {
|
||||
@ -14,7 +14,7 @@ index 536057656dfb7af96977b692b854e5a4fff98dd9..f9b994a024be198a26d0213b9c98fc46
|
||||
try {
|
||||
if (save) {
|
||||
- handle.save(null, true, true);
|
||||
+ handle.save(null, true, false); // Paper - don't disable saving
|
||||
+ handle.save(null, true, false); // Paper - Fix saving in unloadWorld
|
||||
}
|
||||
|
||||
handle.getChunkSource().close(save);
|
||||
|
@ -13,14 +13,14 @@ we'll also only gen a trace for the first one, I see no real pressing need
|
||||
to generate more, given that that would *massively* negate this patch otherwise
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
index 3f5ba2b2f01d8cc07c4200a60b1b08cb584b170e..49c7825156afd053df1b7721a63070b51427aff2 100644
|
||||
index 3f5ba2b2f01d8cc07c4200a60b1b08cb584b170e..1c2ec978f923521322aaec59b4e88d26d656b6cd 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
@@ -296,6 +296,7 @@ public class WorldGenRegion implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
|
||||
+ private boolean hasSetFarWarned = false; // Paper
|
||||
+ private boolean hasSetFarWarned = false; // Paper - Buffer OOB setBlock calls
|
||||
@Override
|
||||
public boolean ensureCanWrite(BlockPos pos) {
|
||||
int i = SectionPos.blockToSectionCoord(pos.getX());
|
||||
@ -28,7 +28,7 @@ index 3f5ba2b2f01d8cc07c4200a60b1b08cb584b170e..49c7825156afd053df1b7721a63070b5
|
||||
|
||||
return true;
|
||||
} else {
|
||||
+ // Paper start
|
||||
+ // Paper start - Buffer OOB setBlock calls
|
||||
+ if (!hasSetFarWarned) {
|
||||
Util.logAndPauseIfInIde("Detected setBlock in a far chunk [" + i + ", " + j + "], pos: " + pos + ", status: " + this.generatingStatus + (this.currentlyGenerating == null ? "" : ", currently generating: " + (String) this.currentlyGenerating.get()));
|
||||
+ hasSetFarWarned = true;
|
||||
@ -36,7 +36,7 @@ index 3f5ba2b2f01d8cc07c4200a60b1b08cb584b170e..49c7825156afd053df1b7721a63070b5
|
||||
+ io.papermc.paper.util.TraceUtil.dumpTraceForThread("far setBlock call");
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Buffer OOB setBlock calls
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add TameableDeathMessageEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/TamableAnimal.java b/src/main/java/net/minecraft/world/entity/TamableAnimal.java
|
||||
index 8f085654f3b9c540346fe4e56c71d572da7a897c..1999cda5876bb12283d8c91a1b3e737c0d27bc38 100644
|
||||
index 8f085654f3b9c540346fe4e56c71d572da7a897c..4d893c445af2b6dc74d5ad731b69eb5a488817b4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/TamableAnimal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/TamableAnimal.java
|
||||
@@ -197,7 +197,12 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity {
|
||||
@ -13,12 +13,12 @@ index 8f085654f3b9c540346fe4e56c71d572da7a897c..1999cda5876bb12283d8c91a1b3e737c
|
||||
public void die(DamageSource damageSource) {
|
||||
if (!this.level().isClientSide && this.level().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) {
|
||||
- this.getOwner().sendSystemMessage(this.getCombatTracker().getDeathMessage());
|
||||
+ // Paper start - TameableDeathMessageEvent
|
||||
+ // Paper start - Add TameableDeathMessageEvent
|
||||
+ io.papermc.paper.event.entity.TameableDeathMessageEvent event = new io.papermc.paper.event.entity.TameableDeathMessageEvent((org.bukkit.entity.Tameable) getBukkitEntity(), io.papermc.paper.adventure.PaperAdventure.asAdventure(this.getCombatTracker().getDeathMessage()));
|
||||
+ if (event.callEvent()) {
|
||||
+ this.getOwner().sendSystemMessage(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.deathMessage()));
|
||||
+ }
|
||||
+ // Paper end - TameableDeathMessageEvent
|
||||
+ // Paper end - Add TameableDeathMessageEvent
|
||||
}
|
||||
|
||||
super.die(damageSource);
|
||||
|
@ -131,7 +131,7 @@ index 6f452605e9dc9ebd9980eae9fdeea34417a37a88..2c60a3765d22909e73b660492410ab84
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||
index 2886f4437d8361cde39922b87e9cc8e5d386e0ad..2f80d484ad523860322483cebe92cf7cd8cfad22 100644
|
||||
index 3f256b87cb4d5ecb745a949e6714682be805e72f..d945c0a7b8ba87301e12b49f859e6fbe65de04f3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||
@@ -306,7 +306,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
|
||||
|
@ -5,21 +5,21 @@ Subject: [PATCH] fix player loottables running when mob loot gamerule is false
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 7c8f5ae6bd83bd08403738dcd364b0af06fb1a9b..1f7b13806ffbcf81df67a02129aa2c07dfc7b8f5 100644
|
||||
index 7c8f5ae6bd83bd08403738dcd364b0af06fb1a9b..1695e7d3e456bb3539fb37d943e8cf45489f0762 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -924,12 +924,14 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
}
|
||||
}
|
||||
+ if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { // Paper - preserve this check from vanilla
|
||||
+ if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { // Paper - fix player loottables running when mob loot gamerule is false
|
||||
// SPIGOT-5071: manually add player loot tables (SPIGOT-5195 - ignores keepInventory rule)
|
||||
this.dropFromLootTable(damageSource, this.lastHurtByPlayerTime > 0);
|
||||
for (org.bukkit.inventory.ItemStack item : this.drops) {
|
||||
loot.add(item);
|
||||
}
|
||||
this.drops.clear(); // SPIGOT-5188: make sure to clear
|
||||
+ } // Paper
|
||||
+ } // Paper - fix player loottables running when mob loot gamerule is false
|
||||
|
||||
Component defaultMessage = this.getCombatTracker().getDeathMessage();
|
||||
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Ensure entity passenger world matches ridden entity
|
||||
Bad plugins doing this would cause some obvious problems...
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2f0c5e1b4b2dfb8006447c296170e80a97b36562..8284b150bbca66fc536418ec66bf93fb205cdcc5 100644
|
||||
index 2f0c5e1b4b2dfb8006447c296170e80a97b36562..cc90b96ae9709c7f3997dc1524bcf0feeb00c864 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2847,7 +2847,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@ -14,7 +14,7 @@ index 2f0c5e1b4b2dfb8006447c296170e80a97b36562..8284b150bbca66fc536418ec66bf93fb
|
||||
|
||||
public boolean startRiding(Entity entity, boolean force) {
|
||||
- if (entity == this.vehicle) {
|
||||
+ if (entity == this.vehicle || entity.level != this.level) { // Paper - check level
|
||||
+ if (entity == this.vehicle || entity.level != this.level) { // Paper - Ensure entity passenger world matches ridden entity (bad plugins)
|
||||
return false;
|
||||
} else if (!entity.couldAcceptPassenger()) {
|
||||
return false;
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Guard against invalid entity positions
|
||||
Anything not finite should be blocked and logged
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 8284b150bbca66fc536418ec66bf93fb205cdcc5..2c3193fdfb0e4b4a47cceb2da8b3fe85bd1e6848 100644
|
||||
index cc90b96ae9709c7f3997dc1524bcf0feeb00c864..ab409aae677a5ed4ca50113e88397c4543373df8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4539,11 +4539,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
@ -1,21 +1,21 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Doc <nachito94@msn.com>
|
||||
Date: Sun, 3 Apr 2022 11:31:42 -0400
|
||||
Subject: [PATCH] Allow to change the podium for the EnderDragon
|
||||
Subject: [PATCH] Allow changing the EnderDragon podium
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index 2ede6678a5fe6e1280ee4918b69302f483cc50ff..4bcbfe3f95efd5d8ec2d2d7c66c4c355cdf510b2 100644
|
||||
index 2ede6678a5fe6e1280ee4918b69302f483cc50ff..36893dac635f676ca447133a1bce32429347e4a5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -103,6 +103,10 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
private final int[] nodeAdjacency;
|
||||
private final BinaryHeap openSet;
|
||||
private final Explosion explosionSource; // CraftBukkit - reusable source for CraftTNTPrimed.getSource()
|
||||
+ // Paper start - add var for save custom podium
|
||||
+ // Paper start - Allow changing the EnderDragon podium
|
||||
+ @Nullable
|
||||
+ private BlockPos podium;
|
||||
+ // Paper end
|
||||
+ // Paper end - Allow changing the EnderDragon podium
|
||||
|
||||
public EnderDragon(EntityType<? extends EnderDragon> entitytypes, Level world) {
|
||||
super(EntityType.ENDER_DRAGON, world);
|
||||
@ -23,7 +23,7 @@ index 2ede6678a5fe6e1280ee4918b69302f483cc50ff..4bcbfe3f95efd5d8ec2d2d7c66c4c355
|
||||
return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 200.0D);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ // Paper start - Allow changing the EnderDragon podium
|
||||
+ public BlockPos getPodium() {
|
||||
+ if (this.podium == null) {
|
||||
+ return EndPodiumFeature.getLocation(this.getFightOrigin());
|
||||
@ -34,7 +34,7 @@ index 2ede6678a5fe6e1280ee4918b69302f483cc50ff..4bcbfe3f95efd5d8ec2d2d7c66c4c355
|
||||
+ public void setPodium(@Nullable BlockPos blockPos) {
|
||||
+ this.podium = blockPos;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Allow changing the EnderDragon podium
|
||||
+
|
||||
@Override
|
||||
public boolean isFlapping() {
|
||||
@ -44,7 +44,7 @@ index 2ede6678a5fe6e1280ee4918b69302f483cc50ff..4bcbfe3f95efd5d8ec2d2d7c66c4c355
|
||||
}
|
||||
} else {
|
||||
- BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.fightOrigin));
|
||||
+ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium
|
||||
+ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - Allow changing the EnderDragon podium
|
||||
double d1 = Math.max(Math.sqrt(blockposition.distToCenterSqr(this.position())) / 4.0D, 1.0D);
|
||||
|
||||
d0 = (double) segmentOffset / d1;
|
||||
@ -53,12 +53,12 @@ index 2ede6678a5fe6e1280ee4918b69302f483cc50ff..4bcbfe3f95efd5d8ec2d2d7c66c4c355
|
||||
}
|
||||
} else {
|
||||
- BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.fightOrigin));
|
||||
+ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium
|
||||
+ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - Allow changing the EnderDragon podium
|
||||
|
||||
f1 = Math.max((float) Math.sqrt(blockposition.distToCenterSqr(this.position())) / 4.0F, 1.0F);
|
||||
float f3 = 6.0F / f1;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java
|
||||
index f4028b6890fd094360a33403728588380111204d..0fddefff4a6ab46920fbc6f86c17c6c51027dc02 100644
|
||||
index f4028b6890fd094360a33403728588380111204d..d6ec0583dbaca95eb6a6444923cc1311a9753825 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java
|
||||
@@ -32,7 +32,7 @@ public class DragonDeathPhase extends AbstractDragonPhaseInstance {
|
||||
@ -66,12 +66,12 @@ index f4028b6890fd094360a33403728588380111204d..0fddefff4a6ab46920fbc6f86c17c6c5
|
||||
++this.time;
|
||||
if (this.targetLocation == null) {
|
||||
- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, EndPodiumFeature.getLocation(this.dragon.getFightOrigin()));
|
||||
+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, this.dragon.getPodium()); // Paper - use custom podium
|
||||
+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, this.dragon.getPodium()); // Paper - Allow changing the EnderDragon podium
|
||||
this.targetLocation = Vec3.atBottomCenterOf(blockPos);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java
|
||||
index 00228e49c07eeed13b726192d5f9b8f2fc55bb75..b8c928b8fd30ebe923785d7b03b2cab3b44e488f 100644
|
||||
index 00228e49c07eeed13b726192d5f9b8f2fc55bb75..bd7be8a5a24f1328dde28ae4a66823c12110fa02 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java
|
||||
@@ -54,7 +54,7 @@ public class DragonHoldingPatternPhase extends AbstractDragonPhaseInstance {
|
||||
@ -79,12 +79,12 @@ index 00228e49c07eeed13b726192d5f9b8f2fc55bb75..b8c928b8fd30ebe923785d7b03b2cab3
|
||||
private void findNewTarget() {
|
||||
if (this.currentPath != null && this.currentPath.isDone()) {
|
||||
- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, new BlockPos(EndPodiumFeature.getLocation(this.dragon.getFightOrigin())));
|
||||
+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium
|
||||
+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - Allow changing the EnderDragon podium
|
||||
int i = this.dragon.getDragonFight() == null ? 0 : this.dragon.getDragonFight().getCrystalsAlive();
|
||||
if (this.dragon.getRandom().nextInt(i + 3) == 0) {
|
||||
this.dragon.getPhaseManager().setPhase(EnderDragonPhase.LANDING_APPROACH);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java
|
||||
index 80647b1f5192e6f2b660a31413db1fa45fb92f2c..a9f184cbed518561b1534f4fe9bc731a134d9152 100644
|
||||
index 80647b1f5192e6f2b660a31413db1fa45fb92f2c..e161bfb06beeada4987272d01a0f140069b37951 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java
|
||||
@@ -52,7 +52,7 @@ public class DragonLandingApproachPhase extends AbstractDragonPhaseInstance {
|
||||
@ -92,12 +92,12 @@ index 80647b1f5192e6f2b660a31413db1fa45fb92f2c..a9f184cbed518561b1534f4fe9bc731a
|
||||
if (this.currentPath == null || this.currentPath.isDone()) {
|
||||
int i = this.dragon.findClosestNode();
|
||||
- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin()));
|
||||
+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium
|
||||
+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - Allow changing the EnderDragon podium
|
||||
Player player = this.dragon.level().getNearestPlayer(NEAR_EGG_TARGETING, this.dragon, (double)blockPos.getX(), (double)blockPos.getY(), (double)blockPos.getZ());
|
||||
int j;
|
||||
if (player != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java
|
||||
index 48ebc2ab8ebbdc2292af10b955384bf7d722ade2..c1c71ff254ecb4a0cef3b8d7cc12f6cb34cad6d7 100644
|
||||
index 48ebc2ab8ebbdc2292af10b955384bf7d722ade2..24db7fafd31277eb1b82eac4a97b2f979c1d3816 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java
|
||||
@@ -39,7 +39,7 @@ public class DragonLandingPhase extends AbstractDragonPhaseInstance {
|
||||
@ -105,12 +105,12 @@ index 48ebc2ab8ebbdc2292af10b955384bf7d722ade2..c1c71ff254ecb4a0cef3b8d7cc12f6cb
|
||||
public void doServerTick() {
|
||||
if (this.targetLocation == null) {
|
||||
- this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())));
|
||||
+ this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium())); // Paper - use custom podium
|
||||
+ this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium())); // Paper - Allow changing the EnderDragon podium
|
||||
}
|
||||
|
||||
if (this.targetLocation.distanceToSqr(this.dragon.getX(), this.dragon.getY(), this.dragon.getZ()) < 1.0D) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java
|
||||
index 1290090f855840bf64bf3a7ba93e3cb036630dcc..98fb6422df0ceadff5aaf4b2965eb1b095a3370b 100644
|
||||
index 1290090f855840bf64bf3a7ba93e3cb036630dcc..792ff77090fa582a7ffcb7b8c394badfa7586126 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java
|
||||
@@ -24,7 +24,7 @@ public class DragonTakeoffPhase extends AbstractDragonPhaseInstance {
|
||||
@ -118,12 +118,12 @@ index 1290090f855840bf64bf3a7ba93e3cb036630dcc..98fb6422df0ceadff5aaf4b2965eb1b0
|
||||
public void doServerTick() {
|
||||
if (!this.firstTick && this.currentPath != null) {
|
||||
- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin()));
|
||||
+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium
|
||||
+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - Allow changing the EnderDragon podium
|
||||
if (!blockPos.closerToCenterThan(this.dragon.position(), 10.0D)) {
|
||||
this.dragon.getPhaseManager().setPhase(EnderDragonPhase.HOLDING_PATTERN);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
|
||||
index 25b3d889a1742c347e60725df8d6f6c1cee264c7..6eae6efa35a1ccc224e2f311e25ecf13e8647ec8 100644
|
||||
index 25b3d889a1742c347e60725df8d6f6c1cee264c7..7b7b89e67d53ed70efae714192c5fa32977f3d9c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
|
||||
@@ -73,4 +73,22 @@ public class CraftEnderDragon extends CraftMob implements EnderDragon, CraftEnem
|
||||
@ -131,7 +131,7 @@ index 25b3d889a1742c347e60725df8d6f6c1cee264c7..6eae6efa35a1ccc224e2f311e25ecf13
|
||||
return this.getHandle().dragonDeathTime;
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
+ // Paper start - Allow changing the EnderDragon podium
|
||||
+ @Override
|
||||
+ public org.bukkit.Location getPodium() {
|
||||
+ net.minecraft.core.BlockPos blockPosOrigin = this.getHandle().getPodium();
|
||||
@ -147,5 +147,5 @@ index 25b3d889a1742c347e60725df8d6f6c1cee264c7..6eae6efa35a1ccc224e2f311e25ecf13
|
||||
+ this.getHandle().setPodium(io.papermc.paper.util.MCUtil.toBlockPos(location));
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Allow changing the EnderDragon podium
|
||||
}
|
@ -9,7 +9,7 @@ is not a WorldGenRegion, we can bypass the deadlock entirely.
|
||||
See https://bugs.mojang.com/browse/MC-246262
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
|
||||
index b2139e5f7a051cdea2a7ed6e98ba8be7ce1113cc..52c389472e013e658344496218689465350bf8a3 100644
|
||||
index b2139e5f7a051cdea2a7ed6e98ba8be7ce1113cc..0540929bd362b266295ea6770ce2fb351b614463 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
|
||||
@@ -279,7 +279,11 @@ public class StructureTemplate {
|
||||
@ -21,7 +21,7 @@ index b2139e5f7a051cdea2a7ed6e98ba8be7ce1113cc..52c389472e013e658344496218689465
|
||||
+ if (!(world instanceof net.minecraft.world.level.WorldGenLevel)) {
|
||||
+ Clearable.tryClear(tileentity);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Fix NBT pieces overriding a block entity during worldgen deadlock
|
||||
world.setBlock(blockposition2, Blocks.BARRIER.defaultBlockState(), 20);
|
||||
}
|
||||
// CraftBukkit start
|
||||
@ -34,7 +34,7 @@ index b2139e5f7a051cdea2a7ed6e98ba8be7ce1113cc..52c389472e013e658344496218689465
|
||||
+ if (!(world instanceof net.minecraft.world.level.WorldGenLevel)) {
|
||||
+ tileentity.setChanged();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Fix NBT pieces overriding a block entity during worldgen deadlock
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Prevent tile entity copies loading chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ab64ffed96e0f8a3293254105d63b934133407e8..15198891975856e54bb9fcf1eb8a2838bc107da5 100644
|
||||
index 33356ffc634549560adc24c40e58152e5482949d..5a2f8806366e3a423e77e882dbc9068ad64ff538 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3197,7 +3197,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -13,12 +13,12 @@ index ab64ffed96e0f8a3293254105d63b934133407e8..15198891975856e54bb9fcf1eb8a2838
|
||||
|
||||
if (this.player.level().isLoaded(blockposition)) {
|
||||
- BlockEntity tileentity = this.player.level().getBlockEntity(blockposition);
|
||||
+ // Paper start
|
||||
+ // Paper start - Prevent tile entity copies loading chunks
|
||||
+ BlockEntity tileentity = null;
|
||||
+ if (this.player.distanceToSqr(blockposition.getX(), blockposition.getY(), blockposition.getZ()) < 32 * 32 && this.player.serverLevel().isLoadedAndInBounds(blockposition)) {
|
||||
+ tileentity = this.player.level().getBlockEntity(blockposition);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Prevent tile entity copies loading chunks
|
||||
|
||||
if (tileentity != null) {
|
||||
tileentity.saveToItem(itemstack);
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use username instead of display name in
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index e79748938395c79fcb6c2c164e35a191781b7c2f..cd527e612a8a84451f9ef1fa0fcc900e16f54da1 100644
|
||||
index 8bf39ebc7c04e54fc46ca267af06a3a84b240fbb..57fa7cdcb2feb959cb413d4675fca11544236628 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1449,7 +1449,7 @@ public abstract class PlayerList {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Pass ServerLevel for gamerule callbacks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index e69a0121c8644d831cbb8bc1c95d9219d1c343da..4d7124ae7cefcc8c65bf74ac9d3c103fe6817c42 100644
|
||||
index e69a0121c8644d831cbb8bc1c95d9219d1c343da..7d33ce8d68ca55e0fd37d2d4e3c78a436f17f229 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -304,7 +304,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -13,12 +13,12 @@ index e69a0121c8644d831cbb8bc1c95d9219d1c343da..4d7124ae7cefcc8c65bf74ac9d3c103f
|
||||
//DedicatedServer.LOGGER.info("Done ({})! For help, type \"help\"", s); // Paper moved to after init
|
||||
if (dedicatedserverproperties.announcePlayerAchievements != null) {
|
||||
- ((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, this);
|
||||
+ ((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, null); // Paper
|
||||
+ ((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, null); // Paper - Pass ServerLevel for gamerule callbacks
|
||||
}
|
||||
|
||||
if (dedicatedserverproperties.enableQuery) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 15198891975856e54bb9fcf1eb8a2838bc107da5..52efebcc440253e84640be3c24c2dcd76c2a5b9a 100644
|
||||
index 5a2f8806366e3a423e77e882dbc9068ad64ff538..9ce9390291988e3110e228e83e0754e5529de800 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2761,7 +2761,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -26,12 +26,12 @@ index 15198891975856e54bb9fcf1eb8a2838bc107da5..52efebcc440253e84640be3c24c2dcd7
|
||||
if (this.server.isHardcore()) {
|
||||
this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper
|
||||
- ((GameRules.BooleanValue) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.server);
|
||||
+ ((GameRules.BooleanValue) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.player.serverLevel()); // Paper
|
||||
+ ((GameRules.BooleanValue) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.player.serverLevel()); // Paper - Pass ServerLevel for gamerule callbacks
|
||||
}
|
||||
}
|
||||
break;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||
index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f2297147a 100644
|
||||
index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..dd03426943dd380cefe12afe3e63c3180a22ec4f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/GameRules.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||
@@ -52,7 +52,7 @@ public class GameRules {
|
||||
@ -39,7 +39,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f
|
||||
public static final GameRules.Key<GameRules.BooleanValue> RULE_REDUCEDDEBUGINFO = GameRules.register("reducedDebugInfo", GameRules.Category.MISC, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_gameruleboolean) -> {
|
||||
int i = gamerules_gameruleboolean.get() ? 22 : 23;
|
||||
- Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator();
|
||||
+ Iterator iterator = minecraftserver.players().iterator(); // Paper
|
||||
+ Iterator iterator = minecraftserver.players().iterator(); // Paper - Pass ServerLevel for gamerule callbacks
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
||||
@ -48,7 +48,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f
|
||||
public static final GameRules.Key<GameRules.BooleanValue> RULE_WEATHER_CYCLE = GameRules.register("doWeatherCycle", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true));
|
||||
public static final GameRules.Key<GameRules.BooleanValue> RULE_LIMITED_CRAFTING = GameRules.register("doLimitedCrafting", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_gameruleboolean) -> {
|
||||
- Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator();
|
||||
+ Iterator iterator = minecraftserver.players().iterator(); // Paper
|
||||
+ Iterator iterator = minecraftserver.players().iterator(); // Paper - Pass ServerLevel for gamerule callbacks
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
||||
@ -57,7 +57,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f
|
||||
public static final GameRules.Key<GameRules.BooleanValue> RULE_DOINSOMNIA = GameRules.register("doInsomnia", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true));
|
||||
public static final GameRules.Key<GameRules.BooleanValue> RULE_DO_IMMEDIATE_RESPAWN = GameRules.register("doImmediateRespawn", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_gameruleboolean) -> {
|
||||
- Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator();
|
||||
+ Iterator iterator = minecraftserver.players().iterator(); // Paper
|
||||
+ Iterator iterator = minecraftserver.players().iterator(); // Paper - Pass ServerLevel for gamerule callbacks
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
||||
@ -66,14 +66,14 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f
|
||||
}
|
||||
|
||||
- public void assignFrom(GameRules rules, @Nullable MinecraftServer server) {
|
||||
+ public void assignFrom(GameRules rules, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper
|
||||
+ public void assignFrom(GameRules rules, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks
|
||||
rules.rules.keySet().forEach((gamerules_gamerulekey) -> {
|
||||
this.assignCap(gamerules_gamerulekey, rules, server);
|
||||
});
|
||||
}
|
||||
|
||||
- private <T extends GameRules.Value<T>> void assignCap(GameRules.Key<T> key, GameRules rules, @Nullable MinecraftServer server) {
|
||||
+ private <T extends GameRules.Value<T>> void assignCap(GameRules.Key<T> key, GameRules rules, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper
|
||||
+ private <T extends GameRules.Value<T>> void assignCap(GameRules.Key<T> key, GameRules rules, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks
|
||||
T t0 = rules.getRule(key);
|
||||
|
||||
this.getRule(key).setFrom(t0, server);
|
||||
@ -82,11 +82,11 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f
|
||||
private final Supplier<ArgumentType<?>> argument;
|
||||
private final Function<GameRules.Type<T>, T> constructor;
|
||||
- final BiConsumer<MinecraftServer, T> callback;
|
||||
+ final BiConsumer<net.minecraft.server.level.ServerLevel, T> callback; // Paper
|
||||
+ final BiConsumer<net.minecraft.server.level.ServerLevel, T> callback; // Paper - Pass ServerLevel for gamerule callbacks
|
||||
private final GameRules.VisitorCaller<T> visitorCaller;
|
||||
|
||||
- Type(Supplier<ArgumentType<?>> argumentType, Function<GameRules.Type<T>, T> ruleFactory, BiConsumer<MinecraftServer, T> changeCallback, GameRules.VisitorCaller<T> ruleAcceptor) {
|
||||
+ Type(Supplier<ArgumentType<?>> argumentType, Function<GameRules.Type<T>, T> ruleFactory, BiConsumer<net.minecraft.server.level.ServerLevel, T> changeCallback, GameRules.VisitorCaller<T> ruleAcceptor) { // Paper
|
||||
+ Type(Supplier<ArgumentType<?>> argumentType, Function<GameRules.Type<T>, T> ruleFactory, BiConsumer<net.minecraft.server.level.ServerLevel, T> changeCallback, GameRules.VisitorCaller<T> ruleAcceptor) { // Paper - Pass ServerLevel for gamerule callbacks
|
||||
this.argument = argumentType;
|
||||
this.constructor = ruleFactory;
|
||||
this.callback = changeCallback;
|
||||
@ -95,11 +95,11 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f
|
||||
public void setFromArgument(CommandContext<CommandSourceStack> context, String name, GameRules.Key<T> gameRuleKey) { // Paper
|
||||
this.updateFromArgument(context, name, gameRuleKey); // Paper
|
||||
- this.onChanged(((CommandSourceStack) context.getSource()).getServer());
|
||||
+ this.onChanged(((CommandSourceStack) context.getSource()).getLevel()); // Paper
|
||||
+ this.onChanged(((CommandSourceStack) context.getSource()).getLevel()); // Paper - Pass ServerLevel for gamerule callbacks
|
||||
}
|
||||
|
||||
- public void onChanged(@Nullable MinecraftServer server) {
|
||||
+ public void onChanged(@Nullable net.minecraft.server.level.ServerLevel server) { // Paper
|
||||
+ public void onChanged(@Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks
|
||||
if (server != null) {
|
||||
this.type.callback.accept(server, this.getSelf());
|
||||
}
|
||||
@ -108,7 +108,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f
|
||||
protected abstract T copy();
|
||||
|
||||
- public abstract void setFrom(T rule, @Nullable MinecraftServer server);
|
||||
+ public abstract void setFrom(T rule, @Nullable net.minecraft.server.level.ServerLevel level); // Paper
|
||||
+ public abstract void setFrom(T rule, @Nullable net.minecraft.server.level.ServerLevel level); // Paper - Pass ServerLevel for gamerule callbacks
|
||||
}
|
||||
|
||||
public interface GameRuleTypeVisitor {
|
||||
@ -117,7 +117,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f
|
||||
private boolean value;
|
||||
|
||||
- static GameRules.Type<GameRules.BooleanValue> create(boolean initialValue, BiConsumer<MinecraftServer, GameRules.BooleanValue> changeCallback) {
|
||||
+ static GameRules.Type<GameRules.BooleanValue> create(boolean initialValue, BiConsumer<net.minecraft.server.level.ServerLevel, GameRules.BooleanValue> changeCallback) { // Paper
|
||||
+ static GameRules.Type<GameRules.BooleanValue> create(boolean initialValue, BiConsumer<net.minecraft.server.level.ServerLevel, GameRules.BooleanValue> changeCallback) { // Paper - Pass ServerLevel for gamerule callbacks
|
||||
return new GameRules.Type<>(BoolArgumentType::bool, (gamerules_gameruledefinition) -> {
|
||||
return new GameRules.BooleanValue(gamerules_gameruledefinition, initialValue);
|
||||
}, changeCallback, GameRules.GameRuleTypeVisitor::visitBoolean);
|
||||
@ -126,7 +126,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f
|
||||
}
|
||||
|
||||
- public void set(boolean value, @Nullable MinecraftServer server) {
|
||||
+ public void set(boolean value, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper
|
||||
+ public void set(boolean value, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks
|
||||
this.value = value;
|
||||
this.onChanged(server);
|
||||
}
|
||||
@ -135,7 +135,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f
|
||||
}
|
||||
|
||||
- public void setFrom(GameRules.BooleanValue rule, @Nullable MinecraftServer server) {
|
||||
+ public void setFrom(GameRules.BooleanValue rule, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper
|
||||
+ public void setFrom(GameRules.BooleanValue rule, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks
|
||||
this.value = rule.value;
|
||||
this.onChanged(server);
|
||||
}
|
||||
@ -144,7 +144,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f
|
||||
private int value;
|
||||
|
||||
- private static GameRules.Type<GameRules.IntegerValue> create(int initialValue, BiConsumer<MinecraftServer, GameRules.IntegerValue> changeCallback) {
|
||||
+ private static GameRules.Type<GameRules.IntegerValue> create(int initialValue, BiConsumer<net.minecraft.server.level.ServerLevel, GameRules.IntegerValue> changeCallback) { // Paper
|
||||
+ private static GameRules.Type<GameRules.IntegerValue> create(int initialValue, BiConsumer<net.minecraft.server.level.ServerLevel, GameRules.IntegerValue> changeCallback) { // Paper - Pass ServerLevel for gamerule callbacks
|
||||
return new GameRules.Type<>(IntegerArgumentType::integer, (gamerules_gameruledefinition) -> {
|
||||
return new GameRules.IntegerValue(gamerules_gameruledefinition, initialValue);
|
||||
}, changeCallback, GameRules.GameRuleTypeVisitor::visitInteger);
|
||||
@ -153,7 +153,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f
|
||||
}
|
||||
|
||||
- public void set(int value, @Nullable MinecraftServer server) {
|
||||
+ public void set(int value, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper
|
||||
+ public void set(int value, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks
|
||||
this.value = value;
|
||||
this.onChanged(server);
|
||||
}
|
||||
@ -162,12 +162,12 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f
|
||||
}
|
||||
|
||||
- public void setFrom(GameRules.IntegerValue rule, @Nullable MinecraftServer server) {
|
||||
+ public void setFrom(GameRules.IntegerValue rule, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper
|
||||
+ public void setFrom(GameRules.IntegerValue rule, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks
|
||||
this.value = rule.value;
|
||||
this.onChanged(server);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 719d2ac5907b4c96828460daae9f254c2cd3e840..388ce676487dc094cf78ce7bd3c50942b3ec5e29 100644
|
||||
index 3cf9aafb3ce75c0340605fa29c2a55ff237b843b..c517d8e2daac5675425783a50ae04b5d2a07e37a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2038,7 +2038,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@ -175,7 +175,7 @@ index 719d2ac5907b4c96828460daae9f254c2cd3e840..388ce676487dc094cf78ce7bd3c50942
|
||||
GameRules.Value<?> handle = this.getHandle().getGameRules().getRule(CraftWorld.getGameRulesNMS().get(rule));
|
||||
handle.deserialize(event.getValue()); // Paper
|
||||
- handle.onChanged(this.getHandle().getServer());
|
||||
+ handle.onChanged(this.getHandle()); // Paper
|
||||
+ handle.onChanged(this.getHandle()); // Paper - Pass ServerLevel for gamerule callbacks
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ index 719d2ac5907b4c96828460daae9f254c2cd3e840..388ce676487dc094cf78ce7bd3c50942
|
||||
GameRules.Value<?> handle = this.getHandle().getGameRules().getRule(CraftWorld.getGameRulesNMS().get(rule.getName()));
|
||||
handle.deserialize(event.getValue()); // Paper
|
||||
- handle.onChanged(this.getHandle().getServer());
|
||||
+ handle.onChanged(this.getHandle()); // Paper
|
||||
+ handle.onChanged(this.getHandle()); // Paper - Pass ServerLevel for gamerule callbacks
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1,23 +1,23 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: HexedHero <6012891+HexedHero@users.noreply.github.com>
|
||||
Date: Sun, 10 Apr 2022 06:26:32 +0100
|
||||
Subject: [PATCH] Add pre-unbreaking amount to PlayerItemDamageEvent
|
||||
Subject: [PATCH] Expand PlayerItemDamageEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 8cf7d514803fd953e068d3436bfd4e50fb4b0da0..80682ce58d0b0ce0409d162f447b585163c36753 100644
|
||||
index 8cf7d514803fd953e068d3436bfd4e50fb4b0da0..6b38e515a77df7fb06b41fbedaa1090b1cac78fb 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -638,10 +638,11 @@ public final class ItemStack {
|
||||
}
|
||||
}
|
||||
|
||||
+ int originalDamage = amount; // Paper
|
||||
+ int originalDamage = amount; // Paper - Expand PlayerItemDamageEvent
|
||||
amount -= k;
|
||||
// CraftBukkit start
|
||||
if (player instanceof ServerPlayer serverPlayer) { // Paper
|
||||
- PlayerItemDamageEvent event = new PlayerItemDamageEvent(serverPlayer.getBukkitEntity(), CraftItemStack.asCraftMirror(this), amount); // Paper
|
||||
+ PlayerItemDamageEvent event = new PlayerItemDamageEvent(serverPlayer.getBukkitEntity(), CraftItemStack.asCraftMirror(this), amount, originalDamage); // Paper
|
||||
+ PlayerItemDamageEvent event = new PlayerItemDamageEvent(serverPlayer.getBukkitEntity(), CraftItemStack.asCraftMirror(this), amount, originalDamage); // Paper - Expand PlayerItemDamageEvent
|
||||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (amount != event.getDamage() || event.isCancelled()) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f9b994a024be198a26d0213b9c98fc46987549a4..08eb6f115fe5fb2414a35010faa91d6fab7db0e2 100644
|
||||
index 8802d28c71d3ebc74690ad5c53c7dd77436e1a9f..170da30329f2a0d65a05c0d5c7a4170405df6aef 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1283,7 +1283,7 @@ public final class CraftServer implements Server {
|
||||
@ -19,7 +19,7 @@ index f9b994a024be198a26d0213b9c98fc46987549a4..08eb6f115fe5fb2414a35010faa91d6f
|
||||
return null;
|
||||
@@ -1295,6 +1295,7 @@ public final class CraftServer implements Server {
|
||||
internal.setSpawnSettings(true, true);
|
||||
// Paper - move up
|
||||
// Paper - Put world into worldlist before initing the world; move up
|
||||
|
||||
+ internal.keepSpawnInMemory = creator.keepSpawnLoaded().toBooleanOrElse(internal.getWorld().getKeepSpawnInMemory()); // Paper
|
||||
this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
|
||||
|
@ -5,23 +5,23 @@ Subject: [PATCH] Trigger bee_nest_destroyed trigger in the correct place
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 236dabc1d4ae9dc9a2a2c07a4a27fc0bfae72f66..bf9b185e3defb496022c20ec60a84a4f6f99d5be 100644
|
||||
index 236dabc1d4ae9dc9a2a2c07a4a27fc0bfae72f66..a7c0db6aebef3aec931513c726447091088cc546 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -423,12 +423,16 @@ public class ServerPlayerGameMode {
|
||||
block.destroy(this.level, pos, iblockdata1);
|
||||
}
|
||||
|
||||
+ ItemStack mainHandStack = null; // Paper
|
||||
+ boolean isCorrectTool = false; // Paper
|
||||
+ ItemStack mainHandStack = null; // Paper - Trigger bee_nest_destroyed trigger in the correct place
|
||||
+ boolean isCorrectTool = false; // Paper - Trigger bee_nest_destroyed trigger in the correct place
|
||||
if (this.isCreative()) {
|
||||
// return true; // CraftBukkit
|
||||
} else {
|
||||
ItemStack itemstack = this.player.getMainHandItem();
|
||||
ItemStack itemstack1 = itemstack.copy();
|
||||
boolean flag1 = this.player.hasCorrectToolForDrops(iblockdata1);
|
||||
+ mainHandStack = itemstack1; // Paper
|
||||
+ isCorrectTool = flag1; // Paper
|
||||
+ mainHandStack = itemstack1; // Paper - Trigger bee_nest_destroyed trigger in the correct place
|
||||
+ isCorrectTool = flag1; // Paper - Trigger bee_nest_destroyed trigger in the correct place
|
||||
|
||||
itemstack.mineBlock(this.level, iblockdata1, pos, this.player);
|
||||
if (flag && flag1 && event.isDropItems()) { // CraftBukkit - Check if block should drop items
|
||||
@ -29,18 +29,18 @@ index 236dabc1d4ae9dc9a2a2c07a4a27fc0bfae72f66..bf9b185e3defb496022c20ec60a84a4f
|
||||
if (flag && event != null) {
|
||||
iblockdata.getBlock().popExperience(this.level, pos, event.getExpToDrop(), this.player); // Paper
|
||||
}
|
||||
+ // Paper start - trigger after items are dropped (check impls of block#playerDestroy)
|
||||
+ // Paper start - Trigger bee_nest_destroyed trigger in the correct place (check impls of block#playerDestroy)
|
||||
+ if (mainHandStack != null) {
|
||||
+ if (flag && isCorrectTool && event.isDropItems() && block instanceof net.minecraft.world.level.block.BeehiveBlock && tileentity instanceof net.minecraft.world.level.block.entity.BeehiveBlockEntity beehiveBlockEntity) { // simulates the guard on block#playerDestroy above
|
||||
+ CriteriaTriggers.BEE_NEST_DESTROYED.trigger(player, iblockdata, mainHandStack, beehiveBlockEntity.getOccupantCount());
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Trigger bee_nest_destroyed trigger in the correct place
|
||||
|
||||
return true;
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
index f82cd3677da96d3cf051c983d08a8ff302400b18..6e7a9f68aa3a5084c8eea9fd8721272260734289 100644
|
||||
index f82cd3677da96d3cf051c983d08a8ff302400b18..ed87664f513cf82c7bf8439672a656d0a57c1991 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
@@ -95,7 +95,7 @@ public class BeehiveBlock extends BaseEntityBlock {
|
||||
@ -48,7 +48,7 @@ index f82cd3677da96d3cf051c983d08a8ff302400b18..6e7a9f68aa3a5084c8eea9fd87212722
|
||||
}
|
||||
|
||||
- CriteriaTriggers.BEE_NEST_DESTROYED.trigger((ServerPlayer) player, state, tool, tileentitybeehive.getOccupantCount());
|
||||
+ // CriteriaTriggers.BEE_NEST_DESTROYED.trigger((ServerPlayer) player, state, tool, tileentitybeehive.getOccupantCount()); // Paper - moved until after items are dropped
|
||||
+ // CriteriaTriggers.BEE_NEST_DESTROYED.trigger((ServerPlayer) player, state, tool, tileentitybeehive.getOccupantCount()); // Paper - Trigger bee_nest_destroyed trigger in the correct place; moved until after items are dropped
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,38 +5,38 @@ Subject: [PATCH] Add EntityDyeEvent and CollarColorable interface
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
index a744cb70ac719eae376fb2ab2271e4f8ac7b12f2..40af8405c6f3ecc5a8168bb62607eb79862cefa6 100644
|
||||
index 7dfd2b17e82a80683af28779d0bd8f64a909c3b6..1d0c424be2b67cad0f8bca85070a9c46a6b283da 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
@@ -402,6 +402,13 @@ public class Cat extends TamableAnimal implements VariantHolder<CatVariant> {
|
||||
DyeColor enumcolor = ((DyeItem) item).getDyeColor();
|
||||
|
||||
if (enumcolor != this.getCollarColor()) {
|
||||
+ // Paper start
|
||||
+ // Paper start - Add EntityDyeEvent and CollarColorable interface
|
||||
+ final io.papermc.paper.event.entity.EntityDyeEvent event = new io.papermc.paper.event.entity.EntityDyeEvent(this.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData((byte) enumcolor.getId()), ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity());
|
||||
+ if (!event.callEvent()) {
|
||||
+ return InteractionResult.FAIL;
|
||||
+ }
|
||||
+ enumcolor = DyeColor.byId(event.getColor().getWoolData());
|
||||
+ // Paper end
|
||||
+ // Paper end - Add EntityDyeEvent and CollarColorable interface
|
||||
this.setCollarColor(enumcolor);
|
||||
if (!player.getAbilities().instabuild) {
|
||||
itemstack.shrink(1);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
index 9ebb994b62b58352525da21385f02803e8414687..eecb7511582e5e316b71fa4a4734881424be5ca7 100644
|
||||
index 9ebb994b62b58352525da21385f02803e8414687..2d20b2c1f58beb1ad8c9012d8124e476899e6be6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
@@ -369,6 +369,14 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
DyeColor enumcolor = itemdye.getDyeColor();
|
||||
|
||||
if (enumcolor != this.getCollarColor()) {
|
||||
+ // Paper start
|
||||
+ // Paper start - Add EntityDyeEvent and CollarColorable interface
|
||||
+ final io.papermc.paper.event.entity.EntityDyeEvent event = new io.papermc.paper.event.entity.EntityDyeEvent(this.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData((byte) enumcolor.getId()), ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity());
|
||||
+ if (!event.callEvent()) {
|
||||
+ return InteractionResult.FAIL;
|
||||
+ }
|
||||
+ enumcolor = DyeColor.byId(event.getColor().getWoolData());
|
||||
+ // Paper end
|
||||
+ // Paper end - Add EntityDyeEvent and CollarColorable interface
|
||||
+
|
||||
this.setCollarColor(enumcolor);
|
||||
if (!player.getAbilities().instabuild) {
|
||||
|
@ -7,7 +7,7 @@ Also don't fire level events or game events if stalactite
|
||||
drip is cancelled
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java b/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java
|
||||
index 4c9334dde0734a3550a810845cee53f474e9c96b..ef7f1a871144f4a6897769f2459a4dd5eeffa5b4 100644
|
||||
index 4c9334dde0734a3550a810845cee53f474e9c96b..dc1d20691ae5bd9026143e143a9bfdc1b6cfd6eb 100644
|
||||
--- a/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java
|
||||
+++ b/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java
|
||||
@@ -80,7 +80,7 @@ public interface CauldronInteraction {
|
||||
@ -15,7 +15,7 @@ index 4c9334dde0734a3550a810845cee53f474e9c96b..ef7f1a871144f4a6897769f2459a4dd5
|
||||
if (!world.isClientSide) {
|
||||
// CraftBukkit start
|
||||
- if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, Blocks.WATER_CAULDRON.defaultBlockState(), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) {
|
||||
+ if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, Blocks.WATER_CAULDRON.defaultBlockState(), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper
|
||||
+ if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, Blocks.WATER_CAULDRON.defaultBlockState(), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper - Call CauldronLevelChange
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -24,7 +24,7 @@ index 4c9334dde0734a3550a810845cee53f474e9c96b..ef7f1a871144f4a6897769f2459a4dd5
|
||||
if (!world.isClientSide) {
|
||||
// CraftBukkit start
|
||||
- if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata.cycle(LayeredCauldronBlock.LEVEL), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) {
|
||||
+ if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata.cycle(LayeredCauldronBlock.LEVEL), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper
|
||||
+ if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata.cycle(LayeredCauldronBlock.LEVEL), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper - Call CauldronLevelChange
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -33,7 +33,7 @@ index 4c9334dde0734a3550a810845cee53f474e9c96b..ef7f1a871144f4a6897769f2459a4dd5
|
||||
if (!world.isClientSide) {
|
||||
// CraftBukkit start
|
||||
- if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.CAULDRON.defaultBlockState(), player, CauldronLevelChangeEvent.ChangeReason.BUCKET_FILL)) {
|
||||
+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.CAULDRON.defaultBlockState(), player, CauldronLevelChangeEvent.ChangeReason.BUCKET_FILL, false)) { // Paper
|
||||
+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.CAULDRON.defaultBlockState(), player, CauldronLevelChangeEvent.ChangeReason.BUCKET_FILL, false)) { // Paper - Call CauldronLevelChange
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -42,12 +42,12 @@ index 4c9334dde0734a3550a810845cee53f474e9c96b..ef7f1a871144f4a6897769f2459a4dd5
|
||||
if (!world.isClientSide) {
|
||||
// CraftBukkit start
|
||||
- if (!LayeredCauldronBlock.changeLevel(state, world, pos, state, player, CauldronLevelChangeEvent.ChangeReason.BUCKET_EMPTY)) {
|
||||
+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, state, player, CauldronLevelChangeEvent.ChangeReason.BUCKET_EMPTY, false)) { // Paper
|
||||
+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, state, player, CauldronLevelChangeEvent.ChangeReason.BUCKET_EMPTY, false)) { // Paper - Call CauldronLevelChange
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/CauldronBlock.java b/src/main/java/net/minecraft/world/level/block/CauldronBlock.java
|
||||
index 588b3e911d9b22dad2928ea9e32e8a8a3a8e9b96..a821a981adbebdcf22997731b9bbea3d033cd2b1 100644
|
||||
index 588b3e911d9b22dad2928ea9e32e8a8a3a8e9b96..274dc56a71fb05060de42169df34dfd8097f2b62 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/CauldronBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/CauldronBlock.java
|
||||
@@ -43,10 +43,18 @@ public class CauldronBlock extends AbstractCauldronBlock {
|
||||
@ -55,19 +55,19 @@ index 588b3e911d9b22dad2928ea9e32e8a8a3a8e9b96..a821a981adbebdcf22997731b9bbea3d
|
||||
if (CauldronBlock.shouldHandlePrecipitation(world, precipitation)) {
|
||||
if (precipitation == Biome.Precipitation.RAIN) {
|
||||
- world.setBlockAndUpdate(pos, Blocks.WATER_CAULDRON.defaultBlockState());
|
||||
+ // Paper start - call event for initial fill
|
||||
+ // Paper start - Call CauldronLevelChange
|
||||
+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.WATER_CAULDRON.defaultBlockState(), null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL, false)) { // avoid duplicate game event
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Call CauldronLevelChange
|
||||
world.gameEvent((Entity) null, GameEvent.BLOCK_CHANGE, pos);
|
||||
} else if (precipitation == Biome.Precipitation.SNOW) {
|
||||
- world.setBlockAndUpdate(pos, Blocks.POWDER_SNOW_CAULDRON.defaultBlockState());
|
||||
+ // Paper start - call event for initial fill
|
||||
+ // Paper start - Call CauldronLevelChange
|
||||
+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.POWDER_SNOW_CAULDRON.defaultBlockState(), null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL, false)) { // avoid duplicate game event
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Call CauldronLevelChange
|
||||
world.gameEvent((Entity) null, GameEvent.BLOCK_CHANGE, pos);
|
||||
}
|
||||
|
||||
@ -76,25 +76,25 @@ index 588b3e911d9b22dad2928ea9e32e8a8a3a8e9b96..a821a981adbebdcf22997731b9bbea3d
|
||||
if (fluid == Fluids.WATER) {
|
||||
iblockdata1 = Blocks.WATER_CAULDRON.defaultBlockState();
|
||||
- LayeredCauldronBlock.changeLevel(state, world, pos, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL); // CraftBukkit
|
||||
+ // Paper start - don't send level event or game event if cancelled
|
||||
+ // Paper start - Call CauldronLevelChange; don't send level event or game event if cancelled
|
||||
+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL)) { // CraftBukkit
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Call CauldronLevelChange
|
||||
world.levelEvent(1047, pos, 0);
|
||||
} else if (fluid == Fluids.LAVA) {
|
||||
iblockdata1 = Blocks.LAVA_CAULDRON.defaultBlockState();
|
||||
- LayeredCauldronBlock.changeLevel(state, world, pos, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL); // CraftBukkit
|
||||
+ // Paper start - don't send level event or game event if cancelled
|
||||
+ // Paper start - Call CauldronLevelChange; don't send level event or game event if cancelled
|
||||
+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL)) { // CraftBukkit
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Call CauldronLevelChange
|
||||
world.levelEvent(1046, pos, 0);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
index a8b2c49ebf531d730d681ca3bceb4dc74b433fdb..7daf2ec30fd31023d326a6149661f38bfc1d646b 100644
|
||||
index a8b2c49ebf531d730d681ca3bceb4dc74b433fdb..b9383a9992e940fc3442d52344744cfe2fadfb74 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
@@ -101,7 +101,13 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
@ -102,13 +102,13 @@ index a8b2c49ebf531d730d681ca3bceb4dc74b433fdb..7daf2ec30fd31023d326a6149661f38b
|
||||
|
||||
// CraftBukkit start
|
||||
- public static boolean changeLevel(BlockState iblockdata, Level world, BlockPos blockposition, BlockState newBlock, Entity entity, CauldronLevelChangeEvent.ChangeReason reason) {
|
||||
+ // Paper start
|
||||
+ // Paper start - Call CauldronLevelChange
|
||||
+ public static boolean changeLevel(BlockState iblockdata, Level world, BlockPos blockposition, BlockState newBlock, @javax.annotation.Nullable Entity entity, CauldronLevelChangeEvent.ChangeReason reason) { // Paper - entity is nullable
|
||||
+ return changeLevel(iblockdata, world, blockposition, newBlock, entity, reason, true);
|
||||
+ }
|
||||
+
|
||||
+ public static boolean changeLevel(BlockState iblockdata, Level world, BlockPos blockposition, BlockState newBlock, @javax.annotation.Nullable Entity entity, CauldronLevelChangeEvent.ChangeReason reason, boolean sendGameEvent) { // Paper - entity is nullable
|
||||
+ // Paper end
|
||||
+ // Paper end - Call CauldronLevelChange
|
||||
CraftBlockState newState = CraftBlockStates.getBlockState(world, blockposition);
|
||||
newState.setData(newBlock);
|
||||
|
||||
@ -117,7 +117,7 @@ index a8b2c49ebf531d730d681ca3bceb4dc74b433fdb..7daf2ec30fd31023d326a6149661f38b
|
||||
}
|
||||
newState.update(true);
|
||||
- world.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(newBlock));
|
||||
+ if (sendGameEvent) world.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(newBlock)); // Paper
|
||||
+ if (sendGameEvent) world.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(newBlock)); // Paper - Call CauldronLevelChange
|
||||
return true;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -7,7 +7,7 @@ Powder snow cauldrons should turn to water when
|
||||
extinguishing an entity
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
index 7daf2ec30fd31023d326a6149661f38bfc1d646b..93f5e583635a2addeabf2adff9374dcec0b66ee4 100644
|
||||
index b9383a9992e940fc3442d52344744cfe2fadfb74..db8d2157df0b276313493af224be343ae0de0917 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
@@ -69,7 +69,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
@ -23,7 +23,7 @@ index 7daf2ec30fd31023d326a6149661f38bfc1d646b..93f5e583635a2addeabf2adff9374dce
|
||||
|
||||
}
|
||||
|
||||
+ @Deprecated // Paper - use #handleEntityOnFireInsideWithEvent
|
||||
+ @Deprecated // Paper - fix powdered snow cauldron extinguishing entities; use #handleEntityOnFireInsideWithEvent
|
||||
private void handleEntityOnFireInside(BlockState state, Level world, BlockPos pos) {
|
||||
if (this.precipitationType == Biome.Precipitation.SNOW) {
|
||||
LayeredCauldronBlock.lowerFillLevel((BlockState) Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, (Integer) state.getValue(LayeredCauldronBlock.LEVEL)), world, pos);
|
||||
@ -31,7 +31,7 @@ index 7daf2ec30fd31023d326a6149661f38bfc1d646b..93f5e583635a2addeabf2adff9374dce
|
||||
}
|
||||
|
||||
}
|
||||
+ // Paper start
|
||||
+ // Paper start - fix powdered snow cauldron extinguishing entities
|
||||
+ protected boolean handleEntityOnFireInsideWithEvent(BlockState state, Level world, BlockPos pos, Entity entity) {
|
||||
+ if (this.precipitationType == Biome.Precipitation.SNOW) {
|
||||
+ return LayeredCauldronBlock.lowerFillLevel((BlockState) Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, (Integer) state.getValue(LayeredCauldronBlock.LEVEL)), world, pos, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH);
|
||||
@ -39,7 +39,7 @@ index 7daf2ec30fd31023d326a6149661f38bfc1d646b..93f5e583635a2addeabf2adff9374dce
|
||||
+ return LayeredCauldronBlock.lowerFillLevel(state, world, pos, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH);
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - fix powdered snow cauldron extinguishing entities
|
||||
|
||||
public static void lowerFillLevel(BlockState state, Level world, BlockPos pos) {
|
||||
// CraftBukkit start
|
||||
|
@ -5,14 +5,14 @@ Subject: [PATCH] Add PlayerStopUsingItemEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index e27b19cf56b269c426cb6ddf81513497b70c676f..36ecdf1d0171286893b267b4591d298eefe40587 100644
|
||||
index e27b19cf56b269c426cb6ddf81513497b70c676f..546777ad955d0d317d129882cfeab68935708228 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -4025,6 +4025,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
public void releaseUsingItem() {
|
||||
if (!this.useItem.isEmpty()) {
|
||||
+ if (this instanceof ServerPlayer) new io.papermc.paper.event.player.PlayerStopUsingItemEvent((Player) getBukkitEntity(), useItem.asBukkitMirror(), getTicksUsingItem()).callEvent(); // Paper
|
||||
+ if (this instanceof ServerPlayer) new io.papermc.paper.event.player.PlayerStopUsingItemEvent((Player) getBukkitEntity(), useItem.asBukkitMirror(), getTicksUsingItem()).callEvent(); // Paper - Add PlayerStopUsingItemEvent
|
||||
this.useItem.releaseUsing(this.level(), this, this.getUseItemRemainingTicks());
|
||||
if (this.useItem.useOnRelease()) {
|
||||
this.updatingUsingItem();
|
||||
|
@ -10,7 +10,7 @@ list is only used in the tick and tickPassenger methods, so we can safely not ad
|
||||
markers to it. When the config option is set to true, markers are ticked as normal.
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java b/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java
|
||||
index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5f43aedc6596e2b1ac7af9711515714752c262e3 100644
|
||||
index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5e5a018433414af76eaa1e781f61612ddc305b07 100644
|
||||
--- a/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java
|
||||
+++ b/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java
|
||||
@@ -109,7 +109,7 @@ public final class EntityCommand implements PaperSubcommand {
|
||||
@ -18,7 +18,7 @@ index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5f43aedc6596e2b1ac7af97115157147
|
||||
info.left++;
|
||||
info.right.put(chunk, info.right.getOrDefault(chunk, 0) + 1);
|
||||
- if (!chunkProviderServer.isPositionTicking(e)) {
|
||||
+ if (!chunkProviderServer.isPositionTicking(e) || (e instanceof net.minecraft.world.entity.Marker && !world.paperConfig().entities.markers.tick)) { // Configurable marker ticking
|
||||
+ if (!chunkProviderServer.isPositionTicking(e) || (e instanceof net.minecraft.world.entity.Marker && !world.paperConfig().entities.markers.tick)) { // Paper - Configurable marker ticking
|
||||
nonEntityTicking.merge(key, 1, Integer::sum);
|
||||
}
|
||||
});
|
||||
@ -35,21 +35,21 @@ index cae00701c5dbf40be07ea5c2d01ea8929f4fa216..646fb7e4a83e9f9a1b78d8c70f3518b9
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 3495981419a75efe42bce45a89a32378dd6b8372..2d31752478636bd21bbff5b430e5acb76b5d91c2 100644
|
||||
index 3495981419a75efe42bce45a89a32378dd6b8372..fafc8b84d6b6368c70b8eedfdb4c3a9deace9c26 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -213,8 +213,14 @@ public class ActivationRange
|
||||
|
||||
// Paper start
|
||||
java.util.List<Entity> entities = world.getEntities((Entity)null, ActivationRange.maxBB, null);
|
||||
+ boolean tickMarkers = world.paperConfig().entities.markers.tick; // Paper - configurable marker ticking
|
||||
+ boolean tickMarkers = world.paperConfig().entities.markers.tick; // Paper - Configurable marker ticking
|
||||
for (int i = 0; i < entities.size(); i++) {
|
||||
Entity entity = entities.get(i);
|
||||
+ // Paper start - configurable marker ticking
|
||||
+ // Paper start - Configurable marker ticking
|
||||
+ if (!tickMarkers && entity instanceof net.minecraft.world.entity.Marker) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ // Paper end - configurable marker ticking
|
||||
+ // Paper end - Configurable marker ticking
|
||||
ActivationRange.activateEntity(entity);
|
||||
}
|
||||
// Paper end
|
||||
|
@ -13,14 +13,14 @@ public net.minecraft.world.entity.item.FallingBlockEntity blockState
|
||||
Co-authored-by: Lukas Planz <lukas.planz@web.de>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index fc33d05cf1a3cceb220dab1ee1da33ffe37834db..45c07733f03b5c11f6d8e820f65dc950c70d9a67 100644
|
||||
index fc33d05cf1a3cceb220dab1ee1da33ffe37834db..21a4669b01e9c57100224e20500bc23f8e101434 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -66,6 +66,7 @@ public class FallingBlockEntity extends Entity {
|
||||
@Nullable
|
||||
public CompoundTag blockData;
|
||||
protected static final EntityDataAccessor<BlockPos> DATA_START_POS = SynchedEntityData.defineId(FallingBlockEntity.class, EntityDataSerializers.BLOCK_POS);
|
||||
+ public boolean autoExpire = true; // Paper - Auto expire setting
|
||||
+ public boolean autoExpire = true; // Paper - Expand FallingBlock API
|
||||
|
||||
public FallingBlockEntity(EntityType<? extends FallingBlockEntity> type, Level world) {
|
||||
super(type, world);
|
||||
@ -29,7 +29,7 @@ index fc33d05cf1a3cceb220dab1ee1da33ffe37834db..45c07733f03b5c11f6d8e820f65dc950
|
||||
|
||||
if (!this.onGround() && !flag1) {
|
||||
- if (!this.level().isClientSide && (this.time > 100 && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || this.time > 600)) {
|
||||
+ if (!this.level().isClientSide && ((this.time > 100 && autoExpire) && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || (this.time > 600 && autoExpire))) { // Paper - Auto expire setting
|
||||
+ if (!this.level().isClientSide && ((this.time > 100 && autoExpire) && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || (this.time > 600 && autoExpire))) { // Paper - Expand FallingBlock API
|
||||
if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||
this.spawnAtLocation((ItemLike) block);
|
||||
}
|
||||
@ -37,7 +37,7 @@ index fc33d05cf1a3cceb220dab1ee1da33ffe37834db..45c07733f03b5c11f6d8e820f65dc950
|
||||
}
|
||||
|
||||
nbt.putBoolean("CancelDrop", this.cancelDrop);
|
||||
+ if (!autoExpire) {nbt.putBoolean("Paper.AutoExpire", false);} // Paper - AutoExpire setting
|
||||
+ if (!autoExpire) {nbt.putBoolean("Paper.AutoExpire", false);} // Paper - Expand FallingBlock API
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -45,23 +45,23 @@ index fc33d05cf1a3cceb220dab1ee1da33ffe37834db..45c07733f03b5c11f6d8e820f65dc950
|
||||
this.setOrigin(new org.bukkit.Location(this.level().getWorld(), srcX, srcY, srcZ));
|
||||
}
|
||||
// Paper end
|
||||
+ // Paper start
|
||||
+ // Paper start - Expand FallingBlock API
|
||||
+ if (nbt.contains("Paper.AutoExpire")) {
|
||||
+ this.autoExpire = nbt.getBoolean("Paper.AutoExpire");
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Expand FallingBlock API
|
||||
}
|
||||
|
||||
public void setHurtsEntities(float fallHurtAmount, int fallHurtMax) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
||||
index a7a3f74b846112d752fe04162b30805961457b11..73911b81f4e927026657953a0c68ddda9a8f93c1 100644
|
||||
index a7a3f74b846112d752fe04162b30805961457b11..2ba8f461d32a7c517a93461bf6f8f5cd4defdef4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
||||
@@ -33,6 +33,31 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock {
|
||||
public BlockData getBlockData() {
|
||||
return CraftBlockData.fromData(this.getHandle().getBlockState());
|
||||
}
|
||||
+ // Paper start
|
||||
+ // Paper start - Expand FallingBlock API
|
||||
+ @Override
|
||||
+ public void setBlockData(final BlockData blockData) {
|
||||
+ Preconditions.checkArgument(blockData != null, "blockData");
|
||||
@ -85,7 +85,7 @@ index a7a3f74b846112d752fe04162b30805961457b11..73911b81f4e927026657953a0c68ddda
|
||||
+ this.setBlockData(blockState.getBlockData());
|
||||
+ if (blockState instanceof final org.bukkit.craftbukkit.block.CraftBlockEntityState<?> tileEntity) this.getHandle().blockData = tileEntity.getSnapshotNBT();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Expand FallingBlock API
|
||||
|
||||
@Override
|
||||
public boolean getDropItem() {
|
||||
@ -93,7 +93,7 @@ index a7a3f74b846112d752fe04162b30805961457b11..73911b81f4e927026657953a0c68ddda
|
||||
this.setHurtEntities(true);
|
||||
}
|
||||
}
|
||||
+ // Paper Start - Auto expire setting
|
||||
+ // Paper Start - Expand FallingBlock API
|
||||
+ @Override
|
||||
+ public boolean doesAutoExpire() {
|
||||
+ return this.getHandle().autoExpire;
|
||||
@ -103,5 +103,5 @@ index a7a3f74b846112d752fe04162b30805961457b11..73911b81f4e927026657953a0c68ddda
|
||||
+ public void shouldAutoExpire(boolean autoExpires) {
|
||||
+ this.getHandle().autoExpire = autoExpires;
|
||||
+ }
|
||||
+ // Paper End - Auto expire setting
|
||||
+ // Paper End - Expand FallingBlock API
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Do not accept invalid client settings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 52efebcc440253e84640be3c24c2dcd76c2a5b9a..c63dd80b23df877cb900e608406f747b87e3cae7 100644
|
||||
index 9ce9390291988e3110e228e83e0754e5529de800..aba06bae97f021d9f62441eb662539a0bbc815ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3321,6 +3321,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -17,18 +17,18 @@ index 517920023bc28fea04eeb709364d5a7292adcc5e..444ff797c70b0e285d4272ea2ce3d724
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm-commons:9.5")
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
index 54c7f34ba3dc8466223e589702d0c93af8cf52a0..79326308f6126f84a3cbb3d5a33302de048d8a50 100644
|
||||
index 54c7f34ba3dc8466223e589702d0c93af8cf52a0..1df438ce6604981d459a6bc0b351be6d7c1bc050 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
@@ -111,6 +111,12 @@ public class ServerConnectionListener {
|
||||
ServerConnectionListener.LOGGER.info("Paper: Using " + com.velocitypowered.natives.util.Natives.cipher.getLoadedVariant() + " cipher from Velocity.");
|
||||
// Paper end
|
||||
|
||||
+ // Paper start - indicate Proxy Protocol usage
|
||||
+ // Paper start - Add support for proxy protocol
|
||||
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.proxyProtocol) {
|
||||
+ ServerConnectionListener.LOGGER.info("Paper: Using Proxy Protocol");
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Add support for proxy protocol
|
||||
+
|
||||
this.channels.add(((ServerBootstrap) ((ServerBootstrap) (new ServerBootstrap()).channel(oclass)).childHandler(new ChannelInitializer<Channel>() {
|
||||
protected void initChannel(Channel channel) {
|
||||
@ -59,7 +59,7 @@ index 54c7f34ba3dc8466223e589702d0c93af8cf52a0..79326308f6126f84a3cbb3d5a33302de
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Add support for proxy protocol
|
||||
pending.add(object); // Paper
|
||||
((Connection) object).configurePacketHandler(channelpipeline);
|
||||
((Connection) object).setListenerForServerboundHandshake(new ServerHandshakePacketListenerImpl(ServerConnectionListener.this.server, (Connection) object));
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix FurnaceInventory for smokers and blast furnaces
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
|
||||
index 8d3f71689087d687e6400e2ea9750a6fb3535bf1..f59a972cb4516623f9715e4a5a3a9fa3bfd8f989 100644
|
||||
index 8d3f71689087d687e6400e2ea9750a6fb3535bf1..149683821a248fbbd93d0417085f0cb0e86a1398 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
|
||||
@@ -65,7 +65,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat
|
||||
@ -25,7 +25,7 @@ index 8d3f71689087d687e6400e2ea9750a6fb3535bf1..f59a972cb4516623f9715e4a5a3a9fa3
|
||||
+ }
|
||||
+
|
||||
+ public static abstract class AbstractFurnaceInventoryConverter extends CraftTileInventoryConverter {
|
||||
+ // Paper end
|
||||
+ // Paper end - abstract furnace converter to apply to all 3 furnaces
|
||||
// Paper start
|
||||
@Override
|
||||
public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
Date: Fri, 3 Dec 2021 16:55:50 -0500
|
||||
Subject: [PATCH] Sanitize Sent BlockEntity NBT
|
||||
Subject: [PATCH] Sanitize sent BlockEntity NBT
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
|
||||
@ -30,19 +30,18 @@ index bf6cdc08367fc26716e7904162a21e63fecab3ed..51e24105facfe71ce9f2757c6c881a21
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index e3557f4c8cee7c88b3e352cd246078da7762effc..5bdad1866386908b9fef74d15862eb107fabe68f 100644
|
||||
index e3557f4c8cee7c88b3e352cd246078da7762effc..0fdf74317a20a250b474978c9e50a6c533abfbe6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -253,4 +253,12 @@ public abstract class BlockEntity {
|
||||
@@ -253,4 +253,11 @@ public abstract class BlockEntity {
|
||||
return null;
|
||||
}
|
||||
// CraftBukkit end
|
||||
+ // Paper start
|
||||
+ // Paper start - Sanitize sent data
|
||||
+ public CompoundTag sanitizeSentNbt(CompoundTag tag) {
|
||||
+ tag.remove("PublicBukkitValues");
|
||||
+
|
||||
+ return tag;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
+ // Paper end - Sanitize sent data
|
||||
}
|
@ -5,7 +5,7 @@ Subject: [PATCH] Disable component selector resolving in books by default
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/WrittenBookItem.java b/src/main/java/net/minecraft/world/item/WrittenBookItem.java
|
||||
index a324df312d9bb87d9e0962f8028d900933e70c07..31911c09fe15753ae32fa39417bdc9e9de552a88 100644
|
||||
index a324df312d9bb87d9e0962f8028d900933e70c07..258a636a59203c4e5415a89002c6a607338f9514 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/WrittenBookItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/WrittenBookItem.java
|
||||
@@ -111,7 +111,7 @@ public class WrittenBookItem extends Item {
|
||||
@ -13,7 +13,7 @@ index a324df312d9bb87d9e0962f8028d900933e70c07..31911c09fe15753ae32fa39417bdc9e9
|
||||
public static boolean resolveBookComponents(ItemStack book, @Nullable CommandSourceStack commandSource, @Nullable Player player) {
|
||||
CompoundTag compoundTag = book.getTag();
|
||||
- if (compoundTag != null && !compoundTag.getBoolean("resolved")) {
|
||||
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.resolveSelectorsInBooks && compoundTag != null && !compoundTag.getBoolean("resolved")) { // Paper
|
||||
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.resolveSelectorsInBooks && compoundTag != null && !compoundTag.getBoolean("resolved")) { // Paper - Disable component selector resolving in books by default
|
||||
compoundTag.putBoolean("resolved", true);
|
||||
if (!makeSureTagIsValid(compoundTag)) {
|
||||
return false;
|
||||
|
@ -5,19 +5,19 @@ Subject: [PATCH] Prevent entity loading causing async lookups
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2c3193fdfb0e4b4a47cceb2da8b3fe85bd1e6848..edea89eebb9a99e41dc2bcbabc94b6775f5470df 100644
|
||||
index ab409aae677a5ed4ca50113e88397c4543373df8..e5f4388d531910c238fcd809a1c5d92267858c53 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -803,6 +803,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
||||
public void baseTick() {
|
||||
this.level().getProfiler().push("entityBaseTick");
|
||||
+ if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking
|
||||
+ if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups
|
||||
this.feetBlockState = null;
|
||||
if (this.isPassenger() && this.getVehicle().isRemoved()) {
|
||||
this.stopRiding();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/NeutralMob.java b/src/main/java/net/minecraft/world/entity/NeutralMob.java
|
||||
index fa64c7baa7587f2cfe80b78ed83be011239618cf..55defe4f42bea4600a4e2b93c88e90231e61f6ef 100644
|
||||
index fa64c7baa7587f2cfe80b78ed83be011239618cf..47d5a0928f3c86d71f851738bfe7beedc98cfbb3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/NeutralMob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/NeutralMob.java
|
||||
@@ -42,18 +42,11 @@ public interface NeutralMob {
|
||||
@ -36,7 +36,7 @@ index fa64c7baa7587f2cfe80b78ed83be011239618cf..55defe4f42bea4600a4e2b93c88e9023
|
||||
- }
|
||||
-
|
||||
- }
|
||||
+ // Paper - Moved diff to separate method
|
||||
+ // Paper - Prevent entity loading causing async lookups; Moved diff to separate method
|
||||
+ // If this entity already survived its first tick, e.g. is loaded and ticked in sync, actively
|
||||
+ // tick the initial persistent anger.
|
||||
+ // If not, let the first tick on the baseTick call the method later down the line.
|
||||
@ -44,12 +44,13 @@ index fa64c7baa7587f2cfe80b78ed83be011239618cf..55defe4f42bea4600a4e2b93c88e9023
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,4 +120,26 @@ public interface NeutralMob {
|
||||
@@ -127,4 +120,27 @@ public interface NeutralMob {
|
||||
|
||||
@Nullable
|
||||
LivingEntity getTarget();
|
||||
+
|
||||
+ // Paper start - Update last hurt when ticking
|
||||
+ // Paper start - Prevent entity loading causing async lookups
|
||||
+ // Update last hurt when ticking
|
||||
+ default void tickInitialPersistentAnger(Level level) {
|
||||
+ UUID target = getPersistentAngerTarget();
|
||||
+ if (target == null) {
|
||||
@ -69,5 +70,5 @@ index fa64c7baa7587f2cfe80b78ed83be011239618cf..55defe4f42bea4600a4e2b93c88e9023
|
||||
+
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Prevent entity loading causing async lookups
|
||||
}
|
||||
|
@ -7,14 +7,14 @@ There are no plans to support creating worlds while worlds are
|
||||
being ticked themselvess.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d8eb1dbc1601c1f76183ddd78b88d0ee6df68bed..002511a54565aab9eb4552fecdf974fe0eab9122 100644
|
||||
index e5dccd330cbf3301a60b65453e87a4005f954716..b9df0b37b5568758c04ee41e258395c3a2d493c1 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -310,6 +310,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
public volatile Thread shutdownThread; // Paper
|
||||
public volatile boolean abnormalExit = false; // Paper
|
||||
+ public boolean isIteratingOverLevels = false; // Paper
|
||||
+ public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
||||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
@ -23,7 +23,7 @@ index d8eb1dbc1601c1f76183ddd78b88d0ee6df68bed..002511a54565aab9eb4552fecdf974fe
|
||||
MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper
|
||||
this.profiler.popPush("levels");
|
||||
- Iterator iterator = this.getAllLevels().iterator();
|
||||
+ //Iterator iterator = this.getAllLevels().iterator(); // Paper - moved down
|
||||
+ //Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
|
||||
|
||||
// CraftBukkit start
|
||||
// Run tasks that are waiting on processing
|
||||
@ -31,8 +31,8 @@ index d8eb1dbc1601c1f76183ddd78b88d0ee6df68bed..002511a54565aab9eb4552fecdf974fe
|
||||
// Paper end
|
||||
MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
|
||||
|
||||
+ this.isIteratingOverLevels = true; // Paper
|
||||
+ Iterator iterator = this.getAllLevels().iterator(); // Paper - move down
|
||||
+ this.isIteratingOverLevels = true; // Paper - Throw exception on world create while being ticked
|
||||
+ Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; move down
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
||||
@ -40,12 +40,12 @@ index d8eb1dbc1601c1f76183ddd78b88d0ee6df68bed..002511a54565aab9eb4552fecdf974fe
|
||||
this.profiler.pop();
|
||||
worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
|
||||
}
|
||||
+ this.isIteratingOverLevels = false; // Paper
|
||||
+ this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
||||
|
||||
this.profiler.popPush("connection");
|
||||
MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 08eb6f115fe5fb2414a35010faa91d6fab7db0e2..398a89a1f695f1e99b30ca0d5ebb192c8f465748 100644
|
||||
index 170da30329f2a0d65a05c0d5c7a4170405df6aef..e549dc84ac05a8b5f4dc602689904eb92445c687 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -874,6 +874,11 @@ public final class CraftServer implements Server {
|
||||
|
@ -2008,7 +2008,7 @@ index 0000000000000000000000000000000000000000..33cd90c30c22200a4e1ae64f40a0bf78
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 646fb7e4a83e9f9a1b78d8c70f3518b977572fde..43893ea7ff9bda6130b5b74340cdd27bf5f809c5 100644
|
||||
index 646fb7e4a83e9f9a1b78d8c70f3518b977572fde..2af4d65fc0c761bcf58e94d4ce0cc918afa47c10 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -223,6 +223,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -2028,7 +2028,7 @@ index 646fb7e4a83e9f9a1b78d8c70f3518b977572fde..43893ea7ff9bda6130b5b74340cdd27b
|
||||
+ public alternate.current.wire.WireHandler getWireHandler() {
|
||||
+ return wireHandler;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - optimize redstone (Alternate Current)
|
||||
+
|
||||
private final class EntityCallbacks implements LevelCallback<Entity> {
|
||||
|
||||
@ -2054,7 +2054,7 @@ index 2287987d5bb0e6c4cb6153f04c420fe5ec7c8089..8200844b73dc7181d5867aafa83087e0
|
||||
+ // Paper end - optimize redstone (Alternate Current)
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
index 5ffb1453bf332e8035abacc97ab36d78e1248484..507be06ad51b7a212e28d3ca6680e0e4b00f4233 100644
|
||||
index 5ffb1453bf332e8035abacc97ab36d78e1248484..7339795addfeaedc3c8a7db03f73546fb5fba06b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
@@ -259,7 +259,7 @@ public class RedStoneWireBlock extends Block {
|
||||
@ -2077,7 +2077,7 @@ index 5ffb1453bf332e8035abacc97ab36d78e1248484..507be06ad51b7a212e28d3ca6680e0e4
|
||||
+ } else {
|
||||
+ this.updateSurroundingRedstone(world, pos, state, null); // vanilla/Eigencraft
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - optimize redstone
|
||||
Iterator iterator = Direction.Plane.VERTICAL.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@ -2092,7 +2092,7 @@ index 5ffb1453bf332e8035abacc97ab36d78e1248484..507be06ad51b7a212e28d3ca6680e0e4
|
||||
+ } else {
|
||||
+ this.updateSurroundingRedstone(world, pos, state, null); // vanilla/Eigencraft
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - optimize redstone
|
||||
this.updateNeighborsOfNeighboringWires(world, pos);
|
||||
}
|
||||
}
|
||||
@ -2105,7 +2105,7 @@ index 5ffb1453bf332e8035abacc97ab36d78e1248484..507be06ad51b7a212e28d3ca6680e0e4
|
||||
+ if (world.paperConfig().misc.redstoneImplementation == io.papermc.paper.configuration.WorldConfiguration.Misc.RedstoneImplementation.ALTERNATE_CURRENT) {
|
||||
+ world.getWireHandler().onWireUpdated(pos);
|
||||
+ } else
|
||||
+ // Paper end
|
||||
+ // Paper end - optimize redstone (Alternate Current)
|
||||
if (state.canSurvive(world, pos)) {
|
||||
- this.updateSurroundingRedstone(world, pos, state, sourcePos); // Paper - Optimize redstone
|
||||
+ this.updateSurroundingRedstone(world, pos, state, sourcePos); // Paper - Optimize redstone (Eigencraft)
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add WardenAngerChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java
|
||||
index 02abc5f387d781094bd2f39233444add3a470be1..ece82743df21f0b776382821ad75dee96d0a0748 100644
|
||||
index 02abc5f387d781094bd2f39233444add3a470be1..1017c294b48bf0bbf733e1f41d580d1e6c927834 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java
|
||||
@@ -146,7 +146,7 @@ public class AngerManagement {
|
||||
@ -13,19 +13,19 @@ index 02abc5f387d781094bd2f39233444add3a470be1..ece82743df21f0b776382821ad75dee9
|
||||
boolean bl = !this.angerBySuspect.containsKey(entity);
|
||||
int i = this.angerBySuspect.computeInt(entity, (suspect, anger) -> {
|
||||
- return Math.min(150, (anger == null ? 0 : anger) + amount);
|
||||
+ return Math.min(150, (anger == null ? 0 : anger) + amount); // Paper - diff on change
|
||||
+ return Math.min(150, (anger == null ? 0 : anger) + amount); // Paper - diff on change (Warden#increaseAngerAt WardenAngerChangeEvent)
|
||||
});
|
||||
if (bl) {
|
||||
int j = this.angerByUuid.removeInt(entity.getUUID());
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
index b5185fcb635fbf5e5ed9d6cc9cc517cb46ada5aa..9f1b7c629644931074293151ed58a523ca6d488c 100644
|
||||
index b5185fcb635fbf5e5ed9d6cc9cc517cb46ada5aa..937f81a859953498abe73bea560c86e6560e1c33 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
@@ -488,6 +488,15 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
@VisibleForTesting
|
||||
public void increaseAngerAt(@Nullable Entity entity, int amount, boolean listening) {
|
||||
if (!this.isNoAi() && this.canTargetEntity(entity)) {
|
||||
+ // Paper start
|
||||
+ // Paper start - Add WardenAngerChangeEvent
|
||||
+ int activeAnger = this.angerManagement.getActiveAnger(entity);
|
||||
+ io.papermc.paper.event.entity.WardenAngerChangeEvent event = new io.papermc.paper.event.entity.WardenAngerChangeEvent((org.bukkit.entity.Warden) this.getBukkitEntity(), entity.getBukkitEntity(), activeAnger, Math.min(150, activeAnger + amount));
|
||||
+ this.level().getCraftServer().getPluginManager().callEvent(event);
|
||||
@ -33,7 +33,7 @@ index b5185fcb635fbf5e5ed9d6cc9cc517cb46ada5aa..9f1b7c629644931074293151ed58a523
|
||||
+ return;
|
||||
+ }
|
||||
+ amount = event.getNewAnger() - activeAnger;
|
||||
+ // Paper end
|
||||
+ // Paper end - Add WardenAngerChangeEvent
|
||||
WardenAi.setDigCooldown(this);
|
||||
boolean flag1 = !(this.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).orElse(null) instanceof Player); // CraftBukkit - decompile error
|
||||
int j = this.angerManagement.increaseAnger(entity, amount);
|
||||
|
@ -24,7 +24,7 @@ index 5f9cb2c7a2874e423087d04d3360af0364692b5c..428e0afef2cac9f2a19d8cfe8f2504dd
|
||||
} else {
|
||||
BlockPos blockPos = BlockPos.containing(x, y, z);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 1f7b13806ffbcf81df67a02129aa2c07dfc7b8f5..f2677922cb97c9aa34f2e80769ac9cccc3dc8089 100644
|
||||
index 1695e7d3e456bb3539fb37d943e8cf45489f0762..d3fdb56f1e62a241d8edbde4faa1296de36de246 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1321,6 +1321,12 @@ public class ServerPlayer extends Player {
|
||||
|
@ -20,7 +20,7 @@ index c56f5173fda6b38c2dcaea196217f2f5a7d7c641..524b0f1086c01888fe0b76e180c40915
|
||||
Date date = new Date();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 398a89a1f695f1e99b30ca0d5ebb192c8f465748..7749d9740c965baf901512b242426f9a15aca24f 100644
|
||||
index e549dc84ac05a8b5f4dc602689904eb92445c687..3aae0cce193777cd64124a87f43645207c5f6743 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1873,7 +1873,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -7,7 +7,7 @@ The previous solution caused a bunch of bandaid fixes inorder to resolve edge ca
|
||||
Just simply prevent them from being added to the world instead.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 43893ea7ff9bda6130b5b74340cdd27bf5f809c5..2bfa9d1abf7a777b588314d314d06be3b4d2c6a5 100644
|
||||
index 2af4d65fc0c761bcf58e94d4ce0cc918afa47c10..d6bf1580787a4d5a2ac9ebde5efe236be3f15a1a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1587,6 +1587,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add various missing EntityDropItemEvent calls
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index edea89eebb9a99e41dc2bcbabc94b6775f5470df..053dbed42a74a5721cfe9f6d70cd965ede3ef1f3 100644
|
||||
index e5f4388d531910c238fcd809a1c5d92267858c53..549a0144e3c6ef267afeb665059bce0f6eac360e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2699,6 +2699,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c63dd80b23df877cb900e608406f747b87e3cae7..be9584daa1da322855524386acf7718d825a7034 100644
|
||||
index aba06bae97f021d9f62441eb662539a0bbc815ef..bc632d1772dd6d9103674ec15408797cc12f2bc0 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2378,7 +2378,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] More Teleport API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index be9584daa1da322855524386acf7718d825a7034..6498ce505226d35f30062bc3aa52388b739c13fe 100644
|
||||
index bc632d1772dd6d9103674ec15408797cc12f2bc0..d8f77bbf533b45e3964c8b0920396b9bed4b3b99 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1637,11 +1637,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityPortalReadyEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 053dbed42a74a5721cfe9f6d70cd965ede3ef1f3..5a57fe0dacd4baf3fea9b64f6325acc34b946036 100644
|
||||
index 549a0144e3c6ef267afeb665059bce0f6eac360e..2de97b71c16094c39a0d1eb2880d1b036b44b710 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3099,6 +3099,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
@ -7,7 +7,7 @@ Minecraft's prediction system does not handle block entities, so if we are manua
|
||||
block breaking we need to set it after the prediction is finished. This fixes block entities not showing when cancelling the BlockBreakEvent.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index bf9b185e3defb496022c20ec60a84a4f6f99d5be..c29ac2fd8dd08fe0c87abc3efb92e539dfdfd739 100644
|
||||
index a7c0db6aebef3aec931513c726447091088cc546..5333488e606f2966271e1d25bacfa4196ca5145b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -62,6 +62,8 @@ public class ServerPlayerGameMode {
|
||||
@ -57,7 +57,7 @@ index bf9b185e3defb496022c20ec60a84a4f6f99d5be..c29ac2fd8dd08fe0c87abc3efb92e539
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6498ce505226d35f30062bc3aa52388b739c13fe..e6bb211374b7fba2e275dd43604ab5a171c833d7 100644
|
||||
index d8f77bbf533b45e3964c8b0920396b9bed4b3b99..5cb69d9fbff2ee1e647c21e40a17b7244815f213 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1783,8 +1783,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -18,7 +18,7 @@ index 8200844b73dc7181d5867aafa83087e09ff2df76..e853c9fdc8ebde6a653aacbb1db6679c
|
||||
|
||||
private static boolean isOutsideSpawnableHeight(int y) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 388ce676487dc094cf78ce7bd3c50942b3ec5e29..e3a1a1ed5f165d7d37a4f760e5ab7ecbea993a0e 100644
|
||||
index c517d8e2daac5675425783a50ae04b5d2a07e37a..a4912e7df109e3648200814e31e81a26262a832a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -312,9 +312,24 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
@ -106,7 +106,7 @@ index 0000000000000000000000000000000000000000..3c31ff3330c2e925e205c0c9ff4f0b83
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 4d7124ae7cefcc8c65bf74ac9d3c103fe6817c42..bbe9ad20a664bcd3952f3a4643add957d20fce20 100644
|
||||
index 7d33ce8d68ca55e0fd37d2d4e3c78a436f17f229..cb7fe116a29916761299a808572f76547d143971 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -274,13 +274,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -228,7 +228,7 @@ index 6121a3879eeb1d13653e93da02ecdbbcb2a866ac..a9f5af48c1f97b2e635727b48f438350
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7749d9740c965baf901512b242426f9a15aca24f..7f238c76a57c9d26c0bafa3f7b4f0436c0a1b93b 100644
|
||||
index 3aae0cce193777cd64124a87f43645207c5f6743..f428bff49d109d2045634505ddcab90f89771a81 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -803,7 +803,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..c1d3bac79bb8b4796c013ff4472f75dc
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 002511a54565aab9eb4552fecdf974fe0eab9122..7c9f7aefc59ae1a785b261f80f25d3304f3bdd22 100644
|
||||
index b9df0b37b5568758c04ee41e258395c3a2d493c1..5981171f4960b61a448014ccaa5336bdc556ae81 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1026,6 +1026,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Stop large look changes from crashing the server
|
||||
Co-authored-by: Jaren Knodel <Jaren@Knodel.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 36ecdf1d0171286893b267b4591d298eefe40587..0d0299482be6c906575626dc352cd13ae8be4569 100644
|
||||
index 546777ad955d0d317d129882cfeab68935708228..cc774a2803051a5d981ecece2e9a992f09850ecf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3056,37 +3056,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Missing eating regain reason
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
index 40af8405c6f3ecc5a8168bb62607eb79862cefa6..ff32fb9e2302cf34f6ddd5647706d37980342657 100644
|
||||
index 1d0c424be2b67cad0f8bca85070a9c46a6b283da..f760ce7d9df79ef58f8963de3e901cba3e12fcaa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
@@ -387,7 +387,7 @@ public class Cat extends TamableAnimal implements VariantHolder<CatVariant> {
|
||||
|
@ -129,7 +129,7 @@ index a0603e567deeede8b4cd2ba57ded44f29239d78d..982750fd4f3f474514194df9b7638831
|
||||
return this.anyPlayerCloseEnoughForSpawning(pos, false);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 2bfa9d1abf7a777b588314d314d06be3b4d2c6a5..0a4586d1b847de49d9e6faa16dba6de4a6a7cca6 100644
|
||||
index d6bf1580787a4d5a2ac9ebde5efe236be3f15a1a..675bc8df01ad9e338541e16575c9ec8e538787e2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1032,7 +1032,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -142,7 +142,7 @@ index 2bfa9d1abf7a777b588314d314d06be3b4d2c6a5..0a4586d1b847de49d9e6faa16dba6de4
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index f2677922cb97c9aa34f2e80769ac9cccc3dc8089..958b013cc4805704cec9a87835f3541e7d3c7faa 100644
|
||||
index d3fdb56f1e62a241d8edbde4faa1296de36de246..482cf5cf164ee33691a5581c6acafb5959705c83 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -468,14 +468,14 @@ public class ServerPlayer extends Player {
|
||||
@ -163,7 +163,7 @@ index f2677922cb97c9aa34f2e80769ac9cccc3dc8089..958b013cc4805704cec9a87835f3541e
|
||||
while (!world.noCollision(this, this.getBoundingBox(), true) && this.getY() < (double) (world.getMaxBuildHeight() - 1)) { // Paper - make sure this loads chunks, we default to NOT loading now
|
||||
this.setPos(this.getX(), this.getY() + 1.0D, this.getZ());
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index c29ac2fd8dd08fe0c87abc3efb92e539dfdfd739..08a013310970c8223b2e942992a0df2e99fb419b 100644
|
||||
index 5333488e606f2966271e1d25bacfa4196ca5145b..9a68d910b0629c0dc7dce482f81752de7900304c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -92,7 +92,7 @@ public class ServerPlayerGameMode {
|
||||
@ -176,7 +176,7 @@ index c29ac2fd8dd08fe0c87abc3efb92e539dfdfd739..08a013310970c8223b2e942992a0df2e
|
||||
this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, this.player), this.player); // CraftBukkit
|
||||
this.level.updateSleepingPlayerList();
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index cd527e612a8a84451f9ef1fa0fcc900e16f54da1..e018cf9ca617adec197e7fa8e116287633002e62 100644
|
||||
index 57fa7cdcb2feb959cb413d4675fca11544236628..423aa9b56c9e9152bba00f47a71ae41612bebdbd 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -711,8 +711,10 @@ public abstract class PlayerList {
|
||||
@ -442,7 +442,7 @@ index 6e45582f8ea7dd2a46f58369c5581764538bff0d..3ecc92439fc85d224ff52f41c5e34079
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
index 93f5e583635a2addeabf2adff9374dcec0b66ee4..843926beb1edd897724b512ad915894fa4a2da6c 100644
|
||||
index db8d2157df0b276313493af224be343ae0de0917..b53d27965d91ee19722f0325f6e0ba3a08684ea5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
@@ -68,7 +68,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 0a4586d1b847de49d9e6faa16dba6de4a6a7cca6..a1411657b226c3eb3fb68bbf7f7afe8524fd96b2 100644
|
||||
index 675bc8df01ad9e338541e16575c9ec8e538787e2..c71a844064f15bdcc2f4fab14b7ace80d95269c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2641,7 +2641,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Correctly handle interactions with items on cooldown
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 08a013310970c8223b2e942992a0df2e99fb419b..9fcac4412d7af04b233e34bd4b5501bcb61855e2 100644
|
||||
index 9a68d910b0629c0dc7dce482f81752de7900304c..a4058e8ce468ef515236813b034f1a08d5d9589f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -516,6 +516,7 @@ public class ServerPlayerGameMode {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerInventorySlotChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 958b013cc4805704cec9a87835f3541e7d3c7faa..8c7356f06e4e7fcaac6fd04fbfd7b471e3bbeaef 100644
|
||||
index 482cf5cf164ee33691a5581c6acafb5959705c83..78e0c0b1eb659733d555d17dbeca8f186572b777 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -379,6 +379,25 @@ public class ServerPlayer extends Player {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityToggleSitEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/TamableAnimal.java b/src/main/java/net/minecraft/world/entity/TamableAnimal.java
|
||||
index 1999cda5876bb12283d8c91a1b3e737c0d27bc38..4d32db04040014dba8935d1cb601e0da1a5d5b02 100644
|
||||
index 4d893c445af2b6dc74d5ad731b69eb5a488817b4..e4550d3ac8d93e0dd9a54e41fbbbef2ef9d4f55e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/TamableAnimal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/TamableAnimal.java
|
||||
@@ -67,7 +67,7 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity {
|
||||
@ -31,7 +31,7 @@ index 1999cda5876bb12283d8c91a1b3e737c0d27bc38..4d32db04040014dba8935d1cb601e0da
|
||||
if (inSittingPose) {
|
||||
this.entityData.set(DATA_FLAGS_ID, (byte)(b | 1));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
index 96799179b0dd1886f0cdc386f04e152a19b3337d..3d771b137dc29579614aa4c15d12bd456cdc608a 100644
|
||||
index 94bb69a7f5795e0fbee171433632b5c3bca3b902..287e52dc844c2a64dac74dad117b775f46631157 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
@@ -433,7 +433,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
||||
@ -69,7 +69,7 @@ index 130761afcaa6723e0a9d9a518f1b526c344484b4..25a7602670b9f736b3b9ff4523bc867e
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
index faf3e31f23d71bbc345bf98d4240490ac4677843..17cff1a4657f688ed704404f76f6ceead3be3be1 100644
|
||||
index 570b39592e7e3a24828c233ec2a2f113b9ef5868..e89f454fe178483a7db381591a4a345ac24db2b8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
@@ -556,7 +556,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index fcef36f5314107f416953fbd0f891da7348c2243..f46640f3e3305b133bd49271377cedae4fe31ab5 100644
|
||||
index 2de97b71c16094c39a0d1eb2880d1b036b44b710..9634ff08d14500216835423376dbc86f3b0ffd35 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3378,6 +3378,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
@ -7,7 +7,7 @@ Makes certain entities check all players when searching for a player
|
||||
instead of just checking players in their world.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index c3ee52f2ad47c6f92b0e8cb284a14a3376fabba7..0bf8cf88a3385f21ffc00096a4af5ce76070614e 100644
|
||||
index c71a844064f15bdcc2f4fab14b7ace80d95269c0..77199a85df9559eeb83b6410ab0e1793020fd0c1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2764,4 +2764,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -24,7 +24,7 @@ index c3ee52f2ad47c6f92b0e8cb284a14a3376fabba7..0bf8cf88a3385f21ffc00096a4af5ce7
|
||||
+ // Paper end - check global player list where appropriate
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 0d0299482be6c906575626dc352cd13ae8be4569..f3d201cba18be448a52304a43ec05b109010bb98 100644
|
||||
index cc774a2803051a5d981ecece2e9a992f09850ecf..10b838b486fa857645bb12ea2043727996b4aadf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3678,7 +3678,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix async entity add due to fungus trees
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
index 49c7825156afd053df1b7721a63070b51427aff2..277c8e429481ca9763ddac9e700735d25aba78e9 100644
|
||||
index 1c2ec978f923521322aaec59b4e88d26d656b6cd..5ece375eaf6bcc61864997a389bb5e24625e4505 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
@@ -249,6 +249,7 @@ public class WorldGenRegion implements WorldGenLevel {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Friction API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index f3d201cba18be448a52304a43ec05b109010bb98..38d0def27625f5b7918cc2cebad0d9db2596ff3b 100644
|
||||
index 10b838b486fa857645bb12ea2043727996b4aadf..40e1caa2c070f11d7195a707ec628f40bccdeef7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -261,6 +261,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@ -55,7 +55,7 @@ index f3d201cba18be448a52304a43ec05b109010bb98..38d0def27625f5b7918cc2cebad0d9db
|
||||
if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) {
|
||||
this.getAttributes().load(nbt.getList("Attributes", 10));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 6b18f23b57c7000dce9726df98a509ee9477f6d2..c34c698d389da29c9cfaa56cb8023e30416a14ba 100644
|
||||
index e19a0f1fac3dd04927f73f3d11a921ffc4608388..491a521f0e5e272fbad7870fa3adefdea22e179f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -57,6 +57,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
|
@ -8,7 +8,7 @@ offhand slot isn't sent. This is not correct because you *can* put stuff into th
|
||||
by pressing the offhand swap item
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 24e6808e325bd80a55c94309aeab835804b03973..2c3a6cee9519f44c40227c5d9cbd63cc483d2d60 100644
|
||||
index 78e0c0b1eb659733d555d17dbeca8f186572b777..6bf33688882e3dca8868590454a9d25567a6a780 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -348,6 +348,13 @@ public class ServerPlayer extends Player {
|
||||
@ -26,7 +26,7 @@ index 24e6808e325bd80a55c94309aeab835804b03973..2c3a6cee9519f44c40227c5d9cbd63cc
|
||||
public void sendSlotChange(AbstractContainerMenu handler, int slot, ItemStack stack) {
|
||||
ServerPlayer.this.connection.send(new ClientboundContainerSetSlotPacket(handler.containerId, handler.incrementStateId(), slot, stack));
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index c18348f4ea79b15b081cf7ba3bd9d77212aa086e..cd82b7e83f79e813d9d87d074bbccad4d2712d60 100644
|
||||
index 2a73cdc6b347aa31a74c2372b0bdc7b00706004a..9eef711958443726249a75e6b4fac70a1714397e 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -200,6 +200,7 @@ public abstract class AbstractContainerMenu {
|
||||
|
@ -21,7 +21,7 @@ index 982750fd4f3f474514194df9b76388311c052b29..a9c94645a4bf3837bce5622b76f0d24a
|
||||
} else if (this.seenBy.remove(player.connection)) {
|
||||
this.serverEntity.removePairing(player);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index f46640f3e3305b133bd49271377cedae4fe31ab5..1a44341de58519dff830afce72707c286ac51364 100644
|
||||
index 9634ff08d14500216835423376dbc86f3b0ffd35..09fa4c28d43c8fddc84056f5cf19dedc6ffe2077 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4107,7 +4107,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
@ -85,7 +85,7 @@ index d088479d160dbd2fc90b48a30553be141db8eef2..ccb7d92b6c36b6225a2e640f8cea6c0d
|
||||
public static class DataItem<T> {
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 3f60f33c43dfcc4ea99a80c66a70222b2ea2f4a6..2fdc9fcc8f88d78fd4b06bfae947c5cb28f8eea7 100644
|
||||
index 5cb69d9fbff2ee1e647c21e40a17b7244815f213..e12f9616a3ef7663bafdb986a73cff858beb3a52 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2658,7 +2658,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -98,7 +98,7 @@ index 3f60f33c43dfcc4ea99a80c66a70222b2ea2f4a6..2fdc9fcc8f88d78fd4b06bfae947c5cb
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index e018cf9ca617adec197e7fa8e116287633002e62..70a1e695a037833c46749a3371ad866b1971037d 100644
|
||||
index 423aa9b56c9e9152bba00f47a71ae41612bebdbd..0223b11df825964f205193268e5c96d7e2d13b6c 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -376,7 +376,7 @@ public abstract class PlayerList {
|
||||
|
@ -34,7 +34,7 @@ index 9652e3385ad10e5d825dd141f6be3522c596916d..baea154a24d1b888af18b9b792db9ede
|
||||
this.discard();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
|
||||
index 0a2de99c22cfcc96a664dc2afe7379987ea815db..452b3070e68dda1a4c7ba99cbefcaab5c5958bdd 100644
|
||||
index 3777e60d0b81e242b1a6e9b0be3e2f21a1642335..bb45605e1ef3e6cfa1976cf9e449456b19cc7c9c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
|
||||
@@ -117,7 +117,7 @@ public class FrogspawnBlock extends Block {
|
||||
@ -47,7 +47,7 @@ index 0a2de99c22cfcc96a664dc2afe7379987ea815db..452b3070e68dda1a4c7ba99cbefcaab5
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
|
||||
index 3cedc349e79665d3d471c92b5dca25c9e66ca0bf..4d3dc58750f80d4aacb46c98a8ffc66acb4a2edc 100644
|
||||
index 8782b05575e4a8d5e5c667c43808442b81c13f6b..6d073e82daf41e35b63703ab9bce8c576862eb3e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
|
||||
@@ -88,7 +88,7 @@ public class SnifferEggBlock extends Block {
|
||||
|
@ -40,7 +40,7 @@ index 536f0c496ce36ca3248fc6eeac9bbd77214a36f9..31718823250a1490b783f426fff65bf5
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 2fdc9fcc8f88d78fd4b06bfae947c5cb28f8eea7..c64cbcd11362ad3e4cf63d769732a5158d616c4c 100644
|
||||
index e12f9616a3ef7663bafdb986a73cff858beb3a52..087f26d52536ec1f196f21e2df1a7159a4a63c1a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3395,7 +3395,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Improve PortalEvents
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 1a44341de58519dff830afce72707c286ac51364..68730383d7ad770cf971e3ae27cff329580b9ea8 100644
|
||||
index 09fa4c28d43c8fddc84056f5cf19dedc6ffe2077..4ea43e3fdc2b8b85c9524f9404fe3535adacc65d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3765,7 +3765,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c64cbcd11362ad3e4cf63d769732a5158d616c4c..6d8d07f30cc18357b2b3a6aa50c54deb1c52f2b7 100644
|
||||
index 087f26d52536ec1f196f21e2df1a7159a4a63c1a..5e6632e3557cf43b4d71ad457d64f3be3518187e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2139,7 +2139,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Expose pre-collision moving velocity to
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 68730383d7ad770cf971e3ae27cff329580b9ea8..25f611ea672ed8ea112a2e31444d0dbdb59f9945 100644
|
||||
index 4ea43e3fdc2b8b85c9524f9404fe3535adacc65d..ee5dfa18049bb36aa6403e6342aa56fb1bebf172 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1162,7 +1162,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Use single player info update packet on join
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6d8d07f30cc18357b2b3a6aa50c54deb1c52f2b7..19c1c398ca8e91faa23e8dc3736cd0945a540419 100644
|
||||
index 5e6632e3557cf43b4d71ad457d64f3be3518187e..3fe70d0c82e30b3893e24119f792d308e2f37112 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3425,7 +3425,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -18,7 +18,7 @@ index 6d8d07f30cc18357b2b3a6aa50c54deb1c52f2b7..19c1c398ca8e91faa23e8dc3736cd094
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 70a1e695a037833c46749a3371ad866b1971037d..64635241bf3c1dd1e2f7e6756b34d497875aa6fa 100644
|
||||
index 0223b11df825964f205193268e5c96d7e2d13b6c..8d8cc5463f261334d0aabf4fd31854a2af862acc 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -358,6 +358,7 @@ public abstract class PlayerList {
|
||||
|
@ -22,7 +22,7 @@ This patch corrects this behaviour by only shrinking the item if a totem
|
||||
of undying was found and the event was called uncancelled.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 38d0def27625f5b7918cc2cebad0d9db2596ff3b..4b6858596f03233bf432329c1cdfe306cd0781ac 100644
|
||||
index 40e1caa2c070f11d7195a707ec628f40bccdeef7..15ebd6c287d90af9d4acb3529c2fb1b9394d3caf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1611,7 +1611,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Update the flag when a captured block state is outdated
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 28ed2605bc3f4d657f6f58729134aeb81a98dac4..c7eb97008b8096f69602678722506fddbeac3148 100644
|
||||
index e853c9fdc8ebde6a653aacbb1db6679ce4d9d50b..8d887a07bd2ef11667ccb34872d629656859fb6c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -923,6 +923,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -23,7 +23,7 @@ index f054d67a637b204de604fadc0d321f5c9816d808..fc5f1e1b445f0a55a35a31d58a90920a
|
||||
|
||||
return !this.getResponse();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 4b6858596f03233bf432329c1cdfe306cd0781ac..a89b49052556cb26accc1957aaef2aea63f6f583 100644
|
||||
index 15ebd6c287d90af9d4acb3529c2fb1b9394d3caf..da89e72040e2d109eebf2d1ca0089d695394f959 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2302,7 +2302,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
@ -50,7 +50,7 @@ index 0000000000000000000000000000000000000000..5c42823726e70ce6c9d0121d07431548
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7c9f7aefc59ae1a785b261f80f25d3304f3bdd22..45f7e7efa8cf407cae2db657074478565590bd12 100644
|
||||
index 5981171f4960b61a448014ccaa5336bdc556ae81..cf94634cc11e368cea60a9005d11c7f7aa64fbae 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1672,6 +1672,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -62,7 +62,7 @@ index 7c9f7aefc59ae1a785b261f80f25d3304f3bdd22..45f7e7efa8cf407cae2db65707447856
|
||||
|
||||
this.profiler.push(() -> {
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 80682ce58d0b0ce0409d162f447b585163c36753..9f1dfb6c7c44d0525792d3517bfdad6479fb12a7 100644
|
||||
index 6b38e515a77df7fb06b41fbedaa1090b1cac78fb..a01a7abcbfa95d75191cc7fbdad6cbebfe06d3f9 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -749,10 +749,16 @@ public final class ItemStack {
|
||||
@ -85,7 +85,7 @@ index 80682ce58d0b0ce0409d162f447b585163c36753..9f1dfb6c7c44d0525792d3517bfdad64
|
||||
itemstack.setPopTime(this.getPopTime());
|
||||
if (this.tag != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index 5bdad1866386908b9fef74d15862eb107fabe68f..a6f47fa9f6065ed669414996b447e2daf34b3495 100644
|
||||
index 0fdf74317a20a250b474978c9e50a6c533abfbe6..4ce7a7947fa727e64556148f923508ce76c128c4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -26,6 +26,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix beehives generating from using bonemeal
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 9f1dfb6c7c44d0525792d3517bfdad6479fb12a7..8d051e23e16cef71e54fef2955720f604c306221 100644
|
||||
index a01a7abcbfa95d75191cc7fbdad6cbebfe06d3f9..ae39d5f386b3f307ba85b359d552a8885d232f7f 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -422,6 +422,7 @@ public final class ItemStack {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Treat sequence violations like they should be
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 19c1c398ca8e91faa23e8dc3736cd0945a540419..8a907853a81480f2b1bcb9d82b62d9d595dcbd35 100644
|
||||
index 3fe70d0c82e30b3893e24119f792d308e2f37112..2cdae57a255305a16fae6ccf431aea78e2c84429 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2043,6 +2043,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -24,7 +24,7 @@ index 0e54e8faa48751a651b953bec72543a94edf74bc..d43106eb89b14667e85cd6e8fa047d64
|
||||
UPDATE_GAME_MODE((serialized, buf) -> {
|
||||
serialized.gameMode = GameType.byId(buf.readVarInt());
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 8a907853a81480f2b1bcb9d82b62d9d595dcbd35..caa9fd305c90fe84b2eebca0f244c818800021ca 100644
|
||||
index 2cdae57a255305a16fae6ccf431aea78e2c84429..533d637c634af9bf086cf3d480f219f7c2d3f34a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -287,6 +287,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 0bf8cf88a3385f21ffc00096a4af5ce76070614e..eff2a7e25a7b99613c1e208058c316f1e3586995 100644
|
||||
index 77199a85df9559eeb83b6410ab0e1793020fd0c1..799ffd47bca76dd9a8c19ab5d37d09e82b477717 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1724,6 +1724,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Use array for gamerule storage
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||
index 6c1af24f2f02ef5fe1be135b4071362f2297147a..a9be16e53a9df34af3495048aa9af7b1a3efea4a 100644
|
||||
index dd03426943dd380cefe12afe3e63c3180a22ec4f..afe91d02363bf7385d34447dda8960980ec48443 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/GameRules.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||
@@ -114,6 +114,7 @@ public class GameRules {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Fix demo flag not enabling demo mode
|
||||
https://github.com/PaperMC/Paper/issues/9046
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 786104fb12f02f493619dfc0d81ab98140d70912..2568272a10c0d92bc49c0c244b10791db7bfae2b 100644
|
||||
index a2d7ed6c68729d1d46b1ac949b7e98cd6badedba..a5e6b99b95e8408136f4c665aec070c5adc448da 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -333,7 +333,9 @@ public class Main {
|
||||
|
@ -14,7 +14,7 @@ clearing the owner.
|
||||
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 25f611ea672ed8ea112a2e31444d0dbdb59f9945..55e53e6e947107fc27ef8322963a877e2deeb741 100644
|
||||
index ee5dfa18049bb36aa6403e6342aa56fb1bebf172..92fe1b4eb9d23031476c6545f653cee37745bbf8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -386,6 +386,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@ -72,7 +72,7 @@ index 270dd1db56b187bffaedba9f2b86b3e46dda3152..5b6d5c799cc8e601a01b6967917e15ba
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java
|
||||
index 2c376687349825833e6d9a5ca92ce6afb98c36a3..856984601a59f51544b741f5f2137028b53c9439 100644
|
||||
index c1c52f4fc5f900fac4098e5e37c52dfc4e82b8bb..236f94348ff8da661e23e3e17b7fc1b143680da9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java
|
||||
@@ -60,6 +60,7 @@ public abstract class AbstractProjectile extends CraftEntity implements Projecti
|
||||
|
@ -22,7 +22,7 @@ index e581dc10f3c805f7f8b6e4c842092609e7e1a0f8..b6b5abba349fecfecd8f3a3c23769360
|
||||
if ((entityhuman == null || !entityhuman.getAbilities().instabuild) && itemstack != ItemStack.EMPTY) { // CraftBukkit
|
||||
itemstack.shrink(1);
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 8d051e23e16cef71e54fef2955720f604c306221..9ac862354c7026845287344bbc2a94c958f65a59 100644
|
||||
index ae39d5f386b3f307ba85b359d552a8885d232f7f..037e09bc8990036b76f75bca9bf14969ede6d6ad 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -493,13 +493,7 @@ public final class ItemStack {
|
||||
@ -41,7 +41,7 @@ index 8d051e23e16cef71e54fef2955720f604c306221..9ac862354c7026845287344bbc2a94c9
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index c7eb97008b8096f69602678722506fddbeac3148..28e56e61ff5c14683f55780ed83e593f6b06503c 100644
|
||||
index 8d887a07bd2ef11667ccb34872d629656859fb6c..7311a9a3b8c4b62b232ea54568c4090a8e121f26 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1038,17 +1038,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix spigot sound playing for BlockItem ItemStacks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 9ac862354c7026845287344bbc2a94c958f65a59..b7e30d0a3c3c945addfa22c805af9608d68284b5 100644
|
||||
index 037e09bc8990036b76f75bca9bf14969ede6d6ad..f5cc647054148c1e170ca3f49128d4ea4acaf4dc 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -544,7 +544,11 @@ public final class ItemStack {
|
||||
|
@ -19,7 +19,7 @@ index ba94ff948ccaddc16d3452306722759c115bb90a..acaa13f195467c3ebe70677b8440a883
|
||||
world.setBlock(pos.above(), blockState.setValue(HALF, DoubleBlockHalf.UPPER), 3);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
|
||||
index 4d3dc58750f80d4aacb46c98a8ffc66acb4a2edc..77952da3134d782609c66e93f5d52ec5c10d499d 100644
|
||||
index 6d073e82daf41e35b63703ab9bce8c576862eb3e..7be4e32a4409b539839a480ef83750ed4b5359a6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
|
||||
@@ -72,8 +72,13 @@ public class SnifferEggBlock extends Block {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Don't enforce icanhasbukkit default if alias block exists
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 56e5dff13323068ad2911649e6285aa915d787bd..15dfa910d91ac49f4d264d0289b891a47beabe25 100644
|
||||
index f428bff49d109d2045634505ddcab90f89771a81..a6dff659356ca8ce8cf24eca8c6c1e9cb00a3979 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -352,7 +352,11 @@ public final class CraftServer implements Server {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Temp: Pre-init PlayerChunkLoaderData in order to prepopulate
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index aca49044899f65d7e91e5762fb58dbaffbfbd4c9..ef8bbef6e4143b9432ee2ae2fb79e2aa2a9b84df 100644
|
||||
index 39f361e2d3b31dc2587042df225132884a9156c0..16e73128115ef92adefbd7818fef3a4b9bcebad2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -368,6 +368,7 @@ public class Main {
|
||||
|
@ -10,7 +10,7 @@ The underlying issue of this is that the client modifies their synced data value
|
||||
them in order for the client to reset their using item state.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index f58386e952d29a16d160b628a23efbe102791277..d0404f7f103b4f98f9d76cf2a5cddec0dfa47b6f 100644
|
||||
index a4058e8ce468ef515236813b034f1a08d5d9589f..0357e190f6cc0724223ed705b19651d865bf853b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -557,6 +557,7 @@ public class ServerPlayerGameMode {
|
||||
@ -34,7 +34,7 @@ index f58386e952d29a16d160b628a23efbe102791277..d0404f7f103b4f98f9d76cf2a5cddec0
|
||||
return enuminteractionresult;
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index caa9fd305c90fe84b2eebca0f244c818800021ca..3f9106eb34db5df10961a44f56f2110fec8bd3c6 100644
|
||||
index 533d637c634af9bf086cf3d480f219f7c2d3f34a..eaa63c02fcb49f0c99842d5448ef883d37c578db 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1955,6 +1955,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -46,7 +46,7 @@ index caa9fd305c90fe84b2eebca0f244c818800021ca..3f9106eb34db5df10961a44f56f2110f
|
||||
return;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index a89b49052556cb26accc1957aaef2aea63f6f583..fe5c46c9bb6130a29ec9cbb65e9e7142a79a157e 100644
|
||||
index da89e72040e2d109eebf2d1ca0089d695394f959..24d68144d4ae2d34cff2b1378b352e2989cd4b76 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3814,6 +3814,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add event for player editing sign
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index b7e30d0a3c3c945addfa22c805af9608d68284b5..244fcdcb153b1f4d842405302261afe1cce67daa 100644
|
||||
index f5cc647054148c1e170ca3f49128d4ea4acaf4dc..734672b38bd9be4ff63d61febc141278f14d7065 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -523,7 +523,7 @@ public final class ItemStack {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Only tick item frames if players can see it
|
||||
In the event that an item frame cannot be seen by any players, ticking the item frame every tick is unnecessary. This can be a very hot section of the entity tracker when lots of item frames are present on a server, so this reduces the logic which speeds it up.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index 9d5d32705f9d8aadb51019f17b4db76a9bc6a04b..4eee77a14c941b637ec9e9dc844e67c5e933bfe7 100644
|
||||
index ff57dbd34874e020edd7074c71cfa635eab0287b..62ee13247a12723e43f114323a2ec1917835920e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -111,7 +111,7 @@ public class ServerEntity {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Don't load chunks for supporting block checks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 55e53e6e947107fc27ef8322963a877e2deeb741..148f146da8f5887deaa52991a8e484d54918f2b9 100644
|
||||
index 92fe1b4eb9d23031476c6545f653cee37745bbf8..2a6c5af6a3d281436ba39a891015f5852ad31444 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1362,7 +1362,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerFailMoveEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 3f9106eb34db5df10961a44f56f2110fec8bd3c6..e400efa2219fca219ee52021c664409907bc839d 100644
|
||||
index eaa63c02fcb49f0c99842d5448ef883d37c578db..40fb76d2fadbe82515311d65418c90fbfb4a9ab9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1316,8 +1316,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -1148,7 +1148,7 @@ index 0000000000000000000000000000000000000000..d306f911757a4d556c82c0070d4837db
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 45f7e7efa8cf407cae2db657074478565590bd12..d34f0d5abd93ed1729a00405d78a34a1873ba086 100644
|
||||
index cf94634cc11e368cea60a9005d11c7f7aa64fbae..a8a8935d29564cc1deb4cac95fc8f9bb76848099 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1629,6 +1629,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -1173,7 +1173,7 @@ index 45f7e7efa8cf407cae2db657074478565590bd12..d34f0d5abd93ed1729a00405d78a34a1
|
||||
this.profiler.push("commandFunctions");
|
||||
MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 64635241bf3c1dd1e2f7e6756b34d497875aa6fa..a23b05d49e900287314fb93ae0355daed81b16a8 100644
|
||||
index 8d8cc5463f261334d0aabf4fd31854a2af862acc..e05bfebf51d210dad08292489bae89300abf99da 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -649,6 +649,7 @@ public abstract class PlayerList {
|
||||
@ -1185,7 +1185,7 @@ index 64635241bf3c1dd1e2f7e6756b34d497875aa6fa..a23b05d49e900287314fb93ae0355dae
|
||||
this.players.remove(entityplayer);
|
||||
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 148f146da8f5887deaa52991a8e484d54918f2b9..acf14c919150f12ddc5ec87bc06e93a8eca6232a 100644
|
||||
index 2a6c5af6a3d281436ba39a891015f5852ad31444..b874a89678b5bffd06fd96b113d45c2674d191d4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -249,11 +249,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@ -1251,12 +1251,12 @@ index 148f146da8f5887deaa52991a8e484d54918f2b9..acf14c919150f12ddc5ec87bc06e93a8
|
||||
public void setLevelCallback(EntityInLevelCallback changeListener) {
|
||||
this.levelCallback = changeListener;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 15dfa910d91ac49f4d264d0289b891a47beabe25..fd85fa6e6b083fd191193513260a37874495d23e 100644
|
||||
index a6dff659356ca8ce8cf24eca8c6c1e9cb00a3979..8574baaa6e040862901124fa51c500d73c4db623 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -306,6 +306,76 @@ public final class CraftServer implements Server {
|
||||
private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher(); // Paper
|
||||
private final CraftPotionBrewer potionBrewer = new CraftPotionBrewer(); // Paper
|
||||
private final CraftPotionBrewer potionBrewer = new CraftPotionBrewer(); // Paper - Custom Potion Mixes
|
||||
|
||||
+ // Paper start - Folia region threading API
|
||||
+ private final io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler regionizedScheduler = new io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler();
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] API for updating recipes on clients
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index a23b05d49e900287314fb93ae0355daed81b16a8..80777d7fb68b8eac7c00df256ba614772163f49f 100644
|
||||
index e05bfebf51d210dad08292489bae89300abf99da..7c054f3b431171a296549bc2aa597df819fd3457 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1545,6 +1545,13 @@ public abstract class PlayerList {
|
||||
@ -39,7 +39,7 @@ index a23b05d49e900287314fb93ae0355daed81b16a8..80777d7fb68b8eac7c00df256ba61477
|
||||
Iterator iterator1 = this.players.iterator();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fd85fa6e6b083fd191193513260a37874495d23e..6876458b3789c320c13dba0cca8b614d13d42c37 100644
|
||||
index 8574baaa6e040862901124fa51c500d73c4db623..8485d08db000ed623b518a4e452c88d4707f9e60 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1129,6 +1129,18 @@ public final class CraftServer implements Server {
|
||||
|
@ -17,7 +17,7 @@ index 97cff1d1c92f3c06897c7ef5da612eca0ee49b2f..6e19de21b6bb643961afc1d5eced3e0d
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 244fcdcb153b1f4d842405302261afe1cce67daa..32a3729b9f1caca789af8176737fc510761ee960 100644
|
||||
index 734672b38bd9be4ff63d61febc141278f14d7065..74fb996f54783948ee1351f3d437666b4d462cba 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -422,6 +422,7 @@ public final class ItemStack {
|
||||
@ -29,7 +29,7 @@ index 244fcdcb153b1f4d842405302261afe1cce67daa..32a3729b9f1caca789af8176737fc510
|
||||
}
|
||||
entityhuman.awardStat(Stats.ITEM_USED.get(item)); // SPIGOT-7236 - award stat
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 28e56e61ff5c14683f55780ed83e593f6b06503c..a8d22b48bd7108ca22faae178fcf82cb158ee7bb 100644
|
||||
index 7311a9a3b8c4b62b232ea54568c4090a8e121f26..03c43220425411e0a135e7d63df276c4571d23d0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1898,4 +1898,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Use correct seed on api world load
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6876458b3789c320c13dba0cca8b614d13d42c37..7361f83fa27e66844d4b7af242db5ef0c08505d8 100644
|
||||
index 8485d08db000ed623b518a4e452c88d4707f9e60..921069db8727d78cb477b74c84968d79a6ce62c3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1347,7 +1347,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Cache map ids on item frames
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index 4eee77a14c941b637ec9e9dc844e67c5e933bfe7..148a6a2739dee63147c5244376892a24145cf271 100644
|
||||
index 62ee13247a12723e43f114323a2ec1917835920e..628183e6f2c22ba96b6dec7e167c0d56e2374727 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -118,7 +118,7 @@ public class ServerEntity {
|
||||
|
@ -60,7 +60,7 @@ index a4519762175c68256b1f303daca8b9408ac182bb..457e9093adb99d31ffc7f061d8c858f9
|
||||
case COMPOSTER_FILL_ATTEMPT:
|
||||
datavalue = ((Boolean) data) ? 1 : 0;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index e3a1a1ed5f165d7d37a4f760e5ab7ecbea993a0e..6bd86a7183042f9023b9e8cf6423e0a1cbfde97a 100644
|
||||
index a4912e7df109e3648200814e31e81a26262a832a..eff91dcea1646ef3745d0576a656f25a37783dae 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1430,7 +1430,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
@ -61,7 +61,7 @@ index 1483007b79e18107e41037c279e048f04f666d1d..5152979bf81345fc365e7b16028c7d97
|
||||
spawnercreature_d = NaturalSpawner.createState(naturalSpawnChunkCount, this.level.getAllEntities(), this::getFullChunk, null, true);
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 2c3a6cee9519f44c40227c5d9cbd63cc483d2d60..8659402aa75a8e2dd26b11c309852164edb6a799 100644
|
||||
index 6bf33688882e3dca8868590454a9d25567a6a780..b63cbff6e42791bb9e490c0fb5e4e719abb4f202 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -260,6 +260,7 @@ public class ServerPlayer extends Player {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Deprecate and replace methods with old StructureType
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7361f83fa27e66844d4b7af242db5ef0c08505d8..9ef8f911632598fd589368cedde268c8abcad3b6 100644
|
||||
index 921069db8727d78cb477b74c84968d79a6ce62c3..66b858bbd8b4087bf95e1608c9be4df191d94bd4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1951,6 +1951,11 @@ public final class CraftServer implements Server {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user