Patches!!! MORE

Dieser Commit ist enthalten in:
Owen1212055 2023-12-06 11:21:56 -05:00
Ursprung 6bf2ebf200
Commit cd61b5d98e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 2133292072886A30
147 geänderte Dateien mit 520 neuen und 541 gelöschten Zeilen

Datei anzeigen

@ -7,10 +7,10 @@ Also don't fire level events or game events if stalactite
drip is cancelled drip is cancelled
diff --git a/src/main/java/net/minecraft/world/level/block/CauldronBlock.java b/src/main/java/net/minecraft/world/level/block/CauldronBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/CauldronBlock.java b/src/main/java/net/minecraft/world/level/block/CauldronBlock.java
index 53089c3a36bf2c0ec1bc9b436884deff0c30f028..2f85b893dd0abc39fcedec65acc89e1567faf6f0 100644 index 588b3e911d9b22dad2928ea9e32e8a8a3a8e9b96..a821a981adbebdcf22997731b9bbea3d033cd2b1 100644
--- a/src/main/java/net/minecraft/world/level/block/CauldronBlock.java --- a/src/main/java/net/minecraft/world/level/block/CauldronBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CauldronBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CauldronBlock.java
@@ -36,10 +36,18 @@ public class CauldronBlock extends AbstractCauldronBlock { @@ -43,10 +43,18 @@ public class CauldronBlock extends AbstractCauldronBlock {
public void handlePrecipitation(BlockState state, Level world, BlockPos pos, Biome.Precipitation precipitation) { public void handlePrecipitation(BlockState state, Level world, BlockPos pos, Biome.Precipitation precipitation) {
if (CauldronBlock.shouldHandlePrecipitation(world, precipitation)) { if (CauldronBlock.shouldHandlePrecipitation(world, precipitation)) {
if (precipitation == Biome.Precipitation.RAIN) { if (precipitation == Biome.Precipitation.RAIN) {
@ -31,7 +31,7 @@ index 53089c3a36bf2c0ec1bc9b436884deff0c30f028..2f85b893dd0abc39fcedec65acc89e15
world.gameEvent((Entity) null, GameEvent.BLOCK_CHANGE, pos); world.gameEvent((Entity) null, GameEvent.BLOCK_CHANGE, pos);
} }
@@ -57,11 +65,19 @@ public class CauldronBlock extends AbstractCauldronBlock { @@ -64,11 +72,19 @@ public class CauldronBlock extends AbstractCauldronBlock {
if (fluid == Fluids.WATER) { if (fluid == Fluids.WATER) {
iblockdata1 = Blocks.WATER_CAULDRON.defaultBlockState(); iblockdata1 = Blocks.WATER_CAULDRON.defaultBlockState();
@ -54,10 +54,10 @@ index 53089c3a36bf2c0ec1bc9b436884deff0c30f028..2f85b893dd0abc39fcedec65acc89e15
} }
diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
index 24d2da792bc498adf4251555a538df4cafe2e827..14164aa59fa5e315788cd7a207228081a05fd18f 100644 index a8b2c49ebf531d730d681ca3bceb4dc74b433fdb..7daf2ec30fd31023d326a6149661f38bfc1d646b 100644
--- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java --- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
@@ -91,7 +91,13 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock { @@ -101,7 +101,13 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
} }
// CraftBukkit start // CraftBukkit start
@ -72,7 +72,7 @@ index 24d2da792bc498adf4251555a538df4cafe2e827..14164aa59fa5e315788cd7a207228081
CraftBlockState newState = CraftBlockStates.getBlockState(world, blockposition); CraftBlockState newState = CraftBlockStates.getBlockState(world, blockposition);
newState.setData(newBlock); newState.setData(newBlock);
@@ -104,7 +110,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock { @@ -114,7 +120,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
return false; return false;
} }
newState.update(true); newState.update(true);

Datei anzeigen

@ -7,10 +7,10 @@ Powder snow cauldrons should turn to water when
extinguishing an entity extinguishing an entity
diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
index 14164aa59fa5e315788cd7a207228081a05fd18f..2932419b7ca3f066b1db329829af36ba31e17c65 100644 index 7daf2ec30fd31023d326a6149661f38bfc1d646b..43a72941ab553c154633144d358fb204765257f5 100644
--- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java --- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
@@ -64,7 +64,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock { @@ -69,7 +69,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
if (!world.isClientSide && entity.isOnFire() && this.isEntityInsideContent(state, pos, entity)) { if (!world.isClientSide && entity.isOnFire() && this.isEntityInsideContent(state, pos, entity)) {
// CraftBukkit start // CraftBukkit start
if (entity.mayInteract(world, pos)) { if (entity.mayInteract(world, pos)) {
@ -19,13 +19,17 @@ index 14164aa59fa5e315788cd7a207228081a05fd18f..2932419b7ca3f066b1db329829af36ba
return; return;
} }
} }
@@ -74,9 +74,15 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock { @@ -79,6 +79,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
} }
+ @Deprecated // Paper - use #handleEntityOnFireInsideWithEvent + @Deprecated // Paper - use #handleEntityOnFireInsideWithEvent
protected void handleEntityOnFireInside(BlockState state, Level world, BlockPos pos) { private void handleEntityOnFireInside(BlockState state, Level world, BlockPos pos) {
LayeredCauldronBlock.lowerFillLevel(state, world, pos); if (this.precipitationType == Biome.Precipitation.SNOW) {
LayeredCauldronBlock.lowerFillLevel((BlockState) Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, (Integer) state.getValue(LayeredCauldronBlock.LEVEL)), world, pos);
@@ -87,6 +88,11 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
}
} }
+ // Paper start + // Paper start
+ protected boolean handleEntityOnFireInsideWithEvent(BlockState state, Level world, BlockPos pos, Entity entity) { + protected boolean handleEntityOnFireInsideWithEvent(BlockState state, Level world, BlockPos pos, Entity entity) {
@ -35,22 +39,3 @@ index 14164aa59fa5e315788cd7a207228081a05fd18f..2932419b7ca3f066b1db329829af36ba
public static void lowerFillLevel(BlockState state, Level world, BlockPos pos) { public static void lowerFillLevel(BlockState state, Level world, BlockPos pos) {
// CraftBukkit start // CraftBukkit start
diff --git a/src/main/java/net/minecraft/world/level/block/PowderSnowCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/PowderSnowCauldronBlock.java
index 54c8f2ccadd685b43d7ee032a95bfcf193357ce9..7f6b240bbbb773ca49e0e6290169cc81f5529af5 100644
--- a/src/main/java/net/minecraft/world/level/block/PowderSnowCauldronBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/PowderSnowCauldronBlock.java
@@ -16,7 +16,14 @@ public class PowderSnowCauldronBlock extends LayeredCauldronBlock {
}
@Override
+ @Deprecated // Paper - use #handleEntityOnFireInsideWithEvent
protected void handleEntityOnFireInside(BlockState state, Level world, BlockPos pos) {
lowerFillLevel(Blocks.WATER_CAULDRON.defaultBlockState().setValue(LEVEL, state.getValue(LEVEL)), world, pos);
}
+ // Paper - replace powdered snow with water (taken from #handleEntityOnFireInside)
+ @Override
+ protected boolean handleEntityOnFireInsideWithEvent(BlockState state, Level world, BlockPos pos, net.minecraft.world.entity.Entity entity) {
+ return super.handleEntityOnFireInsideWithEvent(Blocks.WATER_CAULDRON.defaultBlockState().setValue(LEVEL, state.getValue(LEVEL)), world, pos, entity);
+ }
+ // Paper end
}

Datei anzeigen

@ -5,10 +5,10 @@ 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 diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 6aec9841fbb41ba448b7c77723f7081b6dfba884..351f6c554a3d50ebe2572671c433be5750ac6dd8 100644 index b8c7f0077118825848bddee8279e252914929d35..a21de30eef397308e3f4866a16cc588012e16f50 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -4023,6 +4023,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -4025,6 +4025,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public void releaseUsingItem() { public void releaseUsingItem() {
if (!this.useItem.isEmpty()) { if (!this.useItem.isEmpty()) {

Datei anzeigen

@ -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 diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 9cc9815aab6d0548c45e380ad3a90130c1d731d7..990e05590e0de258ae8b03335b2d888bc6be0229 100644 index b9b7896c2f850f9a02900932ea9255dc0aa07e26..cc91327050998c5e725ee71ac8b91b41a8b01bdf 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2552,6 +2552,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2593,6 +2593,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
} }
public void onTickingStart(Entity entity) { public void onTickingStart(Entity entity) {

Datei anzeigen

@ -13,7 +13,7 @@ public net.minecraft.world.entity.item.FallingBlockEntity blockState
Co-authored-by: Lukas Planz <lukas.planz@web.de> Co-authored-by: Lukas Planz <lukas.planz@web.de>
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java 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 5164c2bfb32275beff01b6e76dfbd9d031231bc6..e6f75a9cac46c8e3ddba664a9d5b27b665a94cb4 100644 index fc33d05cf1a3cceb220dab1ee1da33ffe37834db..45c07733f03b5c11f6d8e820f65dc950c70d9a67 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -66,6 +66,7 @@ public class FallingBlockEntity extends Entity { @@ -66,6 +66,7 @@ public class FallingBlockEntity extends Entity {

Datei anzeigen

@ -5,10 +5,10 @@ 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 diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ab0a3fed682f6b2cd5e60224c3a0d2a55c69efe8..ac87735ff07ee0833727cdf8b62f443ce16a3216 100644 index 600362fdc2d7b1f1f5614018af3339165c24d8a2..1b4fe753a4c4fc38b963720c2a7a9a4538550d32 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3312,6 +3312,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -3320,6 +3320,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override @Override
public void handleClientInformation(ServerboundClientInformationPacket packet) { public void handleClientInformation(ServerboundClientInformationPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix FurnaceInventory for smokers and blast furnaces
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
index 54e61b9b058bee2167461aaaf828ed7a00949c29..53421f780ac8bc2a67f64671fcad632fcdb8bede 100644 index e97166d3008cae7897519eaaf56b39c927661098..b835782c9c9b8b47a3ce8727e376f795286299a3 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
@@ -65,7 +65,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat @@ -66,7 +66,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat
return new CraftInventory(tileEntity); return new CraftInventory(tileEntity);
} }
@ -17,7 +17,7 @@ index 54e61b9b058bee2167461aaaf828ed7a00949c29..53421f780ac8bc2a67f64671fcad632f
@Override @Override
public Container getTileEntity() { public Container getTileEntity() {
@@ -73,6 +73,11 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat @@ -74,6 +74,11 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat
return furnace; return furnace;
} }
@ -29,7 +29,7 @@ index 54e61b9b058bee2167461aaaf828ed7a00949c29..53421f780ac8bc2a67f64671fcad632f
// Paper start // Paper start
@Override @Override
public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) {
@@ -170,7 +175,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat @@ -171,7 +176,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat
} }
} }
@ -38,7 +38,7 @@ index 54e61b9b058bee2167461aaaf828ed7a00949c29..53421f780ac8bc2a67f64671fcad632f
@Override @Override
public Container getTileEntity() { public Container getTileEntity() {
@@ -186,7 +191,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat @@ -187,7 +192,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat
} }
} }

Datei anzeigen

@ -5,10 +5,10 @@ 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 diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 82311b1f91af8cf1bfdf6036e5ac4334716dfeaf..31d4c3627230f27b955348828d86e86b28ed02e6 100644 index f5fa686060d40b0e8eddb910464c31085c3ee7c1..3dc4345abb975b555931614642be910785f98a7c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -796,6 +796,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -801,6 +801,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public void baseTick() { public void baseTick() {
this.level().getProfiler().push("entityBaseTick"); this.level().getProfiler().push("entityBaseTick");

Datei anzeigen

@ -7,10 +7,10 @@ There are no plans to support creating worlds while worlds are
being ticked themselvess. being ticked themselvess.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 18041f137157ca95639c0511f225bbb58356fe2b..47c984495a66fdbb10dea6bab33da78f4ab70a38 100644 index 752e2b122c41e513aee590699c6d4624bbbfc12a..00de78e06b4583880e00f57823a4929eb1484e7a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -304,6 +304,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -310,6 +310,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public volatile Thread shutdownThread; // Paper public volatile Thread shutdownThread; // Paper
public volatile boolean abnormalExit = false; // Paper public volatile boolean abnormalExit = false; // Paper
@ -18,7 +18,7 @@ index 18041f137157ca95639c0511f225bbb58356fe2b..47c984495a66fdbb10dea6bab33da78f
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) { public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference(); AtomicReference<S> atomicreference = new AtomicReference();
@@ -1470,7 +1471,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1639,7 +1640,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getFunctions().tick(); this.getFunctions().tick();
MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper
this.profiler.popPush("levels"); this.profiler.popPush("levels");
@ -27,7 +27,7 @@ index 18041f137157ca95639c0511f225bbb58356fe2b..47c984495a66fdbb10dea6bab33da78f
// CraftBukkit start // CraftBukkit start
// Run tasks that are waiting on processing // Run tasks that are waiting on processing
@@ -1502,6 +1503,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1671,6 +1672,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper end // Paper end
MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
@ -36,19 +36,19 @@ index 18041f137157ca95639c0511f225bbb58356fe2b..47c984495a66fdbb10dea6bab33da78f
while (iterator.hasNext()) { while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next(); ServerLevel worldserver = (ServerLevel) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
@@ -1548,6 +1551,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1717,6 +1720,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.pop(); this.profiler.pop();
worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
} }
+ this.isIteratingOverLevels = false; // Paper + this.isIteratingOverLevels = false; // Paper
this.profiler.popPush("connection"); this.profiler.popPush("connection");
MinecraftTimings.connectionTimer.startTiming(); // Spigot MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index fc4866d60368b60528dfc3e7cab7892f82680ec7..5c84ce0ec10d00a0c36b2e2fa66ca7387139efda 100644 index d005bcd0a64c4a18697aec802732d4f06b7ed85a..0759824929144805d55b4953863eacd5ae1542e0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -878,6 +878,11 @@ public final class CraftServer implements Server { @@ -873,6 +873,11 @@ public final class CraftServer implements Server {
return new ArrayList<World>(this.worlds.values()); return new ArrayList<World>(this.worlds.values());
} }
@ -60,7 +60,7 @@ index fc4866d60368b60528dfc3e7cab7892f82680ec7..5c84ce0ec10d00a0c36b2e2fa66ca738
public DedicatedPlayerList getHandle() { public DedicatedPlayerList getHandle() {
return this.playerList; return this.playerList;
} }
@@ -1137,6 +1142,7 @@ public final class CraftServer implements Server { @@ -1132,6 +1137,7 @@ public final class CraftServer implements Server {
@Override @Override
public World createWorld(WorldCreator creator) { public World createWorld(WorldCreator creator) {
Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP"); Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
@ -68,7 +68,7 @@ index fc4866d60368b60528dfc3e7cab7892f82680ec7..5c84ce0ec10d00a0c36b2e2fa66ca738
Preconditions.checkArgument(creator != null, "WorldCreator cannot be null"); Preconditions.checkArgument(creator != null, "WorldCreator cannot be null");
String name = creator.name(); String name = creator.name();
@@ -1277,6 +1283,7 @@ public final class CraftServer implements Server { @@ -1309,6 +1315,7 @@ public final class CraftServer implements Server {
@Override @Override
public boolean unloadWorld(World world, boolean save) { public boolean unloadWorld(World world, boolean save) {

Datei anzeigen

@ -725,7 +725,7 @@ index 0000000000000000000000000000000000000000..5a7209f05b549c222f6c9bc2af2a3579
+} +}
diff --git a/src/main/java/alternate/current/wire/WireHandler.java b/src/main/java/alternate/current/wire/WireHandler.java diff --git a/src/main/java/alternate/current/wire/WireHandler.java b/src/main/java/alternate/current/wire/WireHandler.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..dbd0f5eee8b7f0590817673ee5f9a529bd5184cd index 0000000000000000000000000000000000000000..02d0a3c3edd36b636163c5c912b26336fe87d16c
--- /dev/null --- /dev/null
+++ b/src/main/java/alternate/current/wire/WireHandler.java +++ b/src/main/java/alternate/current/wire/WireHandler.java
@@ -0,0 +1,1150 @@ @@ -0,0 +1,1150 @@
@ -1027,7 +1027,7 @@ index 0000000000000000000000000000000000000000..dbd0f5eee8b7f0590817673ee5f9a529
+ } + }
+ +
+ /** + /**
+ * Retrieve the {@link alternate.current.wire.Node Node} that represents the + * Retrieve the {@link Node Node} that represents the
+ * block at the given position in the level. + * block at the given position in the level.
+ */ + */
+ private Node getOrAddNode(BlockPos pos) { + private Node getOrAddNode(BlockPos pos) {
@ -1046,7 +1046,7 @@ index 0000000000000000000000000000000000000000..dbd0f5eee8b7f0590817673ee5f9a529
+ } + }
+ +
+ /** + /**
+ * Remove and return the {@link alternate.current.wire.Node Node} at the given + * Remove and return the {@link Node Node} at the given
+ * position. + * position.
+ */ + */
+ private Node removeNode(BlockPos pos) { + private Node removeNode(BlockPos pos) {
@ -1054,7 +1054,7 @@ index 0000000000000000000000000000000000000000..dbd0f5eee8b7f0590817673ee5f9a529
+ } + }
+ +
+ /** + /**
+ * Return a {@link alternate.current.wire.Node Node} that represents the block + * Return a {@link Node Node} that represents the block
+ * at the given position. + * at the given position.
+ */ + */
+ private Node getNextNode(BlockPos pos) { + private Node getNextNode(BlockPos pos) {
@ -1063,8 +1063,8 @@ index 0000000000000000000000000000000000000000..dbd0f5eee8b7f0590817673ee5f9a529
+ +
+ /** + /**
+ * Return a node that represents the given position and block state. If it is a + * Return a node that represents the given position and block state. If it is a
+ * wire, then create a new {@link alternate.current.wire.WireNode WireNode}. + * wire, then create a new {@link WireNode WireNode}.
+ * Otherwise, grab the next {@link alternate.current.wire.Node Node} from the + * Otherwise, grab the next {@link Node Node} from the
+ * cache and update it. + * cache and update it.
+ */ + */
+ private Node getNextNode(BlockPos pos, BlockState state) { + private Node getNextNode(BlockPos pos, BlockState state) {
@ -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 diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 990e05590e0de258ae8b03335b2d888bc6be0229..244601cd37006b8abdf5bf9dd849d54c24928499 100644 index cc91327050998c5e725ee71ac8b91b41a8b01bdf..9c63f83d2a907afa630b4e05ea486db4d63ff8ec 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -224,6 +224,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
public final UUID uuid; public final UUID uuid;
public boolean hasPhysicsEvent = true; // Paper public boolean hasPhysicsEvent = true; // Paper
public boolean hasEntityMoveEvent = false; // Paper public boolean hasEntityMoveEvent = false; // Paper
@ -2019,8 +2019,8 @@ index 990e05590e0de258ae8b03335b2d888bc6be0229..244601cd37006b8abdf5bf9dd849d54c
public static Throwable getAddToWorldStackTrace(Entity entity) { public static Throwable getAddToWorldStackTrace(Entity entity) {
final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date()); final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date());
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr); io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr);
@@ -2541,6 +2542,13 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2580,6 +2581,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
return this.randomSequences; return crashreportsystemdetails;
} }
+ // Paper start - optimize redstone (Alternate Current) + // Paper start - optimize redstone (Alternate Current)
@ -2034,10 +2034,10 @@ index 990e05590e0de258ae8b03335b2d888bc6be0229..244601cd37006b8abdf5bf9dd849d54c
EntityCallbacks() {} EntityCallbacks() {}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 330ce28f128ff2e5ca80f0938ac3ea7b195e9d82..412f2283a85c39bfb730c73376ec663a79fb9187 100644 index dbabf221bb0d49a2632728a6d04ff3e55a7d5898..7886c49b1b224469b8b542023891b2645b69ec71 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1856,4 +1856,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -1876,4 +1876,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return ret; return ret;
} }
// Paper end // Paper end
@ -2053,10 +2053,10 @@ index 330ce28f128ff2e5ca80f0938ac3ea7b195e9d82..412f2283a85c39bfb730c73376ec663a
+ // Paper end - optimize redstone (Alternate Current) + // Paper end - optimize redstone (Alternate Current)
} }
diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java 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 a0ae3635ae8c3fd3ac17dd9fa614ec84c7b1b0ca..2b054439b7a763d5a3fbb5dbfe197cb9a9a3525c 100644 index 5ffb1453bf332e8035abacc97ab36d78e1248484..507be06ad51b7a212e28d3ca6680e0e4b00f4233 100644
--- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java --- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
+++ b/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 { @@ -259,7 +259,7 @@ public class RedStoneWireBlock extends Block {
return floor.isFaceSturdy(world, pos, Direction.UP) || floor.is(Blocks.HOPPER); return floor.isFaceSturdy(world, pos, Direction.UP) || floor.is(Blocks.HOPPER);
} }
@ -2065,7 +2065,7 @@ index a0ae3635ae8c3fd3ac17dd9fa614ec84c7b1b0ca..2b054439b7a763d5a3fbb5dbfe197cb9
// The bulk of the new functionality is found in RedstoneWireTurbo.java // The bulk of the new functionality is found in RedstoneWireTurbo.java
com.destroystokyo.paper.util.RedstoneWireTurbo turbo = new com.destroystokyo.paper.util.RedstoneWireTurbo(this); com.destroystokyo.paper.util.RedstoneWireTurbo turbo = new com.destroystokyo.paper.util.RedstoneWireTurbo(this);
@@ -454,7 +454,13 @@ public class RedStoneWireBlock extends Block { @@ -461,7 +461,13 @@ public class RedStoneWireBlock extends Block {
@Override @Override
public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
if (!oldState.is(state.getBlock()) && !world.isClientSide) { if (!oldState.is(state.getBlock()) && !world.isClientSide) {
@ -2080,7 +2080,7 @@ index a0ae3635ae8c3fd3ac17dd9fa614ec84c7b1b0ca..2b054439b7a763d5a3fbb5dbfe197cb9
Iterator iterator = Direction.Plane.VERTICAL.iterator(); Iterator iterator = Direction.Plane.VERTICAL.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -481,7 +487,13 @@ public class RedStoneWireBlock extends Block { @@ -488,7 +494,13 @@ public class RedStoneWireBlock extends Block {
world.updateNeighborsAt(pos.relative(enumdirection), this); world.updateNeighborsAt(pos.relative(enumdirection), this);
} }
@ -2095,7 +2095,7 @@ index a0ae3635ae8c3fd3ac17dd9fa614ec84c7b1b0ca..2b054439b7a763d5a3fbb5dbfe197cb9
this.updateNeighborsOfNeighboringWires(world, pos); this.updateNeighborsOfNeighboringWires(world, pos);
} }
} }
@@ -515,8 +527,14 @@ public class RedStoneWireBlock extends Block { @@ -522,8 +534,14 @@ public class RedStoneWireBlock extends Block {
@Override @Override
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
if (!world.isClientSide) { if (!world.isClientSide) {

Datei anzeigen

@ -18,10 +18,10 @@ index 02abc5f387d781094bd2f39233444add3a470be1..ece82743df21f0b776382821ad75dee9
if (bl) { if (bl) {
int j = this.angerByUuid.removeInt(entity.getUUID()); 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 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 2d9ceee41f7b0bd57e1bad26169c506b274019b9..b2bc3a832c310448046ccde37a04918aa6d63197 100644 index b5185fcb635fbf5e5ed9d6cc9cc517cb46ada5aa..9f1b7c629644931074293151ed58a523ca6d488c 100644
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java --- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java +++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
@@ -487,6 +487,15 @@ public class Warden extends Monster implements VibrationSystem { @@ -488,6 +488,15 @@ public class Warden extends Monster implements VibrationSystem {
@VisibleForTesting @VisibleForTesting
public void increaseAngerAt(@Nullable Entity entity, int amount, boolean listening) { public void increaseAngerAt(@Nullable Entity entity, int amount, boolean listening) {
if (!this.isNoAi() && this.canTargetEntity(entity)) { if (!this.isNoAi() && this.canTargetEntity(entity)) {

Datei anzeigen

@ -11,10 +11,10 @@ distance trigger. This adds a config option to ignore that
and use the exact dimension key of the worlds involved. and use the exact dimension key of the worlds involved.
diff --git a/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java b/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java diff --git a/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java b/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java
index d4a673a9fb604876c554f955ed13ad31a2adb217..e75b3df4db9cb618aef4837acb8cde92ed5a4b01 100644 index 5f9cb2c7a2874e423087d04d3360af0364692b5c..f81aa5adf9a499cef6dc45bf3f9de2df3dc61460 100644
--- a/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java --- a/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java
+++ b/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java +++ b/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java
@@ -30,7 +30,7 @@ public record LocationPredicate(Optional<LocationPredicate.PositionPredicate> po @@ -25,7 +25,7 @@ public record LocationPredicate(Optional<LocationPredicate.PositionPredicate> po
public boolean matches(ServerLevel world, double x, double y, double z) { public boolean matches(ServerLevel world, double x, double y, double z) {
if (this.position.isPresent() && !this.position.get().matches(x, y, z)) { if (this.position.isPresent() && !this.position.get().matches(x, y, z)) {
return false; return false;
@ -24,10 +24,10 @@ index d4a673a9fb604876c554f955ed13ad31a2adb217..e75b3df4db9cb618aef4837acb8cde92
} else { } else {
BlockPos blockPos = BlockPos.containing(x, y, z); BlockPos blockPos = BlockPos.containing(x, y, z);
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index edd8eb7e9b4c676bd823a5081f3f23f8eda13eba..fdd8ae699ebffcce391321d0c0d48a2bf171de12 100644 index b6142c9f4474749be495ca0638e7b45fad327ce1..4895f0c507aac0c473ecca951f206a5b2182ad97 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1316,6 +1316,12 @@ public class ServerPlayer extends Player { @@ -1320,6 +1320,12 @@ public class ServerPlayer extends Player {
ResourceKey<Level> maindimensionkey = CraftDimensionUtil.getMainDimensionKey(origin); ResourceKey<Level> maindimensionkey = CraftDimensionUtil.getMainDimensionKey(origin);
ResourceKey<Level> maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level()); ResourceKey<Level> maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level());

Datei anzeigen

@ -53,7 +53,7 @@ index ffe6881d93153838cd23f125980b832e6fd1d0eb..f5cbe9ae5802fa48e57092b1e5ca8a5f
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
index d5861dfa771c4eb217e082e3c832c3a6c603710d..1233788274f1cbdaa564d3145214b4908ae1f573 100644 index 187eda2dd40785eb09528c86718d6b4fd3ab252c..32594b4ebe8ab4c820e588573f5e01b08c57984f 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java +++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
@@ -274,4 +274,13 @@ public class DummyGeneratorAccess implements WorldGenLevel { @@ -274,4 +274,13 @@ public class DummyGeneratorAccess implements WorldGenLevel {

Datei anzeigen

@ -8,7 +8,7 @@ in command blocks, and if called asynchronously, would throw
an error an error
diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
index e05eb08a9c229b371887676da510df948b896a85..ceeedbd88c56c08ec8b047c9ca2f14cc581e12ad 100644 index c56f5173fda6b38c2dcaea196217f2f5a7d7c641..d4ff8c6b7801e33be4ff69b8bae13c09f4872c4b 100644
--- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java --- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
+++ b/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 { @@ -172,6 +172,7 @@ public abstract class BaseCommandBlock implements CommandSource {
@ -20,10 +20,10 @@ index e05eb08a9c229b371887676da510df948b896a85..ceeedbd88c56c08ec8b047c9ca2f14cc
Date date = new Date(); Date date = new Date();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5c84ce0ec10d00a0c36b2e2fa66ca7387139efda..8148d1cddc6f062cfc3938f2b185be0ed3afe3ab 100644 index 0759824929144805d55b4953863eacd5ae1542e0..7c8d21499d49aa88ad771e98a8e5302d1b3a3229 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1840,7 +1840,7 @@ public final class CraftServer implements Server { @@ -1872,7 +1872,7 @@ public final class CraftServer implements Server {
// Paper end // Paper end
Set<CommandSender> recipients = new HashSet<>(); Set<CommandSender> recipients = new HashSet<>();
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) { for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {

Datei anzeigen

@ -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. 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 diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 244601cd37006b8abdf5bf9dd849d54c24928499..1f1cdf5516eab738e5d434eb5f2933ff3d7a1359 100644 index 9c63f83d2a907afa630b4e05ea486db4d63ff8ec..60eb96c274ac1b899de9b6f79eaab8596aee012c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1559,6 +1559,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1583,6 +1583,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 // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false; return false;
} else { } else {

Datei anzeigen

@ -5,10 +5,10 @@ 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index e8e61fb73792f8f7fb0266df93dbaf552114b492..9531094aa2b551e5576b0af494cc141fd8cac007 100644 index bd2c3425cb17d14ccb6f8390997cc07de354468c..1bfd3f66bf5f269685774b7cd75112ba3429c484 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/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 { @@ -162,6 +162,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
return new Location(worldServer.getWorld(), bed.getX(), bed.getY(), bed.getZ()); return new Location(worldServer.getWorld(), bed.getX(), bed.getY(), bed.getZ());
} }
// Paper end // Paper end

Datei anzeigen

@ -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 diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 31d4c3627230f27b955348828d86e86b28ed02e6..ba787852ba551130d3200b6f930861c7c35fe7c0 100644 index 3dc4345abb975b555931614642be910785f98a7c..97bd7295c1e9af1666cb16c77f54b92947610724 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2672,6 +2672,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2701,6 +2701,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
entityitem.setDefaultPickUpDelay(); entityitem.setDefaultPickUpDelay();
@ -24,10 +24,10 @@ index 31d4c3627230f27b955348828d86e86b28ed02e6..ba787852ba551130d3200b6f930861c7
EntityDropItemEvent event = new EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity()); EntityDropItemEvent event = new EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
Bukkit.getPluginManager().callEvent(event); 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 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 2f62498432bc90cbbc3f206dca41bb276f46f247..c528cb7c18650863eaf8e2c6c0d9276c02712cc9 100644 index fb5e200499a1a73fd40c8b7c81185f48381f49e4..e555fd8ca61e1ce7a52ecd475cc3ea11dedcab08 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java --- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java +++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
@@ -597,7 +597,7 @@ public class Dolphin extends WaterAnimal { @@ -592,7 +592,7 @@ public class Dolphin extends WaterAnimal {
float f2 = 0.02F * Dolphin.this.random.nextFloat(); 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)); 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));
@ -37,12 +37,12 @@ index 2f62498432bc90cbbc3f206dca41bb276f46f247..c528cb7c18650863eaf8e2c6c0d9276c
} }
} }
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java 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 74c5eec21fe447c525e204b504f40d0d363039bb..e21bf5b02a4d9e6e23ffd42a1da8a3a5f2ac05db 100644 index 6124209f50300eeaab45b66c2f1a5b2944119450..96799179b0dd1886f0cdc386f04e152a19b3337d 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
@@ -509,14 +509,14 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> { @@ -509,14 +509,14 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
entityitem.setPickUpDelay(40); entityitem.setPickUpDelay(40);
entityitem.setThrower(this.getUUID()); entityitem.setThrower(this);
this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F); this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F);
- this.level().addFreshEntity(entityitem); - this.level().addFreshEntity(entityitem);
+ this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent + this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent

Datei anzeigen

@ -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 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 63678ff2e40d2ba0a5e97539394b18f97368f8cf..9a7956befc346e1b58f064213800fd099a052fc6 100644 index c534589762b1361bae7c446dfec8dbbf542485fb..a87a34b0c4c8e5d0cf079025c230b1434c919b54 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
@@ -803,7 +803,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { @@ -810,7 +810,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
++this.pollinatingTicks; ++this.pollinatingTicks;
if (this.pollinatingTicks > 600) { if (this.pollinatingTicks > 600) {
Bee.this.savedFlowerPos = null; Bee.this.savedFlowerPos = null;

Datei anzeigen

@ -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 diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c518f78af7612f59af7f02fcf2ba5ef274f9694d..10bb9364b6ebdd21c4a3602af5c3887871dc0548 100644 index 1b4fe753a4c4fc38b963720c2a7a9a4538550d32..7d35d44f0e95a0ce7bc57e9a306b8a8ab36fce5c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2369,7 +2369,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2377,7 +2377,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} }
// Spigot end // Spigot end
// this.chatSpamTickCount += 20; // this.chatSpamTickCount += 20;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] More Teleport API
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 10bb9364b6ebdd21c4a3602af5c3887871dc0548..ffc6b7e7349ea1088b9ed5e13686d7bd9483aa1c 100644 index 7d35d44f0e95a0ce7bc57e9a306b8a8ab36fce5c..6726fc470843b900ce7b15268cdcbf4881a8fcd0 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1606,11 +1606,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1633,11 +1633,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
return false; // CraftBukkit - Return event status return false; // CraftBukkit - Return event status
} }
@ -29,10 +29,10 @@ index 10bb9364b6ebdd21c4a3602af5c3887871dc0548..ffc6b7e7349ea1088b9ed5e13686d7bd
d0 = to.getX(); d0 = to.getX();
d1 = to.getY(); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 28cda0cc2e179b3f03d4bee3ca6c24c3f831214a..e02c454ba75f440342d85b466426b9363992d923 100644 index d4fffcc5bb746df8dc177780f15ff4dbca64c018..ed30e079c23f564cbd0a45b38586bd12e17c525e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -566,15 +566,36 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -573,15 +573,36 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@Override @Override
public boolean teleport(Location location, TeleportCause cause) { public boolean teleport(Location location, TeleportCause cause) {
@ -72,10 +72,10 @@ index 28cda0cc2e179b3f03d4bee3ca6c24c3f831214a..e02c454ba75f440342d85b466426b936
// Let the server handle cross world teleports // Let the server handle cross world teleports
if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5dc7ec4275ca7377ba25f508c2ffdb0427ca441f..2b4f34e5889bac44f724935b6e1fc330a75bd9d6 100644 index d73f94b37472da28a8c3dda9574d95954033785b..ec18039f7a5577d290c2d5da23aa734ddde62332 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1202,13 +1202,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1209,13 +1209,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public void setRotation(float yaw, float pitch) { public void setRotation(float yaw, float pitch) {
@ -178,7 +178,7 @@ index 5dc7ec4275ca7377ba25f508c2ffdb0427ca441f..2b4f34e5889bac44f724935b6e1fc330
location.checkFinite(); location.checkFinite();
ServerPlayer entity = this.getHandle(); ServerPlayer entity = this.getHandle();
@@ -1221,7 +1309,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1228,7 +1316,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return false; return false;
} }
@ -187,7 +187,7 @@ index 5dc7ec4275ca7377ba25f508c2ffdb0427ca441f..2b4f34e5889bac44f724935b6e1fc330
return false; return false;
} }
@@ -1239,7 +1327,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1246,7 +1334,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
// If this player is riding another entity, we must dismount before teleporting. // If this player is riding another entity, we must dismount before teleporting.
@ -196,7 +196,7 @@ index 5dc7ec4275ca7377ba25f508c2ffdb0427ca441f..2b4f34e5889bac44f724935b6e1fc330
// SPIGOT-5509: Wakeup, similar to riding // SPIGOT-5509: Wakeup, similar to riding
if (this.isSleeping()) { if (this.isSleeping()) {
@@ -1255,13 +1343,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1262,13 +1350,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle(); ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle();
// Close any foreign inventory // Close any foreign inventory

Datei anzeigen

@ -5,10 +5,10 @@ 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 diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ba787852ba551130d3200b6f930861c7c35fe7c0..ce765fbe067d56ce0e5ae0bfade01f3b50e004be 100644 index 97bd7295c1e9af1666cb16c77f54b92947610724..4ef45d704107d03a506627da80ebfeb41a0945f8 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3074,6 +3074,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -3103,6 +3103,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
this.level().getProfiler().push("portal"); this.level().getProfiler().push("portal");
this.portalTime = i; this.portalTime = i;
@ -22,7 +22,7 @@ index ba787852ba551130d3200b6f930861c7c35fe7c0..ce765fbe067d56ce0e5ae0bfade01f3b
this.setPortalCooldown(); this.setPortalCooldown();
// CraftBukkit start // CraftBukkit start
if (this instanceof ServerPlayer) { if (this instanceof ServerPlayer) {
@@ -3081,6 +3088,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -3110,6 +3117,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} else { } else {
this.changeDimension(worldserver1); this.changeDimension(worldserver1);
} }

Datei anzeigen

@ -9,10 +9,10 @@ should be supported. Some entities (for whatever
reason) use the level's random in some places. reason) use the level's random in some places.
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index d70abca10e84b86310ce5e4d72eb939331dc00e4..1a06d8c839e94fe2c1920035d606b62e0dc5cfba 100644 index fc14a2eb464675f8fb0bff916992687adb4e3d25..6b18f23b57c7000dce9726df98a509ee9477f6d2 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -64,7 +64,12 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -66,7 +66,12 @@ public class ItemEntity extends Entity implements TraceableEntity {
} }
public ItemEntity(Level world, double x, double y, double z, ItemStack stack) { public ItemEntity(Level world, double x, double y, double z, ItemStack stack) {
@ -27,10 +27,10 @@ index d70abca10e84b86310ce5e4d72eb939331dc00e4..1a06d8c839e94fe2c1920035d606b62e
public ItemEntity(Level world, double x, double y, double z, ItemStack stack, double velocityX, double velocityY, double velocityZ) { 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 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 57f9bf73ee14bc8811d0192543caf2b02e890ee0..4ce3e69970dd9eb251d0538a2d233ca30e9e5e47 100644 index d9ed22e9853eebdf6c517b41787a27a1a56a0871..c3e47426382296d650fa00ce0bc1a82bf23c7877 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java --- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
@@ -36,7 +36,7 @@ public class PrimedTnt extends Entity implements TraceableEntity { @@ -43,7 +43,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
public PrimedTnt(Level world, double x, double y, double z, @Nullable LivingEntity igniter) { public PrimedTnt(Level world, double x, double y, double z, @Nullable LivingEntity igniter) {
this(EntityType.TNT, world); this(EntityType.TNT, world);
this.setPos(x, y, z); this.setPos(x, y, z);

Datei anzeigen

@ -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. 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 diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 6cd4e043de742bd9c84dd6408dc80598aedaa3a4..b965df96bd92c0e3ab20f46f5a3712fcb0fb9fce 100644 index bf9b185e3defb496022c20ec60a84a4f6f99d5be..4e1ed252bf400ec991f95b02984f01a9689f2989 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/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 { @@ -62,6 +62,8 @@ public class ServerPlayerGameMode {
@ -57,10 +57,10 @@ index 6cd4e043de742bd9c84dd6408dc80598aedaa3a4..b965df96bd92c0e3ab20f46f5a3712fc
} }
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ffc6b7e7349ea1088b9ed5e13686d7bd9483aa1c..372015adb4f198c131d1a5f239e75f862ab5fdd7 100644 index 6726fc470843b900ce7b15268cdcbf4881a8fcd0..d7f551d8cae2055b82782905a14d649e44e8bcec 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1752,8 +1752,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1779,8 +1779,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
return; return;
} }
// Paper end - Don't allow digging in unloaded chunks // Paper end - Don't allow digging in unloaded chunks

Datei anzeigen

@ -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 diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 412f2283a85c39bfb730c73376ec663a79fb9187..a28da797e3ea01eacb378f65da3cfc75cb6b1830 100644 index 7886c49b1b224469b8b542023891b2645b69ec71..d26216ad6395f6d74a7fa4d080f5edfd44605ae4 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -810,7 +810,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -813,7 +813,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
} }
private static boolean isInWorldBoundsHorizontal(BlockPos pos) { private static boolean isInWorldBoundsHorizontal(BlockPos pos) {
@ -18,10 +18,10 @@ index 412f2283a85c39bfb730c73376ec663a79fb9187..a28da797e3ea01eacb378f65da3cfc75
private static boolean isOutsideSpawnableHeight(int y) { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 70be0eb5dd0928ee24ec8dfb92f811c19b27cdd5..3df9f69e4297ef0f412191f8a0c1cb17311f4de3 100644 index 3f4145bef3ef0d0d54914c1f6ebd216622d9a747..c77fec78636805a496ecea3e56f26290dbcbffff 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -312,9 +312,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -313,9 +313,24 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public boolean setSpawnLocation(int x, int y, int z) { public boolean setSpawnLocation(int x, int y, int z) {
return this.setSpawnLocation(x, y, z, 0.0F); return this.setSpawnLocation(x, y, z, 0.0F);
} }
@ -46,7 +46,7 @@ index 70be0eb5dd0928ee24ec8dfb92f811c19b27cdd5..3df9f69e4297ef0f412191f8a0c1cb17
// Paper start - add ticket to hold chunk for a little while longer if plugin accesses it // Paper start - add ticket to hold chunk for a little while longer if plugin accesses it
net.minecraft.world.level.chunk.LevelChunk chunk = this.world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); net.minecraft.world.level.chunk.LevelChunk chunk = this.world.getChunkSource().getChunkAtIfLoadedImmediately(x, z);
if (chunk == null) { if (chunk == null) {
@@ -429,6 +444,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -430,6 +445,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public boolean regenerateChunk(int x, int z) { public boolean regenerateChunk(int x, int z) {
org.spigotmc.AsyncCatcher.catchOp("chunk regenerate"); // Spigot org.spigotmc.AsyncCatcher.catchOp("chunk regenerate"); // Spigot
@ -54,7 +54,7 @@ index 70be0eb5dd0928ee24ec8dfb92f811c19b27cdd5..3df9f69e4297ef0f412191f8a0c1cb17
// Paper start - implement regenerateChunk method // Paper start - implement regenerateChunk method
final ServerLevel serverLevel = this.world; final ServerLevel serverLevel = this.world;
final net.minecraft.server.level.ServerChunkCache serverChunkCache = serverLevel.getChunkSource(); final net.minecraft.server.level.ServerChunkCache serverChunkCache = serverLevel.getChunkSource();
@@ -524,6 +540,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -525,6 +541,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public boolean loadChunk(int x, int z, boolean generate) { public boolean loadChunk(int x, int z, boolean generate) {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot
@ -62,7 +62,7 @@ index 70be0eb5dd0928ee24ec8dfb92f811c19b27cdd5..3df9f69e4297ef0f412191f8a0c1cb17
// Paper start - Optimize this method // Paper start - Optimize this method
ChunkPos chunkPos = new ChunkPos(x, z); ChunkPos chunkPos = new ChunkPos(x, z);
ChunkAccess immediate = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); // Paper ChunkAccess immediate = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); // Paper
@@ -587,6 +604,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -588,6 +605,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public boolean addPluginChunkTicket(int x, int z, Plugin plugin) { public boolean addPluginChunkTicket(int x, int z, Plugin plugin) {
@ -70,7 +70,7 @@ index 70be0eb5dd0928ee24ec8dfb92f811c19b27cdd5..3df9f69e4297ef0f412191f8a0c1cb17
Preconditions.checkArgument(plugin != null, "null plugin"); Preconditions.checkArgument(plugin != null, "null plugin");
Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled"); Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled");
@@ -655,6 +673,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -656,6 +674,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public void setChunkForceLoaded(int x, int z, boolean forced) { public void setChunkForceLoaded(int x, int z, boolean forced) {
@ -78,7 +78,7 @@ index 70be0eb5dd0928ee24ec8dfb92f811c19b27cdd5..3df9f69e4297ef0f412191f8a0c1cb17
this.getHandle().setChunkForced(x, z, forced); this.getHandle().setChunkForced(x, z, forced);
} }
@@ -967,6 +986,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -968,6 +987,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) { public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) {
@ -86,7 +86,7 @@ index 70be0eb5dd0928ee24ec8dfb92f811c19b27cdd5..3df9f69e4297ef0f412191f8a0c1cb17
// Transient load for this tick // Transient load for this tick
return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z); return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z);
} }
@@ -2414,6 +2434,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -2420,6 +2440,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
// Spigot end // Spigot end
// Paper start // Paper start
public java.util.concurrent.CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent) { public java.util.concurrent.CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent) {

Datei anzeigen

@ -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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2b4f34e5889bac44f724935b6e1fc330a75bd9d6..337dbf8e5a2537e1d617d355a9a0f79171a69524 100644 index ec18039f7a5577d290c2d5da23aa734ddde62332..50d3de2bb715e7de8243174f66d92e45bae10683 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -642,6 +642,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -649,6 +649,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
// Paper end - sendOpLevel API // Paper end - sendOpLevel API

Datei anzeigen

@ -10,10 +10,10 @@ potentially waterlogged block states fading.
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com
diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
index 834c5e3fbff3819f3f72e95a1072d9b9e57f25b3..294d22b6b27e96b59c77527efcfefa9410b756e4 100644 index a4ca58384ae2a39ec568b153cc1a4f7704136108..0a2de99c22cfcc96a664dc2afe7379987ea815db 100644
--- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java --- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
@@ -85,6 +85,11 @@ public class FrogspawnBlock extends Block { @@ -92,6 +92,11 @@ public class FrogspawnBlock extends Block {
} }
private void hatchFrogspawn(ServerLevel world, BlockPos pos, RandomSource random) { private void hatchFrogspawn(ServerLevel world, BlockPos pos, RandomSource random) {
@ -26,10 +26,10 @@ index 834c5e3fbff3819f3f72e95a1072d9b9e57f25b3..294d22b6b27e96b59c77527efcfefa94
world.playSound((Player)null, pos, SoundEvents.FROGSPAWN_HATCH, SoundSource.BLOCKS, 1.0F, 1.0F); world.playSound((Player)null, pos, SoundEvents.FROGSPAWN_HATCH, SoundSource.BLOCKS, 1.0F, 1.0F);
this.spawnTadpoles(world, pos, random); this.spawnTadpoles(world, pos, random);
diff --git a/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java b/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java b/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java
index f99082c58743e8b73e263655dbebc34e904c45bc..e9358522e526505d5c200e19b193bbcf5ee10826 100644 index f660e58badfcc2a90e6dd618428a21bf5ad34969..13ee09f93ec325e416a2b29e3608e870e7f06aed 100644
--- a/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java --- a/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java
@@ -96,7 +96,7 @@ public class ScaffoldingBlock extends Block implements SimpleWaterloggedBlock { @@ -103,7 +103,7 @@ public class ScaffoldingBlock extends Block implements SimpleWaterloggedBlock {
int i = ScaffoldingBlock.getDistance(world, pos); int i = ScaffoldingBlock.getDistance(world, pos);
BlockState iblockdata1 = (BlockState) ((BlockState) state.setValue(ScaffoldingBlock.DISTANCE, i)).setValue(ScaffoldingBlock.BOTTOM, this.isBottom(world, pos, i)); BlockState iblockdata1 = (BlockState) ((BlockState) state.setValue(ScaffoldingBlock.DISTANCE, i)).setValue(ScaffoldingBlock.BOTTOM, this.isBottom(world, pos, i));
@ -39,10 +39,10 @@ index f99082c58743e8b73e263655dbebc34e904c45bc..e9358522e526505d5c200e19b193bbcf
FallingBlockEntity.fall(world, pos, iblockdata1); FallingBlockEntity.fall(world, pos, iblockdata1);
} else { } else {
diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
index 1e115adfcfee518667559100d04050f5e71c8a23..8aaa3cb2248a02b5ee25251cc837a145edd34341 100644 index 615ee22b4948d6a4869dc8b2111f48056969dd79..3cedc349e79665d3d471c92b5dca25c9e66ca0bf 100644
--- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java --- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
@@ -54,12 +54,26 @@ public class SnifferEggBlock extends Block { @@ -61,12 +61,26 @@ public class SnifferEggBlock extends Block {
return this.getHatchLevel(state) == 2; return this.getHatchLevel(state) == 2;
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Collision API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index 5a94a06bb531fe7805b43b5033a1d6edeee3b883..8cc1d7f5c5f8e9b9d6f7ab26025acf7237262959 100644 index 681d29902a14b36e4b72e1ca530e131e1aaf273f..0b7faa5b0fce81fd1790341599c632ffc5b171f3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -1021,5 +1021,12 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -1055,5 +1055,12 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
return this.getHandle().clip(new net.minecraft.world.level.ClipContext(start, end, net.minecraft.world.level.ClipContext.Block.COLLIDER, net.minecraft.world.level.ClipContext.Fluid.NONE, null)).getType() == net.minecraft.world.phys.HitResult.Type.MISS; return this.getHandle().clip(new net.minecraft.world.level.ClipContext(start, end, net.minecraft.world.level.ClipContext.Block.COLLIDER, net.minecraft.world.level.ClipContext.Fluid.NONE, null)).getType() == net.minecraft.world.phys.HitResult.Type.MISS;
} }
@ -22,10 +22,10 @@ index 5a94a06bb531fe7805b43b5033a1d6edeee3b883..8cc1d7f5c5f8e9b9d6f7ab26025acf72
// Paper end // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index e02c454ba75f440342d85b466426b9363992d923..4199bc76c1f304e19fa7c3b7763d31b56a57221b 100644 index ed30e079c23f564cbd0a45b38586bd12e17c525e..1075c90e51cfea5823a74c07847545e227968ad2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1435,4 +1435,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1479,4 +1479,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return getHandle().isInPowderSnow || getHandle().wasInPowderSnow; // depending on the location in the entity "tick" either could be needed. return getHandle().isInPowderSnow || getHandle().wasInPowderSnow; // depending on the location in the entity "tick" either could be needed.
} }
// Paper end // Paper end

Datei anzeigen

@ -0,0 +1,20 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: chickeneer <emcchickeneer@gmail.com>
Date: Mon, 1 Aug 2022 20:13:02 -0500
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 0299b79f3643bf8c4f4da176c20fec64f4601228..6bab6dd39ac316f43768f24fef6490073e6c9bb7 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -392,7 +392,7 @@ public class Commands {
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
int i = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> {
- return chatmodifier.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, label)); // CraftBukkit
+ return chatmodifier.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/" + label)); // CraftBukkit // Paper
});
if (i > 10) {

Datei anzeigen

@ -5,10 +5,10 @@ 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 diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 8f588ce8de7304dbb48bca01ed331f65ba25fef8..11cc7e640774c6098c247382da8520d62ba19c32 100644 index 6d10396347b69d9243ab902ecc68ede93fa17b7d..0a96b00a98227714ef99005e0a223765feae8fe9 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -708,5 +708,21 @@ public class CraftBlock implements Block { @@ -709,5 +709,21 @@ public class CraftBlock implements Block {
public boolean isValidTool(ItemStack itemStack) { public boolean isValidTool(ItemStack itemStack) {
return getDrops(itemStack).size() != 0; return getDrops(itemStack).size() != 0;
} }
@ -31,10 +31,10 @@ index 8f588ce8de7304dbb48bca01ed331f65ba25fef8..11cc7e640774c6098c247382da8520d6
// Paper end // 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 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 5b67d4dd280688093d7e36e59e5b2ec6ebdc796c..0bf863f597f3657a0f158756a2a91bda7eb453f6 100644 index 79c469d461ce9df0994214ebc8b157a095a4c848..28a798e497c2c12794169068e69b56dd954978f3 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -704,4 +704,11 @@ public class CraftBlockData implements BlockData { @@ -711,4 +711,11 @@ public class CraftBlockData implements BlockData {
return speed; return speed;
} }
// Paper end - destroy speed API // Paper end - destroy speed API

Datei anzeigen

@ -95,7 +95,7 @@ index 0000000000000000000000000000000000000000..a34381122de53123169927e181df6628
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 72c685ed3ece3752e34fc0ae25c7278ec131a505..4454944ba851216c8c88fe76ee910a2da52a2292 100644 index 5264235c1547c78b8123e2efb07dcb77486cc5bf..db363bca264e37c29fda58291246aba0d3759de0 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/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 @@ -274,13 +274,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -123,10 +123,10 @@ index 72c685ed3ece3752e34fc0ae25c7278ec131a505..4454944ba851216c8c88fe76ee910a2d
DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose."); DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 5ff49a0f2f42b63d606c7d9205c0e63fe39e163f..aac84898d2563bfb45c7d0884d65be2346d2911e 100644 index 5c767318ff3f589ecebb9608ce173fa578e330a5..83605748ca8cf68c0fc6d99c34f3091183c7a059 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -62,6 +62,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -64,6 +64,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
private final String serverId; private final String serverId;
private ServerPlayer player; // CraftBukkit private ServerPlayer player; // CraftBukkit
public boolean iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation = false; // Paper - username validation overriding public boolean iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation = false; // Paper - username validation overriding
@ -134,7 +134,7 @@ index 5ff49a0f2f42b63d606c7d9205c0e63fe39e163f..aac84898d2563bfb45c7d0884d65be23
public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) { public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) {
this.state = ServerLoginPacketListenerImpl.State.HELLO; this.state = ServerLoginPacketListenerImpl.State.HELLO;
@@ -175,6 +176,16 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -177,6 +178,16 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
this.state = ServerLoginPacketListenerImpl.State.KEY; this.state = ServerLoginPacketListenerImpl.State.KEY;
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge)); this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge));
} else { } else {
@ -151,7 +151,7 @@ index 5ff49a0f2f42b63d606c7d9205c0e63fe39e163f..aac84898d2563bfb45c7d0884d65be23
// Spigot start // Spigot start
// Paper start - Cache authenticator threads // Paper start - Cache authenticator threads
authenticatorPool.execute(new Runnable() { authenticatorPool.execute(new Runnable() {
@@ -318,6 +329,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -314,6 +325,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
public class LoginHandler { public class LoginHandler {
public void fireEvents(GameProfile gameprofile) throws Exception { public void fireEvents(GameProfile gameprofile) throws Exception {
@ -164,7 +164,7 @@ index 5ff49a0f2f42b63d606c7d9205c0e63fe39e163f..aac84898d2563bfb45c7d0884d65be23
String playerName = gameprofile.getName(); String playerName = gameprofile.getName();
java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(); java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress();
java.net.InetAddress rawAddress = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.channel.remoteAddress()).getAddress(); // Paper java.net.InetAddress rawAddress = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.channel.remoteAddress()).getAddress(); // Paper
@@ -367,6 +384,49 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -363,6 +380,49 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@Override @Override
public void handleCustomQueryPacket(ServerboundCustomQueryAnswerPacket packet) { public void handleCustomQueryPacket(ServerboundCustomQueryAnswerPacket packet) {
@ -215,10 +215,10 @@ index 5ff49a0f2f42b63d606c7d9205c0e63fe39e163f..aac84898d2563bfb45c7d0884d65be23
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 8148d1cddc6f062cfc3938f2b185be0ed3afe3ab..7376d3acb27edd7209916e9e9df4ce9b9514e50c 100644 index 7c8d21499d49aa88ad771e98a8e5302d1b3a3229..97a32d1d4bc4042c72c488eee92dff69f8336464 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -807,7 +807,7 @@ public final class CraftServer implements Server { @@ -802,7 +802,7 @@ public final class CraftServer implements Server {
@Override @Override
public long getConnectionThrottle() { public long getConnectionThrottle() {
// Spigot Start - Automatically set connection throttle for bungee configurations // Spigot Start - Automatically set connection throttle for bungee configurations

Datei anzeigen

@ -5,11 +5,11 @@ Subject: [PATCH] Use thread safe random in ServerLoginPacketListenerImpl
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index aac84898d2563bfb45c7d0884d65be2346d2911e..1c4f272219e68373eaae93fc5ea9af7d8f3fd6f9 100644 index 83605748ca8cf68c0fc6d99c34f3091183c7a059..601691db6943ae78530d01468e581760f2331b43 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -50,6 +50,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -52,6 +52,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
static final Logger LOGGER = LogUtils.getLogger(); private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads
private static final int MAX_TICKS_BEFORE_LOGIN = 600; private static final int MAX_TICKS_BEFORE_LOGIN = 600;
private static final Component DISCONNECT_UNEXPECTED_QUERY = Component.translatable("multiplayer.disconnect.unexpected_query_response"); private static final Component DISCONNECT_UNEXPECTED_QUERY = Component.translatable("multiplayer.disconnect.unexpected_query_response");
+ private static final RandomSource RANDOM = new org.bukkit.craftbukkit.util.RandomSourceWrapper(new java.util.Random()); // Paper - This is called across threads, make safe + private static final RandomSource RANDOM = new org.bukkit.craftbukkit.util.RandomSourceWrapper(new java.util.Random()); // Paper - This is called across threads, make safe

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> 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 diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 170fd09370ebf8c14116933fd505c8096904a281..ef317919818f9387dc394dd703fc028eaf37ec63 100644 index ef59fcd13f8835001fcc6fba6165ffd6c35784fa..7cfb8ffd7d107aef20a86d044b453c49e9f59b7f 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -604,6 +604,19 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -601,6 +601,19 @@ public final class CraftMagicNumbers implements UnsafeValues {
Preconditions.checkArgument(material.isBlock(), material + " is not a block"); Preconditions.checkArgument(material.isBlock(), material + " is not a block");
return getBlock(material).hasCollision; return getBlock(material).hasCollision;
} }

Datei anzeigen

@ -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 diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 47c984495a66fdbb10dea6bab33da78f4ab70a38..ebc35224004375b77039342926876a408995b04d 100644 index 00de78e06b4583880e00f57823a4929eb1484e7a..92468b925a742b8e4ab741c39677fb3656f8481b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -980,6 +980,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1026,6 +1026,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
net.minecrell.terminalconsole.TerminalConsoleAppender.close(); // Paper - Use TerminalConsoleAppender net.minecrell.terminalconsole.TerminalConsoleAppender.close(); // Paper - Use TerminalConsoleAppender
} catch (Exception e) { } catch (Exception e) {
} }
@ -49,7 +49,7 @@ index 47c984495a66fdbb10dea6bab33da78f4ab70a38..ebc35224004375b77039342926876a40
// Paper end - move final shutdown items here // Paper end - move final shutdown items here
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 334743a8c82bbcb2f09d0919fc9597750a25b8dd..ab4cf79e297ada08a0a5e2cbf294a70f9e87c635 100644 index f402d0ecc6ed3bfe76a3a2b6780dda5b8ecdd750..f37ac6edc60545600ccd22bfac072585d11b449b 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -18,6 +18,12 @@ public class Main { @@ -18,6 +18,12 @@ public class Main {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Stop large look changes from crashing the server
Co-authored-by: Jaren Knodel <Jaren@Knodel.com> 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 diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 351f6c554a3d50ebe2572671c433be5750ac6dd8..e2ccf8badc02b5a21e3fcd6fcac76155d29e472c 100644 index a21de30eef397308e3f4866a16cc588012e16f50..ece2f45427462587e28ba770178e13d7037e6668 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3059,37 +3059,15 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3056,37 +3056,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.level().getProfiler().pop(); this.level().getProfiler().pop();
this.level().getProfiler().push("rangeChecks"); this.level().getProfiler().push("rangeChecks");
@ -54,10 +54,10 @@ index 351f6c554a3d50ebe2572671c433be5750ac6dd8..e2ccf8badc02b5a21e3fcd6fcac76155
this.level().getProfiler().pop(); this.level().getProfiler().pop();
this.animStep += f2; 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 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 24b549cb21926a02d736f0bbb991006b9453068d..6d7ac0c8c171834fa8da94f158258a4774d80ec4 100644 index 621cb07c02cf318bf1b72c14724a42e0987d5b2f..5d779e75a1516487c53d96744613f292b0ccd1f7 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -251,13 +251,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { @@ -271,13 +271,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
} }
protected static float lerpRotation(float prevRot, float newRot) { protected static float lerpRotation(float prevRot, float newRot) {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Fire EntityChangeBlockEvent in more places
Co-authored-by: ChristopheG <61288881+chrisgdt@users.noreply.github.com> 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 diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java
index 21cdbd96ecbe2a6c8f7b2e3f20aed6c175f3732b..471275c5362b61ce8b5b9dd5c85b3e93cabd3f76 100644 index 80740ca823915fb2c854f13445d81964e0e971e5..255fb5e922c63130708e4bcab208b4db52a58387 100644
--- a/src/main/java/net/minecraft/world/entity/LightningBolt.java --- a/src/main/java/net/minecraft/world/entity/LightningBolt.java
+++ b/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 { @@ -98,7 +98,7 @@ public class LightningBolt extends Entity {
@ -96,15 +96,15 @@ index 2c443b421e342ebfbdf941a431ba20560521920b..91b68ee3605afdb845405e455c869e48
world.gameEvent(GameEvent.BLOCK_PLACE, blockPos3, GameEvent.Context.of(entity, blockState)); world.gameEvent(GameEvent.BLOCK_PLACE, blockPos3, GameEvent.Context.of(entity, blockState));
world.playSound((Player)null, entity, SoundEvents.FROG_LAY_SPAWN, SoundSource.BLOCKS, 1.0F, 1.0F); world.playSound((Player)null, entity, SoundEvents.FROG_LAY_SPAWN, SoundSource.BLOCKS, 1.0F, 1.0F);
diff --git a/src/main/java/net/minecraft/world/item/AxeItem.java b/src/main/java/net/minecraft/world/item/AxeItem.java diff --git a/src/main/java/net/minecraft/world/item/AxeItem.java b/src/main/java/net/minecraft/world/item/AxeItem.java
index 2f8ae1786a4c4438515c59fa56acaefdff60703d..18898e16ec42f6b694b06e09d9174b60d62450d7 100644 index db507638a97b5a33df712c54daff35b21922c0dd..2e75fd06e9e379eb95ebfe55086ffc327706ab2f 100644
--- a/src/main/java/net/minecraft/world/item/AxeItem.java --- a/src/main/java/net/minecraft/world/item/AxeItem.java
+++ b/src/main/java/net/minecraft/world/item/AxeItem.java +++ b/src/main/java/net/minecraft/world/item/AxeItem.java
@@ -54,6 +54,11 @@ public class AxeItem extends DiggerItem { @@ -38,6 +38,11 @@ public class AxeItem extends DiggerItem {
} return InteractionResult.PASS;
} else {
if (optional4.isPresent()) { ItemStack itemStack = context.getItemInHand();
+ // Paper start - EntityChangeBlockEvent + // Paper start - EntityChangeBlockEvent
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, blockPos, optional4.get())) { + if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, blockPos, optional.get())) {
+ return InteractionResult.PASS; + return InteractionResult.PASS;
+ } + }
+ // Paper end + // Paper end
@ -128,7 +128,7 @@ index 1fddc9025a9e5079f05dd6c86f6ca43c5d51d9c3..6d45e3ebea6721b9c168fea572e9bd61
Block.pushEntitiesUp(iblockdata, iblockdata1, world, blockposition); Block.pushEntitiesUp(iblockdata, iblockdata1, world, blockposition);
world.setBlock(blockposition, iblockdata1, 2); 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 diff --git a/src/main/java/net/minecraft/world/item/HoneycombItem.java b/src/main/java/net/minecraft/world/item/HoneycombItem.java
index 5ab115834cddb9ab3209c11bd0fe657b06a02eb2..eaa263db594d5cf8758c8205ea06bbd37d56cdd4 100644 index 78bdf7c0a058e84cafcd831c6d6f5123c0f168b0..e0cae3b6848af74fefc37a1e3183c501155c4710 100644
--- a/src/main/java/net/minecraft/world/item/HoneycombItem.java --- a/src/main/java/net/minecraft/world/item/HoneycombItem.java
+++ b/src/main/java/net/minecraft/world/item/HoneycombItem.java +++ b/src/main/java/net/minecraft/world/item/HoneycombItem.java
@@ -39,6 +39,14 @@ public class HoneycombItem extends Item implements SignApplicator { @@ -39,6 +39,14 @@ public class HoneycombItem extends Item implements SignApplicator {
@ -147,7 +147,7 @@ index 5ab115834cddb9ab3209c11bd0fe657b06a02eb2..eaa263db594d5cf8758c8205ea06bbd3
CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger((ServerPlayer)player, blockPos, itemStack); 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 diff --git a/src/main/java/net/minecraft/world/item/PotionItem.java b/src/main/java/net/minecraft/world/item/PotionItem.java
index 8c79ca75089e739d4899421106833e42e4e57280..88df7093c47f2a90f79a55797a04d7e4f51ed549 100644 index d7ef159cc44787558ba41964f57a79f048371e97..0a61a03c4aa9a66548896126b6f72c7a3474ba5a 100644
--- a/src/main/java/net/minecraft/world/item/PotionItem.java --- a/src/main/java/net/minecraft/world/item/PotionItem.java
+++ b/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 { @@ -107,6 +107,12 @@ public class PotionItem extends Item {
@ -199,10 +199,10 @@ index 32995cb5efdad0bc34ecacacb78cccd21220ba8d..21212462e6b415e96536a27b2c009d15
level.gameEvent(GameEvent.BLOCK_CHANGE, blockPos, GameEvent.Context.of(player, blockState3)); level.gameEvent(GameEvent.BLOCK_CHANGE, blockPos, GameEvent.Context.of(player, blockState3));
if (player != null) { 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 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 4f24d5453522c68c22f15beed87e5237163c701a..38cb52d185e543c4df9eebfcd856df6fa80ba0ed 100644 index 6cccdd1d19488275ff3fe90838cf1c31e844d517..413b307acaad5823b9e06f49fa2faf561f5f7b9a 100644
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java --- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
@@ -231,6 +231,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { @@ -238,6 +238,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
if (i < 8 && ComposterBlock.COMPOSTABLES.containsKey(itemstack.getItem())) { if (i < 8 && ComposterBlock.COMPOSTABLES.containsKey(itemstack.getItem())) {
if (i < 7 && !world.isClientSide) { if (i < 7 && !world.isClientSide) {
BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack); BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack);
@ -214,7 +214,7 @@ index 4f24d5453522c68c22f15beed87e5237163c701a..38cb52d185e543c4df9eebfcd856df6f
world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0); world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
player.awardStat(Stats.ITEM_USED.get(itemstack.getItem())); player.awardStat(Stats.ITEM_USED.get(itemstack.getItem()));
@@ -254,11 +259,16 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { @@ -261,11 +266,16 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
if (i < 7 && ComposterBlock.COMPOSTABLES.containsKey(stack.getItem())) { if (i < 7 && ComposterBlock.COMPOSTABLES.containsKey(stack.getItem())) {
// CraftBukkit start // CraftBukkit start
double rand = world.getRandom().nextDouble(); double rand = world.getRandom().nextDouble();
@ -233,7 +233,7 @@ index 4f24d5453522c68c22f15beed87e5237163c701a..38cb52d185e543c4df9eebfcd856df6f
// CraftBukkit end // CraftBukkit end
stack.shrink(1); stack.shrink(1);
@@ -299,11 +309,13 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { @@ -306,11 +316,13 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
return iblockdata1; return iblockdata1;
} }
@ -247,7 +247,7 @@ index 4f24d5453522c68c22f15beed87e5237163c701a..38cb52d185e543c4df9eebfcd856df6f
static BlockState addItem(@Nullable Entity entity, BlockState iblockdata, LevelAccessor generatoraccess, BlockPos blockposition, ItemStack itemstack, double rand) { static BlockState addItem(@Nullable Entity entity, BlockState iblockdata, LevelAccessor generatoraccess, BlockPos blockposition, ItemStack itemstack, double rand) {
// CraftBukkit end // CraftBukkit end
int i = (Integer) iblockdata.getValue(ComposterBlock.LEVEL); int i = (Integer) iblockdata.getValue(ComposterBlock.LEVEL);
@@ -314,6 +326,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { @@ -321,6 +333,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
} else { } else {
int j = i + 1; int j = i + 1;
BlockState iblockdata1 = (BlockState) iblockdata.setValue(ComposterBlock.LEVEL, j); BlockState iblockdata1 = (BlockState) iblockdata.setValue(ComposterBlock.LEVEL, j);
@ -260,7 +260,7 @@ index 4f24d5453522c68c22f15beed87e5237163c701a..38cb52d185e543c4df9eebfcd856df6f
generatoraccess.setBlock(blockposition, iblockdata1, 3); generatoraccess.setBlock(blockposition, iblockdata1, 3);
generatoraccess.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(entity, iblockdata1)); generatoraccess.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(entity, iblockdata1));
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
index 1233788274f1cbdaa564d3145214b4908ae1f573..23ee60e8843a6a05e7ae6512248a57ec2a08321b 100644 index 32594b4ebe8ab4c820e588573f5e01b08c57984f..a5e34c25e00e7f770bcb6e15ed0bbfe8f369a68a 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java +++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
@@ -120,7 +120,7 @@ public class DummyGeneratorAccess implements WorldGenLevel { @@ -120,7 +120,7 @@ public class DummyGeneratorAccess implements WorldGenLevel {

Datei anzeigen

@ -5,10 +5,10 @@ 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 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 21b414201539a1625001b8676d51b8afb67506bb..d5b97d4316390028f54aa9bb9fa52b0b003e32a0 100644 index af5db5da4e5b2fd90a5cf0ca3c92e87ba82d4779..387006271c246362b0df1bfcadca7b7096660003 100644
--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java --- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
@@ -424,7 +424,7 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolo @@ -419,7 +419,7 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolo
player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, j, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // CraftBukkit player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, j, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // CraftBukkit
} }
@ -31,7 +31,7 @@ index c8e783014a6a09d59e85715a7fbf2a5f65201e77..5cba503c7342f66018af568be200999e
if (stack.isEmpty()) { 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 diff --git a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
index e6d4dfdbe824cc3dbbad988cdc2ca7c7f6c7a99f..5cf732818a1f1811de2a408d9165c48a61466b3e 100644 index 8a7ab376a260bd70a799ce182a03450b3916f733..ba6dc881343148a17ed02486650e51b1e3bdd73c 100644
--- a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java --- a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
+++ b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java +++ b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
@@ -66,7 +66,7 @@ public class SuspiciousStewItem extends Item { @@ -66,7 +66,7 @@ public class SuspiciousStewItem extends Item {

Datei anzeigen

@ -5,10 +5,10 @@ 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 0faed04c7794dd4fd758a151d15ad5956e4f4907..c9396a55fddba47124ad5aebe7f816d99a03659c 100644 index 68d827b95a67f2fb65ed806221bb4e7e906a05f4..bd58fdd7001e41418f4bbc881274814cf9fe79c3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -509,8 +509,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -510,8 +510,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
} }
@Override @Override
@ -25,7 +25,7 @@ index 0faed04c7794dd4fd758a151d15ad5956e4f4907..c9396a55fddba47124ad5aebe7f816d9
Preconditions.checkState(!this.getHandle().generation, "Cannot launch projectile during world generation"); Preconditions.checkState(!this.getHandle().generation, "Cannot launch projectile during world generation");
net.minecraft.world.level.Level world = ((CraftWorld) this.getWorld()).getHandle(); net.minecraft.world.level.Level world = ((CraftWorld) this.getWorld()).getHandle();
@@ -593,6 +600,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -598,6 +605,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
if (velocity != null) { if (velocity != null) {
((T) launch.getBukkitEntity()).setVelocity(velocity); ((T) launch.getBukkitEntity()).setVelocity(velocity);
} }
@ -38,7 +38,7 @@ index 0faed04c7794dd4fd758a151d15ad5956e4f4907..c9396a55fddba47124ad5aebe7f816d9
world.addFreshEntity(launch); world.addFreshEntity(launch);
return (T) launch.getBukkitEntity(); return (T) launch.getBukkitEntity();
diff --git a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java diff --git a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
index 7f9a716ea65f98d1c8487438949f1d5bc8becc4a..ab684fc1b09d4eade7dd11a95065e72b842a3667 100644 index d4f6348144f9caa1aa155dfb8484df3524db0770..16f0b3711a6bbff0d4ea1f82bcc8723cbfd932c6 100644
--- a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java --- a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
+++ b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java +++ b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
@@ -56,6 +56,13 @@ public class CraftBlockProjectileSource implements BlockProjectileSource { @@ -56,6 +56,13 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {

Datei anzeigen

@ -7,10 +7,10 @@ Subject: [PATCH] Mitigate effects of WorldCreator#keepSpawnLoaded ret type
TODO: Remove in 1.21? TODO: Remove in 1.21?
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
index 1f30da05f0dd1d0f67ff7ec544e8f8455e2ef516..6f752084919ec1329d46b61b9d5f84656c9d9921 100644 index 2a75bd263dce91bc64601f96b622ed6d4fb18fe6..15c5d1c048bf2780e963a1055f0a6dd77b31ff45 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -460,6 +460,12 @@ public class Commodore @@ -463,6 +463,12 @@ public class Commodore
super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, CB_PACKAGE + "/advancement/CraftAdvancement", "getDisplay0", desc, false); super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, CB_PACKAGE + "/advancement/CraftAdvancement", "getDisplay0", desc, false);
return; return;
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] fix Jigsaw block kicking user
diff --git a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
index 8efdd41fbd14a2127a6d52577550bb781bc8c5f7..182e16c1d968707a11329150d71b7d01df6c6e52 100644 index 72d89e8999825b43a36ed9ee8f4545bde3927690..3a210e138b6ae065fd32e1b1e0e49999e20c4667 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
@@ -109,7 +109,12 @@ public class JigsawBlockEntity extends BlockEntity { @@ -133,7 +133,12 @@ public class JigsawBlockEntity extends BlockEntity {
public void generate(ServerLevel world, int maxDepth, boolean keepJigsaws) { public void generate(ServerLevel world, int maxDepth, boolean keepJigsaws) {
BlockPos blockPos = this.getBlockPos().relative(this.getBlockState().getValue(JigsawBlock.ORIENTATION).front()); BlockPos blockPos = this.getBlockPos().relative(this.getBlockState().getValue(JigsawBlock.ORIENTATION).front());
Registry<StructureTemplatePool> registry = world.registryAccess().registryOrThrow(Registries.TEMPLATE_POOL); Registry<StructureTemplatePool> registry = world.registryAccess().registryOrThrow(Registries.TEMPLATE_POOL);

Datei anzeigen

@ -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 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 741aef7f4fbe1eba8db1eb4eb2ab255906863c66..cd943997f11f5ea5c600fdc6db96043fb0fa713c 100644 index e59f9b83606da83f15924477ea2a2c4b74e7d892..bd22d3fdecbc992b11073a74d854b7d1b43c3f6a 100644
--- a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java --- a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java +++ b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
@@ -211,10 +211,13 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate @@ -220,10 +220,13 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate
if (((PointedDripstoneBlock.FluidInfo) optional.get()).sourceState.is(Blocks.MUD) && fluidtype == Fluids.WATER) { if (((PointedDripstoneBlock.FluidInfo) optional.get()).sourceState.is(Blocks.MUD) && fluidtype == Fluids.WATER) {
BlockState iblockdata1 = Blocks.CLAY.defaultBlockState(); BlockState iblockdata1 = Blocks.CLAY.defaultBlockState();

Datei anzeigen

@ -66,9 +66,6 @@ https://bugs.mojang.com/browse/MC-174630
https://bugs.mojang.com/browse/MC-153086 https://bugs.mojang.com/browse/MC-153086
Fix the beacon deactivation sound always playing when broken Fix the beacon deactivation sound always playing when broken
https://bugs.mojang.com/browse/MC-259321
Fix spawners checking max nearby entities with correct type
https://bugs.mojang.com/browse/MC-200092 https://bugs.mojang.com/browse/MC-200092
Fix yaw being ignored for a player's first spawn pos Fix yaw being ignored for a player's first spawn pos
@ -78,7 +75,7 @@ public net/minecraft/world/entity/Mob leashInfoTag
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com> 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 diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index b5ea499b78970ec1575893e3b52900bf34feb3ec..e9db6b5096e7368b4a32a0e86eebccac15ab443b 100644 index 9f220c99d7374ab3d9db222346694342d3e926c1..d9077127757886e5d5e8d63a46fe27f2bfba1420 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -351,7 +351,7 @@ public interface DispenseItemBehavior { @@ -351,7 +351,7 @@ public interface DispenseItemBehavior {
@ -130,12 +127,12 @@ index b71be5e7e18f884cf35cc3a940c87e744e00f811..81d3d664d4397e528a02e50469622c4f
return this.anyPlayerCloseEnoughForSpawning(pos, false); return this.anyPlayerCloseEnoughForSpawning(pos, false);
} }
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 1f1cdf5516eab738e5d434eb5f2933ff3d7a1359..c5f0439133f3ab609324f21f68027edebed049c5 100644 index 60eb96c274ac1b899de9b6f79eaab8596aee012c..80283588344ae3ba4a58d4be2c0bfc769cbcd78d 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1005,7 +1005,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1028,7 +1028,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
} else { } else {
AABB axisalignedbb = (new AABB(blockposition1, new BlockPos(blockposition1.getX(), this.getMaxBuildHeight(), blockposition1.getZ()))).inflate(3.0D); AABB axisalignedbb = AABB.encapsulatingFullBlocks(blockposition1, new BlockPos(blockposition1.atY(this.getMaxBuildHeight()))).inflate(3.0D);
List<LivingEntity> list = this.getEntitiesOfClass(LivingEntity.class, axisalignedbb, (entityliving) -> { List<LivingEntity> list = this.getEntitiesOfClass(LivingEntity.class, axisalignedbb, (entityliving) -> {
- return entityliving != null && entityliving.isAlive() && this.canSeeSky(entityliving.blockPosition()); - return entityliving != null && entityliving.isAlive() && this.canSeeSky(entityliving.blockPosition());
+ return entityliving != null && entityliving.isAlive() && this.canSeeSky(entityliving.blockPosition()) && !entityliving.isSpectator(); // Paper - Fix lightning being able to hit spectators (MC-262422) + return entityliving != null && entityliving.isAlive() && this.canSeeSky(entityliving.blockPosition()) && !entityliving.isSpectator(); // Paper - Fix lightning being able to hit spectators (MC-262422)
@ -143,10 +140,10 @@ index 1f1cdf5516eab738e5d434eb5f2933ff3d7a1359..c5f0439133f3ab609324f21f68027ede
if (!list.isEmpty()) { if (!list.isEmpty()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index fdd8ae699ebffcce391321d0c0d48a2bf171de12..0d8d17c03af1ebe033f4e3a4743e018bd819efdb 100644 index 4895f0c507aac0c473ecca951f206a5b2182ad97..c0306e2cca4289fae6ebd4a1b232c235f6fe06cb 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -461,14 +461,14 @@ public class ServerPlayer extends Player { @@ -468,14 +468,14 @@ public class ServerPlayer extends Player {
BlockPos blockposition1 = PlayerRespawnLogic.getOverworldRespawnPos(world, blockposition.getX() + j2 - i, blockposition.getZ() + k2 - i); BlockPos blockposition1 = PlayerRespawnLogic.getOverworldRespawnPos(world, blockposition.getX() + j2 - i, blockposition.getZ() + k2 - i);
if (blockposition1 != null) { if (blockposition1 != null) {
@ -164,7 +161,7 @@ index fdd8ae699ebffcce391321d0c0d48a2bf171de12..0d8d17c03af1ebe033f4e3a4743e018b
while (!world.noCollision(this, this.getBoundingBox(), true) && this.getY() < (double) (world.getMaxBuildHeight() - 1)) { // Paper - make sure this loads chunks, we default to NOT loading now while (!world.noCollision(this, this.getBoundingBox(), true) && this.getY() < (double) (world.getMaxBuildHeight() - 1)) { // Paper - make sure this loads chunks, we default to NOT loading now
this.setPos(this.getX(), this.getY() + 1.0D, this.getZ()); this.setPos(this.getX(), this.getY() + 1.0D, this.getZ());
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index b965df96bd92c0e3ab20f46f5a3712fcb0fb9fce..411215e353d89f49b52c74de7b0ca99c8b776cdb 100644 index 4e1ed252bf400ec991f95b02984f01a9689f2989..805c9b9b0e89002b97e1e11e1e6e2435315b8f2c 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -92,7 +92,7 @@ public class ServerPlayerGameMode { @@ -92,7 +92,7 @@ public class ServerPlayerGameMode {
@ -222,7 +219,7 @@ index 784a894688f98f9d0368a36d456c5c94e1ee3695..a85885ee51df585fa11ae9f8fcd67ff2
} }
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
index b0caf52d00d8cd76550ab116291f8e11144a5e59..93bbda61f0eb2dd52573602b1f9cc7b031d1fc5a 100644 index d802985f1431be4332c07f0dab88feebedea4ce2..4e2c23ccdf4e4a4d65b291dbe20952bae1838bff 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java --- a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
@@ -31,6 +31,11 @@ public class EatBlockGoal extends Goal { @@ -31,6 +31,11 @@ public class EatBlockGoal extends Goal {
@ -285,7 +282,7 @@ index 363892e0c26bab89d2abaa44d8736e2fd84d292f..111a244087e24f25ba8524a46a228da1
} }
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 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 a974b57dfb007d14194c566421216003ffb0c5d6..09e9c0e55c789f03a4b64136f28154bd114db6f5 100644 index bd0165d9ca52665a52fbd9678ed895bf4bed2fe7..8fe5a4ccf474c094b8081828c93e8973cdabb6ed 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java --- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
@@ -252,7 +252,13 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, @@ -252,7 +252,13 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
@ -304,10 +301,10 @@ index a974b57dfb007d14194c566421216003ffb0c5d6..09e9c0e55c789f03a4b64136f28154bd
public void equipArmor(Player player, ItemStack stack) { public void equipArmor(Player player, ItemStack stack) {
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java 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 a86472cce8e8fcde16d761842fe443a619f6e305..b42c060a5d8d68b5773a8a5e38c59707a277d9bb 100644 index 63ef00eb6f93a471de1e9c2355099d9dd3a71dd9..6849429c3577f36eb699083375824ae5633f8d06 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java --- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
@@ -287,6 +287,14 @@ public class ItemFrame extends HangingEntity { @@ -282,6 +282,14 @@ public class ItemFrame extends HangingEntity {
} }
} }
@ -422,49 +419,13 @@ index ca6a2b9840c9ade87ec8effab01d4f184fe876b7..43129ecefcc8beccbcf2978f262b1ce8
entity.level().gameEvent(entity, GameEvent.EQUIP, entity.position()); entity.level().gameEvent(entity, GameEvent.EQUIP, entity.position());
stack.shrink(1); stack.shrink(1);
} }
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index ae2b95f53e875716489821dc9b0a3a35039bfcc9..e4a5871d8f07e2b4c12b94b6372afe3a34b13071 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -46,6 +46,22 @@ public abstract class BaseSpawner {
public int requiredPlayerRange = 16;
public int spawnRange = 4;
private int tickDelay = 0; // Paper
+ // Paper start - ported from 1.20.3 Fix MC-259321
+ static <B, T extends B> net.minecraft.world.level.entity.EntityTypeTest<B, T> forExactClass(Class<T> clazz) {
+ return new net.minecraft.world.level.entity.EntityTypeTest<>() {
+ @Nullable
+ @Override
+ public T tryCast(B entity) {
+ return (T)(clazz.equals(entity.getClass()) ? entity : null);
+ }
+
+ @Override
+ public Class<? extends B> getBaseClass() {
+ return clazz;
+ }
+ };
+ }
+ // Paper end
public BaseSpawner() {}
@@ -160,7 +176,7 @@ public abstract class BaseSpawner {
return;
}
- int k = world.getEntitiesOfClass(entity.getClass(), (new AABB((double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), (double) (pos.getX() + 1), (double) (pos.getY() + 1), (double) (pos.getZ() + 1))).inflate((double) this.spawnRange)).size();
+ int k = world.getEntities(forExactClass(entity.getClass()), (new AABB((double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), (double) (pos.getX() + 1), (double) (pos.getY() + 1), (double) (pos.getZ() + 1))).inflate((double) this.spawnRange), net.minecraft.world.entity.EntitySelector.NO_SPECTATORS).size(); // Paper - Fix MC-259321 (only count exact entity types for nearby checks)
if (k >= this.maxNearbyEntities) {
this.delay(world, pos);
diff --git a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
index eba153ad0025d92ffb5d8de65f69a8e812b81533..087f3b3cc180e16195efdc0b402701fd9f5d78b4 100644 index 6e45582f8ea7dd2a46f58369c5581764538bff0d..3ecc92439fc85d224ff52f41c5e34079e042a5e6 100644
--- a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java --- a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java +++ b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
@@ -45,4 +45,11 @@ public class AzaleaBlock extends BushBlock implements BonemealableBlock { @@ -51,4 +51,11 @@ public class AzaleaBlock extends BushBlock implements BonemealableBlock {
public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, BlockState state) { public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, BlockState state) {
TREE_GROWER.growTree(world, world.getChunkSource().getGenerator(), pos, state, random); TreeGrower.AZALEA.growTree(world, world.getChunkSource().getGenerator(), pos, state, random);
} }
+ +
+ // Paper start - Fix MC-224454 + // Paper start - Fix MC-224454
@ -475,10 +436,10 @@ index eba153ad0025d92ffb5d8de65f69a8e812b81533..087f3b3cc180e16195efdc0b402701fd
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
index 2932419b7ca3f066b1db329829af36ba31e17c65..e11eced0bf15dfecaf64f5e1c28e973c38746095 100644 index 43a72941ab553c154633144d358fb204765257f5..b5e4beb21e1669e5af4da4c3b55a56f83ec5db4f 100644
--- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java --- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
@@ -63,7 +63,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock { @@ -68,7 +68,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper
if (!world.isClientSide && entity.isOnFire() && this.isEntityInsideContent(state, pos, entity)) { if (!world.isClientSide && entity.isOnFire() && this.isEntityInsideContent(state, pos, entity)) {
// CraftBukkit start // CraftBukkit start

Datei anzeigen

@ -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 diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index c5f0439133f3ab609324f21f68027edebed049c5..45b41d000bae08125ea8e6fb39b9f9fc037a6137 100644 index 80283588344ae3ba4a58d4be2c0bfc769cbcd78d..ba30421e53f935e2860564f8e3748160d64e3665 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2588,7 +2588,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2629,7 +2629,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (entity instanceof Mob) { if (entity instanceof Mob) {
Mob entityinsentient = (Mob) entity; Mob entityinsentient = (Mob) entity;
@ -17,7 +17,7 @@ index c5f0439133f3ab609324f21f68027edebed049c5..45b41d000bae08125ea8e6fb39b9f9fc
String s = "onTrackingStart called during navigation iteration"; String s = "onTrackingStart called during navigation iteration";
Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration")); Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration"));
@@ -2673,7 +2673,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2714,7 +2714,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (entity instanceof Mob) { if (entity instanceof Mob) {
Mob entityinsentient = (Mob) entity; Mob entityinsentient = (Mob) entity;

Datei anzeigen

@ -5,7 +5,7 @@ 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 diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 411215e353d89f49b52c74de7b0ca99c8b776cdb..e8ad6a1e497f399c5d8cd6a6ec192ddc932e3fb9 100644 index 805c9b9b0e89002b97e1e11e1e6e2435315b8f2c..f58386e952d29a16d160b628a23efbe102791277 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -516,6 +516,7 @@ public class ServerPlayerGameMode { @@ -516,6 +516,7 @@ public class ServerPlayerGameMode {
@ -30,7 +30,7 @@ index 411215e353d89f49b52c74de7b0ca99c8b776cdb..e8ad6a1e497f399c5d8cd6a6ec192ddc
this.interactResult = event.useItemInHand() == Event.Result.DENY; this.interactResult = event.useItemInHand() == Event.Result.DENY;
this.interactPosition = blockposition.immutable(); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 914fb155cbd79d0a1c4fbd5389ae3a15e76cad61..5f35eed82193e1868102cdfa931f1cb2c7662185 100644 index 2b0a969b185dd959067d8828254f9c48f5b49161..1854933bb3400f44da835364edda51d430da2160 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -546,7 +546,13 @@ public class CraftEventFactory { @@ -546,7 +546,13 @@ public class CraftEventFactory {

Datei anzeigen

@ -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 diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 0d8d17c03af1ebe033f4e3a4743e018bd819efdb..04961c33f4d89c491c5b6eb2a53b948feca17807 100644 index c0306e2cca4289fae6ebd4a1b232c235f6fe06cb..51a7ce409c00f586058d4b7b0e3dba17f3b6900b 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -372,6 +372,25 @@ public class ServerPlayer extends Player { @@ -379,6 +379,25 @@ public class ServerPlayer extends Player {
} }
} }
@ -35,7 +35,7 @@ index 0d8d17c03af1ebe033f4e3a4743e018bd819efdb..04961c33f4d89c491c5b6eb2a53b948f
@Override @Override
public void dataChanged(AbstractContainerMenu handler, int property, int value) {} 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 diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
index 1a19c6dc49cac784ca56d92ec755d6ead9811b20..176c8048f2fb3822fc14af9bfe5676c9d0768ca3 100644 index b22cf4636108794092d8e289368b72a10a16d3cd..c18348f4ea79b15b081cf7ba3bd9d77212aa086e 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/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 { @@ -302,7 +302,7 @@ public abstract class AbstractContainerMenu {

Datei anzeigen

@ -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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 337dbf8e5a2537e1d617d355a9a0f79171a69524..52dc37b5127a3ae3a3948c645968365fd0dc0908 100644 index 50d3de2bb715e7de8243174f66d92e45bae10683..6885b8995906e9fbb94316db5b1ba764f287d942 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3164,6 +3164,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -3179,6 +3179,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
// Paper end // Paper end

Datei anzeigen

@ -5,10 +5,10 @@ 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index c9396a55fddba47124ad5aebe7f816d99a03659c..1de9516fc3b6decca250b103abf85a4a8dcea6b2 100644 index bd58fdd7001e41418f4bbc881274814cf9fe79c3..3e99b80bb8d20198e905b18985941e3d32121e5d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1032,5 +1032,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -1037,5 +1037,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
} }
throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category"); throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category");
} }

Datei anzeigen

@ -27,10 +27,10 @@ index 6bd0afddbcc461149dfe9a5c7a86fff6ea13a5f1..148d233f4f5278ff39eacdaa0f4f0e7d
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 963e9887bda7bbcd9555fcbb17d63362ef1be5a6..ae0e39461e416cecd8e6904cb2fa69ad55a510e1 100644 index 62f4c2c9485f7700a46f33cf9d158ce3d0552185..4a451d6d5b11f10db9c583823c4d742f4a69970c 100644
--- a/src/main/java/net/minecraft/server/Main.java --- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java
@@ -178,6 +178,18 @@ public class Main { @@ -175,6 +175,18 @@ public class Main {
return; return;
} }

Datei anzeigen

@ -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 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 350d931f99bea1291f890d87fca6ae644c1a9fe9..44a6118d3bd67a95180f750c17967561946e2e87 100644 index e3745cc43b48ff59a1659a9f88ad118b34f7f22b..48b1cddfca671ac8bcb93a1b60518a4ee9e977e2 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
@@ -149,7 +149,15 @@ public abstract class AbstractMinecart extends Entity { @@ -168,7 +168,15 @@ public abstract class AbstractMinecart extends VehicleEntity {
@Override @Override
public boolean canCollideWith(Entity other) { public boolean canCollideWith(Entity other) {

Datei anzeigen

@ -5,10 +5,10 @@ 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 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 1fe07f8f9b28faf076209f7ad235fd5dc948b294..9bbb9f8e917288bb0d11661a1399a05631ebcce0 100644 index f38524cbcaa908644d901bf0929331d6dfd99ed9..1acdf9dad2621a20b077c5f88dab5e0f8688a38f 100644
--- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java --- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
+++ b/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 { @@ -19,8 +19,13 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock {
} }
private static boolean canBeGrass(BlockState state, LevelReader world, BlockPos pos) { private static boolean canBeGrass(BlockState state, LevelReader world, BlockPos pos) {
@ -23,8 +23,8 @@ index 1fe07f8f9b28faf076209f7ad235fd5dc948b294..9bbb9f8e917288bb0d11661a1399a056
if (iblockdata1.is(Blocks.SNOW) && (Integer) iblockdata1.getValue(SnowLayerBlock.LAYERS) == 1) { if (iblockdata1.is(Blocks.SNOW) && (Integer) iblockdata1.getValue(SnowLayerBlock.LAYERS) == 1) {
return true; return true;
@@ -33,15 +38,27 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock { @@ -37,15 +42,27 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock {
} protected abstract MapCodec<? extends SpreadingSnowyDirtBlock> codec();
private static boolean canPropagate(BlockState state, LevelReader world, BlockPos pos) { private static boolean canPropagate(BlockState state, LevelReader world, BlockPos pos) {
+ // Paper start + // Paper start
@ -53,7 +53,7 @@ index 1fe07f8f9b28faf076209f7ad235fd5dc948b294..9bbb9f8e917288bb0d11661a1399a056
// CraftBukkit start // CraftBukkit start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.DIRT.defaultBlockState()).isCancelled()) { if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.DIRT.defaultBlockState()).isCancelled()) {
return; return;
@@ -54,9 +71,19 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock { @@ -58,9 +75,19 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock {
for (int i = 0; i < 4; ++i) { for (int i = 0; i < 4; ++i) {
BlockPos blockposition1 = pos.offset(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1); BlockPos blockposition1 = pos.offset(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1);

Datei anzeigen

@ -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 diff --git a/src/main/java/net/minecraft/world/entity/TamableAnimal.java b/src/main/java/net/minecraft/world/entity/TamableAnimal.java
index 9fb11df7131f400e6e631146c32efccea83adf56..1282911b97292cde30dff83de756bc91bf319cb2 100644 index 1999cda5876bb12283d8c91a1b3e737c0d27bc38..1611a54bb68af34bfcbfd17028f564b7332aa489 100644
--- a/src/main/java/net/minecraft/world/entity/TamableAnimal.java --- a/src/main/java/net/minecraft/world/entity/TamableAnimal.java
+++ b/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 { @@ -67,7 +67,7 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity {
@ -31,7 +31,7 @@ index 9fb11df7131f400e6e631146c32efccea83adf56..1282911b97292cde30dff83de756bc91
if (inSittingPose) { if (inSittingPose) {
this.entityData.set(DATA_FLAGS_ID, (byte)(b | 1)); 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 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 e21bf5b02a4d9e6e23ffd42a1da8a3a5f2ac05db..9e2af80c6a87f5849710266149cbca8cabfad4f8 100644 index 96799179b0dd1886f0cdc386f04e152a19b3337d..d17c69a857f083350cc9e9ec2b5dbe0a1482c85f 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
@@ -433,7 +433,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> { @@ -433,7 +433,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {

Datei anzeigen

@ -5,10 +5,10 @@ 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 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 a3021fbc570ae47eb6b0d4a89388c8ed893aced7..2c7847aebabe14da44b9a42f5ecae77858fb9dd3 100644 index 3fb197ee3bfd3f36881b7d67f7a37f035bb27daf..8c0db5219ff30bdfae61b4b9f6033c8e28d21ee1 100644
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
+++ b/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 { @@ -172,7 +172,7 @@ public class FireBlock extends BaseFireBlock {
@Override @Override
public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
@ -17,7 +17,7 @@ index a3021fbc570ae47eb6b0d4a89388c8ed893aced7..2c7847aebabe14da44b9a42f5ecae778
if (world.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) { if (world.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) {
if (!state.canSurvive(world, pos)) { if (!state.canSurvive(world, pos)) {
this.fireExtinguished(world, pos); // CraftBukkit - invalid place location this.fireExtinguished(world, pos); // CraftBukkit - invalid place location
@@ -366,11 +366,13 @@ public class FireBlock extends BaseFireBlock { @@ -373,11 +373,13 @@ public class FireBlock extends BaseFireBlock {
public void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, UseOnContext itemActionContext) { public void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, UseOnContext itemActionContext) {
super.onPlace(iblockdata, world, blockposition, iblockdata1, flag, itemActionContext); super.onPlace(iblockdata, world, blockposition, iblockdata1, flag, itemActionContext);
// Paper end // Paper end

Datei anzeigen

@ -5,10 +5,10 @@ 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 diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index e4a5871d8f07e2b4c12b94b6372afe3a34b13071..6eca4a9b3cf462a4d18f32619bbcdfda0fa2ebc5 100644 index 9ec83d6eeff22c2ce25374a83f581a675d4fd067..d88a23984dcea9c2119bdc245013af8b25448da3 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -96,6 +96,7 @@ public abstract class BaseSpawner { @@ -82,6 +82,7 @@ public abstract class BaseSpawner {
} }
public void serverTick(ServerLevel world, BlockPos pos) { public void serverTick(ServerLevel world, BlockPos pos) {

Datei anzeigen

@ -5,7 +5,7 @@ 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 diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index e9db6b5096e7368b4a32a0e86eebccac15ab443b..f9ab6d4f6e7f430d41b79227e74136a3e980f340 100644 index d9077127757886e5d5e8d63a46fe27f2bfba1420..b65d0c2ac5b4f7eb3da85b693c354463c6f49694 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -517,6 +517,7 @@ public interface DispenseItemBehavior { @@ -517,6 +517,7 @@ public interface DispenseItemBehavior {

Datei anzeigen

@ -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 diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ce765fbe067d56ce0e5ae0bfade01f3b50e004be..a8750ba7720896685f9956194e43bb83a97670a8 100644 index 4ef45d704107d03a506627da80ebfeb41a0945f8..a59d738a8697ed06c445b0837b887aabcd92e366 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3353,6 +3353,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -3382,6 +3382,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
pluginManager.callEvent(entityCombustEvent); pluginManager.callEvent(entityCombustEvent);
if (!entityCombustEvent.isCancelled()) { if (!entityCombustEvent.isCancelled()) {
this.setSecondsOnFire(entityCombustEvent.getDuration(), false); this.setSecondsOnFire(entityCombustEvent.getDuration(), false);
@ -21,10 +21,10 @@ index ce765fbe067d56ce0e5ae0bfade01f3b50e004be..a8750ba7720896685f9956194e43bb83
// CraftBukkit end // CraftBukkit end
} }
diff --git a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java
index f89234dbfd03ba5192423bb75d58f8951f289761..c8f935efdfd48d4440828a7b2f0e25449fe90688 100644 index 02cbb25b8b1fdaf6e2b771067ca132245eab13dc..116dc2ac4c0176244eb8fc22a471d2b9ede72822 100644
--- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java --- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java
@@ -130,6 +130,10 @@ public abstract class BaseFireBlock extends Block { @@ -134,6 +134,10 @@ public abstract class BaseFireBlock extends Block {
if (!event.isCancelled()) { if (!event.isCancelled()) {
entity.setSecondsOnFire(event.getDuration(), false); entity.setSecondsOnFire(event.getDuration(), false);

Datei anzeigen

@ -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 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 85799b95bab12b5a060246f20364e9440e56a3ed..f9a308490e1cd7745dc12369c6041f0ae9e0b1e1 100644 index bce494bb7bc1ce20809ac7d355f04aa7aad78308..078dd3ccf046d3ee5ef41108e9db4736182778f1 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java --- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1245,8 +1245,17 @@ public abstract class Player extends LivingEntity { @@ -1240,8 +1240,17 @@ public abstract class Player extends LivingEntity {
} }
public void attack(Entity target) { public void attack(Entity target) {

Datei anzeigen

@ -6,10 +6,10 @@ 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. 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 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 b42c060a5d8d68b5773a8a5e38c59707a277d9bb..dcf245387f59ce730cb2cfb5fc0e837a20d3dfe5 100644 index 6849429c3577f36eb699083375824ae5633f8d06..9c11d0af958ec47408d238d34d30750d29ecdd88 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java --- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
@@ -296,7 +296,9 @@ public class ItemFrame extends HangingEntity { @@ -291,7 +291,9 @@ public class ItemFrame extends HangingEntity {
// Paper end // Paper end
private void removeFramedMap(ItemStack itemstack) { private void removeFramedMap(ItemStack itemstack) {
@ -20,7 +20,7 @@ index b42c060a5d8d68b5773a8a5e38c59707a277d9bb..dcf245387f59ce730cb2cfb5fc0e837a
MapItemSavedData worldmap = MapItem.getSavedData(i, this.level()); MapItemSavedData worldmap = MapItem.getSavedData(i, this.level());
if (worldmap != null) { if (worldmap != null) {
@@ -314,7 +316,12 @@ public class ItemFrame extends HangingEntity { @@ -309,7 +311,12 @@ public class ItemFrame extends HangingEntity {
public OptionalInt getFramedMapId() { public OptionalInt getFramedMapId() {
ItemStack itemstack = this.getItem(); ItemStack itemstack = this.getItem();

Datei anzeigen

@ -10,10 +10,10 @@ public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTick
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 52dc37b5127a3ae3a3948c645968365fd0dc0908..68f12f6352cd19a2a681f7008ec91746323f7af6 100644 index 6885b8995906e9fbb94316db5b1ba764f287d942..003ff30116a6b91e244af12e51aa5dd0925c778e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3169,6 +3169,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -3184,6 +3184,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void showElderGuardian(boolean silent) { public void showElderGuardian(boolean silent) {
if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F)); if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F));
} }

Datei anzeigen

@ -5,7 +5,7 @@ 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 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 f58be4e2529759cc64df2c70a69ef56eabbb762d..cbe2a37f74f4fb2abd0b3297699e54335aaed64f 100644 index 363d1f469862c2e980624ff69f74be015c19412d..11935e5b16324af572b07c5b173708f5a91f8289 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -944,6 +944,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -944,6 +944,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler

Datei anzeigen

@ -7,10 +7,10 @@ Makes certain entities check all players when searching for a player
instead of just checking players in their world. instead of just checking players in their world.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 45b41d000bae08125ea8e6fb39b9f9fc037a6137..2ef86ad041d496f2d04b163fde1fa277b990b85e 100644 index ba30421e53f935e2860564f8e3748160d64e3665..56f1bbeaab24975b76026ebb5a4c73b62635c730 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2710,4 +2710,12 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2751,4 +2751,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::move); entity.updateDynamicGameEventListener(DynamicGameEventListener::move);
} }
} }
@ -24,10 +24,10 @@ index 45b41d000bae08125ea8e6fb39b9f9fc037a6137..2ef86ad041d496f2d04b163fde1fa277
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index e2ccf8badc02b5a21e3fcd6fcac76155d29e472c..a73fdae75a8ef1b5c0aa7c05bd1ec9081634f565 100644 index ece2f45427462587e28ba770178e13d7037e6668..9ea6c0b250c361949a7f2d2c6b5fb2eeac7c650a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3676,7 +3676,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3678,7 +3678,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
} }
public void onItemPickup(ItemEntity item) { public void onItemPickup(ItemEntity item) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Fix async entity add due to fungus trees
diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
index 78284a89900e6b3ee0c066d00ba3ddf043b63401..50ed7cfe1ecef6d075ba484804827cec83ba2bf2 100644 index 49c7825156afd053df1b7721a63070b51427aff2..14a5492428eac823a295ef3746d0aca6fbdab4ec 100644
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java --- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java +++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
@@ -249,6 +249,7 @@ public class WorldGenRegion implements WorldGenLevel { @@ -249,6 +249,7 @@ public class WorldGenRegion implements WorldGenLevel {
@ -17,10 +17,10 @@ index 78284a89900e6b3ee0c066d00ba3ddf043b63401..50ed7cfe1ecef6d075ba484804827cec
BlockEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(pos) : null; BlockEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(pos) : null;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index 8cc1d7f5c5f8e9b9d6f7ab26025acf7237262959..7ef90fbdbcdb12ae0f3837fb003112115ab7ecfe 100644 index 0b7faa5b0fce81fd1790341599c632ffc5b171f3..096e1cc920f5f48fe59b9419827c3cbb7adefe14 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -402,10 +402,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -405,10 +405,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
((ChorusFlowerBlock) Blocks.CHORUS_FLOWER).generatePlant(access, pos, random, 8); ((ChorusFlowerBlock) Blocks.CHORUS_FLOWER).generatePlant(access, pos, random, 8);
return true; return true;
case CRIMSON_FUNGUS: case CRIMSON_FUNGUS:

Datei anzeigen

@ -11,10 +11,10 @@ the logic associated with damaging them
public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 1de9516fc3b6decca250b103abf85a4a8dcea6b2..80463de09f649c28bc5a96712b2ea370a62b8baa 100644 index 3e99b80bb8d20198e905b18985941e3d32121e5d..14ff9f9951bbb567ad76198477d61d22d522dac9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1033,6 +1033,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -1038,6 +1038,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category"); throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category");
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Friction API
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index a73fdae75a8ef1b5c0aa7c05bd1ec9081634f565..e579d9cc70115a3fb3388adb309847faa1f9aaab 100644 index 9ea6c0b250c361949a7f2d2c6b5fb2eeac7c650a..58fdbdcc5de9f93230669d93778c4c1392e0a4cf 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -262,6 +262,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -261,6 +261,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public boolean bukkitPickUpLoot; public boolean bukkitPickUpLoot;
public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event
@ -16,7 +16,7 @@ index a73fdae75a8ef1b5c0aa7c05bd1ec9081634f565..e579d9cc70115a3fb3388adb309847fa
@Override @Override
public float getBukkitYaw() { public float getBukkitYaw() {
@@ -717,7 +718,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -716,7 +717,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
} }
public boolean shouldDiscardFriction() { public boolean shouldDiscardFriction() {
@ -25,7 +25,7 @@ index a73fdae75a8ef1b5c0aa7c05bd1ec9081634f565..e579d9cc70115a3fb3388adb309847fa
} }
public void setDiscardFriction(boolean noDrag) { public void setDiscardFriction(boolean noDrag) {
@@ -761,6 +762,11 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -760,6 +761,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override @Override
public void addAdditionalSaveData(CompoundTag nbt) { public void addAdditionalSaveData(CompoundTag nbt) {
@ -37,7 +37,7 @@ index a73fdae75a8ef1b5c0aa7c05bd1ec9081634f565..e579d9cc70115a3fb3388adb309847fa
nbt.putFloat("Health", this.getHealth()); nbt.putFloat("Health", this.getHealth());
nbt.putShort("HurtTime", (short) this.hurtTime); nbt.putShort("HurtTime", (short) this.hurtTime);
nbt.putInt("HurtByTimestamp", this.lastHurtByMobTimestamp); nbt.putInt("HurtByTimestamp", this.lastHurtByMobTimestamp);
@@ -803,6 +809,15 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -802,6 +808,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
absorptionAmount = 0; absorptionAmount = 0;
} }
this.internalSetAbsorptionAmount(absorptionAmount); this.internalSetAbsorptionAmount(absorptionAmount);
@ -54,10 +54,10 @@ index a73fdae75a8ef1b5c0aa7c05bd1ec9081634f565..e579d9cc70115a3fb3388adb309847fa
if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) { if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) {
this.getAttributes().load(nbt.getList("Attributes", 10)); this.getAttributes().load(nbt.getList("Attributes", 10));
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index 1a06d8c839e94fe2c1920035d606b62e0dc5cfba..eb0351aa12eebcefab1d1d14641fc3c60cbbcab8 100644 index 6b18f23b57c7000dce9726df98a509ee9477f6d2..a39db702063887cf530f272deaf4f334047cc7d4 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -55,6 +55,7 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -57,6 +57,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
public boolean canMobPickup = true; // Paper public boolean canMobPickup = true; // Paper
private int despawnRate = -1; // Paper private int despawnRate = -1; // Paper
@ -65,7 +65,7 @@ index 1a06d8c839e94fe2c1920035d606b62e0dc5cfba..eb0351aa12eebcefab1d1d14641fc3c6
public ItemEntity(EntityType<? extends ItemEntity> type, Level world) { public ItemEntity(EntityType<? extends ItemEntity> type, Level world) {
super(type, world); super(type, world);
@@ -160,7 +161,11 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -178,7 +179,11 @@ public class ItemEntity extends Entity implements TraceableEntity {
this.move(MoverType.SELF, this.getDeltaMovement()); this.move(MoverType.SELF, this.getDeltaMovement());
float f1 = 0.98F; float f1 = 0.98F;
@ -78,7 +78,7 @@ index 1a06d8c839e94fe2c1920035d606b62e0dc5cfba..eb0351aa12eebcefab1d1d14641fc3c6
f1 = this.level().getBlockState(this.getBlockPosBelowThatAffectsMyMovement()).getBlock().getFriction() * 0.98F; f1 = this.level().getBlockState(this.getBlockPosBelowThatAffectsMyMovement()).getBlock().getFriction() * 0.98F;
} }
@@ -369,6 +374,11 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -387,6 +392,11 @@ public class ItemEntity extends Entity implements TraceableEntity {
@Override @Override
public void addAdditionalSaveData(CompoundTag nbt) { public void addAdditionalSaveData(CompoundTag nbt) {
@ -90,8 +90,8 @@ index 1a06d8c839e94fe2c1920035d606b62e0dc5cfba..eb0351aa12eebcefab1d1d14641fc3c6
nbt.putShort("Health", (short) this.health); nbt.putShort("Health", (short) this.health);
nbt.putShort("Age", (short) this.age); nbt.putShort("Age", (short) this.age);
nbt.putShort("PickupDelay", (short) this.pickupDelay); nbt.putShort("PickupDelay", (short) this.pickupDelay);
@@ -402,6 +412,17 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -421,6 +431,17 @@ public class ItemEntity extends Entity implements TraceableEntity {
this.thrower = nbt.getUUID("Thrower"); this.cachedThrower = null;
} }
+ // Paper start + // Paper start
@ -109,7 +109,7 @@ index 1a06d8c839e94fe2c1920035d606b62e0dc5cfba..eb0351aa12eebcefab1d1d14641fc3c6
this.setItem(ItemStack.of(nbttagcompound1)); this.setItem(ItemStack.of(nbttagcompound1));
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
index 073643d7f83b974509cf2dd4ea41e3dd9cb90a0d..f444e843535ec68ede0f05e7e7ef182ce872342b 100644 index b1bbab951ef9a3d2bd98cc54665ba824263542eb..81498941748d646ebe6495f4a7ce6953532144c6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
@@ -99,6 +99,18 @@ public class CraftItem extends CraftEntity implements Item { @@ -99,6 +99,18 @@ public class CraftItem extends CraftEntity implements Item {
@ -132,10 +132,10 @@ index 073643d7f83b974509cf2dd4ea41e3dd9cb90a0d..f444e843535ec68ede0f05e7e7ef182c
public int getHealth() { public int getHealth() {
return this.getHandle().health; return this.getHandle().health;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 80463de09f649c28bc5a96712b2ea370a62b8baa..4591d57052e2d0499d441efa13e8b43c606665b0 100644 index 14ff9f9951bbb567ad76198477d61d22d522dac9..edb086d479f2485b3ec7a6fffe2c7e4a15f0c319 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1080,6 +1080,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -1085,6 +1085,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}); });
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Ability to control player's insomnia and phantoms
diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java
index de06ae3e8757c923a6f3f475a34885d2f15af46e..3ff999734d14e2b6e7828e117f5ee32a60c26bc1 100644 index 93a41156a01a1638f3ef469b1518a07e7961f378..2986c3b1c9dd7f3a00ed7f25b25bfc2b513b35eb 100644
--- a/src/main/java/net/minecraft/world/entity/EntitySelector.java --- a/src/main/java/net/minecraft/world/entity/EntitySelector.java
+++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java +++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java
@@ -27,7 +27,18 @@ public final class EntitySelector { @@ -28,7 +28,18 @@ public final class EntitySelector {
return !entity.isSpectator(); return !entity.isSpectator();
}; };
public static final Predicate<Entity> CAN_BE_COLLIDED_WITH = EntitySelector.NO_SPECTATORS.and(Entity::canBeCollidedWith); public static final Predicate<Entity> CAN_BE_COLLIDED_WITH = EntitySelector.NO_SPECTATORS.and(Entity::canBeCollidedWith);

Datei anzeigen

@ -9,10 +9,10 @@ also check if all packets are ignored during the shutdown process.
See net.minecraft.network.Connection#channelRead0(ChannelHandlerContext, Packet) and net.minecraft.util.thread.BlockableEventLoop#executeIfPossible(Runnable) See net.minecraft.network.Connection#channelRead0(ChannelHandlerContext, Packet) and net.minecraft.util.thread.BlockableEventLoop#executeIfPossible(Runnable)
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
index 6ac03dee902051a26493dba468d6a2f5cecfe066..9a49f5271ec1d9de17632bfffe8309cb1ba0d8b1 100644 index 7297bca9224c12d7ace0e1967340d99436afafc1..c5c734b9eb80d1cdf0e9fd8a043f2b6d1f4cbffe 100644
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java --- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java +++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
@@ -43,7 +43,7 @@ public class PacketUtils { @@ -44,7 +44,7 @@ public class PacketUtils {
public static <T extends PacketListener> void ensureRunningOnSameThread(Packet<T> packet, T listener, BlockableEventLoop<?> engine) throws RunningOnDifferentThreadException { public static <T extends PacketListener> void ensureRunningOnSameThread(Packet<T> packet, T listener, BlockableEventLoop<?> engine) throws RunningOnDifferentThreadException {
if (!engine.isSameThread()) { if (!engine.isSameThread()) {

Datei anzeigen

@ -8,10 +8,10 @@ offhand slot isn't sent. This is not correct because you *can* put stuff into th
by pressing the offhand swap item by pressing the offhand swap item
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 04961c33f4d89c491c5b6eb2a53b948feca17807..113089a7d087ecb0508b5f05e708dca1c3296735 100644 index 51a7ce409c00f586058d4b7b0e3dba17f3b6900b..cca1f44ba8cefcc0ee3e6dadd175bd67b311b2de 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -341,6 +341,13 @@ public class ServerPlayer extends Player { @@ -348,6 +348,13 @@ public class ServerPlayer extends Player {
} }
@ -26,7 +26,7 @@ index 04961c33f4d89c491c5b6eb2a53b948feca17807..113089a7d087ecb0508b5f05e708dca1
public void sendSlotChange(AbstractContainerMenu handler, int slot, ItemStack stack) { public void sendSlotChange(AbstractContainerMenu handler, int slot, ItemStack stack) {
ServerPlayer.this.connection.send(new ClientboundContainerSetSlotPacket(handler.containerId, handler.incrementStateId(), slot, stack)); ServerPlayer.this.connection.send(new ClientboundContainerSetSlotPacket(handler.containerId, handler.incrementStateId(), slot, stack));
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
index 176c8048f2fb3822fc14af9bfe5676c9d0768ca3..3ef712299fe248602b0b117c0a8e285cdf4e05c2 100644 index c18348f4ea79b15b081cf7ba3bd9d77212aa086e..9ee3c2e0dcfaa4280be4973479c6490ded33809c 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -200,6 +200,7 @@ public abstract class AbstractContainerMenu { @@ -200,6 +200,7 @@ public abstract class AbstractContainerMenu {

Datei anzeigen

@ -85,10 +85,10 @@ index d088479d160dbd2fc90b48a30553be141db8eef2..ccb7d92b6c36b6225a2e640f8cea6c0d
public static class DataItem<T> { public static class DataItem<T> {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 372015adb4f198c131d1a5f239e75f862ab5fdd7..d63451592c34429c1c827ff8e16989347e2efdaa 100644 index d7f551d8cae2055b82782905a14d649e44e8bcec..199a9e1d082ab937e2be9fd5abdd0891b7b78024 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2649,7 +2649,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2657,7 +2657,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Entity in bucket - SPIGOT-4048 and SPIGOT-6859a // Entity in bucket - SPIGOT-4048 and SPIGOT-6859a
if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) { if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
@ -98,10 +98,10 @@ index 372015adb4f198c131d1a5f239e75f862ab5fdd7..d63451592c34429c1c827ff8e1698934
} }
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 80d1c6850e7ce3d48cf54297ffcf9f5a2903d216..fd0164d843c2c73d7eaddbaf72d2021ff94ca38c 100644 index 5afafee10b32b7f09757b5d60ad58e35cd467c17..53f9286d37215af55ab17c447327b13464c7a79d 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -378,7 +378,7 @@ public abstract class PlayerList { @@ -376,7 +376,7 @@ public abstract class PlayerList {
((ServerLevel)player.level()).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now ((ServerLevel)player.level()).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now
// CraftBukkit end // CraftBukkit end
@ -125,10 +125,10 @@ index 37596c7b65f280be00e8e59ae18bd1aceae21080..eca18540aeb0b0d4098477d73b14c78a
} }
entity.playSound(((Bucketable) entity).getPickupSound(), 1.0F, 1.0F); entity.playSound(((Bucketable) entity).getPickupSound(), 1.0F, 1.0F);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 4199bc76c1f304e19fa7c3b7763d31b56a57221b..37b1eb5ba224e4de28c49c04d218c3951b1bbfd1 100644 index 1075c90e51cfea5823a74c07847545e227968ad2..c0f11fb8de8c15f8b07023fc05a7856413bc8036 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1258,7 +1258,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1302,7 +1302,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return; return;
} }

Datei anzeigen

@ -8,10 +8,10 @@ Fixes some wrong reasons, and adds missing spawn reasons for entities.
Co-authored-by: Doc <nachito94@msn.com> Co-authored-by: Doc <nachito94@msn.com>
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index b1a5f160f5bd4da271f212f02c3c977a5e576b99..e6cddde3e5b87d114cda5d4c6de5f71ee96e933d 100644 index 823f3b3093cffb49ccdcbcfbe6d348009a553ad7..e754a294645e1af9e39bde32dd1387cd54335e7e 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java --- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -349,7 +349,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT @@ -353,7 +353,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@Nullable @Nullable
public T spawn(ServerLevel world, @Nullable ItemStack stack, @Nullable Player player, BlockPos pos, MobSpawnType spawnReason, boolean alignPosition, boolean invertY) { public T spawn(ServerLevel world, @Nullable ItemStack stack, @Nullable Player player, BlockPos pos, MobSpawnType spawnReason, boolean alignPosition, boolean invertY) {
// CraftBukkit start // CraftBukkit start
@ -34,10 +34,10 @@ index 9652e3385ad10e5d825dd141f6be3522c596916d..6256ce68d6ecada66745fb09360cba2b
this.discard(); this.discard();
} }
diff --git a/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java b/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java b/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java
index 41a74780ce9edc8442732b04785396c245ee5c32..23c487e295b3b736d8800f0c884324c9b18a5373 100644 index 8f38965b42a20ac39cb1170278562070ebf2f958..a63733fa01dc58b3c0abb28c1cd88c8b0a456083 100644
--- a/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java --- a/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java
@@ -85,7 +85,17 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { @@ -92,7 +92,17 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock {
// clearPatternBlocks(world, shapedetector_shapedetectorcollection); // CraftBukkit - moved down // clearPatternBlocks(world, shapedetector_shapedetectorcollection); // CraftBukkit - moved down
entity.moveTo((double) pos.getX() + 0.5D, (double) pos.getY() + 0.05D, (double) pos.getZ() + 0.5D, 0.0F, 0.0F); entity.moveTo((double) pos.getX() + 0.5D, (double) pos.getY() + 0.05D, (double) pos.getZ() + 0.5D, 0.0F, 0.0F);
// CraftBukkit start // CraftBukkit start
@ -57,10 +57,10 @@ index 41a74780ce9edc8442732b04785396c245ee5c32..23c487e295b3b736d8800f0c884324c9
} }
CarvedPumpkinBlock.clearPatternBlocks(world, patternResult); // CraftBukkit - from above CarvedPumpkinBlock.clearPatternBlocks(world, patternResult); // CraftBukkit - from above
diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
index 294d22b6b27e96b59c77527efcfefa9410b756e4..bebcdc70c4cb01764428836fff76f03b94f2eae8 100644 index 0a2de99c22cfcc96a664dc2afe7379987ea815db..6fc8d7f93141d85d8aecc97314e747624beb5e6c 100644
--- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java --- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
@@ -110,7 +110,7 @@ public class FrogspawnBlock extends Block { @@ -117,7 +117,7 @@ public class FrogspawnBlock extends Block {
int k = random.nextInt(1, 361); int k = random.nextInt(1, 361);
tadpole.moveTo(d, (double)pos.getY() - 0.5D, e, (float)k, 0.0F); tadpole.moveTo(d, (double)pos.getY() - 0.5D, e, (float)k, 0.0F);
tadpole.setPersistenceRequired(); tadpole.setPersistenceRequired();
@ -70,10 +70,10 @@ index 294d22b6b27e96b59c77527efcfefa9410b756e4..bebcdc70c4cb01764428836fff76f03b
} }
diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
index 8aaa3cb2248a02b5ee25251cc837a145edd34341..ecb8224beb0ee65855c7529b69ea56b7b6674664 100644 index 3cedc349e79665d3d471c92b5dca25c9e66ca0bf..6c025c0fac9bd6373b99e374b773ca626d47ee6d 100644
--- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java --- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
@@ -81,7 +81,7 @@ public class SnifferEggBlock extends Block { @@ -88,7 +88,7 @@ public class SnifferEggBlock extends Block {
Vec3 vec3 = pos.getCenter(); Vec3 vec3 = pos.getCenter();
sniffer.setBaby(true); sniffer.setBaby(true);
sniffer.moveTo(vec3.x(), vec3.y(), vec3.z(), Mth.wrapDegrees(world.random.nextFloat() * 360.0F), 0.0F); sniffer.moveTo(vec3.x(), vec3.y(), vec3.z(), Mth.wrapDegrees(world.random.nextFloat() * 360.0F), 0.0F);

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] fix Instruments
properly handle Player#playNote properly handle Player#playNote
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 68f12f6352cd19a2a681f7008ec91746323f7af6..98f8ffe3e69d563fb7dd07f3c42476d52239fff4 100644 index 003ff30116a6b91e244af12e51aa5dd0925c778e..a25cdcb4468d16a064ea290c0a397ea8cf0864ad 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -719,7 +719,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -726,7 +726,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Sound instrumentSound = instrument.getSound(); Sound instrumentSound = instrument.getSound();
if (instrumentSound == null) return; if (instrumentSound == null) return;

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Improve inlining for some hot BlockBehavior and FluidState
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index fc28bca0d31b01287f38405f795da577c6c89105..e6a4a5898ffdcb2aa2bc01371a6d7dbc06d610ce 100644 index 84d7aeafafe1497d96dca2238b579007cbe27146..3ab8b99837b1d1faea722c598b0228b2780be8b1 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -1011,15 +1011,15 @@ public abstract class BlockBehaviour implements FeatureElement { @@ -1078,15 +1078,15 @@ public abstract class BlockBehaviour implements FeatureElement {
return this.shapeExceedsCube; // Paper - moved into shape cache init return this.shapeExceedsCube; // Paper - moved into shape cache init
} }
@ -28,7 +28,7 @@ index fc28bca0d31b01287f38405f795da577c6c89105..e6a4a5898ffdcb2aa2bc01371a6d7dbc
return this.isAir; return this.isAir;
} }
@@ -1103,7 +1103,7 @@ public abstract class BlockBehaviour implements FeatureElement { @@ -1170,7 +1170,7 @@ public abstract class BlockBehaviour implements FeatureElement {
} }
} }
@ -37,8 +37,8 @@ index fc28bca0d31b01287f38405f795da577c6c89105..e6a4a5898ffdcb2aa2bc01371a6d7dbc
return this.canOcclude; return this.canOcclude;
} }
@@ -1303,11 +1303,11 @@ public abstract class BlockBehaviour implements FeatureElement { @@ -1378,11 +1378,11 @@ public abstract class BlockBehaviour implements FeatureElement {
return this.getBlock() == block; return this.getBlock().builtInRegistryHolder().is(key);
} }
- public FluidState getFluidState() { - public FluidState getFluidState() {

Datei anzeigen

@ -47,10 +47,10 @@ index e22d71c371952e91b838d10206d3dcdf9dc8716d..155bd3d6d9c7d3cac7fd04de82103012
} }
diff --git a/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java diff --git a/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java
index eb3b91a49d7831d7a3cbbee9323723956d3d3e00..80dbeb0a988c749feaaba26ce5ad93c181d88a5d 100644 index 90e1914599b43c8bf813596b3b428d8be3bac1b5..6df0db8b4cdab23494ea34236949ece4989110a3 100644
--- a/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java --- a/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java
@@ -57,7 +57,7 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior { @@ -58,7 +58,7 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior {
// Object object = this.isChestBoat ? new ChestBoat(worldserver, d1, d2 + d4, d3) : new EntityBoat(worldserver, d1, d2 + d4, d3); // Object object = this.isChestBoat ? new ChestBoat(worldserver, d1, d2 + d4, d3) : new EntityBoat(worldserver, d1, d2 + d4, d3);
// CraftBukkit start // CraftBukkit start
@ -59,7 +59,7 @@ index eb3b91a49d7831d7a3cbbee9323723956d3d3e00..80dbeb0a988c749feaaba26ce5ad93c1
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -67,12 +67,13 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior { @@ -68,12 +68,13 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior {
} }
if (event.isCancelled()) { if (event.isCancelled()) {
@ -75,8 +75,8 @@ index eb3b91a49d7831d7a3cbbee9323723956d3d3e00..80dbeb0a988c749feaaba26ce5ad93c1
// Chain to handler for new item // Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -87,8 +88,7 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior { @@ -89,8 +90,7 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior {
EntityType.createDefaultStackConfig(worldserver, stack, (Player) null).accept(object);
((Boat) object).setVariant(this.type); ((Boat) object).setVariant(this.type);
((Boat) object).setYRot(enumdirection.toYRot()); ((Boat) object).setYRot(enumdirection.toYRot());
- if (!worldserver.addFreshEntity((Entity) object)) stack.grow(1); // CraftBukkit - if (!worldserver.addFreshEntity((Entity) object)) stack.grow(1); // CraftBukkit
@ -86,7 +86,7 @@ index eb3b91a49d7831d7a3cbbee9323723956d3d3e00..80dbeb0a988c749feaaba26ce5ad93c1
} }
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index f9ab6d4f6e7f430d41b79227e74136a3e980f340..c0baec6ae9bd90410f47aa04d7c7704233375d1a 100644 index b65d0c2ac5b4f7eb3da85b693c354463c6f49694..dd017c33ff89a516022378160410bc41cce9222e 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -217,7 +217,7 @@ public interface DispenseItemBehavior { @@ -217,7 +217,7 @@ public interface DispenseItemBehavior {
@ -333,7 +333,15 @@ index f9ab6d4f6e7f430d41b79227e74136a3e980f340..c0baec6ae9bd90410f47aa04d7c77042
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(x, y, z)); BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(x, y, z));
if (!DispenserBlock.eventFired) { if (!DispenserBlock.eventFired) {
@@ -694,7 +704,7 @@ public interface DispenseItemBehavior { @@ -631,6 +641,7 @@ public interface DispenseItemBehavior {
return stack;
}
+ boolean shrink = true; // Paper
if (!event.getItem().equals(craftItem)) {
// Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
@@ -694,7 +705,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start // CraftBukkit start
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
@ -342,7 +350,17 @@ index f9ab6d4f6e7f430d41b79227e74136a3e980f340..c0baec6ae9bd90410f47aa04d7c77042
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ())); BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
if (!DispenserBlock.eventFired) { if (!DispenserBlock.eventFired) {
@@ -802,7 +812,7 @@ public interface DispenseItemBehavior { @@ -752,7 +763,9 @@ public interface DispenseItemBehavior {
return stack;
}
+ boolean shrink = true; // Paper
if (!event.getItem().equals(craftItem)) {
+ shrink = false; // Paper - shrink below (this was actually missing and should be here, added it commented out just for less confusion)
// Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -802,7 +815,7 @@ public interface DispenseItemBehavior {
BlockPos blockposition = pointer.pos().relative((Direction) pointer.state().getValue(DispenserBlock.FACING)); BlockPos blockposition = pointer.pos().relative((Direction) pointer.state().getValue(DispenserBlock.FACING));
// CraftBukkit start // CraftBukkit start
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
@ -351,7 +369,15 @@ index f9ab6d4f6e7f430d41b79227e74136a3e980f340..c0baec6ae9bd90410f47aa04d7c77042
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0)); BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
if (!DispenserBlock.eventFired) { if (!DispenserBlock.eventFired) {
@@ -868,7 +878,7 @@ public interface DispenseItemBehavior { @@ -813,6 +826,7 @@ public interface DispenseItemBehavior {
return stack;
}
+ boolean shrink = true; // Paper
if (!event.getItem().equals(craftItem)) {
// Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
@@ -868,7 +882,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start // CraftBukkit start
// EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (EntityLiving) null); // EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (EntityLiving) null);
@ -360,7 +386,7 @@ index f9ab6d4f6e7f430d41b79227e74136a3e980f340..c0baec6ae9bd90410f47aa04d7c77042
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -878,12 +888,13 @@ public interface DispenseItemBehavior { @@ -878,12 +892,13 @@ public interface DispenseItemBehavior {
} }
if (event.isCancelled()) { if (event.isCancelled()) {
@ -376,7 +402,7 @@ index f9ab6d4f6e7f430d41b79227e74136a3e980f340..c0baec6ae9bd90410f47aa04d7c77042
// Chain to handler for new item // Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -899,7 +910,7 @@ public interface DispenseItemBehavior { @@ -899,7 +914,7 @@ public interface DispenseItemBehavior {
worldserver.addFreshEntity(entitytntprimed); worldserver.addFreshEntity(entitytntprimed);
worldserver.playSound((Player) null, entitytntprimed.getX(), entitytntprimed.getY(), entitytntprimed.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F); worldserver.playSound((Player) null, entitytntprimed.getX(), entitytntprimed.getY(), entitytntprimed.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F);
worldserver.gameEvent((Entity) null, GameEvent.ENTITY_PLACE, blockposition); worldserver.gameEvent((Entity) null, GameEvent.ENTITY_PLACE, blockposition);
@ -385,7 +411,7 @@ index f9ab6d4f6e7f430d41b79227e74136a3e980f340..c0baec6ae9bd90410f47aa04d7c77042
return stack; return stack;
} }
}); });
@@ -926,7 +937,7 @@ public interface DispenseItemBehavior { @@ -926,7 +941,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start // CraftBukkit start
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
@ -394,7 +420,19 @@ index f9ab6d4f6e7f430d41b79227e74136a3e980f340..c0baec6ae9bd90410f47aa04d7c77042
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ())); BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
if (!DispenserBlock.eventFired) { if (!DispenserBlock.eventFired) {
@@ -975,7 +986,7 @@ public interface DispenseItemBehavior { @@ -934,9 +949,11 @@ public interface DispenseItemBehavior {
}
if (event.isCancelled()) {
+ // stack.grow(1); // Paper - shrink below (this was actually missing and should be here, added it commented out just for less confusion)
return stack;
}
+ boolean shrink = true; // Paper
if (!event.getItem().equals(craftItem)) {
// Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
@@ -975,7 +992,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start // CraftBukkit start
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
@ -403,7 +441,15 @@ index f9ab6d4f6e7f430d41b79227e74136a3e980f340..c0baec6ae9bd90410f47aa04d7c77042
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ())); BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
if (!DispenserBlock.eventFired) { if (!DispenserBlock.eventFired) {
@@ -1048,7 +1059,7 @@ public interface DispenseItemBehavior { @@ -986,6 +1003,7 @@ public interface DispenseItemBehavior {
return stack;
}
+ boolean shrink = true; // Paper
if (!event.getItem().equals(craftItem)) {
// Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
@@ -1048,7 +1066,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start // CraftBukkit start
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
@ -412,6 +458,14 @@ index f9ab6d4f6e7f430d41b79227e74136a3e980f340..c0baec6ae9bd90410f47aa04d7c77042
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ())); BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
if (!DispenserBlock.eventFired) { if (!DispenserBlock.eventFired) {
@@ -1059,6 +1077,7 @@ public interface DispenseItemBehavior {
return stack;
}
+ boolean shrink = true; // Paper
if (!event.getItem().equals(craftItem)) {
// Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
diff --git a/src/main/java/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java b/src/main/java/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java diff --git a/src/main/java/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java b/src/main/java/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java
index f84987c36a16df19286d6f1badfb1ffb9cc7e770..6f2adf2334e35e8a617a4ced0c1af2abf32bbd8d 100644 index f84987c36a16df19286d6f1badfb1ffb9cc7e770..6f2adf2334e35e8a617a4ced0c1af2abf32bbd8d 100644
--- a/src/main/java/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java --- a/src/main/java/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java
@ -463,10 +517,10 @@ index a745dc02ae25bcf10cee954b6e53f8b106fd045d..42d87800a328f71c5127ce5599ca4c71
} }
} }
diff --git a/src/main/java/net/minecraft/world/item/MinecartItem.java b/src/main/java/net/minecraft/world/item/MinecartItem.java diff --git a/src/main/java/net/minecraft/world/item/MinecartItem.java b/src/main/java/net/minecraft/world/item/MinecartItem.java
index 496900fc805e7e3f6206777c9c9b0260839dd9b0..a33395dc5a94d89b5ab273c7832813b6ff9ea3b7 100644 index 9bcca21ba03dc838f3e857018adee9506d8bb6a3..3aa73cd44aa8c86b78c35bc1788e4f83018c49ed 100644
--- a/src/main/java/net/minecraft/world/item/MinecartItem.java --- a/src/main/java/net/minecraft/world/item/MinecartItem.java
+++ b/src/main/java/net/minecraft/world/item/MinecartItem.java +++ b/src/main/java/net/minecraft/world/item/MinecartItem.java
@@ -64,7 +64,7 @@ public class MinecartItem extends Item { @@ -65,7 +65,7 @@ public class MinecartItem extends Item {
// CraftBukkit start // CraftBukkit start
// EntityMinecartAbstract entityminecartabstract = EntityMinecartAbstract.createMinecart(worldserver, d0, d1 + d3, d2, ((ItemMinecart) itemstack.getItem()).type); // EntityMinecartAbstract entityminecartabstract = EntityMinecartAbstract.createMinecart(worldserver, d0, d1 + d3, d2, ((ItemMinecart) itemstack.getItem()).type);
@ -475,7 +529,7 @@ index 496900fc805e7e3f6206777c9c9b0260839dd9b0..a33395dc5a94d89b5ab273c7832813b6
org.bukkit.block.Block block2 = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block block2 = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -74,12 +74,13 @@ public class MinecartItem extends Item { @@ -75,12 +75,13 @@ public class MinecartItem extends Item {
} }
if (event.isCancelled()) { if (event.isCancelled()) {
@ -491,9 +545,9 @@ index 496900fc805e7e3f6206777c9c9b0260839dd9b0..a33395dc5a94d89b5ab273c7832813b6
// Chain to handler for new item // Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -96,8 +97,7 @@ public class MinecartItem extends Item { @@ -93,8 +94,7 @@ public class MinecartItem extends Item {
entityminecartabstract.setCustomName(stack.getHoverName()); itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
} AbstractMinecart entityminecartabstract = AbstractMinecart.createMinecart(worldserver, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), ((MinecartItem) itemstack1.getItem()).type, itemstack1, (Player) null);
- if (!worldserver.addFreshEntity(entityminecartabstract)) stack.grow(1); - if (!worldserver.addFreshEntity(entityminecartabstract)) stack.grow(1);
- // itemstack.shrink(1); // CraftBukkit - handled during event processing - // itemstack.shrink(1); // CraftBukkit - handled during event processing

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add Sneaking API for Entities
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 37b1eb5ba224e4de28c49c04d218c3951b1bbfd1..a42be7d446e7066b5451f58834901672c293a34b 100644 index c0f11fb8de8c15f8b07023fc05a7856413bc8036..908da9217c6553301c22ca0415924d2aebe993ef 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1218,6 +1218,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1226,6 +1226,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return Pose.values()[this.getHandle().getPose().ordinal()]; return Pose.values()[this.getHandle().getPose().ordinal()];
} }

Datei anzeigen

@ -28,10 +28,10 @@ index 938fe76677139e7e99698b61691bfcadf70dbd87..5cf3732d2197b381ae9256d8bed03a75
private boolean tryInsert(AdvancementHolder advancement) { private boolean tryInsert(AdvancementHolder advancement) {
diff --git a/src/main/java/net/minecraft/server/ServerAdvancementManager.java b/src/main/java/net/minecraft/server/ServerAdvancementManager.java diff --git a/src/main/java/net/minecraft/server/ServerAdvancementManager.java b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
index ebcd2bbcf8f25c52de3deaff32a8522dbf662141..8189c549edd14a351fc5e75be23da7378bbd3532 100644 index 536f0c496ce36ca3248fc6eeac9bbd77214a36f9..5e24c1e712eb16d0d5343760a65310bd79d1020c 100644
--- a/src/main/java/net/minecraft/server/ServerAdvancementManager.java --- a/src/main/java/net/minecraft/server/ServerAdvancementManager.java
+++ b/src/main/java/net/minecraft/server/ServerAdvancementManager.java +++ b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
@@ -63,6 +63,7 @@ public class ServerAdvancementManager extends SimpleJsonResourceReloadListener { @@ -66,6 +66,7 @@ public class ServerAdvancementManager extends SimpleJsonResourceReloadListener {
AdvancementTree advancementtree = new AdvancementTree(); AdvancementTree advancementtree = new AdvancementTree();
advancementtree.addAll(this.advancements.values()); advancementtree.addAll(this.advancements.values());
@ -40,10 +40,10 @@ index ebcd2bbcf8f25c52de3deaff32a8522dbf662141..8189c549edd14a351fc5e75be23da737
while (iterator.hasNext()) { while (iterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index d63451592c34429c1c827ff8e16989347e2efdaa..e87e99569fe5d6d916faa385b1793db858ab39b7 100644 index 199a9e1d082ab937e2be9fd5abdd0891b7b78024..57526743fd14cef2510e3b446d4421bad28fe437 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3386,7 +3386,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -3394,7 +3394,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator)); this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator));
} catch (ProfilePublicKey.ValidationException profilepublickey_b) { } catch (ProfilePublicKey.ValidationException profilepublickey_b) {
@ -70,7 +70,7 @@ index 89aa86a49eda563c82ccedc99641e699f8e578b0..4822f94ce183a99ad9e0d1bdc6c5708d
set.add(string); set.add(string);
} else { } else {
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
index bf16c44e2d61dccb662eceeef89a143a25ba40b0..43aacadcf8be10432a61c83f69ee86580c86d0a3 100644 index 4259181bab2dc4f2d0409b56fdf81d966003376d..93e7d350a4176250d9ae3f0e1e7e6a4197d613b0 100644
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java --- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java +++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
@@ -84,7 +84,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener { @@ -84,7 +84,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Improve PortalEvents
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index a8750ba7720896685f9956194e43bb83a97670a8..5c9a015401312a7f8bbc2974337a665e5726c41d 100644 index a59d738a8697ed06c445b0837b887aabcd92e366..fab6f1a470334e0a2a552ff12da70f463888d7f1 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3736,7 +3736,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -3769,7 +3769,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
Location enter = bukkitEntity.getLocation(); Location enter = bukkitEntity.getLocation();
Location exit = CraftLocation.toBukkit(exitPosition, exitWorldServer.getWorld()); Location exit = CraftLocation.toBukkit(exitPosition, exitWorldServer.getWorld());

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add config option for spider worldborder climbing
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 5c9a015401312a7f8bbc2974337a665e5726c41d..a71376b5c7a6e59eeac3a4e0b29cac69ed99f8f1 100644 index fab6f1a470334e0a2a552ff12da70f463888d7f1..a84811f050378840206f7c2c4591bcd0b948c8fa 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -403,6 +403,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -408,6 +408,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@javax.annotation.Nullable @javax.annotation.Nullable
private UUID originWorld; private UUID originWorld;
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
@ -16,7 +16,7 @@ index 5c9a015401312a7f8bbc2974337a665e5726c41d..a71376b5c7a6e59eeac3a4e0b29cac69
public void setOrigin(@javax.annotation.Nonnull Location location) { public void setOrigin(@javax.annotation.Nonnull Location location) {
this.origin = location.toVector(); this.origin = location.toVector();
@@ -1476,7 +1477,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -1481,7 +1482,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
null, null null, null
); );

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e87e99569fe5d6d916faa385b1793db858ab39b7..5654bc0390f3c205bca3ea1f225eba1a39216005 100644 index 57526743fd14cef2510e3b446d4421bad28fe437..40e69eaf83b7e18718fc347ea10766c27c345d1e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2113,7 +2113,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2139,7 +2139,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private void performChatCommand(ServerboundChatCommandPacket packet, LastSeenMessages lastSeenMessages) { private void performChatCommand(ServerboundChatCommandPacket packet, LastSeenMessages lastSeenMessages) {
// CraftBukkit start // CraftBukkit start
String command = "/" + packet.command(); String command = "/" + packet.command();

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen