mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-23 06:50:25 +01:00
even MOOOOOOOOOOOOAAAAAAAAAAAAAAAARRRRRRRRRRRRR patches
This commit is contained in:
parent
1cb76e15be
commit
6ccc23f457
37 changed files with 62 additions and 60 deletions
|
@ -393,7 +393,7 @@ index 0000000000000000000000000000000000000000..6f560a51277ccbd46a9142cfa057d276
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
index 32af614abd761e39a412422abe2fcb5272a6374c..dc881ffaa947eac4ba34a9ea0c089eaaf06278c5 100644
|
||||
index 61441e56da69ee8cb92a2b1239f5406425a8344d..b4f1d5034db98b021225bb082915bf4c463aaf52 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
@@ -48,6 +48,8 @@ public class AnnotationTest {
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] More World API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 750f1ce409ce53d5fc3b2fab835f55f32a8433d8..34a9b8248409c0d077049944e40b710d97455723 100644
|
||||
index 49cbc8c1f05f2d48177f1b8fec25e2e1439be0d8..5f9daafea35f9763189e3436eaf20c975158e712 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -3498,6 +3498,114 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Expose protocol version
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index d40f341af9649eececfd12c79e34719f03b45c53..68fc9b338d5ad27cd2b56197f9f5ba4988f89ae6 100644
|
||||
index 191d5bee5651e5b8e60547f819836370ce6124bc..e567e9ccd6017e3c95e868efb78388030ee0f676 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -490,6 +490,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow for Component suggestion tooltips in
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 1252e77dc74880c8409dc5d6adf3d60e3e074e31..f431ef6cea6abadef3329daf9869ce8c4ab43a8e 100644
|
||||
index 7d5b999178ef7faed6a901fdc7456a9a2a28d89a..48420071e5d1ee2b4c04822095a1789b6606bef4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -763,12 +763,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -762,12 +762,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
// Paper start - async tab completion
|
||||
com.destroystokyo.paper.event.server.AsyncTabCompleteEvent event;
|
||||
|
@ -24,7 +24,7 @@ index 1252e77dc74880c8409dc5d6adf3d60e3e074e31..f431ef6cea6abadef3329daf9869ce8c
|
|||
// If the event isn't handled, we can assume that we have no completions, and so we'll ask the server
|
||||
if (!event.isHandled()) {
|
||||
if (!event.isCancelled()) {
|
||||
@@ -787,10 +786,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -786,10 +785,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
});
|
||||
}
|
||||
} else if (!completions.isEmpty()) {
|
|
@ -5,21 +5,23 @@ Subject: [PATCH] Enhance console tab completions for brigadier commands
|
|||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 4e824a87b463a417c204a9ee188450bdd9f4fbc2..ef1e6e898b3cb9d012b2cf24aedffea4afce8a38 100644
|
||||
index 408e359e6f1a07c5616822e2ecf7549bf481c77d..1a7f2074de8938b59c06d3a891265c574e3899dc 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -503,4 +503,11 @@ public class PaperConfig {
|
||||
private static void fixEntityPositionDesync() {
|
||||
@@ -106,6 +106,13 @@ public class PaperConfig {
|
||||
fixEntityPositionDesync = getBoolean("settings.fix-entity-position-desync", fixEntityPositionDesync);
|
||||
}
|
||||
+
|
||||
|
||||
+ public static boolean enableBrigadierConsoleHighlighting = true;
|
||||
+ public static boolean enableBrigadierConsoleCompletions = true;
|
||||
+ private static void consoleSettings() {
|
||||
+ enableBrigadierConsoleHighlighting = getBoolean("settings.console.enable-brigadier-highlighting", enableBrigadierConsoleHighlighting);
|
||||
+ enableBrigadierConsoleCompletions = getBoolean("settings.console.enable-brigadier-completions", enableBrigadierConsoleCompletions);
|
||||
+ }
|
||||
}
|
||||
+
|
||||
public static void registerCommands() {
|
||||
for (Map.Entry<String, Command> entry : commands.entrySet()) {
|
||||
MinecraftServer.getServer().server.getCommandMap().register(entry.getKey(), "Paper", entry.getValue());
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
index a4070b59e261f0f1ac4beec47b11492f4724bf27..e0b1f0671d16ddddcb6725acd25a1d1d69e42701 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
|
@ -214,10 +216,10 @@ index 0000000000000000000000000000000000000000..5ab8365b806dd035800ba9b449c9bc92
|
|||
+ 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 67afb97e6cb545d319202f3eca771015065089f6..0300390025c3f5461ef5f379c1710a58de164117 100644
|
||||
index 02d7b16f81ebf9f902a36d4f31802b20d1820d6e..77f49329cc903ba687c60032ba4b21786f79a56b 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -184,7 +184,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -182,7 +182,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
||||
thread.setDaemon(true);
|
||||
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER));
|
||||
|
@ -226,7 +228,7 @@ index 67afb97e6cb545d319202f3eca771015065089f6..0300390025c3f5461ef5f379c1710a58
|
|||
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\"");
|
||||
@@ -218,6 +218,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -216,6 +216,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.error("Unable to load server configuration", e);
|
||||
return false;
|
||||
}
|
|
@ -9,10 +9,10 @@ till their item is switched.
|
|||
This patch clears the active item when the event is cancelled
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 8ce983822ab44ade6306b52cad352ad95f6d6bad..b84e20cd955fd75582a2c52f0c571d54ead555b2 100644
|
||||
index fbd33490d7e1394c0989ca20fb36f0033a9e1c26..96cac8f212de9ae3d7cfdc2c04bc0e8fd07e3efe 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3702,6 +3702,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3707,6 +3707,7 @@ public abstract class LivingEntity extends Entity {
|
||||
level.getCraftServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Set area affect cloud rotation
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
index 0d1421555a98b97c30dbb4d95491308e433a81a3..fe7d73470773179f8254928f8e3cdc19f64e9dd7 100644
|
||||
index 8eb7a4579d8296b0090f9cfa215562a52fa51d75..9653604f05eb3170f4b5dca60e05f3d55db9f508 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
@@ -880,6 +880,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
@@ -885,6 +885,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
entity.moveTo(location.getX(), location.getY(), location.getZ());
|
||||
} else if (AreaEffectCloud.class.isAssignableFrom(clazz)) {
|
||||
entity = new net.minecraft.world.entity.AreaEffectCloud(world, x, y, z);
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] add isDeeplySleeping to HumanEntity
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 01c235d48d9b5276c5b754b25c5585654591ec1c..7c7d05852dd463331110d1dcb71b4d4f5312900f 100644
|
||||
index 45fe3d2d728b984651c478ff050a7c69b1eebef3..eb0ce87bc8eac723b73c2ee6da41db5da3fab401 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -121,6 +121,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
|
@ -42,10 +42,10 @@ index 58941830a4bd024fcdb97df47783c82062e9167f..a0dc380e90415de9068ea408d62a1605
|
|||
itemEntity2.makeFakeItem();
|
||||
}
|
||||
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 e9db4d972abfd7807137e32abc8b1096be4776b5..a84cec9d66a00ef647b0d3bb24879706b97bf9b2 100644
|
||||
index 869c765fba6b8b7f37f0699a05b74b312dfde30d..fad2c1206944c0dbca4317ed84be335f154d1a45 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -685,6 +685,13 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -683,6 +683,13 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Nullable
|
||||
public ItemEntity drop(ItemStack stack, boolean throwRandomly, boolean retainOwnership) {
|
||||
|
@ -59,7 +59,7 @@ index e9db4d972abfd7807137e32abc8b1096be4776b5..a84cec9d66a00ef647b0d3bb24879706
|
|||
if (stack.isEmpty()) {
|
||||
return null;
|
||||
} else {
|
||||
@@ -726,7 +733,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -724,7 +731,7 @@ public abstract class Player extends LivingEntity {
|
||||
PlayerDropItemEvent event = new PlayerDropItemEvent(player, drop);
|
||||
this.level.getCraftServer().getPluginManager().callEvent(event);
|
||||
|
|
@ -5,10 +5,10 @@ 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 5be5f94ff820ba8f60b229816c8b37dc5311c1f9..dc78ade94d547b317be9858a92509cb463e5326b 100644
|
||||
index 4e40eb50effb5508cdbfdc5d55a4b75c832a1ff3..fb15ece736dde16066818216749fb2efba0b3b21 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
|
||||
@@ -343,7 +343,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -342,7 +342,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
if (blockEntity.isLit() && furnaceBurnEvent.isBurning()) {
|
||||
// CraftBukkit end
|
||||
flag1 = true;
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] add get-set drop chance to EntityEquipment
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java
|
||||
index 5a22c089f8c2c58f577ee32caa9985fff112de3c..1a88eafcba718f0c307ef6fcde72f156f644766f 100644
|
||||
index cb704cef3845727c465fe3ea7210a11545da56c8..6827979a5b270ced53b46ecb9eff548727dadb81 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java
|
||||
@@ -244,6 +244,17 @@ public class CraftEntityEquipment implements EntityEquipment {
|
|
@ -5,10 +5,10 @@ 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 92a4ac2d70bf806b149876ff8d033811da7be43f..6b508fb0850eb29e31ad960458ea2922c5bdd2bf 100644
|
||||
index aa81dba877e6611b23ec514ee1bcf9ac29c94515..c1e0cf7d86d7b45cc4ca342d80f0dc3fe43b0bfd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
||||
@@ -51,6 +51,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||
@@ -52,6 +52,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||
private static final int ALERT_RANGE_Y = 10;
|
||||
private static final UniformInt ALERT_INTERVAL = TimeUtil.rangeOfSeconds(4, 6);
|
||||
private int ticksUntilNextAlert;
|
||||
|
@ -16,16 +16,16 @@ index 92a4ac2d70bf806b149876ff8d033811da7be43f..6b508fb0850eb29e31ad960458ea2922
|
|||
|
||||
public ZombifiedPiglin(EntityType<? extends ZombifiedPiglin> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -71,7 +72,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||
@@ -72,7 +73,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||
protected void addBehaviourGoals() {
|
||||
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).setAlertOthers(new Class[0])); // CraftBukkit - decompile error
|
||||
+ this.targetSelector.addGoal(1, pathfinderGoalHurtByTarget = new HurtByTargetGoal(this).setAlertOthers(new Class[0])); // CraftBukkit - decompile error // Paper - assign field
|
||||
- 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(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt));
|
||||
this.targetSelector.addGoal(3, new ResetUniversalAngerTargetGoal<>(this, true));
|
||||
}
|
||||
@@ -174,6 +175,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||
@@ -175,6 +176,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||
this.level.getCraftServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) {
|
||||
this.setPersistentAngerTarget(null);
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix checkReach check for Shulker boxes
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/ShulkerBoxMenu.java b/src/main/java/net/minecraft/world/inventory/ShulkerBoxMenu.java
|
||||
index fdf04f3834a2a58073a642f4d0bfef7c8d1a6888..087da4c5774e01b05612153e4e2e2bb588404f3d 100644
|
||||
index e9cf1ebdfdd363b588b0f7679f1533bc9c2eb844..3991ef6319030e155cb3363f73e67a2bb6ab384f 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/ShulkerBoxMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/ShulkerBoxMenu.java
|
||||
@@ -66,6 +66,7 @@ public class ShulkerBoxMenu extends AbstractContainerMenu {
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] fix PlayerItemHeldEvent firing twice
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index f431ef6cea6abadef3329daf9869ce8c4ab43a8e..c3d69e12e1773be0638a5a7cd1e8a75110491894 100644
|
||||
index 48420071e5d1ee2b4c04822095a1789b6606bef4..eb811f9fcaf84edce3b59fc5f53cd72ffaf1506c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1927,6 +1927,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1932,6 +1932,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (this.player.isImmobile()) return; // CraftBukkit
|
||||
if (packet.getSlot() >= 0 && packet.getSlot() < Inventory.getSelectionSize()) {
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Added 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 a84cec9d66a00ef647b0d3bb24879706b97bf9b2..3e462d68ce5fa37735c5328997767fa1ef3b869d 100644
|
||||
index fad2c1206944c0dbca4317ed84be335f154d1a45..6f406d8d945f3938961fe1a0df42f8cb558d8716 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -247,6 +247,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -245,6 +245,11 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
if (this.isSleeping()) {
|
||||
++this.sleepCounter;
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] More World API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 5ba70949dcdfbb87ed53c1bb750d216c8a16babf..8d8b1b881878200b0bf9c320c72b71b8c3b839d2 100644
|
||||
index 69f6675e3a1e979687d956576719c46003ea3b0e..35b3e76cde3449b805435e6af8e8a296fee905d7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1902,6 +1902,65 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Added 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 0adca590a7118769919e7d923f41148851de4bfd..e3ff04fe21761db65fb03c5e58ecd5823f0507c6 100644
|
||||
index 67b677af9a798b4889d1e231c3af448a087eb3d8..20c0030d566012146021613325c6a979f392740e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
||||
@@ -111,14 +111,23 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
|
||||
@@ -110,14 +110,23 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
|
||||
BlockPos finalblockposition = pos;
|
||||
// CraftBukkit end
|
||||
player.startSleepInBed(pos).ifLeft((entityhuman_enumbedresult) -> {
|
|
@ -42,10 +42,10 @@ index 0000000000000000000000000000000000000000..dd6012b6a097575b2d1471be5069ecce
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 0300390025c3f5461ef5f379c1710a58de164117..2d53dba26af9d372a507ca2d46dec0cb5b9e41b1 100644
|
||||
index 77f49329cc903ba687c60032ba4b21786f79a56b..331c85d236922d7a4b5732cb09aa708830e1393c 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -222,6 +222,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -220,6 +220,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
com.destroystokyo.paper.PaperConfig.registerCommands();
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
io.papermc.paper.util.ObfHelper.INSTANCE.getClass(); // load mappings for stacktrace deobf and etc.
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix anchor respawn acting as a bed respawn from the end
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 5ea29fbff0caecd26009a0923c11fbd28c420b9d..cc366a3c06cfaa08a6503ecf728c061a8898f02f 100644
|
||||
index 4b8a6ed8b336cd2f03a0dc3a5a3214823504bb34..e6deeeb1456e79f91d2ea73b34e4770d32b05d3b 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -849,6 +849,7 @@ public abstract class PlayerList {
|
||||
@@ -845,6 +845,7 @@ public abstract class PlayerList {
|
||||
|
||||
// Paper start
|
||||
boolean isBedSpawn = false;
|
||||
|
@ -17,7 +17,7 @@ index 5ea29fbff0caecd26009a0923c11fbd28c420b9d..cc366a3c06cfaa08a6503ecf728c061a
|
|||
boolean isRespawn = false;
|
||||
boolean isLocAltered = false; // Paper - Fix SPIGOT-5989
|
||||
// Paper end
|
||||
@@ -869,6 +870,7 @@ public abstract class PlayerList {
|
||||
@@ -865,6 +866,7 @@ public abstract class PlayerList {
|
||||
if (optional.isPresent()) {
|
||||
BlockState iblockdata = worldserver1.getBlockState(blockposition);
|
||||
boolean flag3 = iblockdata.is(Blocks.RESPAWN_ANCHOR);
|
||||
|
@ -25,7 +25,7 @@ index 5ea29fbff0caecd26009a0923c11fbd28c420b9d..cc366a3c06cfaa08a6503ecf728c061a
|
|||
Vec3 vec3d = (Vec3) optional.get();
|
||||
float f1;
|
||||
|
||||
@@ -897,7 +899,7 @@ public abstract class PlayerList {
|
||||
@@ -893,7 +895,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
Player respawnPlayer = entityplayer1.getBukkitEntity();
|
|
@ -5,10 +5,10 @@ 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 11740e6a312cf8ab10b52461f455feba0e1b2788..3281448bf37da8a1b4b7b44f10f4b2438b4a4f29 100644
|
||||
index 008d486f4166d9f384e3aab48af6d66a255f3564..423560afba1bc03c0bb2b7d5d028451f34e59ec5 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
|
||||
@@ -206,6 +206,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
@@ -205,6 +205,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
BeaconBlockEntity.playSound(world, pos, SoundEvents.BEACON_AMBIENT);
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ index 11740e6a312cf8ab10b52461f455feba0e1b2788..3281448bf37da8a1b4b7b44f10f4b243
|
|||
|
||||
if (blockEntity.lastCheckY >= l) {
|
||||
blockEntity.lastCheckY = world.getMinBuildHeight() - 1;
|
||||
@@ -263,6 +272,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
@@ -262,6 +271,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
|
||||
@Override
|
||||
public void setRemoved() {
|
|
@ -5,36 +5,36 @@ Subject: [PATCH] add RespawnFlags to PlayerRespawnEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c3d69e12e1773be0638a5a7cd1e8a75110491894..b2925d150a98ffb25cbf3c72f6df2abd862dae44 100644
|
||||
index eb811f9fcaf84edce3b59fc5f53cd72ffaf1506c..9daad376b7c837ac5dcda5f54d520e2adfda0481 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2461,7 +2461,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2470,7 +2470,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
case PERFORM_RESPAWN:
|
||||
if (this.player.wonGame) {
|
||||
this.player.wonGame = false;
|
||||
- this.player = this.server.getPlayerList().respawn(this.player, true);
|
||||
+ this.player = this.server.getPlayerList().moveToWorld(this.player, this.server.getLevel(this.player.getRespawnDimension()), true, null, true, 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, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag.END_PORTAL); // Paper - add isEndCreditsRespawn argument
|
||||
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 cc366a3c06cfaa08a6503ecf728c061a8898f02f..34dd85bbaa2e693d9b6a4db880b42501b3b9225c 100644
|
||||
index e6deeeb1456e79f91d2ea73b34e4770d32b05d3b..bc2f8dd01039d855a174358825d2fdc8d0f0f526 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -808,6 +808,12 @@ public abstract class PlayerList {
|
||||
@@ -804,6 +804,12 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public ServerPlayer moveToWorld(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation) {
|
||||
public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation) {
|
||||
+ // Paper start
|
||||
+ return moveToWorld(entityplayer, worldserver, flag, location, avoidSuffocation, new org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag[0]);
|
||||
+ return respawn(entityplayer, worldserver, flag, location, avoidSuffocation, new org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag[0]);
|
||||
+ }
|
||||
+
|
||||
+ public ServerPlayer moveToWorld(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag...respawnFlags) {
|
||||
+ public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag...respawnFlags) {
|
||||
+ // Paper end
|
||||
entityplayer.stopRiding(); // CraftBukkit
|
||||
this.players.remove(entityplayer);
|
||||
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
@@ -899,7 +905,7 @@ public abstract class PlayerList {
|
||||
@@ -895,7 +901,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
Player respawnPlayer = entityplayer1.getBukkitEntity();
|
|
@ -106,7 +106,7 @@ index 0000000000000000000000000000000000000000..30e62719e0a83525daa33cf41cb61df3
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
index 4e08fdf47fd201c26223fc8efb0ef4f6e884f8c7..5baf51571398d6af626dfa6be3b2e42d6dd29059 100644
|
||||
index 6bf39699700075e295a693b56d237391de4e4f58..940b52e0b22b009f819de0dc05436a1820390bde 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
@@ -112,6 +112,7 @@ public class ServerConnectionListener {
|
|
@ -5,10 +5,10 @@ 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 3270f96717d8096e5be669b6de1168d10921d19f..816ea85a5880123c970d227d61426a0ae2b9539f 100644
|
||||
index e4cb8f2b8602650e26c21a856ed0d8c2ea8f6c28..40a0fbc2049aeffef597f867383877cce9ea7a03 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -334,7 +334,12 @@ public class Commands {
|
||||
@@ -343,7 +343,12 @@ public class Commands {
|
||||
}
|
||||
|
||||
public void sendCommands(ServerPlayer player) {
|
Loading…
Reference in a new issue