Skip to content

Commit

Permalink
all patches applied \o/
Browse files Browse the repository at this point in the history
  • Loading branch information
granny committed Dec 4, 2024
1 parent 3744c42 commit 2951510
Show file tree
Hide file tree
Showing 44 changed files with 59 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Subject: [PATCH] Add more logger output for invalid movement kicks


diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 1e1b42f60679c8b8b27b3255feda4c6cf77d5536..9ae16e24013ea5664d4ea6d52ed7dd188404890f 100644
index 3c98be45587f3f6ca6cdc53834ef7dae4962f58d..f8438bc2af43ee8883db75503deac10e1e34686e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -761,6 +761,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -756,6 +756,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
if (packet.getId() == this.awaitingTeleport) {
if (this.awaitingPositionFromClient == null) {
+ ServerGamePacketListenerImpl.LOGGER.warn("Disconnected on accept teleport packet. Was not expecting position data from client at this time"); // Purpur
this.disconnect((Component) Component.translatable("multiplayer.disconnect.invalid_player_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PLAYER_MOVEMENT); // Paper - kick event cause
return;
}
@@ -1372,7 +1373,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1425,7 +1426,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleMovePlayer(ServerboundMovePlayerPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ Subject: [PATCH] Add Bee API


diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
index 4b32a783cabf05f5bae0dba22eea8ac7ba2cd285..dc8df0912c1d18176e18a8f4dc43c4f60f81b659 100644
index 5ca5f128e5614146e76935e6d674e0699c65dfdb..884527c8326c6df3656a4d3a2f5f2847f95b0f63 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
@@ -954,6 +954,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -988,6 +988,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
if (optional.isPresent()) {
Bee.this.savedFlowerPos = (BlockPos) optional.get();
Bee.this.navigation.moveTo((double) Bee.this.savedFlowerPos.getX() + 0.5D, (double) Bee.this.savedFlowerPos.getY() + 0.5D, (double) Bee.this.savedFlowerPos.getZ() + 0.5D, 1.2000000476837158D);
+ new org.purpurmc.purpur.event.entity.BeeFoundFlowerEvent((org.bukkit.entity.Bee) Bee.this.getBukkitEntity(), io.papermc.paper.util.MCUtil.toLocation(Bee.this.level(), Bee.this.savedFlowerPos)).callEvent(); // Purpur
return true;
} else {
Bee.this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(Bee.this.random, 20, 60);
@@ -997,6 +998,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -1031,6 +1032,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
this.pollinating = false;
Bee.this.navigation.stop();
Bee.this.remainingCooldownBeforeLocatingNewFlower = 200;
+ new org.purpurmc.purpur.event.entity.BeeStopPollinatingEvent((org.bukkit.entity.Bee) Bee.this.getBukkitEntity(), Bee.this.savedFlowerPos == null ? null : io.papermc.paper.util.MCUtil.toLocation(Bee.this.level(), Bee.this.savedFlowerPos), Bee.this.hasNectar()).callEvent(); // Purpur
}

@Override
@@ -1046,6 +1048,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -1080,6 +1082,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
this.setWantedPos();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ index 268ab3f175ece52e7da6dfa50573089f49685d68..6b0308d081af880a79c369306e8ad697

@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 868bf852a9ed6ea2a48a238608f47405da1296f4..907fe00ab752ad124020755f211567af771b9d70 100644
index 5d0f4395617bcd59aad7cea221f6009d08dc0913..41077511328a31f39639af1d02e7a3041992676d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2388,6 +2388,42 @@ public class CraftWorld extends CraftRegionAccessor implements World {
Expand Down Expand Up @@ -99,10 +99,10 @@ index 868bf852a9ed6ea2a48a238608f47405da1296f4..907fe00ab752ad124020755f211567af

@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index fa0cc92b6c66cbed3ab895278b4bf3f80b0af69d..5bb5b1eaf7f50983bce3e9f515115eced685527a 100644
index 3c76dd383ec0ba19eea19d12902833dc410f96c0..f63b02573b3d42ae8743f591aff2282ece927e31 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3629,5 +3629,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3614,5 +3614,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void resetIdleTimer() {
getHandle().resetLastActionTime();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add skeleton bow accuracy option


diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
index 2cadbc0d56908ca978e1735eff07f5e634548606..39d02cf0e31832e30c4f034b0b5385e3e0057e60 100644
index f90f3e3ad7c941e3222a8119d9b01d571eef4c1b..0235488faee8078186fbb78038789da0846aca29 100644
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
@@ -197,7 +197,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
@@ -199,7 +199,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
}

if (event.getProjectile() == entityarrow.getBukkitEntity()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add death screen API


diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 674df8d09988b2509adf93d75b2b37009a709410..02339cdd1e8cd6496cb466eb4b1c7ce2d9b6f064 100644
index f63b02573b3d42ae8743f591aff2282ece927e31..8e0136c55e37d1f2732c555eb7c6129eb2b84c19 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3667,5 +3667,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3652,5 +3652,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (this.getHandle().connection == null) return;
this.getHandle().connection.send(new net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket(new net.minecraft.network.protocol.common.custom.GameTestClearMarkersDebugPayload()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ index 8eb51119d60979f85bc98a9413d318522c732693..08a81a45371fd273fb35956bef3bb794
gg.pufferfish.pufferfish.PufferfishCommand.init(); // Pufferfish

diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 5bce26e9671aab15ac4bac9a0d00b5184bef74ea..430407b0cf06ba337c59cd576c7e40a8e5fe8229 100644
index 628f7f784c830189c5718a20ce43a9352e400c33..c471a8c81ba067abcb22956ad1a30b5a9b64fc87 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -182,6 +182,12 @@ public class Main {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,34 @@ index eedb3707523b47ab79db326f6d7382cca60c5393..db455a0fc7e1fc004215b718ff470bd2

if (environment.includeIntegrated) {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 323d474582cf796ae9d40f9d00f277496d3f2c0a..e6001fadc04b63b82e20652bbb16cb1db5cf44bd 100644
index 7e785394de3db56e5d0fd8bea5edf5df9fa129fa..8264adc43edfebc2c260c2b915186c20ec3637cc 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -332,6 +332,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -330,6 +330,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
public boolean purpurClient = false; // Purpur
private boolean tpsBar = false; // Purpur
private boolean compassBar = false; // Purpur
+ private boolean ramBar = false; // Purpur

// Paper start - rewrite chunk system
private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader;
@@ -696,6 +697,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -694,6 +695,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple

if (nbt.contains("Purpur.TPSBar")) { this.tpsBar = nbt.getBoolean("Purpur.TPSBar"); } // Purpur
if (nbt.contains("Purpur.CompassBar")) { this.compassBar = nbt.getBoolean("Purpur.CompassBar"); } // Purpur
+ if (nbt.contains("Purpur.RamBar")) { this.ramBar = nbt.getBoolean("Purpur.RamBar"); } // Purpur
}

@Override
@@ -748,6 +750,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -746,6 +748,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
}

this.saveEnderPearls(nbt);
+ nbt.putBoolean("Purpur.RamBar", this.ramBar); // Purpur
nbt.putBoolean("Purpur.TPSBar", this.tpsBar); // Purpur
nbt.putBoolean("Purpur.CompassBar", this.compassBar); // Purpur
}
@@ -3477,5 +3480,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -3457,5 +3460,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
public void compassBar(boolean compassBar) {
this.compassBar = compassBar;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable block blast resistance


diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index 6b987ee220d94b482d2aeb4ff6bf271853605dc1..852bfe68ab722a5cbdd90dbd70501b751fe81a78 100644
index 6376b8b3ff444f4cab93e2bb5d2becc77c33c118..c8ae6e4cd74549f753ec04def5d882de1ab72308 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -91,7 +91,7 @@ public abstract class BlockBehaviour implements FeatureElement {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable block fall damage modifiers


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 3b19395f2ddee654a77df5738a1942a08c20c179..c130d316e87f1f896d33ab43831063a89e3bef2b 100644
index db79ef24ea01db5f619ab29700d3d391438fb742..54836f2a1e4cc9046ba29fb71ea237b358c9cb7d 100644
--- a/src/main/java/net/minecraft/world/level/block/BedBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java
@@ -183,7 +183,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
Expand All @@ -18,7 +18,7 @@ index 3b19395f2ddee654a77df5738a1942a08c20c179..c130d316e87f1f896d33ab43831063a8

@Override
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 d324eefa500c528776df698e7f9dcdeab76da167..1748aea6613e0c8081f70092c9431e7e04907383 100644
index b0fbadd0d6ec3e34e36c9f33ed89a3c315dc4289..91e68335d7007e3c1fe13eec0060db01c5f659ac 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -88,6 +88,10 @@ public class Block extends BlockBehaviour implements ItemLike {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Milk Keeps Beneficial Effects


diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 71f735d2c91d08ab652ddc8f3fe37bbb3b425ba4..f4604e543a980d6aeb485252da5a4e755aa12bfa 100644
index 239046ab467f499107d1e30ca183d79661a380f0..33fbe0f7a356dd847e546feffb468b2803c6744b 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1162,6 +1162,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Subject: [PATCH] Add an option to fix MC-3304 (projectile looting)


diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
index b7dccbf33feb978b3937522bb0d62d154699ae9f..d8b69ed256c18e264cffc0097936029e5bd33dd8 100644
index f4f2581faba3f8686592f3f8ebbcdba3e5d30f7b..2f56d25fe4dce613f078455bd0150c6140df7fff 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
@@ -80,6 +80,7 @@ public abstract class AbstractArrow extends Projectile {
@@ -82,6 +82,7 @@ public abstract class AbstractArrow extends Projectile {
public ItemStack pickupItemStack;
@Nullable
public ItemStack firedFromWeapon;
+ public net.minecraft.world.item.enchantment.ItemEnchantments actualEnchantments = net.minecraft.world.item.enchantment.ItemEnchantments.EMPTY; // Purpur - Add an option to fix MC-3304 projectile looting

// Spigot Start
@Override
@@ -623,6 +624,12 @@ public abstract class AbstractArrow extends Projectile {
@@ -638,6 +639,12 @@ public abstract class AbstractArrow extends Projectile {
return this.firedFromWeapon;
}

Expand All @@ -43,10 +43,10 @@ index 78ba170a83f8c026bd110eae494c52577182ed61..c2ae50872cead7202246b9cce4db6e0a
}

diff --git a/src/main/java/net/minecraft/world/item/TridentItem.java b/src/main/java/net/minecraft/world/item/TridentItem.java
index 9134c4aada4e0cd7b51810a59405c07d433f7c78..23e04d0d68ffa0e07ab295e7121f8a4963f4914a 100644
index 810082126567eb02bec395065b95b3c3902d4973..be32255c9bd90f7de3f8f5a62d84c7dcf59fa722 100644
--- a/src/main/java/net/minecraft/world/item/TridentItem.java
+++ b/src/main/java/net/minecraft/world/item/TridentItem.java
@@ -100,6 +100,9 @@ public class TridentItem extends Item implements ProjectileItem {
@@ -101,6 +101,9 @@ public class TridentItem extends Item implements ProjectileItem {
return false;
}
ThrownTrident entitythrowntrident = tridentDelayed.projectile(); // Paper - PlayerLaunchProjectileEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Fire Immunity API


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 2b612bfe6da7cc6d6447c60aa6f4b72b2616b72d..193c888d0ff2a8c2ef1a7fc8fd8af5d26e701092 100644
index 7435ff1996e0a6db2f98f1218bf7d2b73a3e2b1d..1832f7ef8a14fb60e004cb7b99a0cd0155332349 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -393,6 +393,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
Expand All @@ -16,7 +16,7 @@ index 2b612bfe6da7cc6d6447c60aa6f4b72b2616b72d..193c888d0ff2a8c2ef1a7fc8fd8af5d2

public void setOrigin(@javax.annotation.Nonnull Location location) {
this.origin = location.toVector();
@@ -1960,7 +1961,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1983,7 +1984,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}

public boolean fireImmune() {
Expand All @@ -25,7 +25,7 @@ index 2b612bfe6da7cc6d6447c60aa6f4b72b2616b72d..193c888d0ff2a8c2ef1a7fc8fd8af5d2
}

public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
@@ -2715,6 +2716,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2738,6 +2739,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
nbttagcompound.putBoolean("Paper.FreezeLock", true);
}
// Paper end
Expand All @@ -37,7 +37,7 @@ index 2b612bfe6da7cc6d6447c60aa6f4b72b2616b72d..193c888d0ff2a8c2ef1a7fc8fd8af5d2
return nbttagcompound;
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
@@ -2863,6 +2869,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2888,6 +2894,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
freezeLocked = nbt.getBoolean("Paper.FreezeLock");
}
// Paper end
Expand All @@ -50,7 +50,7 @@ index 2b612bfe6da7cc6d6447c60aa6f4b72b2616b72d..193c888d0ff2a8c2ef1a7fc8fd8af5d2
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 02b07d43364c7dec37f1d2adffe123a5b595f669..51aee9a468f4ebfa9672fd9ce84883cf080859e3 100644
index d4396ece618c0fec437ed915ce07be3fb5f7dca9..1290c1587fe9e39d9350c1079ab27f3be0c6084f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -88,6 +88,16 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to teleport to spawn on nether ceiling damage


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 193c888d0ff2a8c2ef1a7fc8fd8af5d26e701092..aa171a1afb9800e6ec84f6b4f1b28e44177752f7 100644
index 1832f7ef8a14fb60e004cb7b99a0cd0155332349..da7ffdf85907c92fe6c4c6a5ebe571ef4666fcb8 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1000,6 +1000,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1004,6 +1004,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
&& this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v)
&& (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
// Paper end - Configurable nether ceiling damage
Expand Down
Loading

0 comments on commit 2951510

Please sign in to comment.