geforkt von Mirrors/Paper
vine boom sound
Dieser Commit ist enthalten in:
Ursprung
bab0b3a7c3
Commit
aa1c25c88d
@ -4,6 +4,7 @@ Date: Fri, 16 Sep 2022 17:44:34 +0200
|
||||
Subject: [PATCH] Fix: EndDragonFight killed statuses should be false for newly
|
||||
created worlds
|
||||
|
||||
Do we need this
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index 230de1c71b0a6d6370df2fedb337cf0e332a7596..8cf4ae35eb66e69de32295d707db6845b4b02962 100644
|
@ -6,6 +6,8 @@ Subject: [PATCH] Set position before player sending on dimension change
|
||||
This causes a moment where the player entity is sent with the previous location, and the
|
||||
teleport packet which is sent shortly after is meant to correct that.
|
||||
|
||||
This was fixed in 1.19.4 iirc
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index b30972c3ab19795e26589cd0cdd54c43414fe368..c5dc769d13fbc2a88a731d42669d0906ee306e4b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
@ -3,6 +3,8 @@ From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
|
||||
Date: Mon, 3 Apr 2023 18:46:49 +0200
|
||||
Subject: [PATCH] Fix block place logic
|
||||
|
||||
TODO: what to do about dropped sign diff
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java
|
||||
index b0204af850ee182773ad458208cccd946ad148d5..ebee8de2ed831755b6fd154f6cc77ac993839bb9 100644
|
@ -5,7 +5,7 @@ Subject: [PATCH] cache resource keys
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index e4f2e1371e481201e4d8b471a8f6f87ba0604028..e4e4a282a10bde462af1e60aa6be992c636b9726 100644
|
||||
index 84d1351c423965acf79c1413d00eff9eaa3927a2..e0c2ad107847227987080491e94b264930fc80e2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -370,12 +370,13 @@ public class CraftBlock implements Block {
|
@ -5,12 +5,12 @@ Subject: [PATCH] Allow to change the podium for the EnderDragon
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index da1e60206f300d64f68f5aedeba52a164829676e..3f66986948d0b43a75454389b7ec8517e2d50899 100644
|
||||
index fada988941c33e09bce5e71bcb2bb733185f6c12..35681b380d22cb0ddeef2aec3553b9835c122aca 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -100,6 +100,10 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
private final int[] nodeAdjacency = new int[24];
|
||||
private final BinaryHeap openSet = new BinaryHeap();
|
||||
@@ -101,6 +101,10 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
private final int[] nodeAdjacency;
|
||||
private final BinaryHeap openSet;
|
||||
private final Explosion explosionSource; // CraftBukkit - reusable source for CraftTNTPrimed.getSource()
|
||||
+ // Paper start - add var for save custom podium
|
||||
+ @Nullable
|
||||
@ -19,7 +19,7 @@ index da1e60206f300d64f68f5aedeba52a164829676e..3f66986948d0b43a75454389b7ec8517
|
||||
|
||||
public EnderDragon(EntityType<? extends EnderDragon> entitytypes, Level world) {
|
||||
super(EntityType.ENDER_DRAGON, world);
|
||||
@@ -121,6 +125,19 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -141,6 +145,19 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 200.0D);
|
||||
}
|
||||
|
||||
@ -39,86 +39,86 @@ index da1e60206f300d64f68f5aedeba52a164829676e..3f66986948d0b43a75454389b7ec8517
|
||||
@Override
|
||||
public boolean isFlapping() {
|
||||
float f = Mth.cos(this.flapTime * 6.2831855F);
|
||||
@@ -969,7 +986,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -1002,7 +1019,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
d0 = segment2[1] - segment1[1];
|
||||
}
|
||||
} else {
|
||||
- BlockPos blockposition = this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION);
|
||||
+ BlockPos blockposition = this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium
|
||||
- BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.fightOrigin));
|
||||
+ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium
|
||||
double d1 = Math.max(Math.sqrt(blockposition.distToCenterSqr(this.position())) / 4.0D, 1.0D);
|
||||
|
||||
d0 = (double) segmentOffset / d1;
|
||||
@@ -996,7 +1013,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -1029,7 +1046,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
vec3d = this.getViewVector(tickDelta);
|
||||
}
|
||||
} else {
|
||||
- BlockPos blockposition = this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION);
|
||||
+ BlockPos blockposition = this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium
|
||||
- BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.fightOrigin));
|
||||
+ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium
|
||||
|
||||
f1 = Math.max((float) Math.sqrt(blockposition.distToCenterSqr(this.position())) / 4.0F, 1.0F);
|
||||
float f3 = 6.0F / f1;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java
|
||||
index a64ee433e34538ce2b52207b6183999ae611e5dd..0f78e1ab090bb1df7b863c90b3c7465a3ce28c8c 100644
|
||||
index f4028b6890fd094360a33403728588380111204d..0fddefff4a6ab46920fbc6f86c17c6c51027dc02 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java
|
||||
@@ -32,7 +32,7 @@ public class DragonDeathPhase extends AbstractDragonPhaseInstance {
|
||||
public void doServerTick() {
|
||||
++this.time;
|
||||
if (this.targetLocation == null) {
|
||||
- BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, EndPodiumFeature.END_PODIUM_LOCATION);
|
||||
+ BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, this.dragon.getPodium()); // Paper - use custom podium
|
||||
- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, EndPodiumFeature.getLocation(this.dragon.getFightOrigin()));
|
||||
+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, this.dragon.getPodium()); // Paper - use custom podium
|
||||
this.targetLocation = Vec3.atBottomCenterOf(blockPos);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java
|
||||
index adec9aec93d545941a3d592b54c5fe064cdb1437..77206aba171d063691b8f32afcebd570784d7da2 100644
|
||||
index 00228e49c07eeed13b726192d5f9b8f2fc55bb75..b8c928b8fd30ebe923785d7b03b2cab3b44e488f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java
|
||||
@@ -54,7 +54,7 @@ public class DragonHoldingPatternPhase extends AbstractDragonPhaseInstance {
|
||||
|
||||
private void findNewTarget() {
|
||||
if (this.currentPath != null && this.currentPath.isDone()) {
|
||||
- BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, new BlockPos(EndPodiumFeature.END_PODIUM_LOCATION));
|
||||
+ BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium
|
||||
- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, new BlockPos(EndPodiumFeature.getLocation(this.dragon.getFightOrigin())));
|
||||
+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium
|
||||
int i = this.dragon.getDragonFight() == null ? 0 : this.dragon.getDragonFight().getCrystalsAlive();
|
||||
if (this.dragon.getRandom().nextInt(i + 3) == 0) {
|
||||
this.dragon.getPhaseManager().setPhase(EnderDragonPhase.LANDING_APPROACH);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java
|
||||
index fdfdd42a30d752b11d18f2cefe84c1e9ddec41a2..5fca7c4e1d1d9da6f29ad70f1b5703c7f092d851 100644
|
||||
index 80647b1f5192e6f2b660a31413db1fa45fb92f2c..a9f184cbed518561b1534f4fe9bc731a134d9152 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java
|
||||
@@ -52,7 +52,7 @@ public class DragonLandingApproachPhase extends AbstractDragonPhaseInstance {
|
||||
private void findNewTarget() {
|
||||
if (this.currentPath == null || this.currentPath.isDone()) {
|
||||
int i = this.dragon.findClosestNode();
|
||||
- BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION);
|
||||
+ BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium
|
||||
Player player = this.dragon.level.getNearestPlayer(NEAR_EGG_TARGETING, this.dragon, (double)blockPos.getX(), (double)blockPos.getY(), (double)blockPos.getZ());
|
||||
- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin()));
|
||||
+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium
|
||||
Player player = this.dragon.level().getNearestPlayer(NEAR_EGG_TARGETING, this.dragon, (double)blockPos.getX(), (double)blockPos.getY(), (double)blockPos.getZ());
|
||||
int j;
|
||||
if (player != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java
|
||||
index ed29ba6c5c4f1380847564f07b5523cce77ab865..2948d58f9f90b353b86eb43f932ab0574b3415f7 100644
|
||||
index 48ebc2ab8ebbdc2292af10b955384bf7d722ade2..c1c71ff254ecb4a0cef3b8d7cc12f6cb34cad6d7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java
|
||||
@@ -39,7 +39,7 @@ public class DragonLandingPhase extends AbstractDragonPhaseInstance {
|
||||
@Override
|
||||
public void doServerTick() {
|
||||
if (this.targetLocation == null) {
|
||||
- this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION));
|
||||
+ this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium())); // Paper - use custom podium
|
||||
- this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())));
|
||||
+ this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium())); // Paper - use custom podium
|
||||
}
|
||||
|
||||
if (this.targetLocation.distanceToSqr(this.dragon.getX(), this.dragon.getY(), this.dragon.getZ()) < 1.0D) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java
|
||||
index 0ae65d0fa03d12486f48b0274b6e2d4eea169caf..ffe89d8c1f22f672d145fedb3bb102589dc31656 100644
|
||||
index 1290090f855840bf64bf3a7ba93e3cb036630dcc..98fb6422df0ceadff5aaf4b2965eb1b095a3370b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java
|
||||
@@ -24,7 +24,7 @@ public class DragonTakeoffPhase extends AbstractDragonPhaseInstance {
|
||||
@Override
|
||||
public void doServerTick() {
|
||||
if (!this.firstTick && this.currentPath != null) {
|
||||
- BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION);
|
||||
+ BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium
|
||||
- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin()));
|
||||
+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium
|
||||
if (!blockPos.closerToCenterThan(this.dragon.position(), 10.0D)) {
|
||||
this.dragon.getPhaseManager().setPhase(EnderDragonPhase.HOLDING_PATTERN);
|
||||
}
|
@ -9,10 +9,10 @@ is not a WorldGenRegion, we can bypass the deadlock entirely.
|
||||
See https://bugs.mojang.com/browse/MC-246262
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
|
||||
index 53ef0991be65d18c3f80030992726b462a7bd8a8..2e1e6ed5345ba4cb44f4b4a9b1d53398d69607e2 100644
|
||||
index 020e436f77f9f2de631727c00ccd41e9293b1f47..25872fc1e827ee1f736c121282585cacec532fb8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
|
||||
@@ -265,7 +265,11 @@ public class StructureTemplate {
|
||||
@@ -266,7 +266,11 @@ public class StructureTemplate {
|
||||
|
||||
if (definedstructure_blockinfo.nbt != null) {
|
||||
tileentity = world.getBlockEntity(blockposition2);
|
||||
@ -25,7 +25,7 @@ index 53ef0991be65d18c3f80030992726b462a7bd8a8..2e1e6ed5345ba4cb44f4b4a9b1d53398
|
||||
world.setBlock(blockposition2, Blocks.BARRIER.defaultBlockState(), 20);
|
||||
}
|
||||
|
||||
@@ -380,7 +384,11 @@ public class StructureTemplate {
|
||||
@@ -379,7 +383,11 @@ public class StructureTemplate {
|
||||
if (pair1.getSecond() != null) {
|
||||
tileentity = world.getBlockEntity(blockposition6);
|
||||
if (tileentity != null) {
|
@ -5,14 +5,14 @@ Subject: [PATCH] Prevent tile entity copies loading chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 2339f46f6a3d5c50179c78515d2bafba588f3aa0..0150f1935bfc7b97f72683699dc265ac8508a8fb 100644
|
||||
index 912c831ca4c52810ff16d4c8f4659d71347ddfa5..12f6305e15a4339d581c502586cd1ddfdd80c7c5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3309,7 +3309,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3307,7 +3307,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound);
|
||||
|
||||
if (this.player.level.isLoaded(blockposition)) {
|
||||
- BlockEntity tileentity = this.player.level.getBlockEntity(blockposition);
|
||||
if (this.player.level().isLoaded(blockposition)) {
|
||||
- BlockEntity tileentity = this.player.level().getBlockEntity(blockposition);
|
||||
+ // Paper start
|
||||
+ BlockEntity tileentity = null;
|
||||
+ if (this.player.distanceToSqr(blockposition.getX(), blockposition.getY(), blockposition.getZ()) < 32 * 32 && this.player.getLevel().isLoadedAndInBounds(blockposition)) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Use username instead of display name in
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index e64f806326a5400eab14e6ebe59901aa1ebea110..168c53eee5bbf84c11a0b0f654e4540e4d082c2a 100644
|
||||
index 833cd284175ed3a874f82b03698dcfd5c0a62ac1..f937dbd6a19b595e3660e598e52bf37f8cc72d13 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1423,7 +1423,7 @@ public abstract class PlayerList {
|
||||
@@ -1430,7 +1430,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start
|
||||
public ServerStatsCounter getPlayerStats(ServerPlayer entityhuman) {
|
||||
ServerStatsCounter serverstatisticmanager = entityhuman.getStats();
|
@ -7,7 +7,7 @@ Fixes MC-50647 by just checking if the spawn type is a SPAWNER
|
||||
and then bypassing the spawn check logic if on slimes if it is.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
index 3f367fb0b2f633024d27dc598738d6651a36f21b..c41c1c2712920c6b7d822cd0f37a5d8d725e4054 100644
|
||||
index 5aa702d68096af180340feb65a07856301b4f258..343433158507451152e5b2fc5e5fd0b0e6b229db 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
@@ -322,6 +322,11 @@ public class Slime extends Mob implements Enemy {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Pass ServerLevel for gamerule callbacks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 5b46cabf4f2e2a1f7feaad378dd98d64aeef8671..51b3db0b6c2cede95b584268e035c0fb36d38094 100644
|
||||
index 9951e999b1440ef623f14bdd46b5e42a90387f1e..91e6161449dc5625331e467d9e8375759686709e 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -304,7 +304,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -18,15 +18,15 @@ index 5b46cabf4f2e2a1f7feaad378dd98d64aeef8671..51b3db0b6c2cede95b584268e035c0fb
|
||||
|
||||
if (dedicatedserverproperties.enableQuery) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0150f1935bfc7b97f72683699dc265ac8508a8fb..aed804e2d146f608587efa31deefe65f84241bbe 100644
|
||||
index 12f6305e15a4339d581c502586cd1ddfdd80c7c5..4be069e435b63ad2ae4627235977915f7a5ca463 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2900,7 +2900,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2897,7 +2897,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH);
|
||||
if (this.server.isHardcore()) {
|
||||
this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper
|
||||
- ((GameRules.BooleanValue) this.player.getLevel().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.server);
|
||||
+ ((GameRules.BooleanValue) this.player.getLevel().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.player.getLevel()); // Paper
|
||||
- ((GameRules.BooleanValue) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.server);
|
||||
+ ((GameRules.BooleanValue) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.player.getLevel()); // Paper
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -158,10 +158,10 @@ index de713f1ca1d61a6b1fca2b66de9162556d102449..edd2c9d0cf5a81c779011cb4215d496a
|
||||
this.onChanged(server);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 9a0542c06ae30361ac6139bdf02d0464c8a53e7b..c13e5b79c0599a9809b6150cfe660fb11bd44cea 100644
|
||||
index 9cb7163a5a59c804de5ac4e9003f401ef058c86a..1ef6091e9e5b204a714d53a98c1e05bee5569e5c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1945,7 +1945,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1940,7 +1940,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
// Paper end
|
||||
GameRules.Value<?> handle = this.getHandle().getGameRules().getRule(CraftWorld.getGameRulesNMS().get(rule));
|
||||
handle.deserialize(event.getValue()); // Paper
|
||||
@ -170,7 +170,7 @@ index 9a0542c06ae30361ac6139bdf02d0464c8a53e7b..c13e5b79c0599a9809b6150cfe660fb1
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1985,7 +1985,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1980,7 +1980,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
// Paper end
|
||||
GameRules.Value<?> handle = this.getHandle().getGameRules().getRule(CraftWorld.getGameRulesNMS().get(rule.getName()));
|
||||
handle.deserialize(event.getValue()); // Paper
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add pre-unbreaking amount to PlayerItemDamageEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 8778b35890b36ff4c13704968f73934e53d7bd6b..ce51f1768275fab434d46b5aa349dfdd2b631977 100644
|
||||
index 3bd5338e66ee52d2ba5b89d050dd996dfc82ba7e..7c1f33082f84049544f958bfaa6552012b8cacd7 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -599,10 +599,11 @@ public final class ItemStack {
|
||||
@@ -607,10 +607,11 @@ public final class ItemStack {
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 2af02829a4b0096c2ef8b7b54a5dd9c37ad0f9a2..cc74d84ba7053163e4910ccac4b6763afa18c218 100644
|
||||
index c020acc1bcfe3471728c143862625463d7c82dd8..cabb66678afdad83341dd3b1a662cadeef4a4196 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1272,6 +1272,7 @@ public final class CraftServer implements Server {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Trigger bee_nest_destroyed trigger in the correct place
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 5461e6ff769be93054b3d8369a7aa286d1244875..161a810a8c4bd4c916c54df49c44c504130cb28e 100644
|
||||
index 34def52e9380a4587c5008f1d133a07e72621f56..0f0cf4fdfcbf8537696f15f98f3fb7e68baeb27c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -427,12 +427,16 @@ public class ServerPlayerGameMode {
|
||||
@@ -426,12 +426,16 @@ public class ServerPlayerGameMode {
|
||||
block.destroy(this.level, pos, iblockdata);
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ index 5461e6ff769be93054b3d8369a7aa286d1244875..161a810a8c4bd4c916c54df49c44c504
|
||||
|
||||
itemstack.mineBlock(this.level, iblockdata, pos, this.player);
|
||||
if (flag && flag1 && event.isDropItems()) { // CraftBukkit - Check if block should drop items
|
||||
@@ -453,6 +457,13 @@ public class ServerPlayerGameMode {
|
||||
@@ -452,6 +456,13 @@ public class ServerPlayerGameMode {
|
||||
if (flag && event != null) {
|
||||
iblockdata.getBlock().popExperience(this.level, pos, event.getExpToDrop(), this.player); // Paper
|
||||
}
|
||||
@ -40,7 +40,7 @@ index 5461e6ff769be93054b3d8369a7aa286d1244875..161a810a8c4bd4c916c54df49c44c504
|
||||
return true;
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
index bd58ae8bb1fcafa2c618f2b0b7825731188a3d65..ca6cf92b96d68ba8b34e90edda2a93e11214c91b 100644
|
||||
index 26f928ad94aed7f1078a31d8a0af2dc377a48d0f..01c8394c6e6b65f40db04280458d0191c116b845 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
@@ -88,7 +88,7 @@ public class BeehiveBlock extends BaseEntityBlock {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityDyeEvent and CollarColorable interface
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
index 9bcc1f4b60eebe77ffc2afaabd46629cb37cc8a0..51ca7668ebc0edf4254b7511bb0df0c2197bf859 100644
|
||||
index 770b15f5413eb38890587aa6af2a56f15bf5934f..438d7c26cc3a4a3b5a1affffbbe26e4d272b0c00 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
@@ -401,6 +401,13 @@ public class Cat extends TamableAnimal implements VariantHolder<CatVariant> {
|
||||
@ -23,20 +23,21 @@ index 9bcc1f4b60eebe77ffc2afaabd46629cb37cc8a0..51ca7668ebc0edf4254b7511bb0df0c2
|
||||
if (!player.getAbilities().instabuild) {
|
||||
itemstack.shrink(1);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
index b6c4f67c870831b8667c88f0c523714b5fdadad2..612601b2536dc522356d4dd2c2ea1192f6435f72 100644
|
||||
index 948978306db3bffd07d0c5d91cd4853102411061..27c4dd3605373f08078048fe923a8f6f4d3ccf3b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
@@ -392,6 +392,13 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
DyeColor enumcolor = ((DyeItem) item).getDyeColor();
|
||||
@@ -380,6 +380,14 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
DyeColor enumcolor = itemdye.getDyeColor();
|
||||
|
||||
if (enumcolor != this.getCollarColor()) {
|
||||
+ // Paper start
|
||||
+ final io.papermc.paper.event.entity.EntityDyeEvent event = new io.papermc.paper.event.entity.EntityDyeEvent(this.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData((byte) enumcolor.getId()), ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity());
|
||||
+ if (!event.callEvent()) {
|
||||
+ return InteractionResult.FAIL;
|
||||
+ }
|
||||
+ enumcolor = DyeColor.byId(event.getColor().getWoolData());
|
||||
+ // Paper end
|
||||
this.setCollarColor(enumcolor);
|
||||
if (!player.getAbilities().instabuild) {
|
||||
itemstack.shrink(1);
|
||||
if (enumcolor != this.getCollarColor()) {
|
||||
+ // Paper start
|
||||
+ final io.papermc.paper.event.entity.EntityDyeEvent event = new io.papermc.paper.event.entity.EntityDyeEvent(this.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData((byte) enumcolor.getId()), ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity());
|
||||
+ if (!event.callEvent()) {
|
||||
+ return InteractionResult.FAIL;
|
||||
+ }
|
||||
+ enumcolor = DyeColor.byId(event.getColor().getWoolData());
|
||||
+ // Paper end
|
||||
+
|
||||
this.setCollarColor(enumcolor);
|
||||
if (!player.getAbilities().instabuild) {
|
||||
itemstack.shrink(1);
|
@ -5,14 +5,14 @@ Subject: [PATCH] Add PlayerStopUsingItemEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index b30e52730a7dec78e425365975ba57aa4f371cfd..34ef66a6f0cfb2bb1435c7342b6261d31dd011ef 100644
|
||||
index c629e03d5281e566050ca22d2c3a16626f7a57cc..9ee16dc1f425e4f0795eec3dcc18affc70e85a31 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3934,6 +3934,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3967,6 +3967,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
public void releaseUsingItem() {
|
||||
if (!this.useItem.isEmpty()) {
|
||||
+ if (this instanceof ServerPlayer) new io.papermc.paper.event.player.PlayerStopUsingItemEvent((Player) getBukkitEntity(), useItem.asBukkitMirror(), getTicksUsingItem()).callEvent(); // Paper
|
||||
this.useItem.releaseUsing(this.level, this, this.getUseItemRemainingTicks());
|
||||
this.useItem.releaseUsing(this.level(), this, this.getUseItemRemainingTicks());
|
||||
if (this.useItem.useOnRelease()) {
|
||||
this.updatingUsingItem();
|
@ -5,7 +5,7 @@ Subject: [PATCH] FallingBlock auto expire setting
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index 02ea0298c6dc6ed3d4350e562c255e748ca141ae..536856300da929c101f50da5827677bada5feb50 100644
|
||||
index 4a44109df0aece6661567dac5ebf6355de5d58c7..eff81e846f696349b3bd3d26c02442f157b169f0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -64,6 +64,7 @@ public class FallingBlockEntity extends Entity {
|
||||
@ -19,38 +19,39 @@ index 02ea0298c6dc6ed3d4350e562c255e748ca141ae..536856300da929c101f50da5827677ba
|
||||
@@ -178,7 +179,7 @@ public class FallingBlockEntity extends Entity {
|
||||
}
|
||||
|
||||
if (!this.onGround && !flag1) {
|
||||
- if (!this.level.isClientSide && (this.time > 100 && (blockposition.getY() <= this.level.getMinBuildHeight() || blockposition.getY() > this.level.getMaxBuildHeight()) || this.time > 600)) {
|
||||
+ if (!this.level.isClientSide && ((this.time > 100 && autoExpire) && (blockposition.getY() <= this.level.getMinBuildHeight() || blockposition.getY() > this.level.getMaxBuildHeight()) || (this.time > 600 && autoExpire))) { // Paper - Auto expire setting
|
||||
if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||
if (!this.onGround() && !flag1) {
|
||||
- if (!this.level().isClientSide && (this.time > 100 && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || this.time > 600)) {
|
||||
+ if (!this.level().isClientSide && ((this.time > 100 && autoExpire) && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || (this.time > 600 && autoExpire))) { // Paper - Auto expire setting
|
||||
if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||
this.spawnAtLocation((ItemLike) block);
|
||||
}
|
||||
@@ -324,6 +325,7 @@ public class FallingBlockEntity extends Entity {
|
||||
if (this.blockData != null) {
|
||||
nbt.put("TileEntityData", this.blockData);
|
||||
@@ -326,6 +327,7 @@ public class FallingBlockEntity extends Entity {
|
||||
}
|
||||
+ if (!autoExpire) {nbt.putBoolean("Paper.AutoExpire", false);} // Paper - AutoExpire setting
|
||||
|
||||
nbt.putBoolean("CancelDrop", this.cancelDrop);
|
||||
+ if (!autoExpire) {nbt.putBoolean("Paper.AutoExpire", false);} // Paper - AutoExpire setting
|
||||
}
|
||||
|
||||
@@ -358,6 +360,10 @@ public class FallingBlockEntity extends Entity {
|
||||
int srcZ = nbt.getInt("SourceLoc_z");
|
||||
@Override
|
||||
@@ -361,6 +363,11 @@ public class FallingBlockEntity extends Entity {
|
||||
this.setOrigin(new org.bukkit.Location(this.level().getWorld(), srcX, srcY, srcZ));
|
||||
}
|
||||
+
|
||||
+ if (nbt.contains("Paper.AutoExpire")) {
|
||||
+ this.autoExpire = nbt.getBoolean("Paper.AutoExpire");
|
||||
+ }
|
||||
// Paper end
|
||||
+ // Paper start
|
||||
+ if (nbt.contains("Paper.AutoExpire")) {
|
||||
+ this.autoExpire = nbt.getBoolean("Paper.AutoExpire");
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
public void setHurtsEntities(float fallHurtAmount, int fallHurtMax) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
||||
index 4a4fe85abb4ddd62e04f348e5be8b98ca4d4fbdc..05778023c3b2809c52c148efdfc8677dcc087a7b 100644
|
||||
index 4a4fe85abb4ddd62e04f348e5be8b98ca4d4fbdc..e99314b905a7ed54ceeb156ed92ff1a5793df99a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
||||
@@ -59,6 +59,17 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock {
|
||||
public void setHurtEntities(boolean hurtEntities) {
|
||||
this.getHandle().hurtEntities = hurtEntities;
|
||||
@@ -97,4 +97,15 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock {
|
||||
this.setHurtEntities(true);
|
||||
}
|
||||
}
|
||||
+ // Paper Start - Auto expire setting
|
||||
+ @Override
|
||||
@ -63,6 +64,4 @@ index 4a4fe85abb4ddd62e04f348e5be8b98ca4d4fbdc..05778023c3b2809c52c148efdfc8677d
|
||||
+ this.getHandle().autoExpire = autoExpires;
|
||||
+ }
|
||||
+ // Paper End - Auto expire setting
|
||||
|
||||
@Override
|
||||
public void setTicksLived(int value) {
|
||||
}
|
@ -23,10 +23,10 @@ index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5f43aedc6596e2b1ac7af97115157147
|
||||
}
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 66b1ef69fe48340b5ccebd845b39f898515ff117..5180516d53030602c4516248703144b3f4047614 100644
|
||||
index b89544fdfceee67fb452c37294131efca007e2fe..2737bd5f1915466a73dd4e093e35301c4353ddea 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2497,6 +2497,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2566,6 +2566,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public void onTickingStart(Entity entity) {
|
||||
@ -35,7 +35,7 @@ index 66b1ef69fe48340b5ccebd845b39f898515ff117..5180516d53030602c4516248703144b3
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index f158fc8a151272428a33dc5f6e1742876edc80d5..52780192d6417f8085566e4cdf3a895a83638520 100644
|
||||
index d0092fa0595bcf3876dec4ef58516089ac99bb26..d4da9ec6e00bb92b70598ee9a0d0ca5816562378 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -212,7 +212,8 @@ public class ActivationRange
|
@ -5,13 +5,13 @@ Subject: [PATCH] Do not accept invalid client settings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index aed804e2d146f608587efa31deefe65f84241bbe..37ad18b6d2a1c537b1cb3d622b6bae2f8100445c 100644
|
||||
index 4be069e435b63ad2ae4627235977915f7a5ca463..d73563cf84a4d6d7a369dde56b670b9010edfac2 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3488,6 +3488,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3449,6 +3449,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@Override
|
||||
public void handleClientInformation(ServerboundClientInformationPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
+ // Paper start - do not accept invalid information
|
||||
+ if (packet.viewDistance() < 0) {
|
||||
+ LOGGER.warn("Disconnecting " + this.player.getScoreboardName() + " for invalid view distance: " + packet.viewDistance());
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add support for Proxy Protocol
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 1cd32d28475b3130b02ad39b9f53aa7074792556..9cf389defdaeb887e9cad4f0fed3f3b95667b238 100644
|
||||
index e1e8f7c42f5e68da25b11c4cfadd67425395e558..7a17e05b630517a6861c34a4561198db62acf82a 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -20,6 +20,7 @@ dependencies {
|
||||
@ -17,10 +17,10 @@ index 1cd32d28475b3130b02ad39b9f53aa7074792556..9cf389defdaeb887e9cad4f0fed3f3b9
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
index 2beddfc0532c3835d50724551e3d46cb0d7d2290..44d99e89226adb6234b9405f25ac9dab9bd84297 100644
|
||||
index 17f42a4097d9c91bae2ccb02365498a0f7c7f8f8..0f578e870f2bed207a8650a31e89b3672ae8a57b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
@@ -108,6 +108,12 @@ public class ServerConnectionListener {
|
||||
@@ -106,6 +106,12 @@ public class ServerConnectionListener {
|
||||
ServerConnectionListener.LOGGER.info("Paper: Using " + com.velocitypowered.natives.util.Natives.cipher.getLoadedVariant() + " cipher from Velocity.");
|
||||
// Paper end
|
||||
|
||||
@ -33,7 +33,7 @@ index 2beddfc0532c3835d50724551e3d46cb0d7d2290..44d99e89226adb6234b9405f25ac9dab
|
||||
this.channels.add(((ServerBootstrap) ((ServerBootstrap) (new ServerBootstrap()).channel(oclass)).childHandler(new ChannelInitializer<Channel>() {
|
||||
protected void initChannel(Channel channel) {
|
||||
try {
|
||||
@@ -123,6 +129,30 @@ public class ServerConnectionListener {
|
||||
@@ -120,6 +126,30 @@ public class ServerConnectionListener {
|
||||
int j = ServerConnectionListener.this.server.getRateLimitPacketsPerSecond();
|
||||
Connection object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND); // CraftBukkit - decompile error
|
||||
|
@ -18,10 +18,10 @@ index d79284a790569141c2ac8178d6ecc20b17cdd0d3..3944852921335c78a04a9dc301882ab5
|
||||
|
||||
public static ClientboundBlockEntityDataPacket create(BlockEntity blockEntity) {
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||
index 40a42a632540d497c1393b112731c41c6e448228..f3fa2678796c33f3a408a02a1995ad117eac9169 100644
|
||||
index 0ef3e9b472e35bd2572b04722781abf7d4a1094b..bd439aef96aeecb9c72b5f50d748d231cccbc970 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||
@@ -183,6 +183,7 @@ public class ClientboundLevelChunkPacketData {
|
||||
@@ -170,6 +170,7 @@ public class ClientboundLevelChunkPacketData {
|
||||
CompoundTag compoundTag = blockEntity.getUpdateTag();
|
||||
BlockPos blockPos = blockEntity.getBlockPos();
|
||||
int i = SectionPos.sectionRelative(blockPos.getX()) << 4 | SectionPos.sectionRelative(blockPos.getZ());
|
||||
@ -30,10 +30,10 @@ index 40a42a632540d497c1393b112731c41c6e448228..f3fa2678796c33f3a408a02a1995ad11
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index 52a5b7c20dda9ad18cdeb70952e7385b0966b161..585d1d1f4b1b212295da36e31ae2670b0d2b06c3 100644
|
||||
index e3557f4c8cee7c88b3e352cd246078da7762effc..5bdad1866386908b9fef74d15862eb107fabe68f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -254,4 +254,12 @@ public abstract class BlockEntity {
|
||||
@@ -253,4 +253,12 @@ public abstract class BlockEntity {
|
||||
return null;
|
||||
}
|
||||
// CraftBukkit end
|
@ -5,19 +5,19 @@ Subject: [PATCH] Prevent entity loading causing async lookups
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 507db20f8622d8f26063150ded79e767e61be553..51176c3fbb00854ffd85ebf5f4fd4e439afa0ad8 100644
|
||||
index 4deb28538dafced0241c3f8031668b5cc6f24c8d..af3cdef67ca516cfe85dea7580b3e93554350115 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -790,6 +790,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -763,6 +763,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
public void baseTick() {
|
||||
this.level.getProfiler().push("entityBaseTick");
|
||||
this.level().getProfiler().push("entityBaseTick");
|
||||
+ if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking
|
||||
this.feetBlockState = null;
|
||||
if (this.isPassenger() && this.getVehicle().isRemoved()) {
|
||||
this.stopRiding();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/NeutralMob.java b/src/main/java/net/minecraft/world/entity/NeutralMob.java
|
||||
index dedf76de5d6f46b9626ca4a98cfffe125b90dd0c..7dac62b6370dae3ad6d098857c3136d5acf2bd74 100644
|
||||
index fa64c7baa7587f2cfe80b78ed83be011239618cf..55defe4f42bea4600a4e2b93c88e90231e61f6ef 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/NeutralMob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/NeutralMob.java
|
||||
@@ -42,18 +42,11 @@ public interface NeutralMob {
|
@ -7,7 +7,7 @@ There are no plans to support creating worlds while worlds are
|
||||
being ticked themselvess.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 3e59620c84b3aa93d8ce41b0e9901a1621bb48df..682005e4b19ba3959d4e3a66475487daf534a003 100644
|
||||
index d373a5f20b017efdb9c339541b124009e07616c8..37441421a50867eeecf5cf3aed3e7096c526d7ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -312,6 +312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -18,7 +18,7 @@ index 3e59620c84b3aa93d8ce41b0e9901a1621bb48df..682005e4b19ba3959d4e3a66475487da
|
||||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
@@ -1486,7 +1487,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1485,7 +1486,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getFunctions().tick();
|
||||
MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper
|
||||
this.profiler.popPush("levels");
|
||||
@ -27,7 +27,7 @@ index 3e59620c84b3aa93d8ce41b0e9901a1621bb48df..682005e4b19ba3959d4e3a66475487da
|
||||
|
||||
// CraftBukkit start
|
||||
// Run tasks that are waiting on processing
|
||||
@@ -1518,6 +1519,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1517,6 +1518,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end
|
||||
MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
|
||||
|
||||
@ -36,7 +36,7 @@ index 3e59620c84b3aa93d8ce41b0e9901a1621bb48df..682005e4b19ba3959d4e3a66475487da
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
||||
@@ -1564,6 +1567,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1563,6 +1566,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.profiler.pop();
|
||||
worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
|
||||
}
|
||||
@ -45,7 +45,7 @@ index 3e59620c84b3aa93d8ce41b0e9901a1621bb48df..682005e4b19ba3959d4e3a66475487da
|
||||
this.profiler.popPush("connection");
|
||||
MinecraftTimings.connectionTimer.startTiming(); // Spigot
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index cc74d84ba7053163e4910ccac4b6763afa18c218..03084affd2f7cadb06d038569374e16c2d13686f 100644
|
||||
index cabb66678afdad83341dd3b1a662cadeef4a4196..dcf7fac3a5619afde34aa22cbc6077579b60eb09 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -868,6 +868,11 @@ public final class CraftServer implements Server {
|
@ -2008,10 +2008,10 @@ index 0000000000000000000000000000000000000000..33cd90c30c22200a4e1ae64f40a0bf78
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 5180516d53030602c4516248703144b3f4047614..08d3d6d5f21326f1b94f2990de702b638e4759cc 100644
|
||||
index 2737bd5f1915466a73dd4e093e35301c4353ddea..4e2b2223c90f1e994dcd584dfa570953caf37a55 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -219,6 +219,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final UUID uuid;
|
||||
public boolean hasPhysicsEvent = true; // Paper
|
||||
public boolean hasEntityMoveEvent = false; // Paper
|
||||
@ -2019,8 +2019,8 @@ index 5180516d53030602c4516248703144b3f4047614..08d3d6d5f21326f1b94f2990de702b63
|
||||
public static Throwable getAddToWorldStackTrace(Entity entity) {
|
||||
final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date());
|
||||
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr);
|
||||
@@ -2486,6 +2487,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return this.server.getWorldData().enabledFeatures();
|
||||
@@ -2555,6 +2556,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return this.randomSequences;
|
||||
}
|
||||
|
||||
+ // Paper start - optimize redstone (Alternate Current)
|
||||
@ -2034,10 +2034,10 @@ index 5180516d53030602c4516248703144b3f4047614..08d3d6d5f21326f1b94f2990de702b63
|
||||
|
||||
EntityCallbacks() {}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index a84f039390afe11d96b24a5c82312e1888311ec9..4ace5a32e8d17303a4b5d9e8935a803d7c0df409 100644
|
||||
index 799d31874be8a7498e71e7e01f84aa81a7f1eed4..01e420715d47b5531ede82139133a9bb59c25955 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1532,4 +1532,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1454,4 +1454,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return ret;
|
||||
}
|
||||
// Paper end
|
||||
@ -2054,7 +2054,7 @@ index a84f039390afe11d96b24a5c82312e1888311ec9..4ace5a32e8d17303a4b5d9e8935a803d
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
index 004894157f732046e89f124872da86c79af1676f..5ea09cc455bd86beb450f0e0275d7c6c8da98084 100644
|
||||
index 1926daed1749e3481861f85f57612fe74450191b..70544dac18381ab3fa8ddfa7d276a4ef03f9b191 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
@@ -252,7 +252,7 @@ public class RedStoneWireBlock extends Block {
|
@ -18,10 +18,10 @@ index 02abc5f387d781094bd2f39233444add3a470be1..ece82743df21f0b776382821ad75dee9
|
||||
if (bl) {
|
||||
int j = this.angerByUuid.removeInt(entity.getUUID());
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
index 2ac6e1e2c8d30ac21f97f6399f68c9b028488b2d..b2b63d9df3c07696f47281e9be74f1799f50b93e 100644
|
||||
index 64d3467322e6db1fc223ded9d4d1b26bc628b4e1..0b274c3937daf274c78d8d5854f740bbcadfb385 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
@@ -495,6 +495,15 @@ public class Warden extends Monster implements VibrationListener.VibrationListen
|
||||
@@ -486,6 +486,15 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
@VisibleForTesting
|
||||
public void increaseAngerAt(@Nullable Entity entity, int amount, boolean listening) {
|
||||
if (!this.isNoAi() && this.canTargetEntity(entity)) {
|
@ -11,19 +11,20 @@ distance trigger. This adds a config option to ignore that
|
||||
and use the exact dimension key of the worlds involved.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 212d61f1c0b9d7039595ec098b7e7d99a898bc4e..b30972c3ab19795e26589cd0cdd54c43414fe368 100644
|
||||
index 72da912363681685809aa04cf35f1e5a8f8b93a8..0e8e1f74a041dc500bb07d3e5e97ff134882fb59 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1273,6 +1273,12 @@ public class ServerPlayer extends Player {
|
||||
@@ -1314,7 +1314,12 @@ public class ServerPlayer extends Player {
|
||||
// CraftBukkit start
|
||||
ResourceKey<Level> maindimensionkey = CraftDimensionUtil.getMainDimensionKey(origin);
|
||||
ResourceKey<Level> maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level);
|
||||
ResourceKey<Level> maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level());
|
||||
-
|
||||
+ // Paper start - config for strict advancement checks for dimensions
|
||||
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.strictAdvancementDimensionCheck) {
|
||||
+ maindimensionkey = resourcekey;
|
||||
+ maindimensionkey1 = resourcekey1;
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
CriteriaTriggers.CHANGED_DIMENSION.trigger(this, maindimensionkey, maindimensionkey1);
|
||||
if (maindimensionkey != resourcekey || maindimensionkey1 != resourcekey1) {
|
||||
CriteriaTriggers.CHANGED_DIMENSION.trigger(this, resourcekey, resourcekey1);
|
@ -8,7 +8,7 @@ in command blocks, and if called asynchronously, would throw
|
||||
an error
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
|
||||
index 7c7e5f3c0f9cd1f16192a8fc8163da9b2d9519d5..888936385196a178ab8b730fd5e4fff4a5466428 100644
|
||||
index c138678fe82e6c1dd7ce634f90bcbfcad6159276..fdf1ee8504afc820df96eed0941eb3f1cd9ba392 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
|
||||
@@ -172,6 +172,7 @@ public abstract class BaseCommandBlock implements CommandSource {
|
||||
@ -20,10 +20,10 @@ index 7c7e5f3c0f9cd1f16192a8fc8163da9b2d9519d5..888936385196a178ab8b730fd5e4fff4
|
||||
Date date = new Date();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 03084affd2f7cadb06d038569374e16c2d13686f..06cd518e7ca037ed6f347c2666b3a252306368a9 100644
|
||||
index dcf7fac3a5619afde34aa22cbc6077579b60eb09..a28da8addf6c06d6c80d9a6a8bd9617808ba7de6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1791,7 +1791,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1789,7 +1789,7 @@ public final class CraftServer implements Server {
|
||||
// Paper end
|
||||
Set<CommandSender> recipients = new HashSet<>();
|
||||
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
@ -7,10 +7,10 @@ The previous solution caused a bunch of bandaid fixes inorder to resolve edge ca
|
||||
Just simply prevent them from being added to the world instead.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 08d3d6d5f21326f1b94f2990de702b638e4759cc..131a7ff0847272b2f9fecf62d0d28ca014689f5b 100644
|
||||
index 4e2b2223c90f1e994dcd584dfa570953caf37a55..6369fba72d7bf2db00f7df064242561681f35a41 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1503,6 +1503,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1564,6 +1564,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||
return false;
|
||||
} else {
|
||||
@ -19,10 +19,10 @@ index 08d3d6d5f21326f1b94f2990de702b638e4759cc..131a7ff0847272b2f9fecf62d0d28ca0
|
||||
if (captureDrops != null && entity instanceof net.minecraft.world.entity.item.ItemEntity) {
|
||||
captureDrops.add((net.minecraft.world.entity.item.ItemEntity) entity);
|
||||
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 d9d50c2658aa3db77948e051d068876d2f5042e6..8a757e6682fb7a58bfd76290bd79ee3cc3dc27b9 100644
|
||||
index 998fe14ef28aaaf9246a05d8670c4caa8306c4d1..310a24c1d79541311cfad43fa2bb14867128e7b9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -511,7 +511,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -515,7 +515,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
}
|
||||
|
||||
public void setItem(ItemStack stack) {
|
||||
@ -30,4 +30,4 @@ index d9d50c2658aa3db77948e051d068876d2f5042e6..8a757e6682fb7a58bfd76290bd79ee3c
|
||||
+ // com.google.common.base.Preconditions.checkArgument(!stack.isEmpty(), "Cannot drop air"); // CraftBukkit // Paper - Remove check
|
||||
this.getEntityData().set(ItemEntity.DATA_ITEM, stack);
|
||||
this.getEntityData().markDirty(ItemEntity.DATA_ITEM); // CraftBukkit - SPIGOT-4591, must mark dirty
|
||||
this.despawnRate = level.paperConfig().entities.spawning.altItemDespawnRate.enabled ? level.paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), level.spigotConfig.itemDespawnRate) : level.spigotConfig.itemDespawnRate; // Paper
|
||||
this.despawnRate = this.level().paperConfig().entities.spawning.altItemDespawnRate.enabled ? this.level().paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), this.level().spigotConfig.itemDespawnRate) : this.level().spigotConfig.itemDespawnRate; // Paper
|
@ -5,12 +5,12 @@ Subject: [PATCH] Don't print component in resource pack rejection message
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 2a4c4180a8ac2f3b2cbb75dc2095ff62bfb3289e..735e16fc2ad7a17accde96c51231dd4bbce109ed 100644
|
||||
index d73563cf84a4d6d7a369dde56b670b9010edfac2..fdc03edbdc404d2e6836a5df498f9ebb709675b0 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2034,7 +2034,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2031,7 +2031,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
public void handleResourcePackResponse(ServerboundResourcePackPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) {
|
||||
- ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName());
|
||||
+ ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getGameProfile().getName()); // Paper - Don't print component in resource pack rejection message
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add Player#getFishHook
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 86b5532b3be5484c68152a777b976bc44008b0df..7a2a73edc13930f34eb11d9d0802ae9ec5cd8d40 100644
|
||||
index 48efd9277d9010df1206ccfac9623d66d8046825..640c76717ebf97a286edd1da0a785e8f3a0b8b3b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -161,6 +161,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
@ -15,10 +15,10 @@ to account for the case where the chunk is _not_ currently loaded
|
||||
and then later loaded.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java b/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java
|
||||
index 1977fde5e9b18406389dfb7374ecf4784f362233..7ee6e2dfb3441c992f4206f5bb8389733cea9dfc 100644
|
||||
index e64435c1dfbaf182d2292a1123701033f817ec38..d368ba29fec49a989be1cacd2422599d6d613c29 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java
|
||||
@@ -66,7 +66,7 @@ public class DynamicGameEventListener<T extends GameEventListener> {
|
||||
@@ -48,7 +48,7 @@ public class DynamicGameEventListener<T extends GameEventListener> {
|
||||
|
||||
private static void ifChunkExists(LevelReader world, @Nullable SectionPos sectionPos, Consumer<GameEventListenerRegistry> dispatcherConsumer) {
|
||||
if (sectionPos != null) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add various missing EntityDropItemEvent calls
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 51176c3fbb00854ffd85ebf5f4fd4e439afa0ad8..95ff9415fea96e1525c97a185e7890b5f3c70fad 100644
|
||||
index af3cdef67ca516cfe85dea7580b3e93554350115..8fef49ba8a46e4490356efdc9dd4ae8ca255421a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2558,6 +2558,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2644,6 +2644,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
|
||||
|
||||
entityitem.setDefaultPickUpDelay();
|
||||
@ -24,48 +24,48 @@ index 51176c3fbb00854ffd85ebf5f4fd4e439afa0ad8..95ff9415fea96e1525c97a185e7890b5
|
||||
EntityDropItemEvent event = new EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
index 40ed36e2dca56d196ee3a78df762f35b41b2f5dc..e93abb02744b5cd8db88e01b6ccf145498903b11 100644
|
||||
index 5c260a56b1df66069aec59726d61ef382ae29faa..501e6cb4aa83f81c1f657e41f4e7f11d19d46831 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
@@ -593,7 +593,7 @@ public class Dolphin extends WaterAnimal {
|
||||
float f2 = 0.02F * Dolphin.this.random.nextFloat();
|
||||
|
||||
entityitem.setDeltaMovement((double) (0.3F * -Mth.sin(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.cos(f1) * f2), (double) (0.3F * Mth.sin(Dolphin.this.getXRot() * 0.017453292F) * 1.5F), (double) (0.3F * Mth.cos(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.sin(f1) * f2));
|
||||
- Dolphin.this.level.addFreshEntity(entityitem);
|
||||
- Dolphin.this.level().addFreshEntity(entityitem);
|
||||
+ Dolphin.this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
index 73510697455d891af6858b9a8ad8ca0c9b74880f..3f9b8873afb22fcf4f741297e77b197899c088f5 100644
|
||||
index 1526ca0063da0962ae781b7aa877d8cf5e1ffd73..167f142d6960867320b90d61db312ebf23e24a48 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
@@ -503,14 +503,14 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
||||
entityitem.setPickUpDelay(40);
|
||||
entityitem.setThrower(this.getUUID());
|
||||
this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F);
|
||||
- this.level.addFreshEntity(entityitem);
|
||||
- this.level().addFreshEntity(entityitem);
|
||||
+ this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent
|
||||
}
|
||||
}
|
||||
|
||||
private void dropItemStack(ItemStack stack) {
|
||||
ItemEntity entityitem = new ItemEntity(this.level, this.getX(), this.getY(), this.getZ(), stack);
|
||||
ItemEntity entityitem = new ItemEntity(this.level(), this.getX(), this.getY(), this.getZ(), stack);
|
||||
|
||||
- this.level.addFreshEntity(entityitem);
|
||||
- this.level().addFreshEntity(entityitem);
|
||||
+ this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
index a0a34f5db4260d77325cfbba9c736726a8f5a5db..db533f458357683b8f3925d628ff1197144f67eb 100644
|
||||
index 316823ea978b9c9b6656a01254c201fdd8c11797..c2111491642dfa29bb85027e137b1a19e3d2d9e6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
@@ -354,8 +354,7 @@ public class Goat extends Animal {
|
||||
double d2 = (double) Mth.randomBetween(this.random, -0.2F, 0.2F);
|
||||
ItemEntity entityitem = new ItemEntity(this.level, vec3d.x(), vec3d.y(), vec3d.z(), itemstack, d0, d1, d2);
|
||||
ItemEntity entityitem = new ItemEntity(this.level(), vec3d.x(), vec3d.y(), vec3d.z(), itemstack, d0, d1, d2);
|
||||
|
||||
- this.level.addFreshEntity(entityitem);
|
||||
- this.level().addFreshEntity(entityitem);
|
||||
- return true;
|
||||
+ return this.spawnAtLocation(entityitem) != null; // Paper - call EntityDropItemEvent by calling spawnAtLocation.
|
||||
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add some minimal debug information to chat packet errors
|
||||
TODO: potentially add some kick leeway
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 27adfbd9c8333cd87b7a38fbbfa31e50ae3f105c..a522600f96e696561dc26d8154dd5072963935db 100644
|
||||
index fdc03edbdc404d2e6836a5df498f9ebb709675b0..aa0b2dd0b3be942d1d2ffed08228afb98b7c91f4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2292,7 +2292,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2289,7 +2289,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
|
||||
if (!this.updateChatOrder(timestamp)) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Bee flower NPE
|
||||
|
||||
|
||||
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 728ddf4399faafd68e9dcc3a14850a039d1a3e4f..a7ccbe4d32e9ea481447b6813efb8a56a529b6bd 100644
|
||||
index c2f56c44e824e3d4f169691b557483a4f0f5b3c6..ea4ca82388f1526fc5af01f6cc406306d79b7499 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -800,7 +800,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -799,7 +799,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
++this.pollinatingTicks;
|
||||
if (this.pollinatingTicks > 600) {
|
||||
Bee.this.savedFlowerPos = null;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a522600f96e696561dc26d8154dd5072963935db..99fe650529e267f8026c5019eab0295b2cddfc53 100644
|
||||
index aa0b2dd0b3be942d1d2ffed08228afb98b7c91f4..791f04d75f4d942bc0ef8d04ef4a401161acdc1c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2539,7 +2539,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2536,7 +2536,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
// Spigot end
|
||||
// this.chatSpamTickCount += 20;
|
@ -7,10 +7,10 @@ Subject: [PATCH] More Teleport API
|
||||
public net.minecraft.server.network.ServerGamePacketListenerImpl internalTeleport(DDDFFLjava/util/Set;Z)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 99fe650529e267f8026c5019eab0295b2cddfc53..f67ce080d9d9e3786009ec86eb9dda658c7b6a30 100644
|
||||
index 791f04d75f4d942bc0ef8d04ef4a401161acdc1c..d74d9493bb6fd4677aa3244b4b1b26d02f6b5b86 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1710,11 +1710,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1707,11 +1707,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return false; // CraftBukkit - Return event status
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ index 99fe650529e267f8026c5019eab0295b2cddfc53..f67ce080d9d9e3786009ec86eb9dda65
|
||||
d0 = to.getX();
|
||||
d1 = to.getY();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 6478faa20adea00349600620c2ab7d559e2fc3b7..52f8a76832b05061dc80381220c866316d4a089d 100644
|
||||
index c6fc526db6943f6466d6504feff63715e35a0eb2..f04c50a76f3589181dd4502d630a93c4dff3a95a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -561,15 +561,36 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@ -74,10 +74,10 @@ index 6478faa20adea00349600620c2ab7d559e2fc3b7..52f8a76832b05061dc80381220c86631
|
||||
// Let the server handle cross world teleports
|
||||
if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 5a51b19345670ab9590f9ee2a9668d5f9fd010fe..5098dc4f380dca3d4a32cbd201e4c925d2504d9a 100644
|
||||
index 6b61a80407cc5ba580d7c95e5bf2146d177b1b4a..ce83330c4ebd81247f2b4c4f2693265810237d7a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1260,13 +1260,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1233,13 +1233,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void setRotation(float yaw, float pitch) {
|
||||
@ -179,7 +179,7 @@ index 5a51b19345670ab9590f9ee2a9668d5f9fd010fe..5098dc4f380dca3d4a32cbd201e4c925
|
||||
location.checkFinite();
|
||||
|
||||
ServerPlayer entity = this.getHandle();
|
||||
@@ -1279,7 +1366,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1252,7 +1339,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ index 5a51b19345670ab9590f9ee2a9668d5f9fd010fe..5098dc4f380dca3d4a32cbd201e4c925
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1297,7 +1384,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1270,7 +1357,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
// If this player is riding another entity, we must dismount before teleporting.
|
||||
@ -197,7 +197,7 @@ index 5a51b19345670ab9590f9ee2a9668d5f9fd010fe..5098dc4f380dca3d4a32cbd201e4c925
|
||||
|
||||
// SPIGOT-5509: Wakeup, similar to riding
|
||||
if (this.isSleeping()) {
|
||||
@@ -1313,13 +1400,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1286,13 +1373,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle();
|
||||
|
||||
// Close any foreign inventory
|
@ -5,12 +5,12 @@ Subject: [PATCH] Add EntityPortalReadyEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 95ff9415fea96e1525c97a185e7890b5f3c70fad..239ace465b2911c0026649e6dd8d9168d9e39845 100644
|
||||
index 8fef49ba8a46e4490356efdc9dd4ae8ca255421a..9ed5882c09e241eaeae258ae15d013d5da98376f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2913,6 +2913,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3000,6 +3000,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
|
||||
this.level.getProfiler().push("portal");
|
||||
this.level().getProfiler().push("portal");
|
||||
this.portalTime = i;
|
||||
+ // Paper start
|
||||
+ io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER);
|
||||
@ -22,11 +22,11 @@ index 95ff9415fea96e1525c97a185e7890b5f3c70fad..239ace465b2911c0026649e6dd8d9168
|
||||
this.setPortalCooldown();
|
||||
// CraftBukkit start
|
||||
if (this instanceof ServerPlayer) {
|
||||
@@ -2920,6 +2927,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3007,6 +3014,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
} else {
|
||||
this.changeDimension(worldserver1);
|
||||
}
|
||||
+ } // Paper
|
||||
// CraftBukkit end
|
||||
this.level.getProfiler().pop();
|
||||
this.level().getProfiler().pop();
|
||||
}
|
@ -9,29 +9,29 @@ should be supported. Some entities (for whatever
|
||||
reason) use the level's random in some places.
|
||||
|
||||
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 a7ccbe4d32e9ea481447b6813efb8a56a529b6bd..c33e5c51839c8e6ec04c1b302127d2bf0f48664c 100644
|
||||
index ea4ca82388f1526fc5af01f6cc406306d79b7499..f6062bf8c888baeb7b421150a2c64bf1af1a312b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -1026,7 +1026,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -1025,7 +1025,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
|
||||
BeeGoToHiveGoal() {
|
||||
super();
|
||||
- this.travellingTicks = Bee.this.level.random.nextInt(10);
|
||||
+ this.travellingTicks = Bee.this./* level. */random.nextInt(10); // Paper - use entity random
|
||||
- this.travellingTicks = Bee.this.level().random.nextInt(10);
|
||||
+ this.travellingTicks = Bee.this./* level(). */random.nextInt(10); // Paper - use entity random
|
||||
this.blacklistedTargets = Lists.newArrayList();
|
||||
this.setFlags(EnumSet.of(Goal.Flag.MOVE));
|
||||
}
|
||||
@@ -1143,7 +1143,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -1142,7 +1142,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
|
||||
BeeGoToKnownFlowerGoal() {
|
||||
super();
|
||||
- this.travellingTicks = Bee.this.level.random.nextInt(10);
|
||||
+ this.travellingTicks = Bee.this./* level. */random.nextInt(10); // Paper - use entity random
|
||||
- this.travellingTicks = Bee.this.level().random.nextInt(10);
|
||||
+ this.travellingTicks = Bee.this./* level(). */random.nextInt(10); // Paper - use entity random
|
||||
this.setFlags(EnumSet.of(Goal.Flag.MOVE));
|
||||
}
|
||||
|
||||
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 8a757e6682fb7a58bfd76290bd79ee3cc3dc27b9..2be70d950be48014c4e9792adfc1d05da5aa6a59 100644
|
||||
index 310a24c1d79541311cfad43fa2bb14867128e7b9..6ee24fbe6528f91306a0eb38b766f77b2228b4aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -63,7 +63,12 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@ -49,7 +49,7 @@ index 8a757e6682fb7a58bfd76290bd79ee3cc3dc27b9..2be70d950be48014c4e9792adfc1d05d
|
||||
|
||||
public ItemEntity(Level world, double x, double y, double z, ItemStack stack, double velocityX, double velocityY, double velocityZ) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
index 94e3ce40da0401a94a24a6c0f9e7ffa3d0ef850d..dfdf7e7fc1070975ec18fd215c724f4fc84d3705 100644
|
||||
index 1251c704e3b83888133b83757e7773c3e3664e6e..bf3301eb1341ba9d482e10873447c42bd670f5ed 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
@@ -33,7 +33,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@ -7,7 +7,7 @@ Minecraft's prediction system does not handle block entities, so if we are manua
|
||||
block breaking we need to set it after the prediction is finished. This fixes block entities not showing when cancelling the BlockBreakEvent.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 161a810a8c4bd4c916c54df49c44c504130cb28e..45b48da09eafa8482836e49768426069b0a73cca 100644
|
||||
index 0f0cf4fdfcbf8537696f15f98f3fb7e68baeb27c..c38268b11dd5a76d5b3c2013c241063cade30909 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -62,6 +62,8 @@ public class ServerPlayerGameMode {
|
||||
@ -19,7 +19,7 @@ index 161a810a8c4bd4c916c54df49c44c504130cb28e..45b48da09eafa8482836e49768426069
|
||||
|
||||
public ServerPlayerGameMode(ServerPlayer player) {
|
||||
this.gameModeForPlayer = GameType.DEFAULT_MODE;
|
||||
@@ -187,10 +189,7 @@ public class ServerPlayerGameMode {
|
||||
@@ -188,10 +190,7 @@ public class ServerPlayerGameMode {
|
||||
this.player.connection.send(new ClientboundBlockUpdatePacket(pos, this.level.getBlockState(pos)));
|
||||
this.debugLogging(pos, false, sequence, "may not interact");
|
||||
// Update any tile entity data for this block
|
||||
@ -31,7 +31,7 @@ index 161a810a8c4bd4c916c54df49c44c504130cb28e..45b48da09eafa8482836e49768426069
|
||||
// CraftBukkit end
|
||||
return;
|
||||
}
|
||||
@@ -206,10 +205,7 @@ public class ServerPlayerGameMode {
|
||||
@@ -207,10 +206,7 @@ public class ServerPlayerGameMode {
|
||||
// Paper end
|
||||
this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos));
|
||||
// Update any tile entity data for this block
|
||||
@ -43,7 +43,7 @@ index 161a810a8c4bd4c916c54df49c44c504130cb28e..45b48da09eafa8482836e49768426069
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -393,10 +389,12 @@ public class ServerPlayerGameMode {
|
||||
@@ -392,10 +388,12 @@ public class ServerPlayerGameMode {
|
||||
}
|
||||
|
||||
// Update any tile entity data for this block
|
||||
@ -57,10 +57,10 @@ index 161a810a8c4bd4c916c54df49c44c504130cb28e..45b48da09eafa8482836e49768426069
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 014a94c5b2f7c900f33a8e29a64d61690c94b150..385e7648dd2e9e812833010ed90bd8e6011082d8 100644
|
||||
index d74d9493bb6fd4677aa3244b4b1b26d02f6b5b86..eb3e0bf223d1d2bb5be8c47e79489abda8607d1d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1856,8 +1856,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1853,8 +1853,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return;
|
||||
}
|
||||
// Paper end - Don't allow digging in unloaded chunks
|
||||
@ -68,7 +68,7 @@ index 014a94c5b2f7c900f33a8e29a64d61690c94b150..385e7648dd2e9e812833010ed90bd8e6
|
||||
+ this.player.gameMode.capturedBlockEntity = false;
|
||||
+ this.player.gameMode.captureSentBlockEntities = true;
|
||||
+ // Paper end - send block entities after prediction
|
||||
this.player.gameMode.handleBlockBreakAction(blockposition, packetplayinblockdig_enumplayerdigtype, packet.getDirection(), this.player.level.getMaxBuildHeight(), packet.getSequence());
|
||||
this.player.gameMode.handleBlockBreakAction(blockposition, packetplayinblockdig_enumplayerdigtype, packet.getDirection(), this.player.level().getMaxBuildHeight(), packet.getSequence());
|
||||
this.player.connection.ackBlockChangesUpTo(packet.getSequence());
|
||||
+ // Paper start - send block entities after prediction
|
||||
+ this.player.gameMode.captureSentBlockEntities = false;
|
||||
@ -80,7 +80,7 @@ index 014a94c5b2f7c900f33a8e29a64d61690c94b150..385e7648dd2e9e812833010ed90bd8e6
|
||||
+ this.player.connection.ackBlockChangesUpTo = -1;
|
||||
+
|
||||
+ this.player.gameMode.capturedBlockEntity = false;
|
||||
+ BlockEntity tileentity = this.player.level.getBlockEntity(blockposition);
|
||||
+ BlockEntity tileentity = this.player.level().getBlockEntity(blockposition);
|
||||
+ if (tileentity != null) {
|
||||
+ this.player.connection.send(tileentity.getUpdatePacket());
|
||||
+ }
|
@ -5,10 +5,10 @@ Subject: [PATCH] Warn on plugins accessing faraway chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 4ace5a32e8d17303a4b5d9e8935a803d7c0df409..174f5ff8f827dab2d85cee525429d46bbeae7183 100644
|
||||
index 01e420715d47b5531ede82139133a9bb59c25955..090771dce76f4e8037b6b2df9fc0dad7fe73411d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -422,7 +422,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -419,7 +419,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
private static boolean isInWorldBoundsHorizontal(BlockPos pos) {
|
||||
@ -18,7 +18,7 @@ index 4ace5a32e8d17303a4b5d9e8935a803d7c0df409..174f5ff8f827dab2d85cee525429d46b
|
||||
|
||||
private static boolean isOutsideSpawnableHeight(int y) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index c13e5b79c0599a9809b6150cfe660fb11bd44cea..8f0234296397ca2d4a607dcea6093c6c606dc7d2 100644
|
||||
index 1ef6091e9e5b204a714d53a98c1e05bee5569e5c..c02df2ad5366e678d69e432b54706eb96269e285 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -311,9 +311,24 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@ -54,7 +54,7 @@ index c13e5b79c0599a9809b6150cfe660fb11bd44cea..8f0234296397ca2d4a607dcea6093c6c
|
||||
// Paper start - implement regenerateChunk method
|
||||
final ServerLevel serverLevel = this.world;
|
||||
final net.minecraft.server.level.ServerChunkCache serverChunkCache = serverLevel.getChunkSource();
|
||||
@@ -524,6 +540,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -519,6 +535,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@Override
|
||||
public boolean loadChunk(int x, int z, boolean generate) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot
|
||||
@ -62,7 +62,7 @@ index c13e5b79c0599a9809b6150cfe660fb11bd44cea..8f0234296397ca2d4a607dcea6093c6c
|
||||
// Paper start - Optimize this method
|
||||
ChunkPos chunkPos = new ChunkPos(x, z);
|
||||
ChunkAccess immediate = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); // Paper
|
||||
@@ -587,6 +604,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -582,6 +599,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public boolean addPluginChunkTicket(int x, int z, Plugin plugin) {
|
||||
@ -70,7 +70,7 @@ index c13e5b79c0599a9809b6150cfe660fb11bd44cea..8f0234296397ca2d4a607dcea6093c6c
|
||||
Preconditions.checkArgument(plugin != null, "null plugin");
|
||||
Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled");
|
||||
|
||||
@@ -655,6 +673,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -650,6 +668,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public void setChunkForceLoaded(int x, int z, boolean forced) {
|
||||
@ -78,7 +78,7 @@ index c13e5b79c0599a9809b6150cfe660fb11bd44cea..8f0234296397ca2d4a607dcea6093c6c
|
||||
this.getHandle().setChunkForced(x, z, forced);
|
||||
}
|
||||
|
||||
@@ -961,6 +980,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -956,6 +975,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) {
|
||||
@ -86,7 +86,7 @@ index c13e5b79c0599a9809b6150cfe660fb11bd44cea..8f0234296397ca2d4a607dcea6093c6c
|
||||
// Transient load for this tick
|
||||
return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z);
|
||||
}
|
||||
@@ -2370,6 +2390,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -2365,6 +2385,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
// Spigot end
|
||||
// Paper start
|
||||
public java.util.concurrent.CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Custom Chat Completion Suggestions API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 5098dc4f380dca3d4a32cbd201e4c925d2504d9a..ec5b1a1434a732ffd99113b301088865e5e34400 100644
|
||||
index ce83330c4ebd81247f2b4c4f2693265810237d7a..328a59ef54e0e0eca0c5c42cf59227834da6cd86 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -675,6 +675,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -642,6 +642,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
this.getHandle().getServer().getPlayerList().sendPlayerPermissionLevel(this.getHandle(), level, false);
|
||||
}
|
@ -5,7 +5,7 @@ Subject: [PATCH] Collision API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
index f4f1150e6be2bff0b8561451594691977a5f1d56..3742e0b32e29d7dde0c2bd3d80348f8fb7b8aaf0 100644
|
||||
index 5bab5c75a2ce945b43434d2240c9d1124a20aee2..94f21c6acaee5a632b6adb4e77488bb2e385fbea 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
@@ -1019,5 +1019,12 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
@ -22,7 +22,7 @@ index f4f1150e6be2bff0b8561451594691977a5f1d56..3742e0b32e29d7dde0c2bd3d80348f8f
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 52f8a76832b05061dc80381220c866316d4a089d..73bd76b7bfcffc1d9dac926d7a781d048f4f2350 100644
|
||||
index f04c50a76f3589181dd4502d630a93c4dff3a95a..b8550052bfde2b2b97fa4497e6e5d055e6161529 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1415,4 +1415,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix suggest command message for brigadier syntax exceptions
|
||||
This is a bug accidentally introduced in upstream CB
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 933d6e67cbcc1bf121005f57b13dd976020985c3..87cc7562e4a166d078fe11b7f6980497fc0bd33e 100644
|
||||
index f967e9039c87ec458da3f133743df834437b3e02..80c2c8d565f03ae0ea24fbdecdbe2bc5b9aa4b82 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -340,7 +340,7 @@ public class Commands {
|
||||
@@ -342,7 +342,7 @@ public class Commands {
|
||||
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
|
||||
int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
|
||||
MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove invalid signature login stacktrace
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6614b6ee463f6f68d14894addcbc79a6a5be5b10..7810ab5bd1791ff5323b7302a6351a987b93bae3 100644
|
||||
index eb3e0bf223d1d2bb5be8c47e79489abda8607d1d..f52b01bca1b4221b389b2e980f2f75b0f1eca077 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3618,7 +3618,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3584,7 +3584,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator, Duration.ZERO));
|
||||
} catch (ProfilePublicKey.ValidationException profilepublickey_b) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Block Ticking API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index e4e4a282a10bde462af1e60aa6be992c636b9726..3a201bb68ef34d53aee75ca248248c11c4a77c2c 100644
|
||||
index e0c2ad107847227987080491e94b264930fc80e2..01b401f7d691ef451266bbc3a94980d613b96f21 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -758,5 +758,21 @@ public class CraftBlock implements Block {
|
||||
@ -31,10 +31,10 @@ index e4e4a282a10bde462af1e60aa6be992c636b9726..3a201bb68ef34d53aee75ca248248c11
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
index 9d09b3064fc0474170e6d584dd3ccb9899cfbd42..c061f76ff6ccf64d9eb53045e9bfabe2021e91ec 100644
|
||||
index 58d10e8909fea652810e30bbd4b24aaa5e038277..85c2e7f8399788caa4c7dfed4f8b1104a546fc21 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
@@ -676,4 +676,11 @@ public class CraftBlockData implements BlockData {
|
||||
@@ -680,4 +680,11 @@ public class CraftBlockData implements BlockData {
|
||||
public void mirror(Mirror mirror) {
|
||||
this.state = this.state.mirror(net.minecraft.world.level.block.Mirror.valueOf(mirror.name()));
|
||||
}
|
@ -95,7 +95,7 @@ index 0000000000000000000000000000000000000000..c4934979b1ed85bfc4f8d9e6f8848b2b
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 51b3db0b6c2cede95b584268e035c0fb36d38094..a7e133f3495e9132a5fdae2c24f225e7b026295a 100644
|
||||
index 91e6161449dc5625331e467d9e8375759686709e..7f0b8cdae07e7e4745a099242a4f0c5914be8667 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -274,13 +274,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -213,7 +213,7 @@ index 3fcd7bfdb8945b276c94a263e9da6b85ce470366..3431b1132e55c53cda7cf47f021f2306
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 06cd518e7ca037ed6f347c2666b3a252306368a9..9f2536d9a73bdb15b5b3004d4da79ca32cee205b 100644
|
||||
index a28da8addf6c06d6c80d9a6a8bd9617808ba7de6..f87433133fa6a68dac33895f91770f453e0678d2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -797,7 +797,7 @@ public final class CraftServer implements Server {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add NamespacedKey biome methods
|
||||
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 707f50536a3915a68ee8ac09a74ecfebbd5a94dd..1179e9fbff93ec8ff82aa3aae477f6bf4ce9b885 100644
|
||||
index a6564c7d69999c55abc4292cab9182390a52e749..b059bb46b649cbf82debdb8d58fe4ba77d040276 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -611,6 +611,19 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -37,10 +37,10 @@ index 0000000000000000000000000000000000000000..c1d3bac79bb8b4796c013ff4472f75dc
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 682005e4b19ba3959d4e3a66475487daf534a003..fbc06f45926e9073c95c97423f92a213898fcd48 100644
|
||||
index 37441421a50867eeecf5cf3aed3e7096c526d7ef..2c3577c6f59e482d68c80d3d414ed43942dfcfbb 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1001,6 +1001,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1000,6 +1000,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
net.minecrell.terminalconsole.TerminalConsoleAppender.close(); // Paper - Use TerminalConsoleAppender
|
||||
} catch (Exception e) {
|
||||
}
|
||||
@ -49,7 +49,7 @@ index 682005e4b19ba3959d4e3a66475487daf534a003..fbc06f45926e9073c95c97423f92a213
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index f332af9c9e16c3851c5a14dad9ad182dd731ed87..755c223ab2a046285eb9916b6195093714f4c5ba 100644
|
||||
index 9f1b363e1a6fa4925dc4560654af8426e6908c9d..717e292040ed7779eb4b6c5fa26665d3df9024e7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -18,6 +18,12 @@ public class Main {
|
@ -6,12 +6,12 @@ Subject: [PATCH] Stop large look changes from crashing the server
|
||||
Co-authored-by: Jaren Knodel <Jaren@Knodel.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 34ef66a6f0cfb2bb1435c7342b6261d31dd011ef..f1dc127a92fe13e92f9af660f98afcdd78f6cbd5 100644
|
||||
index 9ee16dc1f425e4f0795eec3dcc18affc70e85a31..de67999120b52daafa4fb40dd32a348f39ce8df3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2996,37 +2996,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.level.getProfiler().pop();
|
||||
this.level.getProfiler().push("rangeChecks");
|
||||
@@ -3034,37 +3034,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.level().getProfiler().pop();
|
||||
this.level().getProfiler().push("rangeChecks");
|
||||
|
||||
- while (this.getYRot() - this.yRotO < -180.0F) {
|
||||
- this.yRotO -= 360.0F;
|
||||
@ -51,13 +51,13 @@ index 34ef66a6f0cfb2bb1435c7342b6261d31dd011ef..f1dc127a92fe13e92f9af660f98afcdd
|
||||
+ this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F;
|
||||
+ // Paper end
|
||||
|
||||
this.level.getProfiler().pop();
|
||||
this.level().getProfiler().pop();
|
||||
this.animStep += f2;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index ae0e422ee7e1dcf01b4c7b64b23afdbbbe19819e..8b2a3a8482018b7db7de81bc295862f783e17ce5 100644
|
||||
index 24b549cb21926a02d736f0bbb991006b9453068d..6d7ac0c8c171834fa8da94f158258a4774d80ec4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -250,13 +250,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
@@ -251,13 +251,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
}
|
||||
|
||||
protected static float lerpRotation(float prevRot, float newRot) {
|
@ -6,15 +6,15 @@ Subject: [PATCH] Fire EntityChangeBlockEvent in more places
|
||||
Co-authored-by: ChristopheG <61288881+chrisgdt@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java
|
||||
index 534ff7d4844448eaddb2778f81dfd66d1ee375db..558c14af6415681909f9e3a15f303ce4d0ec1395 100644
|
||||
index 611028d65925053c47510185abc526201e5df6bb..cdf1899f1e9978fcf58f05b1efb3165e55445f93 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LightningBolt.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LightningBolt.java
|
||||
@@ -98,7 +98,7 @@ public class LightningBolt extends Entity {
|
||||
}
|
||||
|
||||
this.powerLightningRod();
|
||||
- LightningBolt.clearCopperOnLightningStrike(this.level, this.getStrikePosition());
|
||||
+ LightningBolt.clearCopperOnLightningStrike(this.level, this.getStrikePosition(), this); // Paper - transmit LightningBolt instance to call EntityChangeBlockEvent
|
||||
- LightningBolt.clearCopperOnLightningStrike(this.level(), this.getStrikePosition());
|
||||
+ LightningBolt.clearCopperOnLightningStrike(this.level(), this.getStrikePosition(), this); // Paper - transmit LightningBolt instance to call EntityChangeBlockEvent
|
||||
this.gameEvent(GameEvent.LIGHTNING_STRIKE);
|
||||
}
|
||||
}
|
||||
@ -79,7 +79,7 @@ index 534ff7d4844448eaddb2778f81dfd66d1ee375db..558c14af6415681909f9e3a15f303ce4
|
||||
});
|
||||
world.levelEvent(3002, blockposition1, -1);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java b/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
|
||||
index 04fe142984760a1162703b46e08bf172b7277258..578f98981d3fa50630f8b25ecd69a11e523f7d8d 100644
|
||||
index 2c443b421e342ebfbdf941a431ba20560521920b..72cab38ab1f16f7ccc85258266d4c58cf3287d7d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
|
||||
@@ -27,6 +27,12 @@ public class TryLaySpawnOnWaterNearLand {
|
||||
@ -112,7 +112,7 @@ index 2f8ae1786a4c4438515c59fa56acaefdff60703d..9c7d0b9cc2fa98d5785c914c0183f7d4
|
||||
CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger((ServerPlayer)player, blockPos, itemStack);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/EnderEyeItem.java b/src/main/java/net/minecraft/world/item/EnderEyeItem.java
|
||||
index e0c3aa1285709a40ff0ea8c1d74d43d2b341aecc..f4fc8ff3981555e4b560289248a9b02afc04b42f 100644
|
||||
index 1fddc9025a9e5079f05dd6c86f6ca43c5d51d9c3..2735e139fd2b5ab11e4311848e9676ee203b1a6b 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/EnderEyeItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/EnderEyeItem.java
|
||||
@@ -43,6 +43,11 @@ public class EnderEyeItem extends Item {
|
||||
@ -128,10 +128,10 @@ index e0c3aa1285709a40ff0ea8c1d74d43d2b341aecc..f4fc8ff3981555e4b560289248a9b02a
|
||||
Block.pushEntitiesUp(iblockdata, iblockdata1, world, blockposition);
|
||||
world.setBlock(blockposition, iblockdata1, 2);
|
||||
diff --git a/src/main/java/net/minecraft/world/item/HoneycombItem.java b/src/main/java/net/minecraft/world/item/HoneycombItem.java
|
||||
index 68a8d3b16d49c10fc9834f32009095d35c9c55a8..f0b720eafc538f97d788f89bd2f2e9da0ff84a19 100644
|
||||
index 5ab115834cddb9ab3209c11bd0fe657b06a02eb2..744ee7633e10c68a830e7513993e4c307c8984d2 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/HoneycombItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/HoneycombItem.java
|
||||
@@ -37,6 +37,14 @@ public class HoneycombItem extends Item {
|
||||
@@ -39,6 +39,14 @@ public class HoneycombItem extends Item implements SignApplicator {
|
||||
return getWaxed(blockState).map((state) -> {
|
||||
Player player = context.getPlayer();
|
||||
ItemStack itemStack = context.getItemInHand();
|
||||
@ -147,7 +147,7 @@ index 68a8d3b16d49c10fc9834f32009095d35c9c55a8..f0b720eafc538f97d788f89bd2f2e9da
|
||||
CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger((ServerPlayer)player, blockPos, itemStack);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/PotionItem.java b/src/main/java/net/minecraft/world/item/PotionItem.java
|
||||
index 93bb2cbd397fef4db9d903d2b41a35b6d67bf4a9..3a6601ede6fd7caa48cdbf9856c2e72fd4e73ca8 100644
|
||||
index 8c79ca75089e739d4899421106833e42e4e57280..f8b201f8a8019bc9b85ed013cbe7f20b4f07ec85 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/PotionItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/PotionItem.java
|
||||
@@ -107,6 +107,12 @@ public class PotionItem extends Item {
|
||||
@ -199,10 +199,10 @@ index 32995cb5efdad0bc34ecacacb78cccd21220ba8d..c7195f2e12bbd6545f7bffcc2b4ba5cc
|
||||
level.gameEvent(GameEvent.BLOCK_CHANGE, blockPos, GameEvent.Context.of(player, blockState3));
|
||||
if (player != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
index 53f4a000079f4c056500d03eca71991ae14483a9..50fd52905d8f69c693cb1b406b681a6af02787e2 100644
|
||||
index f1a0304a92abbb58aa8a22f8e470a0f5e4189d02..113083f1b909e3e279789d67e24af36dc0f151bf 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
@@ -230,6 +230,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -232,6 +232,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
if (i < 8 && ComposterBlock.COMPOSTABLES.containsKey(itemstack.getItem())) {
|
||||
if (i < 7 && !world.isClientSide) {
|
||||
BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack);
|
||||
@ -214,7 +214,7 @@ index 53f4a000079f4c056500d03eca71991ae14483a9..50fd52905d8f69c693cb1b406b681a6a
|
||||
|
||||
world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
|
||||
player.awardStat(Stats.ITEM_USED.get(itemstack.getItem()));
|
||||
@@ -253,11 +258,16 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -255,11 +260,16 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
if (i < 7 && ComposterBlock.COMPOSTABLES.containsKey(stack.getItem())) {
|
||||
// CraftBukkit start
|
||||
double rand = world.getRandom().nextDouble();
|
||||
@ -233,7 +233,7 @@ index 53f4a000079f4c056500d03eca71991ae14483a9..50fd52905d8f69c693cb1b406b681a6a
|
||||
// CraftBukkit end
|
||||
|
||||
stack.shrink(1);
|
||||
@@ -298,11 +308,13 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -300,11 +310,13 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
return iblockdata1;
|
||||
}
|
||||
|
||||
@ -247,7 +247,7 @@ index 53f4a000079f4c056500d03eca71991ae14483a9..50fd52905d8f69c693cb1b406b681a6a
|
||||
static BlockState addItem(@Nullable Entity entity, BlockState iblockdata, LevelAccessor generatoraccess, BlockPos blockposition, ItemStack itemstack, double rand) {
|
||||
// CraftBukkit end
|
||||
int i = (Integer) iblockdata.getValue(ComposterBlock.LEVEL);
|
||||
@@ -313,6 +325,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -315,6 +327,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
} else {
|
||||
int j = i + 1;
|
||||
BlockState iblockdata1 = (BlockState) iblockdata.setValue(ComposterBlock.LEVEL, j);
|
@ -5,7 +5,7 @@ Subject: [PATCH] Missing eating regain reason
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
index 51ca7668ebc0edf4254b7511bb0df0c2197bf859..72b30a5cdeb8a43702d9ab5f198311929761fad1 100644
|
||||
index 438d7c26cc3a4a3b5a1affffbbe26e4d272b0c00..90ce201bc7c47cef9bc59d7b535a7453854bac75 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
||||
@@ -386,7 +386,7 @@ public class Cat extends TamableAnimal implements VariantHolder<CatVariant> {
|
||||
@ -18,10 +18,10 @@ index 51ca7668ebc0edf4254b7511bb0df0c2197bf859..72b30a5cdeb8a43702d9ab5f19831192
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
index 9d4a3041ecae2adda40134710eb1edb8571228aa..37882a393d7c17a9437145ab5fe1f74370681146 100644
|
||||
index c853123c451c41beb42209c7edc14a5dcffa2a50..2030fdb3124f793d7b545135b1db32fe9be27050 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
@@ -381,7 +381,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||
@@ -386,7 +386,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||
} else {
|
||||
boolean bl = this.getHealth() < this.getMaxHealth();
|
||||
if (bl) {
|
||||
@ -31,7 +31,7 @@ index 9d4a3041ecae2adda40134710eb1edb8571228aa..37882a393d7c17a9437145ab5fe1f743
|
||||
|
||||
boolean bl2 = this.isTamed() && this.getAge() == 0 && this.canFallInLove();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
|
||||
index 39c6b9b74e072953abe6398ecfcdd444e6d8f194..7ae0e4b3aa8e861500ddc7b38aa671258b532fcd 100644
|
||||
index 4033945cb992e2c9bf42b8a7eda581319a6c6917..3bbb1455773570e3f7f6b8b144d3c589e2705b81 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
|
||||
@@ -217,7 +217,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V
|
@ -5,7 +5,7 @@ Subject: [PATCH] Missing effect cause
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
index a847375087d92fa5cc4b1feed7c8f9991976e6f0..a4e98b02175da96472474b8d7ad5975ce4d2fc43 100644
|
||||
index 10029f37fd70955483f12ba525ec3a598f9994f1..2682a49cd3948e0f80e2d7e58abcd3e6d8f7ac4e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
@@ -429,7 +429,7 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolo
|
||||
@ -31,7 +31,7 @@ index b9dbe5301b04cb1aa5da3a3ee7560c806ce6a411..c8d6b5e60b6c8c612fa8580c63a32c4a
|
||||
|
||||
if (stack.isEmpty()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
|
||||
index a4d9bdb63847eb0653a0e0772f7121c1bbaa8459..0d86deac578a3d4af15ed75e94ecd74948eb05cb 100644
|
||||
index 27873b16b82cac251c756f81844a4f8818a9c94c..1efcec68a3a32b0b6195add7a487bffde4f713ad 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
|
||||
@@ -71,7 +71,7 @@ public class SuspiciousStewItem extends Item {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add a consumer parameter to ProjectileSource#launchProjectile
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 205101e301bb4ea552459fe4e1f028f252136720..5f20251a7d9c3cfa48775d825e557b75930d7923 100644
|
||||
index 8b6cae9a005a6db608be85805382704ff5dc6669..d15a252285e10ce062319b0f1051f59ba46701a0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -500,8 +500,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Call BlockPhysicsEvent more often
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java b/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
|
||||
index af7b535d14ef279073b3b2ffa29cf88ca8305d1e..b1c594dc6a6b8a6c737b99272acab9e7dbd0ed63 100644
|
||||
index a0d035dde5a4976db2d4a9b0ae474e944583f722..ec81be70cd6f92bbf9011395cb361f0ce54c5ad0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java
|
||||
@@ -119,7 +119,27 @@ public class CollectingNeighborUpdater implements NeighborUpdater {
|
@ -22,7 +22,7 @@ is actually processed, this is honestly really just exposed for the misnomers or
|
||||
who just wanna ensure that this won't grow over a specific size if chat gets stupidly active
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index 52b02cb1f02d1c65b840f38cfc8baee500aa2259..8d442c5a498ecf288a0cc0c54889c6e2fda849ce 100644
|
||||
index 09234062090c210227350cafeed141f8cb73108a..9f5f0d8ddc8f480b48079c70e38c9c08eff403f6 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -254,13 +254,26 @@ public class GlobalConfiguration extends ConfigurationPart {
|
@ -5,10 +5,10 @@ Subject: [PATCH] use BlockFormEvent for mud converting into clay
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
|
||||
index 16444949ae03332de75dd1e3c0746cf8d54eca6e..6b909d41ccdf6c1ac3ac0c4e673ff52f0d14a238 100644
|
||||
index 58a966e3aefad6c812cc64f65780e7b4953191eb..e978132e51cde52f7ff1ba31ad521fc2cb4f0dce 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
|
||||
@@ -213,10 +213,13 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate
|
||||
@@ -211,10 +211,13 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate
|
||||
if (((PointedDripstoneBlock.FluidInfo) optional.get()).sourceState.is(Blocks.MUD) && fluidtype == Fluids.WATER) {
|
||||
BlockState iblockdata1 = Blocks.CLAY.defaultBlockState();
|
||||
|
@ -44,10 +44,10 @@ https://bugs.mojang.com/browse/MC-224454
|
||||
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
index 9b56f742443ad98994acc34630f1cef75a00ca8a..618ad17e4f10f58994db55b82b70fbb141e3579e 100644
|
||||
index f651d866355557d10d4bb8730e0aceac483d3ba7..f2500cbe0aecf4959921a56c88a8947839a9b0e4 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
@@ -352,7 +352,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -351,7 +351,7 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -57,36 +57,36 @@ index 9b56f742443ad98994acc34630f1cef75a00ca8a..618ad17e4f10f58994db55b82b70fbb1
|
||||
this.setSuccess(true);
|
||||
return stack;
|
||||
diff --git a/src/main/java/net/minecraft/server/commands/DeOpCommands.java b/src/main/java/net/minecraft/server/commands/DeOpCommands.java
|
||||
index cca2618d90306eed9894c5fa7b6ed96b68210688..10769c60bd53438d44fbc6192667acdf4cc95594 100644
|
||||
index 40490d10649e92cf622849f1bb87538102b130c7..797efca662dcc0fe7f4cf0b4b7baa235ea044f1f 100644
|
||||
--- a/src/main/java/net/minecraft/server/commands/DeOpCommands.java
|
||||
+++ b/src/main/java/net/minecraft/server/commands/DeOpCommands.java
|
||||
@@ -33,7 +33,7 @@ public class DeOpCommands {
|
||||
if (playerList.isOp(gameProfile)) {
|
||||
@@ -34,7 +34,7 @@ public class DeOpCommands {
|
||||
playerList.deop(gameProfile);
|
||||
++i;
|
||||
- source.sendSuccess(Component.translatable("commands.deop.success", targets.iterator().next().getName()), true);
|
||||
+ source.sendSuccess(Component.translatable("commands.deop.success", gameProfile.getName()), true); // Paper - fixes MC-253721
|
||||
source.sendSuccess(() -> {
|
||||
- return Component.translatable("commands.deop.success", targets.iterator().next().getName());
|
||||
+ return Component.translatable("commands.deop.success", gameProfile.getName()); // Paper - fixes MC-253721
|
||||
}, true);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/commands/OpCommand.java b/src/main/java/net/minecraft/server/commands/OpCommand.java
|
||||
index 43e77cef0fce75f59aeb05e161668bebb8fca229..ef50fbf8cb3f008827850b5ed33422007be09bd2 100644
|
||||
index 6cd6d69a20e95e344fc18ab67dc300824537a59b..2e2a7c2cf3081187da817479a9da3eb10f662a6d 100644
|
||||
--- a/src/main/java/net/minecraft/server/commands/OpCommand.java
|
||||
+++ b/src/main/java/net/minecraft/server/commands/OpCommand.java
|
||||
@@ -38,7 +38,7 @@ public class OpCommand {
|
||||
if (!playerList.isOp(gameProfile)) {
|
||||
@@ -39,7 +39,7 @@ public class OpCommand {
|
||||
playerList.op(gameProfile);
|
||||
++i;
|
||||
- source.sendSuccess(Component.translatable("commands.op.success", targets.iterator().next().getName()), true);
|
||||
+ source.sendSuccess(Component.translatable("commands.op.success", gameProfile.getName()), true); // Paper - fixes MC-253721
|
||||
source.sendSuccess(() -> {
|
||||
- return Component.translatable("commands.op.success", targets.iterator().next().getName());
|
||||
+ return Component.translatable("commands.op.success", gameProfile.getName()); // Paper - fixes MC-253721
|
||||
}, true);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 131a7ff0847272b2f9fecf62d0d28ca014689f5b..ed91515947ee049bdb82aa014fe439753f2b7620 100644
|
||||
index 6369fba72d7bf2db00f7df064242561681f35a41..3a5686086e113eed8b80bb65f5b05d4b81138b00 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -949,7 +949,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1010,7 +1010,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
} else {
|
||||
AABB axisalignedbb = (new AABB(blockposition1, new BlockPos(blockposition1.getX(), this.getMaxBuildHeight(), blockposition1.getZ()))).inflate(3.0D);
|
||||
List<LivingEntity> list = this.getEntitiesOfClass(LivingEntity.class, axisalignedbb, (entityliving) -> {
|
||||
@ -96,10 +96,10 @@ index 131a7ff0847272b2f9fecf62d0d28ca014689f5b..ed91515947ee049bdb82aa014fe43975
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 45b48da09eafa8482836e49768426069b0a73cca..16a1416cb2ce01071a033c5049edfb60b614d56a 100644
|
||||
index c38268b11dd5a76d5b3c2013c241063cade30909..25c289b737f6cd7ede94725d86fbbf8d9ae1d70d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -91,7 +91,7 @@ public class ServerPlayerGameMode {
|
||||
@@ -92,7 +92,7 @@ public class ServerPlayerGameMode {
|
||||
return event; // Paper
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -143,23 +143,23 @@ index 19540fd4a7f992888fadb6501d0c8a5a7e71fcf6..e241ae250f4f04a17ef2c583d00b065a
|
||||
public void start() {
|
||||
this.creeper.getNavigation().stop();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
index db533f458357683b8f3925d628ff1197144f67eb..cfa904d42734d0fb0c1ed8b18f4d8bc131027962 100644
|
||||
index c2111491642dfa29bb85027e137b1a19e3d2d9e6..528e7ba29dcd38726b2c1bbc1d8ac208c64ba9df 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
@@ -236,9 +236,10 @@ public class Goat extends Animal {
|
||||
player.setItemInHand(hand, itemstack1);
|
||||
return InteractionResult.sidedSuccess(this.level.isClientSide);
|
||||
return InteractionResult.sidedSuccess(this.level().isClientSide);
|
||||
} else {
|
||||
+ boolean isFood = this.isFood(itemstack); // Paper - track before stack is possibly decreased to 0 (Fixes MC-244739)
|
||||
InteractionResult enuminteractionresult = super.mobInteract(player, hand);
|
||||
|
||||
- if (enuminteractionresult.consumesAction() && this.isFood(itemstack)) {
|
||||
+ if (enuminteractionresult.consumesAction() && isFood) { // Paper
|
||||
this.level.playSound((Player) null, (Entity) this, this.getEatingSound(itemstack), SoundSource.NEUTRAL, 1.0F, Mth.randomBetween(this.level.random, 0.8F, 1.2F));
|
||||
this.level().playSound((Player) null, (Entity) this, this.getEatingSound(itemstack), SoundSource.NEUTRAL, 1.0F, Mth.randomBetween(this.level().random, 0.8F, 1.2F));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
index d38ac1f3ef105474df1294541041c2607ca53244..f9496f757bcf7000fab1f16386e775d54d96e47a 100644
|
||||
index 64b1668856bb2afda3707f7ccc11764fab33ae9f..7f238a9d98095806132c0d22ed7b0dfd25c45262 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
@@ -247,7 +247,13 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
@ -174,34 +174,9 @@ index d38ac1f3ef105474df1294541041c2607ca53244..f9496f757bcf7000fab1f16386e775d5
|
||||
+ public void equipSaddle(@Nullable SoundSource sound, @Nullable ItemStack stack) {
|
||||
+ this.inventory.setItem(0, stack != null ? stack : new ItemStack(Items.SADDLE));
|
||||
+ // Paper end
|
||||
if (sound != null) {
|
||||
this.level.playSound((Player) null, (Entity) this, this.getSaddleSoundEvent(), sound, 0.5F, 1.0F);
|
||||
}
|
||||
@@ -256,7 +262,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
}
|
||||
|
||||
public void equipArmor(Player player, ItemStack stack) {
|
||||
if (this.isArmor(stack)) {
|
||||
- this.inventory.setItem(1, new ItemStack(stack.getItem()));
|
||||
+ this.inventory.setItem(1, stack.copyWithCount(1)); // Paper - fix equipping items with nbt - MC-258360, MC-191591
|
||||
if (!player.getAbilities().instabuild) {
|
||||
stack.shrink(1);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
index 89f761871a84f8ab95f2a16aba8340bb8726da30..f6e2348b280eaefc0eb05bf5d962593caa654357 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
@@ -347,9 +347,10 @@ public class Sniffer extends Animal {
|
||||
@Override
|
||||
public InteractionResult mobInteract(Player player, InteractionHand hand) {
|
||||
ItemStack itemstack = player.getItemInHand(hand);
|
||||
+ boolean wasFood = this.isFood(itemstack); // Paper - Fix MC-260219
|
||||
InteractionResult enuminteractionresult = super.mobInteract(player, hand);
|
||||
|
||||
- if (enuminteractionresult.consumesAction() && this.isFood(itemstack)) {
|
||||
+ if (enuminteractionresult.consumesAction() && wasFood) { // Paper - Fix MC-260219
|
||||
this.level.playSound((Player) null, (Entity) this, this.getEatingSound(itemstack), SoundSource.NEUTRAL, 1.0F, Mth.randomBetween(this.level.random, 0.8F, 1.2F));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java b/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java
|
||||
index f174094febfdfdc309f1b50877be60bae8a98156..5f407535298a31a34cfe114dd863fd6a9b977707 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java
|
||||
@ -217,7 +192,7 @@ index f174094febfdfdc309f1b50877be60bae8a98156..5f407535298a31a34cfe114dd863fd6a
|
||||
return 1;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raids.java b/src/main/java/net/minecraft/world/entity/raid/Raids.java
|
||||
index 7985beb01059a9e4394920bcf3335d842bd20f4e..fabce3bc592b1b172b227395a07febdbb66ec3c9 100644
|
||||
index 380afb885e85e4cf80e746d217033345a7514443..41457c9f27b18fa2734a6cca297ec5186470e82f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/raid/Raids.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/raid/Raids.java
|
||||
@@ -125,7 +125,7 @@ public class Raids extends SavedData {
|
||||
@ -239,16 +214,16 @@ index 7985beb01059a9e4394920bcf3335d842bd20f4e..fabce3bc592b1b172b227395a07febdb
|
||||
player.awardStat(Stats.RAID_TRIGGER);
|
||||
CriteriaTriggers.BAD_OMEN.trigger(player);
|
||||
diff --git a/src/main/java/net/minecraft/world/item/SaddleItem.java b/src/main/java/net/minecraft/world/item/SaddleItem.java
|
||||
index c35375e15c0368fec12d37a4b82668b51d9fe9ff..0c975875f1f2d0236d42a291486a7e78e1702802 100644
|
||||
index 11e8f2bf261abcb75d4dd011702c8f396e9f5be4..7234010d81078d357ab9bca422e44864a9e269bb 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/SaddleItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/SaddleItem.java
|
||||
@@ -18,7 +18,7 @@ public class SaddleItem extends Item {
|
||||
if (entity instanceof Saddleable saddleable && entity.isAlive()) {
|
||||
if (!saddleable.isSaddled() && saddleable.isSaddleable()) {
|
||||
if (!user.level.isClientSide) {
|
||||
if (!user.level().isClientSide) {
|
||||
- saddleable.equipSaddle(SoundSource.NEUTRAL);
|
||||
+ saddleable.equipSaddle(SoundSource.NEUTRAL, stack.copyWithCount(1)); // Paper - Fix saddles losing nbt data - MC-191591
|
||||
entity.level.gameEvent(entity, GameEvent.EQUIP, entity.position());
|
||||
entity.level().gameEvent(entity, GameEvent.EQUIP, entity.position());
|
||||
stack.shrink(1);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
|
||||
@ -281,10 +256,10 @@ index 2932419b7ca3f066b1db329829af36ba31e17c65..e11eced0bf15dfecaf64f5e1c28e973c
|
||||
return;
|
||||
}
|
||||
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 5e70b5f643faabfc05989de9592d8c5c787102e3..2a786c9fd29dc2139cf487fa645cd43345d60167 100644
|
||||
index 436290eaa0dab05a642b67b265117dbe5eceb8b7..5ccc419b904aec590c5624438da61ca6724b20d6 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
|
||||
@@ -664,13 +664,10 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -674,13 +674,10 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
|
||||
@Override
|
||||
public void fillStackedContents(StackedContents finder) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 131a7ff0847272b2f9fecf62d0d28ca014689f5b..066744d37670e0ee4254a34743887416412b0065 100644
|
||||
index 3a5686086e113eed8b80bb65f5b05d4b81138b00..83267ae18c606116cf0c0b55549dc732f269a5d7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2533,7 +2533,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2602,7 +2602,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (entity instanceof Mob) {
|
||||
Mob entityinsentient = (Mob) entity;
|
||||
|
||||
@ -17,7 +17,7 @@ index 131a7ff0847272b2f9fecf62d0d28ca014689f5b..066744d37670e0ee4254a34743887416
|
||||
String s = "onTrackingStart called during navigation iteration";
|
||||
|
||||
Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration"));
|
||||
@@ -2618,7 +2618,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2687,7 +2687,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (entity instanceof Mob) {
|
||||
Mob entityinsentient = (Mob) entity;
|
||||
|
@ -7,7 +7,7 @@ Upstream didn't modify the isLovedItem check in wantsToPickup
|
||||
so piglins never actually tried to pickup interestItems
|
||||
|
||||
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 c3a2b83794c612340edf0bc67f58917f1f96db45..d552deba0a4f20d011defb464d31d8638d37c646 100644
|
||||
index c8e6893a7d2be08d6b0d111aa6e58e72f3376edc..5f2bb0160c49d404a06551880e08c589a5b2a0a7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
|
||||
@@ -402,7 +402,7 @@ public class PiglinAi {
|
@ -12,10 +12,10 @@ Fires the event when a Raider tries to pick up a raid banner
|
||||
to become raid leader.
|
||||
|
||||
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 7b42f7bd100808cb2367d0d7c7361e8f2e597502..afa7ecfa8453da510ec5ccecb1ceeb1d9893d259 100644
|
||||
index 7ef04ef7995b093eef022b397cda8c27c8faede0..27d9145693a772cd1b5d171da303c934101f3be8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
@@ -432,7 +432,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
||||
@@ -429,7 +429,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
||||
|
||||
@Override
|
||||
protected void pickUpItem(ItemEntity item) {
|
||||
@ -25,7 +25,7 @@ index 7b42f7bd100808cb2367d0d7c7361e8f2e597502..afa7ecfa8453da510ec5ccecb1ceeb1d
|
||||
}
|
||||
|
||||
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 d552deba0a4f20d011defb464d31d8638d37c646..2e107f10d497a5696c7bc90ae3c5ecea98edb3e1 100644
|
||||
index 5f2bb0160c49d404a06551880e08c589a5b2a0a7..d98c526676202741e628d5e317b8cdd3f4d3be0a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
|
||||
@@ -241,7 +241,10 @@ public class PiglinAi {
|
||||
@ -49,7 +49,7 @@ index d552deba0a4f20d011defb464d31d8638d37c646..2e107f10d497a5696c7bc90ae3c5ecea
|
||||
|
||||
if (PiglinAi.isLovedItem(itemstack, piglin)) { // CraftBukkit - Changes to allow for custom payment in bartering
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java
|
||||
index da37c51ee443c2f1191a32671912a967a13003cf..99e9d46d42ddd0b451c6aeb847f1b295ebe5c697 100644
|
||||
index 9948085f51659f9b896622251739343d658dd0b2..57fdcdaf54fd1c92a6e51a3a81789029096e5abe 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/raid/Raider.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java
|
||||
@@ -245,6 +245,11 @@ public abstract class Raider extends PatrollingMonster {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Correctly handle interactions with items on cooldown
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 16a1416cb2ce01071a033c5049edfb60b614d56a..1d33c02088c150189d7f4b0aa27f6a1de96b11cf 100644
|
||||
index 25c289b737f6cd7ede94725d86fbbf8d9ae1d70d..bb7ad618fad7f11a02d7e088e2c05bfffaf0b41d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -520,6 +520,7 @@ public class ServerPlayerGameMode {
|
||||
@@ -519,6 +519,7 @@ public class ServerPlayerGameMode {
|
||||
BlockState iblockdata = world.getBlockState(blockposition);
|
||||
InteractionResult enuminteractionresult = InteractionResult.PASS;
|
||||
boolean cancelledBlock = false;
|
||||
@ -16,7 +16,7 @@ index 16a1416cb2ce01071a033c5049edfb60b614d56a..1d33c02088c150189d7f4b0aa27f6a1d
|
||||
|
||||
if (!iblockdata.getBlock().isEnabled(world.enabledFeatures())) {
|
||||
return InteractionResult.FAIL;
|
||||
@@ -529,10 +530,10 @@ public class ServerPlayerGameMode {
|
||||
@@ -528,10 +529,10 @@ public class ServerPlayerGameMode {
|
||||
}
|
||||
|
||||
if (player.getCooldowns().isOnCooldown(stack.getItem())) {
|
||||
@ -30,7 +30,7 @@ index 16a1416cb2ce01071a033c5049edfb60b614d56a..1d33c02088c150189d7f4b0aa27f6a1d
|
||||
this.interactResult = event.useItemInHand() == Event.Result.DENY;
|
||||
this.interactPosition = blockposition.immutable();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 4c957ccae26fcad437234051481e2a1824d17f76..0f4154560047735562b583081a9edb314f3a8a74 100644
|
||||
index 20e1efcadd4a11bab8a0db48410229e4a4d5ce57..86b0fe7b6feeef0e085e577954f869e020cc0f04 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -517,6 +517,12 @@ public class CraftEventFactory {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerInventorySlotChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index c5dc769d13fbc2a88a731d42669d0906ee306e4b..6fdb22809195fc2ba95ee22a5523eeabc2f2c4da 100644
|
||||
index 0e8e1f74a041dc500bb07d3e5e97ff134882fb59..4eb2679bddf89cc1c72ab561fd7e1be8423d746b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -330,6 +330,25 @@ public class ServerPlayer extends Player {
|
||||
@@ -371,6 +371,25 @@ public class ServerPlayer extends Player {
|
||||
|
||||
}
|
||||
}
|
||||
@ -35,7 +35,7 @@ index c5dc769d13fbc2a88a731d42669d0906ee306e4b..6fdb22809195fc2ba95ee22a5523eeab
|
||||
@Override
|
||||
public void dataChanged(AbstractContainerMenu handler, int property, int value) {}
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index ec1da07fdfc86c2905766886f6f922320c73fb6a..0954e834ca4c777de61f5d45812008cc7c2ac733 100644
|
||||
index 19b0ae77e99c972159cb236403f420baa0cc46e0..b9e8d8b91b307e37900d0d2e8c823e63faed7cea 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -302,7 +302,7 @@ public abstract class AbstractContainerMenu {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index ec5b1a1434a732ffd99113b301088865e5e34400..405634ea82f48ccaa170b9de27140573cb647608 100644
|
||||
index 328a59ef54e0e0eca0c5c42cf59227834da6cd86..4b8299c14518fbc658fc30c833e8a870d5e97021 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -3145,6 +3145,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -3118,6 +3118,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
// Paper end
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add entity knockback API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 5f20251a7d9c3cfa48775d825e557b75930d7923..f6e5de14a674a2dd7841c1e03f136cc48e2352cf 100644
|
||||
index d15a252285e10ce062319b0f1051f59ba46701a0..351869735644c984090e1ac571b5ff118ecae9bc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -995,5 +995,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@ -27,7 +27,7 @@ index 6bd0afddbcc461149dfe9a5c7a86fff6ea13a5f1..148d233f4f5278ff39eacdaa0f4f0e7d
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 1619da8a904785e0cc00ddbcfba1c3fa2b8d9b93..c6fa6bcd66d61359124a8426b919493c6ec43f06 100644
|
||||
index 1147044f2c4c2e9510cb6e5c38b6abe85ec994e1..a3c400bb4ee5d8f2985f4bc7e3e35be548177cc6 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -170,6 +170,18 @@ public class Main {
|
@ -5,10 +5,10 @@ Subject: [PATCH] fixed entity vehicle collision event not called
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
index 33dd6f9b3fde5bd19cfc6386dd9454df4a887489..ee4f924afe15c9a4d96af7a55b357076c7b28501 100644
|
||||
index b9ca93026797874c8fa2d68e7177ca1fc0724da7..f0bd07570399aa126b524cd31b819881e2d96cf1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
@@ -143,7 +143,15 @@ public abstract class AbstractMinecart extends Entity {
|
||||
@@ -144,7 +144,15 @@ public abstract class AbstractMinecart extends Entity {
|
||||
|
||||
@Override
|
||||
public boolean canCollideWith(Entity other) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] optimized dirt and snow spreading
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
||||
index 61783f17b655cbb6430d22fb3a81931ab3ea130c..af46c05a34292d271fd4a809398e6b299e10b12b 100644
|
||||
index 1fe07f8f9b28faf076209f7ad235fd5dc948b294..9bbb9f8e917288bb0d11661a1399a05631ebcce0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
||||
@@ -18,8 +18,13 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Added EntityToggleSitEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/TamableAnimal.java b/src/main/java/net/minecraft/world/entity/TamableAnimal.java
|
||||
index dcb4a886a1ade6dfabd9e5fc20d9db433438b959..0fc4a3e196ecdf16250d8b62136b2a4fe1ab6f84 100644
|
||||
index 9fb11df7131f400e6e631146c32efccea83adf56..1282911b97292cde30dff83de756bc91bf319cb2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/TamableAnimal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/TamableAnimal.java
|
||||
@@ -67,7 +67,7 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity {
|
||||
@ -31,7 +31,7 @@ index dcb4a886a1ade6dfabd9e5fc20d9db433438b959..0fc4a3e196ecdf16250d8b62136b2a4f
|
||||
if (inSittingPose) {
|
||||
this.entityData.set(DATA_FLAGS_ID, (byte)(b | 1));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
index 3f9b8873afb22fcf4f741297e77b197899c088f5..89894bc6a55bc7e456a9d49ac48f6a8192b890ae 100644
|
||||
index 167f142d6960867320b90d61db312ebf23e24a48..844083101e9763330af0175388f6cdda27a97ecc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
@@ -427,7 +427,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
||||
@ -41,7 +41,7 @@ index 3f9b8873afb22fcf4f741297e77b197899c088f5..89894bc6a55bc7e456a9d49ac48f6a81
|
||||
- this.setSitting(nbt.getBoolean("Sitting"));
|
||||
+ this.setSitting(nbt.getBoolean("Sitting"), false); // Paper
|
||||
this.setIsCrouching(nbt.getBoolean("Crouching"));
|
||||
if (this.level instanceof ServerLevel) {
|
||||
if (this.level() instanceof ServerLevel) {
|
||||
this.setTargetGoals();
|
||||
@@ -440,6 +440,12 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
||||
}
|
||||
@ -57,7 +57,7 @@ index 3f9b8873afb22fcf4f741297e77b197899c088f5..89894bc6a55bc7e456a9d49ac48f6a81
|
||||
}
|
||||
|
||||
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 0a18108fda778af5b600f77533770bd98584d60e..9c1e02c3a990cd0f8bba1c84c170b438278c02a7 100644
|
||||
index a0933b8467bf81333dc103055e73bb75069dcb36..9b807b318a2843810c3963277d464439a865cfb6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
@@ -132,6 +132,7 @@ public class Panda extends Animal {
|
||||
@ -69,10 +69,10 @@ index 0a18108fda778af5b600f77533770bd98584d60e..9c1e02c3a990cd0f8bba1c84c170b438
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
index 37882a393d7c17a9437145ab5fe1f74370681146..05c7680569346bb863b896bcc9515f3e7cfb8114 100644
|
||||
index 2030fdb3124f793d7b545135b1db32fe9be27050..4efa7e331cc974008c653a04687a336e97626445 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
@@ -586,7 +586,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||
@@ -591,7 +591,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||
}
|
||||
|
||||
public void sitDown() {
|
||||
@ -80,8 +80,8 @@ index 37882a393d7c17a9437145ab5fe1f74370681146..05c7680569346bb863b896bcc9515f3e
|
||||
+ if (!this.isCamelSitting() && new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), true).callEvent()) { // Paper
|
||||
this.playSound(SoundEvents.CAMEL_SIT, 1.0F, 1.0F);
|
||||
this.setPose(Pose.SITTING);
|
||||
this.resetLastPoseChangeTick(-this.level.getGameTime());
|
||||
@@ -594,7 +594,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||
this.resetLastPoseChangeTick(-this.level().getGameTime());
|
||||
@@ -599,7 +599,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||
}
|
||||
|
||||
public void standUp() {
|
||||
@ -89,12 +89,12 @@ index 37882a393d7c17a9437145ab5fe1f74370681146..05c7680569346bb863b896bcc9515f3e
|
||||
+ if (this.isCamelSitting() && new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), false).callEvent()) { // Paper
|
||||
this.playSound(SoundEvents.CAMEL_STAND, 1.0F, 1.0F);
|
||||
this.setPose(Pose.STANDING);
|
||||
this.resetLastPoseChangeTick(this.level.getGameTime());
|
||||
@@ -602,6 +602,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||
this.resetLastPoseChangeTick(this.level().getGameTime());
|
||||
@@ -607,6 +607,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||
}
|
||||
|
||||
public void standUpPanic() {
|
||||
public void standUpInstantly() {
|
||||
+ if (this.isCamelSitting() && !new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), false).callEvent()) return; // Paper
|
||||
this.setPose(Pose.STANDING);
|
||||
this.resetLastPoseChangeTickToFullStand(this.level.getGameTime());
|
||||
this.resetLastPoseChangeTickToFullStand(this.level().getGameTime());
|
||||
}
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add fire-tick-delay option
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
index 69ec4de4d065481496f5363c8985d2f39cd0191d..c33dab52dc73da5f510ea5eed7785bf68e06605e 100644
|
||||
index 7f88b910dfd0303f69b4fd1c7918a401c1f369f2..4002e0fffb60556e7af1aeff71b4be244f02b0f5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
@@ -165,7 +165,7 @@ public class FireBlock extends BaseFireBlock {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Ignore impossible spawn tick
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index 9bf1a37ea8436f3314b28914ae8b1516378eb465..31ac0e5ca26c7bdfa9b710d0bb78d846ddf6863e 100644
|
||||
index c63d5df91726839471c1eaaf7fafab3fa1be153b..8fdbc603486ff8a902b6327bc2acfb86a806626e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -80,6 +80,7 @@ public abstract class BaseSpawner {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Track projectile source for fireworks from dispensers
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
index 618ad17e4f10f58994db55b82b70fbb141e3579e..46accf082b5e440ec743583bb0609c013234cb06 100644
|
||||
index f2500cbe0aecf4959921a56c88a8947839a9b0e4..876f44845a02b02c93233b302c7306eff40f1468 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
@@ -517,6 +517,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -516,6 +516,7 @@ public interface DispenseItemBehavior {
|
||||
|
||||
itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
|
||||
FireworkRocketEntity entityfireworks = new FireworkRocketEntity(pointer.getLevel(), itemstack1, pointer.x(), pointer.y(), pointer.x(), true); // Paper - GH-2871 - fix last firework in stack having no effects when dispensed
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 239ace465b2911c0026649e6dd8d9168d9e39845..06c22d56357d215922195b3ba9149427e61e412d 100644
|
||||
index 9ed5882c09e241eaeae258ae15d013d5da98376f..c588460cb26c4d723428a11fe3d360d81ae39433 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3184,6 +3184,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3275,6 +3275,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
pluginManager.callEvent(entityCombustEvent);
|
||||
if (!entityCombustEvent.isCancelled()) {
|
||||
this.setSecondsOnFire(entityCombustEvent.getDuration(), false);
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PrePlayerAttackEntityEvent
|
||||
|
||||
|
||||
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 4f9931ecdea8742db9e1db78143168d69ee635fb..5b772b3caeafe98aa45a01bffe215a5dd33323b6 100644
|
||||
index b69e0cd17467752707a33540cd6113dc21554ca1..53487f0a4fe672298c3b83d24a2a603641afcde8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1238,8 +1238,17 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1239,8 +1239,17 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
public void attack(Entity target) {
|
@ -6,20 +6,20 @@ Subject: [PATCH] ensure reset EnderDragon boss event name
|
||||
Fix MC-257487
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index 8cf4ae35eb66e69de32295d707db6845b4b02962..e9eb32469a5c03f7a3677ef50fd4541c1ed662ad 100644
|
||||
index 17b5386d147dc007c487da3561ea5a5d3cd6db22..e2cd77d9de9709aa50f4b6febabe21bfcf94dc5d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -68,7 +68,8 @@ public class EndDragonFight {
|
||||
@@ -69,7 +69,8 @@ public class EndDragonFight {
|
||||
private static final int GATEWAY_DISTANCE = 96;
|
||||
public static final int DRAGON_SPAWN_Y = 128;
|
||||
private static final Predicate<Entity> VALID_PLAYER = EntitySelector.ENTITY_STILL_ALIVE.and(EntitySelector.withinDistance(0.0D, 128.0D, 0.0D, 192.0D));
|
||||
private final Predicate<Entity> validPlayer;
|
||||
- public final ServerBossEvent dragonEvent = (ServerBossEvent)(new ServerBossEvent(Component.translatable("entity.minecraft.ender_dragon"), BossEvent.BossBarColor.PINK, BossEvent.BossBarOverlay.PROGRESS)).setPlayBossMusic(true).setCreateWorldFog(true);
|
||||
+ private static final Component DEFAULT_BOSS_EVENT_NAME = Component.translatable("entity.minecraft.ender_dragon"); // Paper
|
||||
+ public final ServerBossEvent dragonEvent = (ServerBossEvent)(new ServerBossEvent(DEFAULT_BOSS_EVENT_NAME, BossEvent.BossBarColor.PINK, BossEvent.BossBarOverlay.PROGRESS)).setPlayBossMusic(true).setCreateWorldFog(true); // Paper
|
||||
public final ServerLevel level;
|
||||
private final BlockPos origin;
|
||||
private final ObjectArrayList<Integer> gateways = new ObjectArrayList<>();
|
||||
private final BlockPattern exitPortalPattern;
|
||||
@@ -450,6 +451,10 @@ public class EndDragonFight {
|
||||
@@ -443,6 +444,10 @@ public class EndDragonFight {
|
||||
this.ticksSinceDragonSeen = 0;
|
||||
if (dragon.hasCustomName()) {
|
||||
this.dragonEvent.setName(dragon.getDisplayName());
|
@ -6,7 +6,7 @@ Subject: [PATCH] fix MC-252817 (green map markers do not disappear).
|
||||
this bug is caused by the fact that the itemframe's item is set to empty before the green marker is requested to be removed. this is fixed by getting the mapid from this method's parameter, rather than the air block now stored by the item frame.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
index bfe94f6607e35db4df75d6061a88bce2a80b86c8..30aec9dff249ae629b22318e52902361a9fa4099 100644
|
||||
index a86472cce8e8fcde16d761842fe443a619f6e305..955316687e2e29ad75a0052317a7b0f89034c82a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
@@ -288,7 +288,9 @@ public class ItemFrame extends HangingEntity {
|
||||
@ -17,7 +17,7 @@ index bfe94f6607e35db4df75d6061a88bce2a80b86c8..30aec9dff249ae629b22318e52902361
|
||||
+ // Paper start - fix MC-252817 (green map markers do not disappear)
|
||||
+ this.getFramedMapIdFromItem(itemstack).ifPresent((i) -> {
|
||||
+ // Paper end
|
||||
MapItemSavedData worldmap = MapItem.getSavedData(i, this.level);
|
||||
MapItemSavedData worldmap = MapItem.getSavedData(i, this.level());
|
||||
|
||||
if (worldmap != null) {
|
||||
@@ -306,7 +308,12 @@ public class ItemFrame extends HangingEntity {
|
@ -10,10 +10,10 @@ public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTick
|
||||
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 405634ea82f48ccaa170b9de27140573cb647608..ff223f33c3fa712ed2c775836412cfed3624137a 100644
|
||||
index 4b8299c14518fbc658fc30c833e8a870d5e97021..c0ecdf15124e1694a8fa65164a82bf56a18917a8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -3150,6 +3150,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -3123,6 +3123,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void showElderGuardian(boolean silent) {
|
||||
if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F));
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] More vanilla friendly methods to update trades
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index 235e41ddd77e126648df81d9d187a1bd178e19fe..6023b9eb3001e1a98ab8b970d853c4e7c7603f4d 100644
|
||||
index 4bef7abbed6b64c2f126c81af5484eff200e620f..e30d5ae3e2900f43d7cafde71b8196f26e872841 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -935,6 +935,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -943,6 +943,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
|
||||
@Override
|
||||
protected void updateTrades() {
|
||||
@ -21,7 +21,7 @@ index 235e41ddd77e126648df81d9d187a1bd178e19fe..6023b9eb3001e1a98ab8b970d853c4e7
|
||||
VillagerData villagerdata = this.getVillagerData();
|
||||
Int2ObjectMap<VillagerTrades.ItemListing[]> int2objectmap = (Int2ObjectMap) VillagerTrades.TRADES.get(villagerdata.getProfession());
|
||||
|
||||
@@ -944,9 +950,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -952,9 +958,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
if (avillagertrades_imerchantrecipeoption != null) {
|
||||
MerchantOffers merchantrecipelist = this.getOffers();
|
||||
|
||||
@ -35,7 +35,7 @@ index 235e41ddd77e126648df81d9d187a1bd178e19fe..6023b9eb3001e1a98ab8b970d853c4e7
|
||||
|
||||
public void gossip(ServerLevel world, Villager villager, long time) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
index a1705b0fae9574d4ce2bb815ea57a35f8551c3a6..4e880409b06086568627f3e930159f1abb979984 100644
|
||||
index e6fcdbabde66f4707627fc8c3012aa20de8e34e3..e986767316a717bdbdff7a9ccaaeba068ab2a6d8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
@@ -100,6 +100,34 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren