mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-23 06:50:25 +01:00
[ci skip] Add more identifying patch comments, merge related patches
This commit is contained in:
parent
eeb6afc435
commit
1c956abfbc
483 changed files with 368 additions and 388 deletions
|
@ -5,7 +5,7 @@ Subject: [PATCH] Expand EntityUnleashEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index d330b6d291cd2967358e892ccbc480bb3bd8022d..f9743f8705a7f5f3ede4c869070d5735e24348a0 100644
|
||||
index d330b6d291cd2967358e892ccbc480bb3bd8022d..16d84042e2575418880897c728a99d1b8bbcdd15 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1305,12 +1305,15 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
|
@ -62,14 +62,14 @@ index d330b6d291cd2967358e892ccbc480bb3bd8022d..f9743f8705a7f5f3ede4c869070d5735
|
|||
- this.dropLeash(true, false);
|
||||
+ // Paper start - drop leash variable
|
||||
+ EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.UNKNOWN, false);
|
||||
+ if (!event.callEvent()) { return; }
|
||||
+ this.level().getCraftServer().getPluginManager().callEvent(event); // CraftBukkit
|
||||
+ this.dropLeash(true, event.isDropLeash());
|
||||
+ // Paper end
|
||||
this.getAllSlots().forEach((itemstack) -> {
|
||||
if (!itemstack.isEmpty()) {
|
||||
itemstack.setCount(0);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java
|
||||
index 452f219fde958fb4dc775cd2c56c0576c45a8045..8e362ad31208d87f4a69a1747485610e0588be51 100644
|
||||
index 452f219fde958fb4dc775cd2c56c0576c45a8045..7ed610c67fcfa200c30e13a49146907f765bc5ed 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/PathfinderMob.java
|
||||
@@ -57,8 +57,11 @@ public abstract class PathfinderMob extends Mob {
|
||||
|
@ -80,7 +80,7 @@ index 452f219fde958fb4dc775cd2c56c0576c45a8045..8e362ad31208d87f4a69a1747485610e
|
|||
- this.dropLeash(true, true);
|
||||
+ // Paper start - drop leash variable
|
||||
+ EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE, true);
|
||||
+ this.level().getCraftServer().getPluginManager().callEvent(event); // CraftBukkit
|
||||
+ if (!event.callEvent()) return;
|
||||
+ this.dropLeash(true, event.isDropLeash());
|
||||
+ // Paper end
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ index 452f219fde958fb4dc775cd2c56c0576c45a8045..8e362ad31208d87f4a69a1747485610e
|
|||
- this.dropLeash(true, true);
|
||||
+ // Paper start - drop leash variable
|
||||
+ EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE, true);
|
||||
+ this.level().getCraftServer().getPluginManager().callEvent(event); // CraftBukkit
|
||||
+ if (!event.callEvent()) return;
|
||||
+ this.dropLeash(true, event.isDropLeash());
|
||||
+ // Paper end
|
||||
this.goalSelector.disableControlFlag(Goal.Flag.MOVE);
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Allow using signs inside spawn protection
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 48815e94a0eacbdd03ea8630ae4a53f1a4747520..06f6f39e8ac9f2ebc05d63c3c34eb2b1bdb6aa1d 100644
|
||||
index 48815e94a0eacbdd03ea8630ae4a53f1a4747520..49914e966296b23736ecf5efc2dbaa0e1fefa091 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1757,7 +1757,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -13,7 +13,7 @@ index 48815e94a0eacbdd03ea8630ae4a53f1a4747520..06f6f39e8ac9f2ebc05d63c3c34eb2b1
|
|||
|
||||
if (blockposition.getY() < i) {
|
||||
- if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.mayInteract(this.player, blockposition)) {
|
||||
+ if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && (worldserver.mayInteract(this.player, blockposition) || (worldserver.paperConfig().spawn.allowUsingSignsInsideSpawnProtection && worldserver.getBlockState(blockposition).getBlock() instanceof net.minecraft.world.level.block.SignBlock))) { // Paper - sign check
|
||||
+ if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && (worldserver.mayInteract(this.player, blockposition) || (worldserver.paperConfig().spawn.allowUsingSignsInsideSpawnProtection && worldserver.getBlockState(blockposition).getBlock() instanceof net.minecraft.world.level.block.SignBlock))) { // Paper - Allow using signs inside spawn protection
|
||||
this.player.stopUsingItem(); // CraftBukkit - SPIGOT-4706
|
||||
InteractionResult enuminteractionresult = this.player.gameMode.useItemOn(this.player, worldserver, itemstack, enumhand, movingobjectpositionblock);
|
||||
|
||||
|
|
|
@ -3,10 +3,9 @@ From: Irmo van den Berge <irmo.vandenberge@ziggo.nl>
|
|||
Date: Wed, 10 Mar 2021 21:26:31 +0100
|
||||
Subject: [PATCH] Add fast alternative constructor for Rotations
|
||||
|
||||
Signed-off-by: Irmo van den Berge <irmo.vandenberge@ziggo.nl>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/Rotations.java b/src/main/java/net/minecraft/core/Rotations.java
|
||||
index e4b4e78de933b93be87805501d9cbfec429cf68c..152b1a2cb88c6456282b537611c18975d6da5f57 100644
|
||||
index e4b4e78de933b93be87805501d9cbfec429cf68c..95ef904bebeaff3275f25c401ef13c68504f3514 100644
|
||||
--- a/src/main/java/net/minecraft/core/Rotations.java
|
||||
+++ b/src/main/java/net/minecraft/core/Rotations.java
|
||||
@@ -19,6 +19,18 @@ public class Rotations {
|
||||
|
@ -23,7 +22,7 @@ index e4b4e78de933b93be87805501d9cbfec429cf68c..152b1a2cb88c6456282b537611c18975
|
|||
+ public static Rotations createWithoutValidityChecks(float x, float y, float z) {
|
||||
+ return new Rotations(x, y, z, null);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - faster alternative constructor
|
||||
+
|
||||
public ListTag save() {
|
||||
ListTag listTag = new ListTag();
|
||||
|
|
|
@ -7,7 +7,7 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro
|
|||
Closes #5036
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 72b9c50024e82356491a3d35bf248223f3088b5c..dfaedfb4996d9edfb5c50851abf4f5a91f41527c 100644
|
||||
index 72b9c50024e82356491a3d35bf248223f3088b5c..5c63a7719b2a4a4bb2c64d460b007d2976cbdbf9 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -597,6 +597,14 @@ public abstract class PlayerList {
|
||||
|
@ -20,7 +20,7 @@ index 72b9c50024e82356491a3d35bf248223f3088b5c..dfaedfb4996d9edfb5c50851abf4f5a9
|
|||
+ entityplayer.containerMenu.setCarried(net.minecraft.world.item.ItemStack.EMPTY);
|
||||
+ entityplayer.drop(carried, false);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Drop carried item when player has disconnected
|
||||
+
|
||||
this.save(entityplayer);
|
||||
if (entityplayer.isPassenger()) {
|
||||
|
|
|
@ -208,7 +208,7 @@ index 0000000000000000000000000000000000000000..dd9d77d7c7f1a5a130a1f4c15e5b1e68
|
|||
+ public void setErrorIndex(final int errorIndex) {}
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index b5acccc3339e3e2b817116ecf2af228cb641b175..d3e5235d4aa7240ba91bd40c3e1809e1fc1c4632 100644
|
||||
index b5acccc3339e3e2b817116ecf2af228cb641b175..d0551eb2aae8a26222827fdd7c1b7ee81c8c95b9 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -173,7 +173,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
@ -216,7 +216,7 @@ index b5acccc3339e3e2b817116ecf2af228cb641b175..d3e5235d4aa7240ba91bd40c3e1809e1
|
|||
thread.setDaemon(true);
|
||||
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER));
|
||||
- thread.start();
|
||||
+ // thread.start(); // Paper - moved down
|
||||
+ // thread.start(); // Paper - Enhance console tab completions for brigadier commands; moved down
|
||||
DedicatedServer.LOGGER.info("Starting minecraft server version {}", SharedConstants.getCurrentVersion().getName());
|
||||
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
|
||||
DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
|
||||
|
@ -224,23 +224,23 @@ index b5acccc3339e3e2b817116ecf2af228cb641b175..d3e5235d4aa7240ba91bd40c3e1809e1
|
|||
this.getPlayerList().loadAndSaveFiles(); // Must be after convertNames
|
||||
// Paper end - convert old users earlier after PlayerList creation but before file load/save
|
||||
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); // Paper - start watchdog thread
|
||||
+ thread.start(); // Paper - start console thread after MinecraftServer.console & PaperConfig are initialized
|
||||
+ thread.start(); // Paper - Enhance console tab completions for brigadier commands; start console thread after MinecraftServer.console & PaperConfig are initialized
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
|
||||
index 8f82041f0482df22a6a9ea38d50d56228131775d..12eeabafbad9da8796dc6fc383b732cf75bb7ddb 100644
|
||||
index 8f82041f0482df22a6a9ea38d50d56228131775d..3e93a6c489972ff2b4ecff3d83cc72b2d5c970f8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
|
||||
@@ -18,9 +18,11 @@ import org.bukkit.event.server.TabCompleteEvent;
|
||||
|
||||
public class ConsoleCommandCompleter implements Completer {
|
||||
private final DedicatedServer server; // Paper - CraftServer -> DedicatedServer
|
||||
+ private final io.papermc.paper.console.BrigadierCommandCompleter brigadierCompleter; // Paper
|
||||
+ private final io.papermc.paper.console.BrigadierCommandCompleter brigadierCompleter; // Paper - Enhance console tab completions for brigadier commands
|
||||
|
||||
public ConsoleCommandCompleter(DedicatedServer server) { // Paper - CraftServer -> DedicatedServer
|
||||
this.server = server;
|
||||
+ this.brigadierCompleter = new io.papermc.paper.console.BrigadierCommandCompleter(this.server); // Paper
|
||||
+ this.brigadierCompleter = new io.papermc.paper.console.BrigadierCommandCompleter(this.server); // Paper - Enhance console tab completions for brigadier commands
|
||||
}
|
||||
|
||||
// Paper start - Change method signature for JLine update
|
||||
|
@ -265,7 +265,7 @@ index 8f82041f0482df22a6a9ea38d50d56228131775d..12eeabafbad9da8796dc6fc383b732cf
|
|||
try {
|
||||
List<String> offers = waitable.get();
|
||||
if (offers == null) {
|
||||
+ this.addCompletions(reader, line, candidates, Collections.emptyList()); // Paper
|
||||
+ this.addCompletions(reader, line, candidates, Collections.emptyList()); // Paper - Enhance console tab completions for brigadier commands
|
||||
return; // Paper - Method returns void
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ Paper.bypassHostCheck
|
|||
Seriously, fix your firewalls. -.-
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
index 5d7f092e966d5b0496f48bd5c9d274157ac6d250..3068e25f2df958689627fb31783a2d356547f1be 100644
|
||||
index 5d7f092e966d5b0496f48bd5c9d274157ac6d250..7fa8efd6b0cd7a7684d9bd4ff89d4955a69a8dd5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
@@ -30,6 +30,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||
|
@ -24,7 +24,7 @@ index 5d7f092e966d5b0496f48bd5c9d274157ac6d250..3068e25f2df958689627fb31783a2d35
|
|||
// Paper end
|
||||
// if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
|
||||
- if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) {
|
||||
+ if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.BYPASS_HOSTCHECK || ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) { // Paper
|
||||
+ if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.BYPASS_HOSTCHECK || ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) { // Paper - Add bypass host check
|
||||
this.connection.hostname = split[0];
|
||||
this.connection.address = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getPort());
|
||||
this.connection.spoofedUUID = com.mojang.util.UndashedUuid.fromStringLenient( split[2] );
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] add consumeFuel to FurnaceBurnEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
index 97b8dc205fb22e17ab457e8d1f4d73a7b2f8cc47..11ee20c6dc87baa063e8293ebdd9d5247a3e932e 100644
|
||||
index 97b8dc205fb22e17ab457e8d1f4d73a7b2f8cc47..b7760cc0f85b5db37d5a309aae3c26a00a65e32e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -359,7 +359,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
|
@ -13,7 +13,7 @@ index 97b8dc205fb22e17ab457e8d1f4d73a7b2f8cc47..11ee20c6dc87baa063e8293ebdd9d524
|
|||
// CraftBukkit end
|
||||
flag1 = true;
|
||||
- if (flag3) {
|
||||
+ if (flag3 && furnaceBurnEvent.willConsumeFuel()) { // Paper
|
||||
+ if (flag3 && furnaceBurnEvent.willConsumeFuel()) { // Paper - add consumeFuel to FurnaceBurnEvent
|
||||
Item item = itemstack.getItem();
|
||||
|
||||
itemstack.shrink(1);
|
||||
|
|
|
@ -5,14 +5,14 @@ Subject: [PATCH] fix PigZombieAngerEvent cancellation
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
||||
index 7e703bf1ca3cf824b06b6be731b866cd407aaff1..1afe8a8694c1fd0bf43ce3c0c36a83fda9aec141 100644
|
||||
index 7e703bf1ca3cf824b06b6be731b866cd407aaff1..fbabbd0808304f5d0d12f987d00c9e43a89fb1c9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
||||
@@ -57,6 +57,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||
private int ticksUntilNextAlert;
|
||||
private static final float ZOMBIFIED_PIGLIN_EYE_HEIGHT = 1.79F;
|
||||
private static final float ZOMBIFIED_PIGLIN_BABY_EYE_HEIGHT_ADJUSTMENT = 0.82F;
|
||||
+ private HurtByTargetGoal pathfinderGoalHurtByTarget; // Paper
|
||||
+ private HurtByTargetGoal pathfinderGoalHurtByTarget; // Paper - fix PigZombieAngerEvent cancellation
|
||||
|
||||
public ZombifiedPiglin(EntityType<? extends ZombifiedPiglin> type, Level world) {
|
||||
super(type, world);
|
||||
|
@ -21,7 +21,7 @@ index 7e703bf1ca3cf824b06b6be731b866cd407aaff1..1afe8a8694c1fd0bf43ce3c0c36a83fd
|
|||
this.goalSelector.addGoal(2, new ZombieAttackGoal(this, 1.0D, false));
|
||||
this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0D));
|
||||
- this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, new Class[0])).setAlertOthers());
|
||||
+ this.targetSelector.addGoal(1, pathfinderGoalHurtByTarget = (new HurtByTargetGoal(this, new Class[0])).setAlertOthers()); // Paper - assign field
|
||||
+ this.targetSelector.addGoal(1, pathfinderGoalHurtByTarget = (new HurtByTargetGoal(this, new Class[0])).setAlertOthers()); // Paper - fix PigZombieAngerEvent cancellation
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt));
|
||||
this.targetSelector.addGoal(3, new ResetUniversalAngerTargetGoal<>(this, true));
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ index 7e703bf1ca3cf824b06b6be731b866cd407aaff1..1afe8a8694c1fd0bf43ce3c0c36a83fd
|
|||
this.level().getCraftServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) {
|
||||
this.setPersistentAngerTarget(null);
|
||||
+ pathfinderGoalHurtByTarget.stop(); // Paper - clear goalTargets to fix cancellation
|
||||
+ pathfinderGoalHurtByTarget.stop(); // Paper - fix PigZombieAngerEvent cancellation
|
||||
return;
|
||||
}
|
||||
this.setRemainingPersistentAngerTime(event.getNewAnger());
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Wed, 21 Apr 2021 15:58:19 -0700
|
||||
Subject: [PATCH] Added PlayerDeepSleepEvent
|
||||
Subject: [PATCH] Add PlayerDeepSleepEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 2957b3929c1e92af1b1a2636b83b757a0fbc789d..51fe3687f6f8c2ce5a5f0ac7749bc7cad135a69a 100644
|
||||
index 2957b3929c1e92af1b1a2636b83b757a0fbc789d..482eaa28277eca1dbb25d1f3cf6c27328a8879de 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -248,6 +248,11 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
if (this.isSleeping()) {
|
||||
++this.sleepCounter;
|
||||
+ // Paper start
|
||||
+ // Paper start - Add PlayerDeepSleepEvent
|
||||
+ if (this.sleepCounter == 100) {
|
||||
+ if (!new io.papermc.paper.event.player.PlayerDeepSleepEvent((org.bukkit.entity.Player) getBukkitEntity()).callEvent()) { this.sleepCounter = Integer.MIN_VALUE; }
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Add PlayerDeepSleepEvent
|
||||
if (this.sleepCounter > 100) {
|
||||
this.sleepCounter = 100;
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Thu, 24 Dec 2020 12:27:41 -0800
|
||||
Subject: [PATCH] Added PlayerBedFailEnterEvent
|
||||
Subject: [PATCH] Add PlayerBedFailEnterEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
||||
index 77438ea56b83f6aecd5f9acb9c55d4cd6e86ff95..0e63fa3b49b1a275254cf108a51ab18e816aad49 100644
|
||||
index 77438ea56b83f6aecd5f9acb9c55d4cd6e86ff95..40559727591278f44dbf50e2d3406054ffeb8ae9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
||||
@@ -119,14 +119,23 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
|
||||
|
@ -18,19 +18,19 @@ index 77438ea56b83f6aecd5f9acb9c55d4cd6e86ff95..0e63fa3b49b1a275254cf108a51ab18e
|
|||
+ if (!event.callEvent()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - PlayerBedFailEnterEvent
|
||||
// CraftBukkit start - handling bed explosion from below here
|
||||
- if (!world.dimensionType().bedWorks()) {
|
||||
+ if (event.getWillExplode()) { // Paper
|
||||
+ if (event.getWillExplode()) { // Paper - PlayerBedFailEnterEvent
|
||||
this.explodeBed(finaliblockdata, world, finalblockposition);
|
||||
} else
|
||||
// CraftBukkit end
|
||||
if (entityhuman_enumbedresult.getMessage() != null) {
|
||||
- player.displayClientMessage(entityhuman_enumbedresult.getMessage(), true);
|
||||
+ final net.kyori.adventure.text.Component message = event.getMessage(); // Paper
|
||||
+ if (message != null) player.displayClientMessage(io.papermc.paper.adventure.PaperAdventure.asVanilla(message), true); // Paper
|
||||
+ final net.kyori.adventure.text.Component message = event.getMessage(); // Paper - PlayerBedFailEnterEvent
|
||||
+ if (message != null) player.displayClientMessage(io.papermc.paper.adventure.PaperAdventure.asVanilla(message), true); // Paper - PlayerBedFailEnterEvent
|
||||
}
|
||||
+ } // Paper
|
||||
+ } // Paper - PlayerBedFailEnterEvent
|
||||
|
||||
});
|
||||
return InteractionResult.SUCCESS;
|
|
@ -1,11 +1,12 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Thu, 22 Apr 2021 17:17:47 -0700
|
||||
Subject: [PATCH] add RespawnFlags to PlayerRespawnEvent
|
||||
From: HexedHero <6012891+HexedHero@users.noreply.github.com>
|
||||
Date: Fri, 23 Apr 2021 22:42:42 +0100
|
||||
Subject: [PATCH] Expand PlayerRespawnEvent, fix passed parameter issues
|
||||
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 91e1a5fb981dd8468bb13098424b54da1c90a998..206c0a1e783699ed272e3640a29fe349eb0b465e 100644
|
||||
index d58d0748e218349fca1927263ad986ca824d4bda..8a6d9ae5b0735884a39fa2ded6f1d94909043eb7 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2644,7 +2644,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -13,33 +14,49 @@ index 91e1a5fb981dd8468bb13098424b54da1c90a998..206c0a1e783699ed272e3640a29fe349
|
|||
if (this.player.wonGame) {
|
||||
this.player.wonGame = false;
|
||||
- this.player = this.server.getPlayerList().respawn(this.player, true, RespawnReason.END_PORTAL);
|
||||
+ this.player = this.server.getPlayerList().respawn(this.player, this.server.getLevel(this.player.getRespawnDimension()), true, null, true, RespawnReason.END_PORTAL, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag.END_PORTAL); // Paper - add isEndCreditsRespawn argument
|
||||
+ this.player = this.server.getPlayerList().respawn(this.player, this.server.getLevel(this.player.getRespawnDimension()), true, null, true, RespawnReason.END_PORTAL, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag.END_PORTAL); // Paper - Expand PlayerRespawnEvent
|
||||
CriteriaTriggers.CHANGED_DIMENSION.trigger(this.player, Level.END, Level.OVERWORLD);
|
||||
} else {
|
||||
if (this.player.getHealth() > 0.0F) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index af1c4caa17e8b6ae597af123abe6b056bd8fd87d..c3e058cb24fc6cf3e7508ad689af9214d9a20f7d 100644
|
||||
index 5c63a7719b2a4a4bb2c64d460b007d2976cbdbf9..a622d91ecdea6ab4deaf0ef4ae90cba71c49b319 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -781,6 +781,12 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation, RespawnReason reason) {
|
||||
+ // Paper start
|
||||
+ // Paper start - Expand PlayerRespawnEvent
|
||||
+ return respawn(entityplayer, worldserver, flag, location, avoidSuffocation, reason, new org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag[0]);
|
||||
+ }
|
||||
+
|
||||
+ public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation, RespawnReason reason, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag...respawnFlags) {
|
||||
+ // Paper end
|
||||
+ // Paper end - Expand PlayerRespawnEvent
|
||||
entityplayer.stopRiding(); // CraftBukkit
|
||||
this.players.remove(entityplayer);
|
||||
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
@@ -872,7 +878,7 @@ public abstract class PlayerList {
|
||||
@@ -822,6 +828,7 @@ public abstract class PlayerList {
|
||||
|
||||
// Paper start
|
||||
boolean isBedSpawn = false;
|
||||
+ boolean isAnchorSpawn = false; // Paper - Fix PlayerRespawnEvent
|
||||
boolean isRespawn = false;
|
||||
boolean isLocAltered = false; // Paper - Fix SPIGOT-5989
|
||||
// Paper end
|
||||
@@ -842,6 +849,7 @@ public abstract class PlayerList {
|
||||
if (optional.isPresent()) {
|
||||
BlockState iblockdata = worldserver1.getBlockState(blockposition);
|
||||
boolean flag3 = iblockdata.is(Blocks.RESPAWN_ANCHOR);
|
||||
+ isAnchorSpawn = flag3; // Paper - Fix PlayerRespawnEvent
|
||||
Vec3 vec3d = (Vec3) optional.get();
|
||||
float f1;
|
||||
|
||||
@@ -870,7 +878,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
Player respawnPlayer = entityplayer1.getBukkitEntity();
|
||||
- PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn, reason); // Paper - Fix anchor respawn acting as a bed respawn from the end portal
|
||||
+ PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn, reason, com.google.common.collect.ImmutableSet.<org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag>builder().add(respawnFlags)); // Paper - Fix anchor respawn acting as a bed respawn from the end portal
|
||||
- PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !flag2, flag2, reason);
|
||||
+ PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn, reason, com.google.common.collect.ImmutableSet.<org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag>builder().add(respawnFlags)); // Paper - PlayerRespawnEvent changes
|
||||
this.cserver.getPluginManager().callEvent(respawnEvent);
|
||||
// Spigot Start
|
||||
if (entityplayer.connection.isDisconnected()) {
|
|
@ -1,36 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: HexedHero <6012891+HexedHero@users.noreply.github.com>
|
||||
Date: Fri, 23 Apr 2021 22:42:42 +0100
|
||||
Subject: [PATCH] Fix anchor respawn acting as a bed respawn from the end
|
||||
portal
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index dfaedfb4996d9edfb5c50851abf4f5a91f41527c..af1c4caa17e8b6ae597af123abe6b056bd8fd87d 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -822,6 +822,7 @@ public abstract class PlayerList {
|
||||
|
||||
// Paper start
|
||||
boolean isBedSpawn = false;
|
||||
+ boolean isAnchorSpawn = false;
|
||||
boolean isRespawn = false;
|
||||
boolean isLocAltered = false; // Paper - Fix SPIGOT-5989
|
||||
// Paper end
|
||||
@@ -842,6 +843,7 @@ public abstract class PlayerList {
|
||||
if (optional.isPresent()) {
|
||||
BlockState iblockdata = worldserver1.getBlockState(blockposition);
|
||||
boolean flag3 = iblockdata.is(Blocks.RESPAWN_ANCHOR);
|
||||
+ isAnchorSpawn = flag3; // Paper - Fix anchor respawn acting as a bed respawn from the end portal
|
||||
Vec3 vec3d = (Vec3) optional.get();
|
||||
float f1;
|
||||
|
||||
@@ -870,7 +872,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
Player respawnPlayer = entityplayer1.getBukkitEntity();
|
||||
- PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !flag2, flag2, reason);
|
||||
+ PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn, reason); // Paper - Fix anchor respawn acting as a bed respawn from the end portal
|
||||
this.cserver.getPluginManager().callEvent(respawnEvent);
|
||||
// Spigot Start
|
||||
if (entityplayer.connection.isDisconnected()) {
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Introduce beacon activation/deactivation events
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
index 3a50fe20294048a1c818ae717a918bb1aed74dea..ca91b82a21a46b1a62564b5157882a845eae8737 100644
|
||||
index 3a50fe20294048a1c818ae717a918bb1aed74dea..d3e2fd7fcfeec133a7baa0007c979c9e379c2f10 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
@@ -221,6 +221,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
|
@ -20,7 +20,7 @@ index 3a50fe20294048a1c818ae717a918bb1aed74dea..ca91b82a21a46b1a62564b5157882a84
|
|||
+ org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(world, pos);
|
||||
+ new io.papermc.paper.event.block.BeaconDeactivatedEvent(block).callEvent();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - beacon activation/deactivation events
|
||||
|
||||
if (blockEntity.lastCheckY >= l) {
|
||||
blockEntity.lastCheckY = world.getMinBuildHeight() - 1;
|
||||
|
@ -28,10 +28,10 @@ index 3a50fe20294048a1c818ae717a918bb1aed74dea..ca91b82a21a46b1a62564b5157882a84
|
|||
|
||||
@Override
|
||||
public void setRemoved() {
|
||||
+ // Paper start - BeaconDeactivatedEvent
|
||||
+ // Paper start - beacon activation/deactivation events
|
||||
+ org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(level, worldPosition);
|
||||
+ new io.papermc.paper.event.block.BeaconDeactivatedEvent(block).callEvent();
|
||||
+ // Paper end
|
||||
+ // Paper end - beacon activation/deactivation events
|
||||
BeaconBlockEntity.playSound(this.level, this.worldPosition, SoundEvents.BEACON_DEACTIVATE);
|
||||
super.setRemoved();
|
||||
}
|
||||
|
|
|
@ -122,14 +122,14 @@ index 0000000000000000000000000000000000000000..0d7e7db9e37ef0183c32b217bd944fb4
|
|||
+ COMPRESSION_DISABLED
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index 2db208427447b94cdfdb22b38b6dc6697b1067bd..d4e23bfb6135d52c1359d7ccfabc6a0e595afe6e 100644
|
||||
index 2db208427447b94cdfdb22b38b6dc6697b1067bd..7e966e072476c085d41942a02a5f0f3ff1ac72bc 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -717,6 +717,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
} else {
|
||||
this.channel.pipeline().addBefore("encoder", "compress", new CompressionEncoder(compressionThreshold));
|
||||
}
|
||||
+ this.channel.pipeline().fireUserEventTriggered(io.papermc.paper.network.ConnectionEvent.COMPRESSION_THRESHOLD_SET); // Paper
|
||||
+ this.channel.pipeline().fireUserEventTriggered(io.papermc.paper.network.ConnectionEvent.COMPRESSION_THRESHOLD_SET); // Paper - Add Channel initialization listeners
|
||||
} else {
|
||||
if (this.channel.pipeline().get("decompress") instanceof CompressionDecoder) {
|
||||
this.channel.pipeline().remove("decompress");
|
||||
|
@ -137,19 +137,19 @@ index 2db208427447b94cdfdb22b38b6dc6697b1067bd..d4e23bfb6135d52c1359d7ccfabc6a0e
|
|||
if (this.channel.pipeline().get("compress") instanceof CompressionEncoder) {
|
||||
this.channel.pipeline().remove("compress");
|
||||
}
|
||||
+ this.channel.pipeline().fireUserEventTriggered(io.papermc.paper.network.ConnectionEvent.COMPRESSION_DISABLED); // Paper
|
||||
+ this.channel.pipeline().fireUserEventTriggered(io.papermc.paper.network.ConnectionEvent.COMPRESSION_DISABLED); // Paper - Add Channel initialization listeners
|
||||
}
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
index b2bfb3893200362ac35ae60982f203f86a1148ec..6641fd04821240b1bbeff1bd8d996a8f2fff8385 100644
|
||||
index b2bfb3893200362ac35ae60982f203f86a1148ec..4414b12218a5693fecaa8c1e7c7676a58bcad324 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
@@ -116,6 +116,7 @@ public class ServerConnectionListener {
|
||||
pending.add(object); // Paper
|
||||
((Connection) object).configurePacketHandler(channelpipeline);
|
||||
((Connection) object).setListenerForServerboundHandshake(new ServerHandshakePacketListenerImpl(ServerConnectionListener.this.server, (Connection) object));
|
||||
+ io.papermc.paper.network.ChannelInitializeListenerHolder.callListeners(channel); // Paper
|
||||
+ io.papermc.paper.network.ChannelInitializeListenerHolder.callListeners(channel); // Paper - Add Channel initialization listeners
|
||||
}
|
||||
}).group(eventloopgroup).localAddress(address, port)).option(ChannelOption.AUTO_READ, false).bind().syncUninterruptibly()); // CraftBukkit
|
||||
}
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Send empty commands if tab completion is disabled
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 2de557a5ed91e2036a7f558cfca8b174cd534959..3b3fa067ee5a95d52645147c2d9d1e43d7a789b6 100644
|
||||
index 2de557a5ed91e2036a7f558cfca8b174cd534959..565685d0f41311bc2281d11ee9d751bf4d4c93a3 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -456,7 +456,12 @@ public class Commands {
|
||||
|
@ -14,11 +14,11 @@ index 2de557a5ed91e2036a7f558cfca8b174cd534959..3b3fa067ee5a95d52645147c2d9d1e43
|
|||
public void sendCommands(ServerPlayer player) {
|
||||
- if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) return; // Spigot
|
||||
+ // Paper start - Send empty commands if tab completion is disabled
|
||||
+ if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) { //return; // Spigot
|
||||
+ if (org.spigotmc.SpigotConfig.tabComplete < 0) {
|
||||
+ player.connection.send(new ClientboundCommandsPacket(new RootCommandNode<>()));
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Send empty commands if tab completion is disabled
|
||||
// CraftBukkit start
|
||||
// Register Vanilla commands into builtRoot as before
|
||||
// Paper start - Async command map building
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add more WanderingTrader API
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
index 0321b4bb622930bfe57661b0e6b893d7635668fb..96115fe8a8c32ce5992d779b5db540b9d81e3b82 100644
|
||||
index 0321b4bb622930bfe57661b0e6b893d7635668fb..594e82a09d21c39331c391f2aec5bc8d87649ea3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
@@ -60,6 +60,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||
|
@ -15,7 +15,7 @@ index 0321b4bb622930bfe57661b0e6b893d7635668fb..96115fe8a8c32ce5992d779b5db540b9
|
|||
+ // Paper start - Add more WanderingTrader API
|
||||
+ public boolean canDrinkPotion = true;
|
||||
+ public boolean canDrinkMilk = true;
|
||||
+ // Paper end
|
||||
+ // Paper end - Add more WanderingTrader API
|
||||
|
||||
public WanderingTrader(EntityType<? extends WanderingTrader> type, Level world) {
|
||||
super(type, world);
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityBlockStorage#clearEntities()
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
||||
index 5f2042d565974a5509aec8f744e091fe7c576c98..8c4fba5369e5e25f144291c43e086b7417b013aa 100644
|
||||
index 5f2042d565974a5509aec8f744e091fe7c576c98..6c42f7e7fbd776a59fbd5aa3723752a130d3090f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
||||
@@ -139,6 +139,11 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
|
@ -16,7 +16,7 @@ index 5f2042d565974a5509aec8f744e091fe7c576c98..8c4fba5369e5e25f144291c43e086b74
|
|||
+ public void clearBees() {
|
||||
+ this.stored.clear();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Add EntityBlockStorage clearEntities
|
||||
public static int getHoneyLevel(BlockState state) {
|
||||
return (Integer) state.getValue(BeehiveBlock.HONEY_LEVEL);
|
||||
}
|
|
@ -9,18 +9,18 @@ defaults are only included for certain entites, this allows setting
|
|||
limits for any entity type.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 9d16fc698b0771bcb3c95f5fb017879c37ebb39b..823f3b3093cffb49ccdcbcfbe6d348009a553ad7 100644
|
||||
index 9d16fc698b0771bcb3c95f5fb017879c37ebb39b..2fa2e5cada590c0f44a4735bcf20de51892f428b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -631,9 +631,20 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
final Spliterator<? extends Tag> spliterator = entityNbtList.spliterator();
|
||||
|
||||
return StreamSupport.stream(new Spliterator<Entity>() {
|
||||
+ final java.util.Map<EntityType<?>, Integer> loadedEntityCounts = new java.util.HashMap<>(); // Paper
|
||||
+ final java.util.Map<EntityType<?>, Integer> loadedEntityCounts = new java.util.HashMap<>(); // Paper - Entity load/save limit per chunk
|
||||
public boolean tryAdvance(Consumer<? super Entity> consumer) {
|
||||
return spliterator.tryAdvance((nbtbase) -> {
|
||||
EntityType.loadEntityRecursive((CompoundTag) nbtbase, world, (entity) -> {
|
||||
+ // Paper start
|
||||
+ // Paper start - Entity load/save limit per chunk
|
||||
+ final EntityType<?> entityType = entity.getType();
|
||||
+ final int saveLimit = world.paperConfig().chunks.entityPerChunkSaveLimit.getOrDefault(entityType, -1);
|
||||
+ if (saveLimit > -1) {
|
||||
|
@ -29,21 +29,21 @@ index 9d16fc698b0771bcb3c95f5fb017879c37ebb39b..823f3b3093cffb49ccdcbcfbe6d34800
|
|||
+ }
|
||||
+ this.loadedEntityCounts.merge(entityType, 1, Integer::sum);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Entity load/save limit per chunk
|
||||
consumer.accept(entity);
|
||||
return entity;
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
|
||||
index 0ec0be22f7292d57c40da6f1f4575bdebf8dbd09..060e064625969610539dbf969ce773b877a7c579 100644
|
||||
index 0ec0be22f7292d57c40da6f1f4575bdebf8dbd09..23dc37ff1f92951817864963bf93220d5aae91bb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
|
||||
@@ -110,7 +110,18 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {
|
||||
}
|
||||
|
||||
ListTag listTag = new ListTag();
|
||||
+ final java.util.Map<net.minecraft.world.entity.EntityType<?>, Integer> savedEntityCounts = new java.util.HashMap<>(); // Paper
|
||||
+ final java.util.Map<net.minecraft.world.entity.EntityType<?>, Integer> savedEntityCounts = new java.util.HashMap<>(); // Paper - Entity load/save limit per chunk
|
||||
entities.forEach((entity) -> { // diff here: use entities parameter
|
||||
+ // Paper start
|
||||
+ // Paper start - Entity load/save limit per chunk
|
||||
+ final EntityType<?> entityType = entity.getType();
|
||||
+ final int saveLimit = level.paperConfig().chunks.entityPerChunkSaveLimit.getOrDefault(entityType, -1);
|
||||
+ if (saveLimit > -1) {
|
||||
|
@ -52,7 +52,7 @@ index 0ec0be22f7292d57c40da6f1f4575bdebf8dbd09..060e064625969610539dbf969ce773b8
|
|||
+ }
|
||||
+ savedEntityCounts.merge(entityType, 1, Integer::sum);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Entity load/save limit per chunk
|
||||
CompoundTag compoundTag = new CompoundTag();
|
||||
if (entity.save(compoundTag)) {
|
||||
listTag.add(compoundTag);
|
|
@ -6,23 +6,23 @@ Subject: [PATCH] Add a "should burn in sunlight" API for Phantoms and
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
index 6be9e8d693bbb084791d7b30a1891ddb803d6b02..8e9469fec42f7b6a132cf173f6f5a95777a29b3b 100644
|
||||
index 6be9e8d693bbb084791d7b30a1891ddb803d6b02..9af5a4b46dcec727c7c862332759ffbe3ebd87b5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
@@ -98,9 +98,15 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
|
||||
return MobType.UNDEAD;
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ // Paper start - shouldBurnInDay API
|
||||
+ private boolean shouldBurnInDay = true;
|
||||
+ public boolean shouldBurnInDay() { return shouldBurnInDay; }
|
||||
+ public void setShouldBurnInDay(boolean shouldBurnInDay) { this.shouldBurnInDay = shouldBurnInDay; }
|
||||
+ // Paper end
|
||||
+ // Paper end - shouldBurnInDay API
|
||||
+
|
||||
@Override
|
||||
public void aiStep() {
|
||||
- boolean flag = this.isSunBurnTick();
|
||||
+ boolean flag = shouldBurnInDay && this.isSunBurnTick(); // Paper - Configurable Burning
|
||||
+ boolean flag = shouldBurnInDay && this.isSunBurnTick(); // Paper - shouldBurnInDay API
|
||||
|
||||
if (flag) {
|
||||
ItemStack itemstack = this.getItemBySlot(EquipmentSlot.HEAD);
|
||||
|
@ -30,25 +30,25 @@ index 6be9e8d693bbb084791d7b30a1891ddb803d6b02..8e9469fec42f7b6a132cf173f6f5a957
|
|||
public void readAdditionalSaveData(CompoundTag nbt) {
|
||||
super.readAdditionalSaveData(nbt);
|
||||
this.reassessWeaponGoal();
|
||||
+ // Paper start
|
||||
+ // Paper start - shouldBurnInDay API
|
||||
+ if (nbt.contains("Paper.ShouldBurnInDay")) {
|
||||
+ this.shouldBurnInDay = nbt.getBoolean("Paper.ShouldBurnInDay");
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - shouldBurnInDay API
|
||||
+ }
|
||||
+
|
||||
+ // Paper start
|
||||
+ // Paper start - shouldBurnInDay API
|
||||
+ @Override
|
||||
+ public void addAdditionalSaveData(CompoundTag nbt) {
|
||||
+ super.addAdditionalSaveData(nbt);
|
||||
+ nbt.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay);
|
||||
}
|
||||
+ // Paper end
|
||||
+ // Paper end - shouldBurnInDay API
|
||||
|
||||
@Override
|
||||
public void setItemSlot(EquipmentSlot slot, ItemStack stack) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
index a40852acf5d175cc3a06bc17fb021c76f0c11a28..5b4719dd7c3b8f93c898779f45239568f6a5fe43 100644
|
||||
index a40852acf5d175cc3a06bc17fb021c76f0c11a28..bb52085d706293fa86df16a1b8e76d17a90ea9e9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
@@ -145,7 +145,7 @@ public class Phantom extends FlyingMob implements Enemy {
|
||||
|
@ -56,7 +56,7 @@ index a40852acf5d175cc3a06bc17fb021c76f0c11a28..5b4719dd7c3b8f93c898779f45239568
|
|||
@Override
|
||||
public void aiStep() {
|
||||
- if (this.isAlive() && this.isSunBurnTick()) {
|
||||
+ if (this.isAlive() && shouldBurnInDay && this.isSunBurnTick()) { // Paper - Configurable Burning
|
||||
+ if (this.isAlive() && shouldBurnInDay && this.isSunBurnTick()) { // Paper - shouldBurnInDay API
|
||||
this.setSecondsOnFire(8);
|
||||
}
|
||||
|
|
@ -5,14 +5,14 @@ Subject: [PATCH] Add environment variable to disable server gui
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 1c64c81980739bbf09b71e1d1dd6d86dbf924e0d..415d55285bb02442d8d1ec907d37b07fad4f3fcc 100644
|
||||
index 1c64c81980739bbf09b71e1d1dd6d86dbf924e0d..bea88fee71f0233839ea240cb8fcfb70228e986e 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -326,6 +326,7 @@ public class Main {
|
||||
*/
|
||||
boolean flag1 = !optionset.has("nogui") && !optionset.nonOptionArguments().contains("nogui");
|
||||
|
||||
+ if(!Boolean.parseBoolean(System.getenv().getOrDefault("PAPER_DISABLE_SERVER_GUI", String.valueOf(false)))) // Paper
|
||||
+ if(!Boolean.parseBoolean(System.getenv().getOrDefault("PAPER_DISABLE_SERVER_GUI", String.valueOf(false)))) // Paper - Add environment variable to disable server gui
|
||||
if (flag1 && !GraphicsEnvironment.isHeadless()) {
|
||||
dedicatedserver1.showGui();
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Sat, 15 May 2021 10:04:43 -0700
|
||||
Subject: [PATCH] additions to PlayerGameModeChangeEvent
|
||||
Subject: [PATCH] Expand PlayerGameModeChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/commands/DefaultGameModeCommands.java b/src/main/java/net/minecraft/server/commands/DefaultGameModeCommands.java
|
||||
index 50e581613156cca765dfd8e3596dcb3b58520cec..12d4c141a1bc72e53e18f73d7ee4d5a2467e08e1 100644
|
||||
index 50e581613156cca765dfd8e3596dcb3b58520cec..21d6a2a5d1722d44146384c28a3cba2df9b42771 100644
|
||||
--- a/src/main/java/net/minecraft/server/commands/DefaultGameModeCommands.java
|
||||
+++ b/src/main/java/net/minecraft/server/commands/DefaultGameModeCommands.java
|
||||
@@ -25,9 +25,13 @@ public class DefaultGameModeCommands {
|
||||
|
@ -14,18 +14,18 @@ index 50e581613156cca765dfd8e3596dcb3b58520cec..12d4c141a1bc72e53e18f73d7ee4d5a2
|
|||
for(ServerPlayer serverPlayer : minecraftServer.getPlayerList().getPlayers()) {
|
||||
- if (serverPlayer.setGameMode(gameType)) {
|
||||
- ++i;
|
||||
+ // Paper start - extend PlayerGameModeChangeEvent
|
||||
+ // Paper start - Expand PlayerGameModeChangeEvent
|
||||
+ org.bukkit.event.player.PlayerGameModeChangeEvent event = serverPlayer.setGameMode(gameType, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.DEFAULT_GAMEMODE, net.kyori.adventure.text.Component.empty());
|
||||
+ if (event != null && event.isCancelled()) {
|
||||
+ source.sendSuccess(() -> io.papermc.paper.adventure.PaperAdventure.asVanilla(event.cancelMessage()), false);
|
||||
}
|
||||
+ // Paper end
|
||||
+ // Paper end - Expand PlayerGameModeChangeEvent
|
||||
+ ++i;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/commands/GameModeCommand.java b/src/main/java/net/minecraft/server/commands/GameModeCommand.java
|
||||
index aee8618e27b893b72931e925724dd683d2e6d2aa..5cb15e2209d7b315904a1fc6d650ce1e75584271 100644
|
||||
index aee8618e27b893b72931e925724dd683d2e6d2aa..f7c9127346261d83413ca03a1cdaa84975ae17d6 100644
|
||||
--- a/src/main/java/net/minecraft/server/commands/GameModeCommand.java
|
||||
+++ b/src/main/java/net/minecraft/server/commands/GameModeCommand.java
|
||||
@@ -48,9 +48,14 @@ public class GameModeCommand {
|
||||
|
@ -33,19 +33,19 @@ index aee8618e27b893b72931e925724dd683d2e6d2aa..5cb15e2209d7b315904a1fc6d650ce1e
|
|||
|
||||
for(ServerPlayer serverPlayer : targets) {
|
||||
- if (serverPlayer.setGameMode(gameMode)) {
|
||||
+ // Paper start - extend PlayerGameModeChangeEvent
|
||||
+ // Paper start - Expand PlayerGameModeChangeEvent
|
||||
+ org.bukkit.event.player.PlayerGameModeChangeEvent event = serverPlayer.setGameMode(gameMode, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.COMMAND, net.kyori.adventure.text.Component.empty());
|
||||
+ if (event != null && !event.isCancelled()) {
|
||||
logGamemodeChange(context.getSource(), serverPlayer, gameMode);
|
||||
++i;
|
||||
+ } else if (event != null && event.cancelMessage() != null) {
|
||||
+ context.getSource().sendSuccess(() -> io.papermc.paper.adventure.PaperAdventure.asVanilla(event.cancelMessage()), true);
|
||||
+ // Paper end
|
||||
+ // Paper end - Expand PlayerGameModeChangeEvent
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 33477a639304c1491b5eea8585051e266ec93bc7..8766c1a6485b371c1d95804d7ad364fd5ba826de 100644
|
||||
index 33477a639304c1491b5eea8585051e266ec93bc7..ce9555b3ccb3c3caa85e549e05e471230ee27680 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1989,8 +1989,16 @@ public class ServerPlayer extends Player {
|
||||
|
@ -54,7 +54,7 @@ index 33477a639304c1491b5eea8585051e266ec93bc7..8766c1a6485b371c1d95804d7ad364fd
|
|||
public boolean setGameMode(GameType gameMode) {
|
||||
- if (!this.gameMode.changeGameModeForPlayer(gameMode)) {
|
||||
- return false;
|
||||
+ // Paper start - Add cause and nullable message to event
|
||||
+ // Paper start - Expand PlayerGameModeChangeEvent
|
||||
+ org.bukkit.event.player.PlayerGameModeChangeEvent event = this.setGameMode(gameMode, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.UNKNOWN, null);
|
||||
+ return event == null ? false : event.isCancelled();
|
||||
+ }
|
||||
|
@ -62,8 +62,8 @@ index 33477a639304c1491b5eea8585051e266ec93bc7..8766c1a6485b371c1d95804d7ad364fd
|
|||
+ public org.bukkit.event.player.PlayerGameModeChangeEvent setGameMode(GameType gameMode, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause cause, @Nullable net.kyori.adventure.text.Component message) {
|
||||
+ org.bukkit.event.player.PlayerGameModeChangeEvent event = this.gameMode.changeGameModeForPlayer(gameMode, cause, message);
|
||||
+ if (event == null || event.isCancelled()) {
|
||||
+ // Paper end
|
||||
+ return null;
|
||||
+ // Paper end - Expand PlayerGameModeChangeEvent
|
||||
} else {
|
||||
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, (float) gameMode.getId()));
|
||||
if (gameMode == GameType.SPECTATOR) {
|
||||
|
@ -72,7 +72,7 @@ index 33477a639304c1491b5eea8585051e266ec93bc7..8766c1a6485b371c1d95804d7ad364fd
|
|||
this.onUpdateAbilities();
|
||||
this.updateEffectVisibility();
|
||||
- return true;
|
||||
+ return event; // Paper
|
||||
+ return event; // Paper - Expand PlayerGameModeChangeEvent
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ index 33477a639304c1491b5eea8585051e266ec93bc7..8766c1a6485b371c1d95804d7ad364fd
|
|||
}
|
||||
|
||||
public void loadGameTypes(@Nullable CompoundTag nbt) {
|
||||
+ // Paper start
|
||||
+ // Paper start - Expand PlayerGameModeChangeEvent
|
||||
+ if (this.server.getForcedGameType() != null && this.server.getForcedGameType() != ServerPlayer.readPlayerMode(nbt, "playerGameType")) {
|
||||
+ if (new org.bukkit.event.player.PlayerGameModeChangeEvent(this.getBukkitEntity(), org.bukkit.GameMode.getByValue(this.server.getDefaultGameType().getId()), org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.DEFAULT_GAMEMODE, null).callEvent()) {
|
||||
+ this.gameMode.setGameModeForPlayer(this.server.getForcedGameType(), GameType.DEFAULT_MODE);
|
||||
|
@ -89,28 +89,28 @@ index 33477a639304c1491b5eea8585051e266ec93bc7..8766c1a6485b371c1d95804d7ad364fd
|
|||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Expand PlayerGameModeChangeEvent
|
||||
this.gameMode.setGameModeForPlayer(this.calculateGameModeForNewPlayer(ServerPlayer.readPlayerMode(nbt, "playerGameType")), ServerPlayer.readPlayerMode(nbt, "previousPlayerGameType"));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index c61754976fab6654f55b1403d769eb1721871dca..236dabc1d4ae9dc9a2a2c07a4a27fc0bfae72f66 100644
|
||||
index c61754976fab6654f55b1403d769eb1721871dca..2e80e2d80bc2ec981e47a42b9c30257898afa4ad 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -73,21 +73,28 @@ public class ServerPlayerGameMode {
|
||||
}
|
||||
|
||||
public boolean changeGameModeForPlayer(GameType gameMode) {
|
||||
+ // Paper end
|
||||
+ // Paper end - Expand PlayerGameModeChangeEvent
|
||||
+ PlayerGameModeChangeEvent event = this.changeGameModeForPlayer(gameMode, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.UNKNOWN, null);
|
||||
+ return event != null && event.isCancelled();
|
||||
+ }
|
||||
+ @Nullable
|
||||
+ public PlayerGameModeChangeEvent changeGameModeForPlayer(GameType gameMode, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause cause, @Nullable net.kyori.adventure.text.Component cancelMessage) {
|
||||
+ // Paper end
|
||||
+ // Paper end - Expand PlayerGameModeChangeEvent
|
||||
if (gameMode == this.gameModeForPlayer) {
|
||||
- return false;
|
||||
+ return null; // Paper
|
||||
+ return null; // Paper - Expand PlayerGameModeChangeEvent
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
- PlayerGameModeChangeEvent event = new PlayerGameModeChangeEvent(this.player.getBukkitEntity(), GameMode.getByValue(gameMode.getId()));
|
||||
|
@ -118,7 +118,7 @@ index c61754976fab6654f55b1403d769eb1721871dca..236dabc1d4ae9dc9a2a2c07a4a27fc0b
|
|||
this.level.getCraftServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) {
|
||||
- return false;
|
||||
+ return event; // Paper
|
||||
+ return event; // Paper - Expand PlayerGameModeChangeEvent
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.setGameModeForPlayer(gameMode, this.previousGameModeForPlayer);
|
||||
|
@ -126,12 +126,12 @@ index c61754976fab6654f55b1403d769eb1721871dca..236dabc1d4ae9dc9a2a2c07a4a27fc0b
|
|||
this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, this.player), this.player); // CraftBukkit
|
||||
this.level.updateSleepingPlayerList();
|
||||
- return true;
|
||||
+ return event; // Paper
|
||||
+ return event; // Paper - Expand PlayerGameModeChangeEvent
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 206c0a1e783699ed272e3640a29fe349eb0b465e..4ea889c12a6750914b82d796ed641cdd810ea957 100644
|
||||
index 8a6d9ae5b0735884a39fa2ded6f1d94909043eb7..f6f57a349fc7385a88299526f563df6e022f1feb 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2653,7 +2653,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -139,12 +139,12 @@ index 206c0a1e783699ed272e3640a29fe349eb0b465e..4ea889c12a6750914b82d796ed641cdd
|
|||
this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH);
|
||||
if (this.server.isHardcore()) {
|
||||
- this.player.setGameMode(GameType.SPECTATOR);
|
||||
+ this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper
|
||||
+ this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper - Expand PlayerGameModeChangeEvent
|
||||
((GameRules.BooleanValue) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.server);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 8a924ae677a93a177651aa1ec0728e3b8d5528a6..6cbb672bc76647e923ec1c16b6e56ee6a4982875 100644
|
||||
index 8a924ae677a93a177651aa1ec0728e3b8d5528a6..b7abab7eaa4f7401396a27fee79bf6367c3d4cc8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1559,7 +1559,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -152,7 +152,7 @@ index 8a924ae677a93a177651aa1ec0728e3b8d5528a6..6cbb672bc76647e923ec1c16b6e56ee6
|
|||
if (this.getHandle().connection == null) return;
|
||||
|
||||
- this.getHandle().setGameMode(GameType.byId(mode.getValue()));
|
||||
+ this.getHandle().setGameMode(GameType.byId(mode.getValue()), org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.PLUGIN, null); // Paper
|
||||
+ this.getHandle().setGameMode(GameType.byId(mode.getValue()), org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.PLUGIN, null); // Paper - Expand PlayerGameModeChangeEvent
|
||||
}
|
||||
|
||||
@Override
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Move range check for block placing up
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 4ea889c12a6750914b82d796ed641cdd810ea957..8d6254c7f63bae10d3e09771d484ee9e44c2c3de 100644
|
||||
index f6f57a349fc7385a88299526f563df6e022f1feb..886b47805a1abdabcd05e8463620c1e211b9ece1 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1743,6 +1743,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
@ -247,7 +247,7 @@ index 0000000000000000000000000000000000000000..513833c2ea23df5b079d157bc5cb89d5
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 415d55285bb02442d8d1ec907d37b07fad4f3fcc..9b0bbaf23b90a04b6e6f6c97d9174fe31af557ce 100644
|
||||
index bea88fee71f0233839ea240cb8fcfb70228e986e..7b996a1c24e66d87c95b9f075248eb1d72ad0476 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -385,6 +385,15 @@ public class Main {
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add Unix domain socket support
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 019dd5a66b883e6ac8d0f07abc2636768a373664..bc157cd71bb6dbc109990533f622f78bcc103918 100644
|
||||
index e30efd5b0715ac777b9284ba441358bc4b7a5d03..3389fca10dac966b8ec61e5bb3ef3f78c3d1dc7f 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -219,6 +219,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
@ -47,7 +47,7 @@ index 019dd5a66b883e6ac8d0f07abc2636768a373664..bc157cd71bb6dbc109990533f622f78b
|
|||
DedicatedServer.LOGGER.warn("**** FAILED TO BIND TO PORT!");
|
||||
DedicatedServer.LOGGER.warn("The exception was: {}", ioexception.toString());
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
index 6641fd04821240b1bbeff1bd8d996a8f2fff8385..4bbb370c5d26749c566216bac079a0cb6d0b4507 100644
|
||||
index 4414b12218a5693fecaa8c1e7c7676a58bcad324..c0ae3ccf4ddf14a4967c86548ec7305cfcc0b48a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
@@ -78,7 +78,12 @@ public class ServerConnectionListener {
|
||||
|
@ -79,7 +79,7 @@ index 6641fd04821240b1bbeff1bd8d996a8f2fff8385..4bbb370c5d26749c566216bac079a0cb
|
|||
} else {
|
||||
@@ -118,7 +129,7 @@ public class ServerConnectionListener {
|
||||
((Connection) object).setListenerForServerboundHandshake(new ServerHandshakePacketListenerImpl(ServerConnectionListener.this.server, (Connection) object));
|
||||
io.papermc.paper.network.ChannelInitializeListenerHolder.callListeners(channel); // Paper
|
||||
io.papermc.paper.network.ChannelInitializeListenerHolder.callListeners(channel); // Paper - Add Channel initialization listeners
|
||||
}
|
||||
- }).group(eventloopgroup).localAddress(address, port)).option(ChannelOption.AUTO_READ, false).bind().syncUninterruptibly()); // CraftBukkit
|
||||
+ }).group(eventloopgroup).localAddress(address)).option(ChannelOption.AUTO_READ, false).bind().syncUninterruptibly()); // CraftBukkit // Paper - Unix domain socket support
|
||||
|
@ -87,7 +87,7 @@ index 6641fd04821240b1bbeff1bd8d996a8f2fff8385..4bbb370c5d26749c566216bac079a0cb
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 8d6254c7f63bae10d3e09771d484ee9e44c2c3de..73b825b16f02e254a1e2313ff1c93c642c5dceeb 100644
|
||||
index 886b47805a1abdabcd05e8463620c1e211b9ece1..364c010be9cc32efa05f58e9a4cdd9acd8a23200 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2476,6 +2476,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -103,7 +103,7 @@ index 8d6254c7f63bae10d3e09771d484ee9e44c2c3de..73b825b16f02e254a1e2313ff1c93c64
|
|||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
index 3068e25f2df958689627fb31783a2d356547f1be..f1a002ddfa55ba3bf4313639d0e82f0c8b036c65 100644
|
||||
index 7fa8efd6b0cd7a7684d9bd4ff89d4955a69a8dd5..6a3be2fe851e14f2c9f8b38ad8d27fe36b5240d3 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
@@ -45,6 +45,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||
|
@ -125,7 +125,7 @@ index 3068e25f2df958689627fb31783a2d356547f1be..f1a002ddfa55ba3bf4313639d0e82f0c
|
|||
@@ -131,8 +133,11 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||
// Paper end
|
||||
// if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
|
||||
if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.BYPASS_HOSTCHECK || ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) { // Paper
|
||||
if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.BYPASS_HOSTCHECK || ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) { // Paper - Add bypass host check
|
||||
+ // Paper start - Unix domain socket support
|
||||
+ java.net.SocketAddress socketAddress = this.connection.getRemoteAddress();
|
||||
this.connection.hostname = split[0];
|
|
@ -209,7 +209,7 @@ index 0616a8e89931680602da2dbc640906708aebd5ca..70458ff8c9bf6f3263868b0f5570840f
|
|||
if (this.cserver.getServer().isRunning()) {
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 73b825b16f02e254a1e2313ff1c93c642c5dceeb..005116339cce73b555415f8deb0e1333f0a2a4bd 100644
|
||||
index 364c010be9cc32efa05f58e9a4cdd9acd8a23200..4f7dea59cd4aed5a9acb6be5fbbbc9ea492ee1dd 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -342,7 +342,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -437,7 +437,7 @@ index 73b825b16f02e254a1e2313ff1c93c642c5dceeb..005116339cce73b555415f8deb0e1333
|
|||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index c3e058cb24fc6cf3e7508ad689af9214d9a20f7d..ff387a1b9ef7165dc755daf672df5d83315b6b7c 100644
|
||||
index a622d91ecdea6ab4deaf0ef4ae90cba71c49b319..f3f8c7b7391370455fe913206a1bc9b80bdaadf8 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -684,7 +684,7 @@ public abstract class PlayerList {
|
||||
|
@ -491,7 +491,7 @@ index 6724d0a1af13e97bc1d3bd94fd43fef742a0deab..20ba0a0c9eae28658888a77dd2170f62
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 6cbb672bc76647e923ec1c16b6e56ee6a4982875..11507cbf0f213079b39b35d06f8fc675d437469b 100644
|
||||
index b7abab7eaa4f7401396a27fee79bf6367c3d4cc8..f1b52cccb8bb82def47c6dee8a63d51a095c112b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -591,7 +591,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
@ -11,7 +11,7 @@ Move the tick logic into the post tick, where portaling was
|
|||
designed to happen in the first place.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 025ec74fe0ada57e1809d7e16c27b3a08007ad78..486a4d9e5cd421e2444327e2c28e4f674c98894a 100644
|
||||
index b3f33d74bf86943dd7ce05ce44541ae3e6db2fef..72f50fe74695e32167d414c1c9ee38deb95afb79 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -492,6 +492,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
@ -60,7 +60,7 @@ index 025ec74fe0ada57e1809d7e16c27b3a08007ad78..486a4d9e5cd421e2444327e2c28e4f67
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
index c8f1bdbfcb2df3d4be05d185e97857a6181b076e..c82ebcac07033d887af499f81520982fbe5ed4f1 100644
|
||||
index 9ee2fd0914ff7836517ca143d51db6150967cb0e..a0c1db8cfebaa0344012cc0af18d6231cdcdcbb8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
@@ -61,16 +61,10 @@ public class EndPortalBlock extends BaseEntityBlock {
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix PlayerDropItemEvent using wrong item
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 8766c1a6485b371c1d95804d7ad364fd5ba826de..b5ee665fecb3e9e96cb937c92cef8579f9cbeb3d 100644
|
||||
index ce9555b3ccb3c3caa85e549e05e471230ee27680..592f8a1277cba26bf07623782bf85110e959be8c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2391,7 +2391,7 @@ public class ServerPlayer extends Player {
|
||||
|
@ -18,7 +18,7 @@ index 8766c1a6485b371c1d95804d7ad364fd5ba826de..b5ee665fecb3e9e96cb937c92cef8579
|
|||
|
||||
this.awardStat(Stats.DROP);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 51fe3687f6f8c2ce5a5f0ac7749bc7cad135a69a..e77a2d3a321313e8476068d895dfb39cb152f7e6 100644
|
||||
index 482eaa28277eca1dbb25d1f3cf6c27328a8879de..00c40d6b61a293786ead2dd66daa6d213a341b23 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -725,6 +725,11 @@ public abstract class Player extends LivingEntity {
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Ensure disconnect for book edit is called on main
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 1a85755ad62498c263783d1d54130d023105ec8d..fe969ecdca0e93319449f2fe3c3f41b4e17b385e 100644
|
||||
index 4f7dea59cd4aed5a9acb6be5fbbbc9ea492ee1dd..b502b3bf5f4f0a820b75434e8f620b3df01e18e2 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1099,7 +1099,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmSwingEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0f0edc347beb179d96ed81e389a71aecd1e0e367..a7984c2454e40137b535c4a14034975339d66407 100644
|
||||
index b502b3bf5f4f0a820b75434e8f620b3df01e18e2..17cf920cc7bbd662a08b075466b8c534f0493802 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2333,7 +2333,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix kick event leave message not being sent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index b5ee665fecb3e9e96cb937c92cef8579f9cbeb3d..4d1978b43a0b95a5fbdcd87a215d63163ec459b4 100644
|
||||
index 592f8a1277cba26bf07623782bf85110e959be8c..c9842d0641b43c10b857ccc89f90b167150f359d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -273,7 +273,6 @@ public class ServerPlayer extends Player {
|
||||
|
@ -50,7 +50,7 @@ index 70458ff8c9bf6f3263868b0f5570840fe3d89ed2..134a84841a1e05b212794c00477f20eb
|
|||
MinecraftServer minecraftserver = this.server;
|
||||
Connection networkmanager = this.connection;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a7984c2454e40137b535c4a14034975339d66407..acde997a61660c1afd4d2a265de553c45bf8a11f 100644
|
||||
index 17cf920cc7bbd662a08b075466b8c534f0493802..d3d1195522e50b00663b274f68fae1cc5ed9d021 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1887,6 +1887,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -96,7 +96,7 @@ index a7984c2454e40137b535c4a14034975339d66407..acde997a61660c1afd4d2a265de553c4
|
|||
this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), false);
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index ff387a1b9ef7165dc755daf672df5d83315b6b7c..75b81f0852241a8edc931e514f06d46583b6ac43 100644
|
||||
index f3f8c7b7391370455fe913206a1bc9b80bdaadf8..2a1b64e5d30cde7b2b2696a6cf5f3163071ab2d6 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -570,6 +570,11 @@ public abstract class PlayerList {
|
|
@ -11,7 +11,7 @@ It does not make a lot of sense to damage players if they get crammed,
|
|||
For those who really want it a config option is provided.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index ae9acf496b866309d336ebd480a0b99aa03694df..b49b56848bdbbd07c49e44d85997fa36192332c5 100644
|
||||
index c9842d0641b43c10b857ccc89f90b167150f359d..68c9e9e6185abdff5b7239002f4005417079c083 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -95,6 +95,7 @@ import net.minecraft.util.Mth;
|
|
@ -105,7 +105,7 @@ index 0000000000000000000000000000000000000000..a8e813ca89b033f061e695288b3383bd
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 9c82a367ceacb1d2ae1a0503f5920d5919289502..7df30c0d3f647b74dd812fc9d286feb95b52dfae 100644
|
||||
index b28212bbf7678d73282d160bfeb0d246e93a8492..f4b1d6ed1e1065e6be175b7b68e29517ebfa2da8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -303,6 +303,7 @@ public final class CraftServer implements Server {
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Prevent AFK kick while watching end credits
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index acde997a61660c1afd4d2a265de553c45bf8a11f..9573db9b35b1eae861af18d5eb4ce54a6648786f 100644
|
||||
index d3d1195522e50b00663b274f68fae1cc5ed9d021..a1cb119e52005e09138930f5a07f919015402424 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -390,7 +390,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
@ -49,7 +49,7 @@ index a2d0699e8427b2262a2396495111125eccafbb66..15db9368227dbc29d07d74e85bd126b3
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 29e94d937f88763fef3c1f748e110cd1dae9a27b..b14f65b657c1a00923bec4a338e06e39f6642dfc 100644
|
||||
index 68c9e9e6185abdff5b7239002f4005417079c083..36e01f491565e70601464d957143c21aba17dfa1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1356,7 +1356,7 @@ public class ServerPlayer extends Player {
|
||||
|
@ -154,7 +154,7 @@ index 29e94d937f88763fef3c1f748e110cd1dae9a27b..b14f65b657c1a00923bec4a338e06e39
|
|||
|
||||
public SectionPos getLastSectionPos() {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 75b81f0852241a8edc931e514f06d46583b6ac43..a0a17fa35c5333655afa8e4e8b3a66ffa41bcc24 100644
|
||||
index 2a1b64e5d30cde7b2b2696a6cf5f3163071ab2d6..1bbcae2411205799b00dba7ee82c3ceb461289cf 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -872,7 +872,7 @@ public abstract class PlayerList {
|
||||
|
@ -187,7 +187,7 @@ index ecaa7f0b2bf795f16187f11fa27f6d5d435ccbfe..acd5ec218b8d4c096f44ae2eec1379ee
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 11507cbf0f213079b39b35d06f8fc675d437469b..97d489d0130e5854b82be73cd538c3305737f3be 100644
|
||||
index f1b52cccb8bb82def47c6dee8a63d51a095c112b..4475a59e867b0e2f64cdac41911af0e7fe721ad2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1318,9 +1318,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
@ -7,7 +7,7 @@ Subject: [PATCH] Add methods to find targets for lightning strikes
|
|||
public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index dbfd4a642e862f46a8b4fd1f3fc52c13ecf74284..1e67fd45b4449b46992cb0617db22e74ce517b4d 100644
|
||||
index 45d5e5bd1ed37c4a3a658b27dc8571344580b65b..c8e8d8c8c49b28cbaed3072a211a79aacd5f0c34 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -998,6 +998,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -31,7 +31,7 @@ index dbfd4a642e862f46a8b4fd1f3fc52c13ecf74284..1e67fd45b4449b46992cb0617db22e74
|
|||
blockposition1 = blockposition1.above(2);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index a920936018a2e05ea72d68a83e6debb3807df353..59ca5a224561f59bf1f44e11db9bc323ac2f6d71 100644
|
||||
index d6b402d0bae4d16932e059f1da59ac4523d974b8..ca0af0011159834919c8e071ceac051a0e600b84 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -701,6 +701,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
|
@ -28,7 +28,7 @@ index df8c88bfa749e02f633350446101dcce05db7ac1..ed1277fad60992344b94f8a939febaca
|
|||
+ // Paper end - add critical damage API
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index e77a2d3a321313e8476068d895dfb39cb152f7e6..21a02cab65506a3746ddc709d92c6fde244446eb 100644
|
||||
index 00c40d6b61a293786ead2dd66daa6d213a341b23..e90bfeca52d74d147616773640517995d98e19bc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1263,7 +1263,7 @@ public abstract class Player extends LivingEntity {
|
|
@ -33,7 +33,7 @@ index 899008b2980d13f1be6280cd8cb959c53a29bebf..d5f7da3502575f6847f3c22ab0e94284
|
|||
private RedirectModifier<S> modifier = null;
|
||||
private boolean forks;
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 3b3fa067ee5a95d52645147c2d9d1e43d7a789b6..9a01905bdbf0b721a129984d71c5745fa5e3c8a5 100644
|
||||
index 565685d0f41311bc2281d11ee9d751bf4d4c93a3..2bad211edde8b494cae726915a332217ae232855 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -257,6 +257,13 @@ public class Commands {
|
|
@ -9,7 +9,7 @@ chunk through it. This should also be OK from a leak prevention/
|
|||
state desync POV because the TE is getting unloaded anyways.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1e67fd45b4449b46992cb0617db22e74ce517b4d..dfbec0bd98f58f7e01d0f45f2ab2c433f9094cc3 100644
|
||||
index c8e8d8c8c49b28cbaed3072a211a79aacd5f0c34..6b4b505ae0c6f95309243aaa149967b2d728fa87 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1578,9 +1578,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -28,7 +28,7 @@ index 1e67fd45b4449b46992cb0617db22e74ce517b4d..dfbec0bd98f58f7e01d0f45f2ab2c433
|
|||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 9f7c149d3ad1175d55ec02e295ee43bc571c3280..87fdc78409fb16c961c04a5551980a8a231b70d0 100644
|
||||
index 36e01f491565e70601464d957143c21aba17dfa1..ca66a8ebb4ae2d3ee9cf88412bbb20d5f812d050 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1630,6 +1630,18 @@ public class ServerPlayer extends Player {
|
||||
|
@ -51,7 +51,7 @@ index 9f7c149d3ad1175d55ec02e295ee43bc571c3280..87fdc78409fb16c961c04a5551980a8a
|
|||
@Override
|
||||
public void doCloseContainer() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 21a02cab65506a3746ddc709d92c6fde244446eb..6018717ea7ff9d3947e48aacd3dbedc075a8376e 100644
|
||||
index e90bfeca52d74d147616773640517995d98e19bc..c21b6e9b013c31342e1a47500f5262ddfb7cd6d0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -508,6 +508,11 @@ public abstract class Player extends LivingEntity {
|
|
@ -17,7 +17,7 @@ Async catch modifications to critical entity state
|
|||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 28fdf5f4df4b61383e6d132f603c50ec35f62024..b203c945e7c013e202013f7bce6b3c7077bf2d42 100644
|
||||
index a1cb119e52005e09138930f5a07f919015402424..2168a16bd954f07de004d9b98ea1dbfecf1f23ae 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1575,6 +1575,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -29,7 +29,7 @@ index 28fdf5f4df4b61383e6d132f603c50ec35f62024..b203c945e7c013e202013f7bce6b3c70
|
|||
if (player.isRemoved()) {
|
||||
LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName());
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index b137ce3be71fa92cb196f5725dd7cfc71f93fcf7..1f3363da6642673d286cb7704aa61cb910c5d23f 100644
|
||||
index 394af8382455d2a039534b87142679f52dc8f2a6..b49ae2a36a426deb5ce393d854df762c5a256fbd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1118,7 +1118,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
@ -166,7 +166,7 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
|
|||
PersistentEntitySectionManager.LOGGER.warn("Entity {} wasn't found in section {} (destroying due to {})", new Object[]{this.entity, SectionPos.of(this.currentSectionKey), reason});
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 59ca5a224561f59bf1f44e11db9bc323ac2f6d71..b882e8d1b3e45277b5e9e3a359f51d9703bdb2d0 100644
|
||||
index ca0af0011159834919c8e071ceac051a0e600b84..305a525815d7a3ea3f5dd3c093a76af0252c2f7e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1803,6 +1803,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
|
@ -278,7 +278,7 @@ index 9df761f5cf043e8d2dffa711c20ab32fe2992331..48cc5623973713e07d95639e5359fc15
|
|||
// Paper start - add parameters and int ret type
|
||||
spawnCategoryForChunk(group, world, chunk, checker, runner, Integer.MAX_VALUE, null);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7df30c0d3f647b74dd812fc9d286feb95b52dfae..65809db4522c3b1ce0b5bf11828de129713d7d21 100644
|
||||
index f4b1d6ed1e1065e6be175b7b68e29517ebfa2da8..9491eb5b47defd7949fe2e691d63d3767be1f337 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2279,6 +2279,11 @@ public final class CraftServer implements Server {
|
||||
|
@ -294,7 +294,7 @@ index 7df30c0d3f647b74dd812fc9d286feb95b52dfae..65809db4522c3b1ce0b5bf11828de129
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index b882e8d1b3e45277b5e9e3a359f51d9703bdb2d0..3eeb878924827861f79c6bc1b510d0167b9ac10b 100644
|
||||
index 305a525815d7a3ea3f5dd3c093a76af0252c2f7e..b49580716ff1dc85adcd466d1df9ce678a58546f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1761,9 +1761,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue