3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

and yet again, more patches

Dieser Commit ist enthalten in:
Jake 2021-11-24 15:46:26 -08:00 committet von MiniDigger | Martin
Ursprung 4664528315
Commit 2e347b629d
36 geänderte Dateien mit 106 neuen und 123 gelöschten Zeilen

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Rewrite LogEvents to contain the source jars in stack traces
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 81292899918c4dc880661ee628384cb840a6244f..1ab107d5bb20b9a12fc8843513bd9a3ada50c0a3 100644 index c4ffe80bc7b4903eb8b8b2dbb18b5ff2d9877508..8a39c48fce819d72a94d5309db8dfc42930989af 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -51,7 +51,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot @@ -51,7 +51,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fixes kick event leave message not being sent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index cdfdad5932f0e03a41cddd8cb7acb0ede43a6a3d..5edb274101f92c442b876cae5749b85c81978bc8 100644 index d66c9c09ae3874dd53ef298f94a0e5c6177f2b35..43cd0b67f31d0340893672c9bf5a00467d9cdb54 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -457,7 +457,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -456,7 +456,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), (future) -> { this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), (future) -> {
this.connection.disconnect(ichatbasecomponent); this.connection.disconnect(ichatbasecomponent);
}); });
@ -17,7 +17,7 @@ index cdfdad5932f0e03a41cddd8cb7acb0ede43a6a3d..5edb274101f92c442b876cae5749b85c
this.connection.setReadOnly(); this.connection.setReadOnly();
MinecraftServer minecraftserver = this.server; MinecraftServer minecraftserver = this.server;
Connection networkmanager = this.connection; Connection networkmanager = this.connection;
@@ -1872,6 +1872,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1877,6 +1877,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@Override @Override
public void onDisconnect(Component reason) { public void onDisconnect(Component reason) {
@ -29,32 +29,32 @@ index cdfdad5932f0e03a41cddd8cb7acb0ede43a6a3d..5edb274101f92c442b876cae5749b85c
// CraftBukkit start - Rarely it would send a disconnect line twice // CraftBukkit start - Rarely it would send a disconnect line twice
if (this.processedDisconnect) { if (this.processedDisconnect) {
return; return;
@@ -1888,7 +1893,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1893,7 +1898,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
this.player.disconnect(); this.player.disconnect();
// Paper start - Adventure // Paper start - Adventure
- net.kyori.adventure.text.Component quitMessage = this.server.getPlayerList().disconnect(this.player); - net.kyori.adventure.text.Component quitMessage = this.server.getPlayerList().remove(this.player);
+ quitMessage = quitMessage == null ? this.server.getPlayerList().disconnect(this.player) : this.server.getPlayerList().disconnect(this.player, quitMessage); // Paper - pass in quitMessage to fix kick message not being used + quitMessage = quitMessage == null ? this.server.getPlayerList().remove(this.player) : this.server.getPlayerList().remove(this.player, quitMessage); // Paper - pass in quitMessage to fix kick message not being used
if ((quitMessage != null) && !quitMessage.equals(net.kyori.adventure.text.Component.empty())) { if ((quitMessage != null) && !quitMessage.equals(net.kyori.adventure.text.Component.empty())) {
this.server.getPlayerList().broadcastMessage(PaperAdventure.asVanilla(quitMessage), ChatType.SYSTEM, Util.NIL_UUID); this.server.getPlayerList().broadcastMessage(PaperAdventure.asVanilla(quitMessage), ChatType.SYSTEM, Util.NIL_UUID);
// Paper end // Paper end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index f68fc7fcebe250a40905b52f6ec29ee6d094aad5..eaae43ffe4701c10133ad4fd2256b22b565e6f51 100644 index de8a14e86b337954fd0f730c1096758e1db409aa..963d40bf7cf7c12a22472f3a5b7080daf1c90e7b 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -588,6 +588,11 @@ public abstract class PlayerList { @@ -585,6 +585,11 @@ public abstract class PlayerList {
} }
public net.kyori.adventure.text.Component disconnect(ServerPlayer entityplayer) { // Paper - return Component public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer) { // Paper - return Component
+ // Paper start + // Paper start
+ return this.disconnect(entityplayer, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, com.destroystokyo.paper.PaperConfig.useDisplayNameInQuit ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName()))); + return this.remove(entityplayer, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, com.destroystokyo.paper.PaperConfig.useDisplayNameInQuit ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName())));
+ } + }
+ public net.kyori.adventure.text.Component disconnect(ServerPlayer entityplayer, net.kyori.adventure.text.Component leaveMessage) { + public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer, net.kyori.adventure.text.Component leaveMessage) {
+ // Paper end + // Paper end
ServerLevel worldserver = entityplayer.getLevel(); ServerLevel worldserver = entityplayer.getLevel();
entityplayer.awardStat(Stats.LEAVE_GAME); entityplayer.awardStat(Stats.LEAVE_GAME);
@@ -598,7 +603,7 @@ public abstract class PlayerList { @@ -595,7 +600,7 @@ public abstract class PlayerList {
entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add config for mobs immune to default effects
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 37cb74b27763db6f4a6a68030f88c37fc731affc..8d620b537ebe9c317c1b4fc72af40ac4a22c24e7 100644 index 3af1cfc75af23edd3cbfbf202427856761b42ce7..c58b18cd75eca14ce61d59c6beffa34337917ddd 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -717,6 +717,21 @@ public class PaperWorldConfig { @@ -667,6 +667,21 @@ public class PaperWorldConfig {
log("Hopper Ignore Occluding Blocks: " + (hoppersIgnoreOccludingBlocks ? "enabled" : "disabled")); log("Hopper Ignore Occluding Blocks: " + (hoppersIgnoreOccludingBlocks ? "enabled" : "disabled"));
} }
@ -31,10 +31,10 @@ index 37cb74b27763db6f4a6a68030f88c37fc731affc..8d620b537ebe9c317c1b4fc72af40ac4
private void nerfNetherPortalPigmen() { private void nerfNetherPortalPigmen() {
nerfNetherPortalPigmen = getBoolean("game-mechanics.nerf-pigmen-from-nether-portals", nerfNetherPortalPigmen); nerfNetherPortalPigmen = getBoolean("game-mechanics.nerf-pigmen-from-nether-portals", nerfNetherPortalPigmen);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index bd2e2eece61fd7fa6ab63d8926308044ceaa4012..2a16984f417967cf11838b1a05d60b9d49af91c3 100644 index 4c0c2bc9fae878304eab1c18b5ef0cae1b780cfd..bec2507294e266dc16f810d0deb7b790dd0a6df0 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1133,7 +1133,7 @@ public abstract class LivingEntity extends Entity { @@ -1128,7 +1128,7 @@ public abstract class LivingEntity extends Entity {
if (this.getMobType() == MobType.UNDEAD) { if (this.getMobType() == MobType.UNDEAD) {
MobEffect mobeffectlist = effect.getEffect(); MobEffect mobeffectlist = effect.getEffect();
@ -44,10 +44,10 @@ index bd2e2eece61fd7fa6ab63d8926308044ceaa4012..2a16984f417967cf11838b1a05d60b9d
} }
} }
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 9a5294596eb50cf4f6cf0729f6b94faaa63a5871..8c17caf00bd24adca5794774171638f298921ee7 100644 index 3657b7021d8b505653fadbdfbd515c112cd11177..ede0ced64d74d71547d1b8bb6853c5aacc1b486a 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -602,7 +602,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -613,7 +613,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@Override @Override
public boolean canBeAffected(MobEffectInstance effect) { public boolean canBeAffected(MobEffectInstance effect) {
@ -57,7 +57,7 @@ index 9a5294596eb50cf4f6cf0729f6b94faaa63a5871..8c17caf00bd24adca5794774171638f2
private class WitherDoNothingGoal extends Goal { private class WitherDoNothingGoal extends Goal {
diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java
index 968907f6aae3f58cddac1967bcfd82cea8800912..64f0ce2981700532cb0d11fbc086bfbd08f2384d 100644 index a3cb44914ef7d8636e743baa361a1a09ceeb2207..05b6c07c0705c7d8741c77baa87982e8e278dc97 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Spider.java --- a/src/main/java/net/minecraft/world/entity/monster/Spider.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java +++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java
@@ -133,7 +133,7 @@ public class Spider extends Monster { @@ -133,7 +133,7 @@ public class Spider extends Monster {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Fix MerchantOffer BuyB-Only AssertionError
diff --git a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java diff --git a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
index 70b703b920752e7301e4f19cdc07a1a4ceac5e0e..33660209885a9d56b127ca3926b6c7c60469127e 100644 index e0f1857dc100bc4d68e5e308b984e5eeaef976b5..12354b2fd411c57fd14dfca92cd2f1522fa6f050 100644
--- a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java --- a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
+++ b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java +++ b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
@@ -231,6 +231,7 @@ public class MerchantOffer { @@ -231,6 +231,7 @@ public class MerchantOffer {

Datei anzeigen

@ -11,10 +11,10 @@ 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. For those who really want it a config option is provided.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 8d620b537ebe9c317c1b4fc72af40ac4a22c24e7..17c3aa70671027d04a59e1108d2e4daaba3efa7b 100644 index c58b18cd75eca14ce61d59c6beffa34337917ddd..f21bd06d7f0531e8ae0412377757a147e9db4e85 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -914,5 +914,10 @@ public class PaperWorldConfig { @@ -823,4 +823,9 @@ public class PaperWorldConfig {
private void showSignClickCommandFailureMessagesToPlayer() { private void showSignClickCommandFailureMessagesToPlayer() {
showSignClickCommandFailureMessagesToPlayer = getBoolean("show-sign-click-command-failure-msgs-to-player", showSignClickCommandFailureMessagesToPlayer); showSignClickCommandFailureMessagesToPlayer = getBoolean("show-sign-click-command-failure-msgs-to-player", showSignClickCommandFailureMessagesToPlayer);
} }
@ -24,12 +24,11 @@ index 8d620b537ebe9c317c1b4fc72af40ac4a22c24e7..17c3aa70671027d04a59e1108d2e4daa
+ allowPlayerCrammingDamage = getBoolean("allow-player-cramming-damage", allowPlayerCrammingDamage); + allowPlayerCrammingDamage = getBoolean("allow-player-cramming-damage", allowPlayerCrammingDamage);
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 9fcf6019423a84baa6ee91e3a10957f092f023b6..e809fd6616e2b7a602be10f0a62d0261b4b3b0da 100644 index d3984faa2566e61eeb6c77b327f3ea951c8c8179..fbd1baca8455e1971f36370c2e90661202d8371f 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1419,7 +1419,7 @@ public class ServerPlayer extends Player { @@ -1417,7 +1417,7 @@ public class ServerPlayer extends Player {
@Override @Override
public boolean isInvulnerableTo(DamageSource damageSource) { public boolean isInvulnerableTo(DamageSource damageSource) {

Datei anzeigen

@ -28,31 +28,29 @@ index b47b7dce26805badd422c1867733ff4bfd00e9f4..b27021a42cbed3f0648a8d0903d00d03
* Get a named timer for the specified tile entity type to track type specific timings. * Get a named timer for the specified tile entity type to track type specific timings.
* @param entity * @param entity
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 17c3aa70671027d04a59e1108d2e4daaba3efa7b..ab3ea12d5f1cbfe55d53d0625c04dac2347f0739 100644 index f21bd06d7f0531e8ae0412377757a147e9db4e85..1f8f7735fbbb86583bd3ac1313e7e6adcfcb16d3 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -7,8 +7,12 @@ import it.unimi.dsi.fastutil.objects.Reference2IntMap; @@ -7,13 +7,18 @@ import it.unimi.dsi.fastutil.objects.Reference2IntMap;
import it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap; import it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap;
import net.minecraft.world.entity.MobCategory; import net.minecraft.world.entity.MobCategory;
import java.util.HashMap; import java.util.HashMap;
+import java.util.Locale; +import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
+ +
+import com.google.common.collect.HashBasedTable; +import com.google.common.collect.HashBasedTable;
+import com.google.common.collect.Table; +import com.google.common.collect.Table;
import net.minecraft.world.Difficulty; import net.minecraft.world.Difficulty;
import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.monster.Vindicator; import net.minecraft.world.entity.monster.Vindicator;
@@ -16,6 +20,7 @@ import net.minecraft.world.entity.monster.Zombie; import net.minecraft.world.entity.monster.Zombie;
import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode;
import net.minecraft.world.level.NaturalSpawner; import net.minecraft.world.level.NaturalSpawner;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
+import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.configuration.file.YamlConfiguration;
import org.spigotmc.SpigotWorldConfig; import org.spigotmc.SpigotWorldConfig;
@@ -919,5 +924,58 @@ public class PaperWorldConfig { @@ -828,4 +833,57 @@ public class PaperWorldConfig {
private void playerCrammingDamage() { private void playerCrammingDamage() {
allowPlayerCrammingDamage = getBoolean("allow-player-cramming-damage", allowPlayerCrammingDamage); allowPlayerCrammingDamage = getBoolean("allow-player-cramming-damage", allowPlayerCrammingDamage);
} }
@ -110,7 +108,6 @@ index 17c3aa70671027d04a59e1108d2e4daaba3efa7b..ab3ea12d5f1cbfe55d53d0625c04dac2
+ return rate != null && rate > -1 ? rate : def; + return rate != null && rate > -1 ? rate : def;
+ } + }
} }
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
index b1212e162ba938b3abe0df747a633ba9cbbe57c8..c24ff2ef1054523e58892c2b35080cffb6ab744a 100644 index b1212e162ba938b3abe0df747a633ba9cbbe57c8..c24ff2ef1054523e58892c2b35080cffb6ab744a 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java --- a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
@ -177,7 +174,7 @@ index b1212e162ba938b3abe0df747a633ba9cbbe57c8..c24ff2ef1054523e58892c2b35080cff
} }
diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
index f94aa5147c52d2e36d6018f51b85e9dac7a6208a..87f804e35e2f124f5ee73d9d9a4fd4b3069b00d0 100644 index c940a910a435b20297eca493c7b27fd69be54e86..f3b8e253a5bfc3f68121dbe656ae7e2ac0f0eb1c 100644
--- a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java --- a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
+++ b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java +++ b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
@@ -19,8 +19,21 @@ public abstract class Sensor<E extends LivingEntity> { @@ -19,8 +19,21 @@ public abstract class Sensor<E extends LivingEntity> {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add a bunch of missing forceDrop toggles
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index c375081e02925da6085a2d433bfc2c3719770f78..a8e5be1c941755b3e5b335d8211ca70a6c6fc32f 100644 index 68da2530db8b0fcdba957ee90c185324a010919f..4a027c802ffa80f69cf2bc68f737a842fbfb0596 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -1474,7 +1474,9 @@ public abstract class Mob extends LivingEntity { @@ -1489,7 +1489,9 @@ public abstract class Mob extends LivingEntity {
} }
if (this.tickCount > 100) { if (this.tickCount > 100) {
@ -19,7 +19,7 @@ index c375081e02925da6085a2d433bfc2c3719770f78..a8e5be1c941755b3e5b335d8211ca70a
} }
} }
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java b/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java b/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java
index 89c53df5a745a5712c3c74030ed942c3102f3725..aba1b220826c7680892a93c1733ad32dc8a0a23f 100644 index e47f3092b6bd6b86b577de705db1a575d0952348..490212cfe4e5cea7219eaf4304e14bfac0e6472d 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java --- a/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java
@@ -100,7 +100,9 @@ public class WorkAtComposter extends WorkAtPoi { @@ -100,7 +100,9 @@ public class WorkAtComposter extends WorkAtPoi {
@ -33,10 +33,10 @@ index 89c53df5a745a5712c3c74030ed942c3102f3725..aba1b220826c7680892a93c1733ad32d
} }
diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java
index dadc202da2d5568dce051b9cb4aadf20cfdd2c4f..8a2c49b7ded2165e383cd9b8744f752754aabdf4 100644 index 29372c8a0c54e4bae518e09846f0e9caba263896..f9be50049325a1139d67ccf590caeeceadb2fd23 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java --- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java +++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
@@ -521,7 +521,9 @@ public class Panda extends Animal { @@ -522,7 +522,9 @@ public class Panda extends Animal {
} }
if (!this.level.isClientSide() && this.random.nextInt(700) == 0 && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { if (!this.level.isClientSide() && this.random.nextInt(700) == 0 && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
@ -47,10 +47,10 @@ index dadc202da2d5568dce051b9cb4aadf20cfdd2c4f..8a2c49b7ded2165e383cd9b8744f7527
} }
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
index d4efcf08148933902d726cad05fc5d1bcb41ae8f..37712fe8585ede00569026bba5377ab61ad08ff5 100644 index f7c23377e41870c558a49a08552d109b7b9cbc33..8a2c2b4bd603aae37055abd058feb7ee759078ce 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java --- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
@@ -306,7 +306,9 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento @@ -305,7 +305,9 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@Override @Override
protected void finishConversion(ServerLevel world) { protected void finishConversion(ServerLevel world) {
PiglinAi.cancelAdmiring(this); PiglinAi.cancelAdmiring(this);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Stinger API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 1c684244213d04b36589dd50ea66052a9cdad072..fe71123dc07cb13ffad8f13e57aa9bda1cb0abf5 100644 index ca176b9331345e343c19a02b6ba2ea886d20962d..c022751e3b45469cc0ad6732e2d6ff08918bafa4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -321,7 +321,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -321,7 +321,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix incosistency issue with empty map items in CB
diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java
index 24700c7e6a32cc30c97dccc21c5f3e3e6b6438e5..4365d8bd4b5c63c1d112b3cd68b6c7163aa56600 100644 index 602e6bc05c053baf821c11c30b24538320b9ac61..7baf8039c5cf2bd68ba79d4a095ed4b58a847081 100644
--- a/src/main/java/net/minecraft/world/item/MapItem.java --- a/src/main/java/net/minecraft/world/item/MapItem.java
+++ b/src/main/java/net/minecraft/world/item/MapItem.java +++ b/src/main/java/net/minecraft/world/item/MapItem.java
@@ -72,7 +72,7 @@ public class MapItem extends ComplexItem { @@ -71,7 +71,7 @@ public class MapItem extends ComplexItem {
public static Integer getMapId(ItemStack stack) { public static Integer getMapId(ItemStack stack) {
CompoundTag nbttagcompound = stack.getTag(); CompoundTag nbttagcompound = stack.getTag();

Datei anzeigen

@ -105,7 +105,7 @@ index 0000000000000000000000000000000000000000..76d0d00cd6742991e3f3ec827a75ee87
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f4a7b1b45d8284a5552dce67979282ce09e71a36..0adb686d690e1be0c5540625efbecc46bac5d045 100644 index 9f69e1874caa087778e1de637c93719b43ac5a23..6b53310b37a502a677459bf2b777a2c450fb6482 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -18,6 +18,7 @@ import com.mojang.serialization.Lifecycle; @@ -18,6 +18,7 @@ import com.mojang.serialization.Lifecycle;
@ -116,7 +116,7 @@ index f4a7b1b45d8284a5552dce67979282ce09e71a36..0adb686d690e1be0c5540625efbecc46
import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap; import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.File; import java.io.File;
@@ -290,6 +291,7 @@ public final class CraftServer implements Server { @@ -294,6 +295,7 @@ public final class CraftServer implements Server {
public int reloadCount; public int reloadCount;
private final io.papermc.paper.datapack.PaperDatapackManager datapackManager; // Paper private final io.papermc.paper.datapack.PaperDatapackManager datapackManager; // Paper
public static Exception excessiveVelEx; // Paper - Velocity warnings public static Exception excessiveVelEx; // Paper - Velocity warnings

Datei anzeigen

@ -5,22 +5,22 @@ Subject: [PATCH] Improve boat collision performance
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
index 81f4f26a6b83079d36acd1fd86dede0eb1116c01..59437f04911662f06596ef61b91017caa6427eec 100644 index b9775bc4e601fe1be8e514222e56ae782a897395..6288ffdaad147a10f25cce00c13820903b4cc7d7 100644
--- a/src/main/java/net/minecraft/Util.java --- a/src/main/java/net/minecraft/Util.java
+++ b/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java
@@ -75,6 +75,7 @@ public class Util { @@ -78,6 +78,7 @@ public class Util {
}).findFirst().orElseThrow(() -> { }).findFirst().orElseThrow(() -> {
return new IllegalStateException("No jar file system provider found"); return new IllegalStateException("No jar file system provider found");
}); });
+ public static final double COLLISION_EPSILON = 1.0E-7; // Paper + public static final double COLLISION_EPSILON = 1.0E-7; // Paper
static final Logger LOGGER = LogManager.getLogger(); private static Consumer<String> thePauser = (string) -> {
};
public static <K, V> Collector<Entry<? extends K, ? extends V>, ?, Map<K, V>> toMap() {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 38e8d8c7d37fc824323dac372c56550480360515..1018f4640bab5876c5e0afb5b88f71437fb79662 100644 index bec2507294e266dc16f810d0deb7b790dd0a6df0..3f9e3415db6cfee317da695793d295660ef29b18 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1321,7 +1321,7 @@ public abstract class LivingEntity extends Entity { @@ -1316,7 +1316,7 @@ public abstract class LivingEntity extends Entity {
if (!source.isProjectile()) { if (!source.isProjectile()) {
Entity entity = source.getDirectEntity(); Entity entity = source.getDirectEntity();
@ -29,7 +29,7 @@ index 38e8d8c7d37fc824323dac372c56550480360515..1018f4640bab5876c5e0afb5b88f7143
this.blockUsingShield((LivingEntity) entity); this.blockUsingShield((LivingEntity) entity);
} }
} }
@@ -1430,11 +1430,12 @@ public abstract class LivingEntity extends Entity { @@ -1425,11 +1425,12 @@ public abstract class LivingEntity extends Entity {
} }
if (entity1 != null) { if (entity1 != null) {
@ -44,7 +44,7 @@ index 38e8d8c7d37fc824323dac372c56550480360515..1018f4640bab5876c5e0afb5b88f7143
d0 = (Math.random() - Math.random()) * 0.01D; d0 = (Math.random() - Math.random()) * 0.01D;
} }
@@ -2086,7 +2087,7 @@ public abstract class LivingEntity extends Entity { @@ -2085,7 +2086,7 @@ public abstract class LivingEntity extends Entity {
this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING)); this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING));
Entity entity = damagesource.getDirectEntity(); Entity entity = damagesource.getDirectEntity();
@ -54,10 +54,10 @@ index 38e8d8c7d37fc824323dac372c56550480360515..1018f4640bab5876c5e0afb5b88f7143
} }
} }
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
index aa7c022c4faade23bd9061311d4152cf845d3331..391454a58d18d7373b974e094fd62514ca0d0b6b 100644 index c3d111204601270b57389e1f85456a9e2ada4629..b967177cb10041f96831322c311579e409050e88 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java --- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
@@ -688,8 +688,8 @@ public class Boat extends Entity { @@ -687,8 +687,8 @@ public class Boat extends Entity {
this.invFriction = 0.05F; this.invFriction = 0.05F;
if (this.oldStatus == Boat.Status.IN_AIR && this.status != Boat.Status.IN_AIR && this.status != Boat.Status.ON_LAND) { if (this.oldStatus == Boat.Status.IN_AIR && this.status != Boat.Status.IN_AIR && this.status != Boat.Status.ON_LAND) {
this.waterLevel = this.getY(1.0D); this.waterLevel = this.getY(1.0D);
@ -68,16 +68,3 @@ index aa7c022c4faade23bd9061311d4152cf845d3331..391454a58d18d7373b974e094fd62514
this.lastYd = 0.0D; this.lastYd = 0.0D;
this.status = Boat.Status.IN_WATER; this.status = Boat.Status.IN_WATER;
} else { } else {
diff --git a/src/main/java/net/minecraft/world/item/BoatItem.java b/src/main/java/net/minecraft/world/item/BoatItem.java
index c0864c833fd313e6ba9339ecc7f9e2359954bda3..8998f6233a3135fda928469ae8bb7119e16eee1a 100644
--- a/src/main/java/net/minecraft/world/item/BoatItem.java
+++ b/src/main/java/net/minecraft/world/item/BoatItem.java
@@ -67,7 +67,7 @@ public class BoatItem extends Item {
entityboat.setType(this.type);
entityboat.setYRot(user.getYRot());
- if (!world.noCollision(entityboat, entityboat.getBoundingBox().inflate(-0.1D))) {
+ if (!world.noCollision(entityboat, entityboat.getBoundingBox())) { // Paper
return InteractionResultHolder.fail(itemstack);
} else {
if (!world.isClientSide) {

Datei anzeigen

@ -5,10 +5,10 @@ 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 diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 5edb274101f92c442b876cae5749b85c81978bc8..efa7c4b1e8c2e4297f89eb62aab76c43d2947e16 100644 index 43cd0b67f31d0340893672c9bf5a00467d9cdb54..7b6cf326dfab9bd0b13dfc330d143d2efeea9aa1 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -389,7 +389,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -388,7 +388,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
--this.dropSpamTickCount; --this.dropSpamTickCount;
} }

Datei anzeigen

@ -8,7 +8,7 @@ Makes less git noise, as it won't update the date every single time
Use -DPaper.skipServerPropertiesComments=true flag to disable writing it Use -DPaper.skipServerPropertiesComments=true flag to disable writing it
diff --git a/src/main/java/net/minecraft/server/dedicated/Settings.java b/src/main/java/net/minecraft/server/dedicated/Settings.java diff --git a/src/main/java/net/minecraft/server/dedicated/Settings.java b/src/main/java/net/minecraft/server/dedicated/Settings.java
index 745a6735fba8343329ec31723da914fad16ae134..232c305b63df19ea923772192c97de65411531dd 100644 index 71767307062e99262afb994016720e1f1555b820..b285e8f6172154af1aa942ab164d73bc885c5fa4 100644
--- a/src/main/java/net/minecraft/server/dedicated/Settings.java --- a/src/main/java/net/minecraft/server/dedicated/Settings.java
+++ b/src/main/java/net/minecraft/server/dedicated/Settings.java +++ b/src/main/java/net/minecraft/server/dedicated/Settings.java
@@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@

Datei anzeigen

@ -18,10 +18,10 @@ index e95f2222814e104bf9194a96385737dffe2cb2b5..249ab7357aa19d87179fa4c3ae89d9d3
String string = resourceKey.location().toString(); String string = resourceKey.location().toString();
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index e809fd6616e2b7a602be10f0a62d0261b4b3b0da..80f7ff6117d15d1e0f19a497a8a2172a75d14734 100644 index fbd1baca8455e1971f36370c2e90661202d8371f..a6ec320bdca4a1c6e23461cd10a6f7bed681f243 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1260,7 +1260,7 @@ public class ServerPlayer extends Player { @@ -1258,7 +1258,7 @@ public class ServerPlayer extends Player {
} else if (this.bedBlocked(blockposition, enumdirection)) { } else if (this.bedBlocked(blockposition, enumdirection)) {
return Either.left(Player.BedSleepingProblem.OBSTRUCTED); return Either.left(Player.BedSleepingProblem.OBSTRUCTED);
} else { } else {
@ -30,16 +30,16 @@ index e809fd6616e2b7a602be10f0a62d0261b4b3b0da..80f7ff6117d15d1e0f19a497a8a2172a
if (this.level.isDay()) { if (this.level.isDay()) {
return Either.left(Player.BedSleepingProblem.NOT_POSSIBLE_NOW); return Either.left(Player.BedSleepingProblem.NOT_POSSIBLE_NOW);
} else { } else {
@@ -2088,12 +2088,33 @@ public class ServerPlayer extends Player { @@ -2086,12 +2086,33 @@ public class ServerPlayer extends Player {
return this.respawnForced; return this.respawnForced;
} }
+ @Deprecated // Paper + @Deprecated // Paper
public void setRespawnPosition(ResourceKey<Level> dimension, @Nullable BlockPos pos, float angle, boolean spawnPointSet, boolean sendMessage) { public void setRespawnPosition(ResourceKey<Level> dimension, @Nullable BlockPos pos, float angle, boolean forced, boolean sendMessage) {
+ // Paper start + // Paper start
+ this.setRespawnPosition(dimension, pos, angle, spawnPointSet, sendMessage, com.destroystokyo.paper.event.player.PlayerSetSpawnEvent.Cause.UNKNOWN); + this.setRespawnPosition(dimension, pos, angle, forced, sendMessage, com.destroystokyo.paper.event.player.PlayerSetSpawnEvent.Cause.UNKNOWN);
+ } + }
+ public void setRespawnPosition(ResourceKey<Level> dimension, @Nullable BlockPos pos, float angle, boolean spawnPointSet, boolean sendMessage, com.destroystokyo.paper.event.player.PlayerSetSpawnEvent.Cause cause) { + public void setRespawnPosition(ResourceKey<Level> dimension, @Nullable BlockPos pos, float angle, boolean forced, boolean sendMessage, com.destroystokyo.paper.event.player.PlayerSetSpawnEvent.Cause cause) {
+ Location spawnLoc = null; + Location spawnLoc = null;
+ boolean willNotify = false; + boolean willNotify = false;
if (pos != null) { if (pos != null) {
@ -48,7 +48,7 @@ index e809fd6616e2b7a602be10f0a62d0261b4b3b0da..80f7ff6117d15d1e0f19a497a8a2172a
+ spawnLoc.setYaw(angle); + spawnLoc.setYaw(angle);
+ willNotify = sendMessage && !flag2; + willNotify = sendMessage && !flag2;
+ } + }
+ com.destroystokyo.paper.event.player.PlayerSetSpawnEvent event = new com.destroystokyo.paper.event.player.PlayerSetSpawnEvent(this.getBukkitEntity(), cause, spawnLoc, spawnPointSet, willNotify, willNotify ? net.kyori.adventure.text.Component.translatable("block.minecraft.set_spawn") : null); + com.destroystokyo.paper.event.player.PlayerSetSpawnEvent event = new com.destroystokyo.paper.event.player.PlayerSetSpawnEvent(this.getBukkitEntity(), cause, spawnLoc, forced, willNotify, willNotify ? net.kyori.adventure.text.Component.translatable("block.minecraft.set_spawn") : null);
+ if (!event.callEvent()) { + if (!event.callEvent()) {
+ return; + return;
+ } + }
@ -56,7 +56,7 @@ index e809fd6616e2b7a602be10f0a62d0261b4b3b0da..80f7ff6117d15d1e0f19a497a8a2172a
+ dimension = event.getLocation().getWorld() != null ? ((CraftWorld) event.getLocation().getWorld()).getHandle().dimension() : dimension; + dimension = event.getLocation().getWorld() != null ? ((CraftWorld) event.getLocation().getWorld()).getHandle().dimension() : dimension;
+ pos = net.minecraft.server.MCUtil.toBlockPosition(event.getLocation()); + pos = net.minecraft.server.MCUtil.toBlockPosition(event.getLocation());
+ angle = (float) event.getLocation().getYaw(); + angle = (float) event.getLocation().getYaw();
+ spawnPointSet = event.isForced(); + forced = event.isForced();
+ // Paper end + // Paper end
- if (sendMessage && !flag2) { - if (sendMessage && !flag2) {
@ -67,10 +67,10 @@ index e809fd6616e2b7a602be10f0a62d0261b4b3b0da..80f7ff6117d15d1e0f19a497a8a2172a
this.respawnPosition = pos; this.respawnPosition = pos;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 9ac7791709263479b87d1234b07e84d9a2a4c9d3..450dd486269450be88c9a9a4d895184199e655aa 100644 index 963d40bf7cf7c12a22472f3a5b7080daf1c90e7b..dca3b995c02507e5df299abe60f518480ce56d21 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -893,7 +893,7 @@ public abstract class PlayerList { @@ -889,7 +889,7 @@ public abstract class PlayerList {
f1 = (float) Mth.wrapDegrees(Mth.atan2(vec3d1.z, vec3d1.x) * 57.2957763671875D - 90.0D); f1 = (float) Mth.wrapDegrees(Mth.atan2(vec3d1.z, vec3d1.x) * 57.2957763671875D - 90.0D);
} }
@ -80,7 +80,7 @@ index 9ac7791709263479b87d1234b07e84d9a2a4c9d3..450dd486269450be88c9a9a4d8951841
isBedSpawn = true; isBedSpawn = true;
location = new Location(worldserver1.getWorld(), vec3d.x, vec3d.y, vec3d.z, f1, 0.0F); location = new Location(worldserver1.getWorld(), vec3d.x, vec3d.y, vec3d.z, f1, 0.0F);
diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
index af4eb4a8814491afef449a2874521636957d7557..0a5d563700c9f806139001181f01fa9d0111f792 100644 index d620f559cdd1bd0e161a99123ef6c6f64e3302df..07e893f1859abe3c2a765694c21309d60346ca82 100644
--- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java --- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java +++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
@@ -73,7 +73,7 @@ public class RespawnAnchorBlock extends Block { @@ -73,7 +73,7 @@ public class RespawnAnchorBlock extends Block {
@ -93,10 +93,10 @@ index af4eb4a8814491afef449a2874521636957d7557..0a5d563700c9f806139001181f01fa9d
return InteractionResult.SUCCESS; return InteractionResult.SUCCESS;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2642f139e6212b0930032cbb8da9fe384b25c26f..869596be0e5d4d0fa82b97e668c7545629fdfd36 100644 index b5df4beaefe68b13e402b6f71d67ca5ddd47c6f4..9b136a877ff07262b1694c6cad43da756602384e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1083,9 +1083,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1077,9 +1077,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public void setBedSpawnLocation(Location location, boolean override) { public void setBedSpawnLocation(Location location, boolean override) {
if (location == null) { if (location == null) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Make hoppers respect inventory max stack size
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
index 08c4a0996410a42418d4a5da3ed1f4db2f171dd2..4950d49ed414e1c82c125b9347113f595f1078b6 100644 index b63fcebac4d51f0d01914c76712f896e6d117f90..71a644a3de1565f7c60b35553df017882f3be860 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
@@ -589,17 +589,19 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen @@ -588,17 +588,19 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
if (itemstack1.isEmpty()) { if (itemstack1.isEmpty()) {
// Spigot start - SPIGOT-6693, InventorySubcontainer#setItem // Spigot start - SPIGOT-6693, InventorySubcontainer#setItem

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Optimize entity tracker passenger checks
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
index 2f3e69ad809199ffc2661d524bb627ec8dbc2e80..e5cae2fb67541785072324e5434820ee4b169556 100644 index f6b6ac1ab31c364646151866c54c9e46dee12516..75d0c2532c26eab044256cf6373ba7909dfe6395 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java --- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -74,7 +74,7 @@ public class ServerEntity { @@ -73,7 +73,7 @@ public class ServerEntity {
this.trackedPlayers = trackedPlayers; this.trackedPlayers = trackedPlayers;
// CraftBukkit end // CraftBukkit end
this.ap = Vec3.ZERO; this.ap = Vec3.ZERO;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Config option for Piglins guarding chests
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index ef569d01165d7953c5802342e00da7d655811ff7..7bc5ba3514d2f091f745b33f96fe86bd839b04c2 100644 index 1f8f7735fbbb86583bd3ac1313e7e6adcfcb16d3..569b108b22cfa21d9368b7f7e1bf785ae7dd15fa 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -80,6 +80,11 @@ public class PaperWorldConfig { @@ -78,6 +78,11 @@ public class PaperWorldConfig {
zombiesTargetTurtleEggs = getBoolean("zombies-target-turtle-eggs", zombiesTargetTurtleEggs); zombiesTargetTurtleEggs = getBoolean("zombies-target-turtle-eggs", zombiesTargetTurtleEggs);
} }
@ -21,14 +21,14 @@ index ef569d01165d7953c5802342e00da7d655811ff7..7bc5ba3514d2f091f745b33f96fe86bd
private void useEigencraftRedstone() { private void useEigencraftRedstone() {
useEigencraftRedstone = this.getBoolean("use-faster-eigencraft-redstone", false); useEigencraftRedstone = this.getBoolean("use-faster-eigencraft-redstone", false);
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
index 4330ccefe92c76a516f42a81b38536cf3312be5b..7fa5cde9c26c21d4d800f720f373a8b702f4fcb5 100644 index 08d17a26bf8a7f3757f4f5b2df4592edbdde9f2e..f362e007aece208036a37d9bda8bb481a78eeaff 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java --- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
@@ -468,6 +468,7 @@ public class PiglinAi { @@ -464,6 +464,7 @@ public class PiglinAi {
} }
public static void angerNearbyPiglins(Player player, boolean blockOpen) { public static void angerNearbyPiglins(Player player, boolean blockOpen) {
+ if (!player.level.paperConfig.piglinsGuardChests) return; // Paper + if (!player.level.paperConfig.piglinsGuardChests) return; // Paper
List<AbstractPiglin> list = (List) player.level.getEntitiesOfClass(Piglin.class, player.getBoundingBox().inflate(16.0D)); // CraftBukkit - decompile error List<Piglin> list = player.level.getEntitiesOfClass(Piglin.class, player.getBoundingBox().inflate(16.0D));
list.stream().filter(PiglinAi::isIdle).filter((entitypiglin) -> { list.stream().filter(PiglinAi::isIdle).filter((entitypiglin) -> {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Added EntityDamageItemEvent
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index e4736190358181a6a7e7e81f4452045f41134060..7695a5ec88023720d873f81fc36f78ad60fb9589 100644 index c5286b3751c58df1b70d9ac01b0497b83c0f917a..8f2f516b1f473ce18a07e9f130b49b795dd6b46e 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java --- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -525,7 +525,7 @@ public final class ItemStack { @@ -527,7 +527,7 @@ public final class ItemStack {
return this.getItem().getMaxDamage(); return this.getItem().getMaxDamage();
} }
@ -17,7 +17,7 @@ index e4736190358181a6a7e7e81f4452045f41134060..7695a5ec88023720d873f81fc36f78ad
if (!this.isDamageableItem()) { if (!this.isDamageableItem()) {
return false; return false;
} else { } else {
@@ -543,8 +543,8 @@ public final class ItemStack { @@ -545,8 +545,8 @@ public final class ItemStack {
amount -= k; amount -= k;
// CraftBukkit start // CraftBukkit start
@ -28,7 +28,7 @@ index e4736190358181a6a7e7e81f4452045f41134060..7695a5ec88023720d873f81fc36f78ad
event.getPlayer().getServer().getPluginManager().callEvent(event); event.getPlayer().getServer().getPluginManager().callEvent(event);
if (amount != event.getDamage() || event.isCancelled()) { if (amount != event.getDamage() || event.isCancelled()) {
@@ -555,6 +555,14 @@ public final class ItemStack { @@ -557,6 +557,14 @@ public final class ItemStack {
} }
amount = event.getDamage(); amount = event.getDamage();
@ -43,7 +43,7 @@ index e4736190358181a6a7e7e81f4452045f41134060..7695a5ec88023720d873f81fc36f78ad
} }
// CraftBukkit end // CraftBukkit end
if (amount <= 0) { if (amount <= 0) {
@@ -562,8 +570,8 @@ public final class ItemStack { @@ -564,8 +572,8 @@ public final class ItemStack {
} }
} }
@ -54,7 +54,7 @@ index e4736190358181a6a7e7e81f4452045f41134060..7695a5ec88023720d873f81fc36f78ad
} }
j = this.getDamageValue() + amount; j = this.getDamageValue() + amount;
@@ -575,7 +583,7 @@ public final class ItemStack { @@ -577,7 +585,7 @@ public final class ItemStack {
public <T extends LivingEntity> void hurtAndBreak(int amount, T entity, Consumer<T> breakCallback) { public <T extends LivingEntity> void hurtAndBreak(int amount, T entity, Consumer<T> breakCallback) {
if (!entity.level.isClientSide && (!(entity instanceof net.minecraft.world.entity.player.Player) || !((net.minecraft.world.entity.player.Player) entity).getAbilities().instabuild)) { if (!entity.level.isClientSide && (!(entity instanceof net.minecraft.world.entity.player.Player) || !((net.minecraft.world.entity.player.Player) entity).getAbilities().instabuild)) {
if (this.isDamageableItem()) { if (this.isDamageableItem()) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Optimize indirect passenger iteration
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4f1a57c24688d1ae537f5fd1c1649e035f20abfd..b7c0574aa8e3aec3bc13064b59c5f7efb075cf13 100644 index 9abbde2f0e8076c9986bc805abd2e71ba4a0af04..aeae0eb6260fa88c55eb8add7e5df3198fe3d465 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3501,26 +3501,41 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -3458,26 +3458,41 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
} }
private Stream<Entity> getIndirectPassengersStream() { private Stream<Entity> getIndirectPassengersStream() {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix block drops position losing precision millions of blocks
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
index d6a3f3a2edae806b0ebf5bf5ac445116c0d64535..1a5605b11170dfe1bd37165de886bad0f2e38ecd 100644 index a37213bce34f45898f56a22196b0d5ef1470e812..76b3d78f4c866a11bd7798af6b330340d898d7d9 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java --- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -344,9 +344,11 @@ public class Block extends BlockBehaviour implements ItemLike { @@ -342,9 +342,11 @@ public class Block extends BlockBehaviour implements ItemLike {
public static void popResource(Level world, BlockPos pos, ItemStack stack) { public static void popResource(Level world, BlockPos pos, ItemStack stack) {
float f = EntityType.ITEM.getHeight() / 2.0F; float f = EntityType.ITEM.getHeight() / 2.0F;
@ -24,7 +24,7 @@ index d6a3f3a2edae806b0ebf5bf5ac445116c0d64535..1a5605b11170dfe1bd37165de886bad0
Block.popResource(world, () -> { Block.popResource(world, () -> {
return new ItemEntity(world, d0, d1, d2, stack); return new ItemEntity(world, d0, d1, d2, stack);
@@ -359,9 +361,11 @@ public class Block extends BlockBehaviour implements ItemLike { @@ -357,9 +359,11 @@ public class Block extends BlockBehaviour implements ItemLike {
int k = direction.getStepZ(); int k = direction.getStepZ();
float f = EntityType.ITEM.getWidth() / 2.0F; float f = EntityType.ITEM.getWidth() / 2.0F;
float f1 = EntityType.ITEM.getHeight() / 2.0F; float f1 = EntityType.ITEM.getHeight() / 2.0F;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable item frame map cursor update interval
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 3297271e3801935de1690c3d1a325d0c8a66d347..9a99211e183958c0327e69457efaeb87fc617964 100644 index 569b108b22cfa21d9368b7f7e1bf785ae7dd15fa..7eacd9265a8d4cee6e3c3608ab08603a3b6e5a15 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -910,6 +910,11 @@ public class PaperWorldConfig { @@ -819,6 +819,11 @@ public class PaperWorldConfig {
mapItemFrameCursorLimit = getInt("map-item-frame-cursor-limit", mapItemFrameCursorLimit); mapItemFrameCursorLimit = getInt("map-item-frame-cursor-limit", mapItemFrameCursorLimit);
} }
@ -21,15 +21,15 @@ index 3297271e3801935de1690c3d1a325d0c8a66d347..9a99211e183958c0327e69457efaeb87
private void fixItemsMergingThroughWalls() { private void fixItemsMergingThroughWalls() {
fixItemsMergingThroughWalls = getBoolean("fix-items-merging-through-walls", fixItemsMergingThroughWalls); fixItemsMergingThroughWalls = getBoolean("fix-items-merging-through-walls", fixItemsMergingThroughWalls);
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
index 69a671a2cd068d7665fdcd455c2710ee2890f564..764d449aa63af88029f80918884a0c942d630113 100644 index 75d0c2532c26eab044256cf6373ba7909dfe6395..94704a258ce7183aeb0ccec0b9106e40efd08821 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java --- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -99,7 +99,7 @@ public class ServerEntity { @@ -98,7 +98,7 @@ public class ServerEntity {
ItemFrame entityitemframe = (ItemFrame) this.entity; ItemFrame entityitemframe = (ItemFrame) this.entity;
ItemStack itemstack = entityitemframe.getItem(); ItemStack itemstack = entityitemframe.getItem();
- if (this.tickCount % 10 == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks - if (this.tickCount % 10 == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks
+ if (this.level.paperConfig.mapItemFrameCursorUpdateInterval > 0 && this.tickCount % this.level.paperConfig.mapItemFrameCursorUpdateInterval == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks // Paper - Make item frame map cursor update interval configurable + if (this.level.paperConfig.mapItemFrameCursorUpdateInterval > 0 && this.tickCount % this.level.paperConfig.mapItemFrameCursorUpdateInterval == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks // Paper - Make item frame map cursor update interval configurable
Integer integer = MapItem.getMapId(itemstack); Integer integer = MapItem.getMapId(itemstack);
MapItemSavedData worldmap = MapItem.getSavedData(integer, (Level) this.level); MapItemSavedData worldmap = MapItem.getSavedData(integer, this.level);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Make EntityUnleashEvent cancellable
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index a8e5be1c941755b3e5b335d8211ca70a6c6fc32f..bada11542390b7575466f0e7062470665b8266c4 100644 index 4a027c802ffa80f69cf2bc68f737a842fbfb0596..697c2663c4deeb8f2ad603c979ab0884ac027930 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -1448,7 +1448,7 @@ public abstract class Mob extends LivingEntity { @@ -1463,7 +1463,7 @@ public abstract class Mob extends LivingEntity {
if (flag1 && this.isLeashed()) { if (flag1 && this.isLeashed()) {
// Paper start - drop leash variable // Paper start - drop leash variable
EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN, true); EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN, true);
@ -18,10 +18,10 @@ index a8e5be1c941755b3e5b335d8211ca70a6c6fc32f..bada11542390b7575466f0e706247066
// Paper end // Paper end
} }
diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java
index d16a7bab5495d58ea9e6811d4b507667cfa3d264..94bf73eb54e302a9d41fbf8b0a487d2660adcd0e 100644 index 5f256c1ac5d49e19cfccf174dd55506313c493e0..744a99151ceecc85349861a99f6cb65e04c41b73 100644
--- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java --- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java
+++ b/src/main/java/net/minecraft/world/entity/PathfinderMob.java +++ b/src/main/java/net/minecraft/world/entity/PathfinderMob.java
@@ -49,7 +49,7 @@ public abstract class PathfinderMob extends Mob { @@ -51,7 +51,7 @@ public abstract class PathfinderMob extends Mob {
if (f > entity.level.paperConfig.maxLeashDistance) { // Paper if (f > entity.level.paperConfig.maxLeashDistance) { // Paper
// Paper start - drop leash variable // Paper start - drop leash variable
EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE, true); EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE, true);
@ -30,7 +30,7 @@ index d16a7bab5495d58ea9e6811d4b507667cfa3d264..94bf73eb54e302a9d41fbf8b0a487d26
this.dropLeash(true, event.isDropLeash()); this.dropLeash(true, event.isDropLeash());
// Paper end // Paper end
} }
@@ -61,7 +61,7 @@ public abstract class PathfinderMob extends Mob { @@ -63,7 +63,7 @@ public abstract class PathfinderMob extends Mob {
if (f > entity.level.paperConfig.maxLeashDistance) { // Paper if (f > entity.level.paperConfig.maxLeashDistance) { // Paper
// Paper start - drop leash variable // Paper start - drop leash variable
EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE, true); EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE, true);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Clear bucket NBT after dispense
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index c5c8a889b745f36c2dce9dbb5d0b6edaefafdd22..e966238696944afea47ae6d869cd25f0d480c248 100644 index 89921ffeae7cc715aa18cbf8687e7c8e612e5612..59db245fe11384282af84ec1d5be08ab0e9484ca 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -637,8 +637,7 @@ public interface DispenseItemBehavior { @@ -634,8 +634,7 @@ public interface DispenseItemBehavior {
Item item = Items.BUCKET; Item item = Items.BUCKET;
stack.shrink(1); stack.shrink(1);
if (stack.isEmpty()) { if (stack.isEmpty()) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Respect despawn rate in item merge check
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index 158719d46c96bb733a00e08c8285f41a48406abf..063f3e4c67e6716c9a03dbe4b72eafd32e4f0d53 100644 index 7897b3324bc8d5a33cd3cd144b9fae9ffdc9241e..0ac107d7a360a5812a43488c611498d12546eed9 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -262,7 +262,7 @@ public class ItemEntity extends Entity { @@ -261,7 +261,7 @@ public class ItemEntity extends Entity {
private boolean isMergable() { private boolean isMergable() {
ItemStack itemstack = this.getItem(); ItemStack itemstack = this.getItem();

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Move BlockPistonRetractEvent to fix duplication
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
index dd50a29d47a62df8cdfd69358218d1559b6794ef..3678f75822b55c3c4c77565893269af4b7f9d8c9 100644 index da9ae487799e58b196ebf219a62020d0c28adc70..c7d23fcaa5702f0e8bbf616c86b16ab1b3400dbb 100644
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java --- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
@@ -147,14 +147,14 @@ public class PistonBaseBlock extends DirectionalBlock { @@ -146,14 +146,14 @@ public class PistonBaseBlock extends DirectionalBlock {
} }
// CraftBukkit start // CraftBukkit start
@ -31,7 +31,7 @@ index dd50a29d47a62df8cdfd69358218d1559b6794ef..3678f75822b55c3c4c77565893269af4
//} // Paper //} // Paper
// PAIL: checkME - what happened to setTypeAndData? // PAIL: checkME - what happened to setTypeAndData?
// CraftBukkit end // CraftBukkit end
@@ -237,6 +237,15 @@ public class PistonBaseBlock extends DirectionalBlock { @@ -236,6 +236,15 @@ public class PistonBaseBlock extends DirectionalBlock {
BlockState iblockdata1 = (BlockState) ((BlockState) Blocks.MOVING_PISTON.defaultBlockState().setValue(MovingPistonBlock.FACING, enumdirection)).setValue(MovingPistonBlock.TYPE, this.isSticky ? PistonType.STICKY : PistonType.DEFAULT); BlockState iblockdata1 = (BlockState) ((BlockState) Blocks.MOVING_PISTON.defaultBlockState().setValue(MovingPistonBlock.FACING, enumdirection)).setValue(MovingPistonBlock.TYPE, this.isSticky ? PistonType.STICKY : PistonType.DEFAULT);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Change EnderEye target without changing other things
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java b/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java b/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java
index 253c5d29452f4f75b9a94a74177c7adaa4a61978..27c81c21b76a6916abe5b334bc05b6edb47d151e 100644 index ab0493b975206b15095175149086cf1a6663995d..909de00db8c94ade82231e76ccd6c884cefed70b 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java --- a/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java +++ b/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java
@@ -75,6 +75,11 @@ public class EyeOfEnder extends Entity implements ItemSupplier { @@ -75,6 +75,11 @@ public class EyeOfEnder extends Entity implements ItemSupplier {