mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-27 19:09:23 +00:00
121/121, 10/16
This commit is contained in:
@@ -18,10 +18,10 @@ index f7bb979f08634a7e1b77c59040f59fb5e11aafa5..3cad7d6bca9af77bace18bfd7cc013ac
|
||||
for (int i1 = 0; i1 < this.height; i1++) {
|
||||
for (int i2 = 0; i2 < this.depth; i2++) {
|
||||
diff --git a/net/minecraft/world/level/dimension/end/EndDragonFight.java b/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index 6e7e87c32734b3aae354bc34459e5f207da5c78f..5a28a821bb401f8f1465b085c9ffda52ba9a0a9f 100644
|
||||
index 8ccd40c70e150bd5a8d89818c229258642f2349e..18a567b676f0bfcd725f19c5ed9e3fdbc8e65573 100644
|
||||
--- a/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
+++ b/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -274,8 +274,68 @@ public class EndDragonFight {
|
||||
@@ -273,8 +273,68 @@ public class EndDragonFight {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ index 6e7e87c32734b3aae354bc34459e5f207da5c78f..5a28a821bb401f8f1465b085c9ffda52
|
||||
ChunkPos chunkPos = new ChunkPos(this.origin);
|
||||
|
||||
for (int i = -8 + chunkPos.x; i <= 8 + chunkPos.x; i++) {
|
||||
@@ -571,6 +631,11 @@ public class EndDragonFight {
|
||||
@@ -572,6 +632,11 @@ public class EndDragonFight {
|
||||
}
|
||||
|
||||
public boolean respawnDragon(List<EndCrystal> crystals) { // CraftBukkit - return boolean
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Creative fly no clip
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index 6fa522d6935c277f2fc35bb772aa7b18b4adf6e3..39fc3ea891947ddd102f992e7b6c62f9367849e7 100644
|
||||
index 2fe76bc1c26423ed5e39453ac1b27a2cc66b1f2e..9f792a7cf9da888e502b79d6b1d1075e9f084f43 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -262,8 +262,8 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -277,8 +277,8 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@@ -19,16 +19,16 @@ index 6fa522d6935c277f2fc35bb772aa7b18b4adf6e3..39fc3ea891947ddd102f992e7b6c62f9
|
||||
this.setOnGround(false);
|
||||
}
|
||||
|
||||
@@ -470,7 +470,7 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
Pose pose1;
|
||||
- if (this.isSpectator() || this.isPassenger() || this.canPlayerFitWithinBlocksAndEntitiesWhen(pose)) {
|
||||
+ if (this.isCreativeFlyOrSpectator() || this.isPassenger() || this.canPlayerFitWithinBlocksAndEntitiesWhen(pose)) { // Leaves - creative no clip
|
||||
pose1 = pose;
|
||||
@@ -471,7 +471,7 @@ public abstract class Player extends LivingEntity {
|
||||
if (this.canPlayerFitWithinBlocksAndEntitiesWhen(Pose.SWIMMING)) {
|
||||
Pose desiredPose = this.getDesiredPose();
|
||||
Pose pose;
|
||||
- if (this.isSpectator() || this.isPassenger() || this.canPlayerFitWithinBlocksAndEntitiesWhen(desiredPose)) {
|
||||
+ if (this.isSpectator() || this.isPassenger() || this.canPlayerFitWithinBlocksAndEntitiesWhen(desiredPose) || this.isCreativeFlyOrSpectator()) { // Leaves - creative no clip
|
||||
pose = desiredPose;
|
||||
} else if (this.canPlayerFitWithinBlocksAndEntitiesWhen(Pose.CROUCHING)) {
|
||||
pose1 = Pose.CROUCHING;
|
||||
@@ -604,7 +604,7 @@ public abstract class Player extends LivingEntity {
|
||||
pose = Pose.CROUCHING;
|
||||
@@ -614,7 +614,7 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
this.bob = this.bob + (f - this.bob) * 0.4F;
|
||||
@@ -37,9 +37,9 @@ index 6fa522d6935c277f2fc35bb772aa7b18b4adf6e3..39fc3ea891947ddd102f992e7b6c62f9
|
||||
AABB aabb;
|
||||
if (this.isPassenger() && !this.getVehicle().isRemoved()) {
|
||||
aabb = this.getBoundingBox().minmax(this.getVehicle().getBoundingBox()).inflate(1.0, 0.0, 1.0);
|
||||
@@ -2044,6 +2044,21 @@ public abstract class Player extends LivingEntity {
|
||||
@Override
|
||||
public abstract boolean isSpectator();
|
||||
@@ -1931,6 +1931,21 @@ public abstract class Player extends LivingEntity {
|
||||
return this.gameMode() == GameType.SPECTATOR;
|
||||
}
|
||||
|
||||
+ // Leaves start - creative no clip
|
||||
+ public boolean isCreativeFlyOrSpectator() {
|
||||
@@ -60,18 +60,20 @@ index 6fa522d6935c277f2fc35bb772aa7b18b4adf6e3..39fc3ea891947ddd102f992e7b6c62f9
|
||||
public boolean canBeHitByProjectile() {
|
||||
return !this.isSpectator() && super.canBeHitByProjectile();
|
||||
diff --git a/net/minecraft/world/item/BlockItem.java b/net/minecraft/world/item/BlockItem.java
|
||||
index 1f4a3d2610abfa2ea2b1d5feba9606b806d6d416..c74e09eed6b8fe2852b3cb592e1a1e628ba9f22a 100644
|
||||
index ed1fb37b0aa02e21bbe491f0eba1322d03315fbc..e2b9446007fa6b5a0ca9c61b3c1b73f2c9c440e2 100644
|
||||
--- a/net/minecraft/world/item/BlockItem.java
|
||||
+++ b/net/minecraft/world/item/BlockItem.java
|
||||
@@ -216,7 +216,7 @@ public class BlockItem extends Item {
|
||||
CollisionContext collisionContext = player == null ? CollisionContext.empty() : CollisionContext.of(player);
|
||||
@@ -207,8 +207,9 @@ public class BlockItem extends Item {
|
||||
protected boolean canPlace(BlockPlaceContext context, BlockState state) {
|
||||
Player player = context.getPlayer();
|
||||
// CraftBukkit start
|
||||
+ CollisionContext collisionContext = player == null ? CollisionContext.empty() : CollisionContext.placementContext(player);
|
||||
Level world = context.getLevel(); // Paper - Cancel hit for vanished players
|
||||
- boolean canBuild = (!this.mustSurvive() || state.canSurvive(world, context.getClickedPos())) && world.checkEntityCollision(state, player, collisionContext, context.getClickedPos(), true); // Paper - Cancel hit for vanished players
|
||||
- boolean canBuild = (!this.mustSurvive() || state.canSurvive(world, context.getClickedPos())) && world.checkEntityCollision(state, player, CollisionContext.placementContext(player), context.getClickedPos(), true); // Paper - Cancel hit for vanished players
|
||||
+ boolean canBuild = (!this.mustSurvive() || state.canSurvive(world, context.getClickedPos())) && ((org.leavesmc.leaves.LeavesConfig.modify.creativeNoClip && context.getPlayer() != null) ? context.getPlayer().canSpectatingPlace(world, state, context.getClickedPos(), collisionContext) : world.checkEntityCollision(state, player, collisionContext, context.getClickedPos(), true)); // Paper - Cancel hit for vanished players // Leaves - creative no clip
|
||||
org.bukkit.entity.Player bukkitPlayer = (context.getPlayer() instanceof ServerPlayer) ? (org.bukkit.entity.Player) context.getPlayer().getBukkitEntity() : null;
|
||||
|
||||
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(world, context.getClickedPos()), bukkitPlayer, CraftBlockData.fromData(state), canBuild, org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(context.getHand())); // Paper - Expose hand in BlockCanBuildEvent
|
||||
org.bukkit.event.block.BlockCanBuildEvent event = new org.bukkit.event.block.BlockCanBuildEvent(
|
||||
diff --git a/net/minecraft/world/item/StandingAndWallBlockItem.java b/net/minecraft/world/item/StandingAndWallBlockItem.java
|
||||
index 1f0e7c391d02b18e2c89700025713ec3d759f2ea..300ee12ca9584e53e9d72e3ebfd039beb3fab3b2 100644
|
||||
--- a/net/minecraft/world/item/StandingAndWallBlockItem.java
|
||||
@@ -86,10 +88,10 @@ index 1f0e7c391d02b18e2c89700025713ec3d759f2ea..300ee12ca9584e53e9d72e3ebfd039be
|
||||
|
||||
org.bukkit.event.block.BlockCanBuildEvent event = new org.bukkit.event.block.BlockCanBuildEvent(org.bukkit.craftbukkit.block.CraftBlock.at(context.getLevel(), clickedPos), player, org.bukkit.craftbukkit.block.data.CraftBlockData.fromData(blockState), defaultReturn, org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(context.getHand())); // Paper - Expose hand in BlockCanBuildEvent
|
||||
diff --git a/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java b/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
|
||||
index cc8781c0a357eebc2bff936b4e7be53cc316716d..f5264831b2dc1843b09599086f2bb586d041535d 100644
|
||||
index 5e58113b3401268e0432235dc10b2734dbbd8b71..1f7c2d06952febd7a5d4e216b6e22794239b9325 100644
|
||||
--- a/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
|
||||
@@ -147,7 +147,7 @@ public class ShulkerBoxBlockEntity extends RandomizableContainerBlockEntity impl
|
||||
@@ -152,7 +152,7 @@ public class ShulkerBoxBlockEntity extends RandomizableContainerBlockEntity impl
|
||||
List<Entity> entities = level.getEntities(null, progressDeltaAabb);
|
||||
if (!entities.isEmpty()) {
|
||||
for (Entity entity : entities) {
|
||||
@@ -99,10 +101,10 @@ index cc8781c0a357eebc2bff936b4e7be53cc316716d..f5264831b2dc1843b09599086f2bb586
|
||||
MoverType.SHULKER_BOX,
|
||||
new Vec3(
|
||||
diff --git a/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||
index ee2f8e8deb35059824b5730a1442f383dc79f01c..841167f3f168ff3129b17e176df476ed7b9aaaf5 100644
|
||||
index 8449545bd5278f5558567dd6b7c1522f63045f22..3d2770828d4fe1123b158e70bfe459d7cf16332a 100644
|
||||
--- a/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||
@@ -148,7 +148,7 @@ public class PistonMovingBlockEntity extends BlockEntity {
|
||||
@@ -152,7 +152,7 @@ public class PistonMovingBlockEntity extends BlockEntity {
|
||||
d3 = movementDirection.getStepZ();
|
||||
}
|
||||
|
||||
@@ -111,11 +113,11 @@ index ee2f8e8deb35059824b5730a1442f383dc79f01c..841167f3f168ff3129b17e176df476ed
|
||||
// Paper - EAR items stuck in slime pushed by a piston
|
||||
entity.activatedTick = Math.max(entity.activatedTick, net.minecraft.server.MinecraftServer.currentTick + 10);
|
||||
entity.activatedImmunityTick = Math.max(entity.activatedImmunityTick, net.minecraft.server.MinecraftServer.currentTick + 10);
|
||||
@@ -184,6 +184,7 @@ public class PistonMovingBlockEntity extends BlockEntity {
|
||||
@@ -188,6 +188,7 @@ public class PistonMovingBlockEntity extends BlockEntity {
|
||||
}
|
||||
|
||||
private static void moveEntityByPiston(Direction noClipDirection, Entity entity, double progress, Direction direction) {
|
||||
+ if (entity instanceof net.minecraft.world.entity.player.Player player && player.isCreativeFlyOrSpectator()) return; // Leaves - creative no clip
|
||||
NOCLIP.set(noClipDirection);
|
||||
Vec3 vec3 = entity.position();
|
||||
entity.move(MoverType.PISTON, new Vec3(progress * direction.getStepX(), progress * direction.getStepY(), progress * direction.getStepZ()));
|
||||
entity.applyEffectsFromBlocks();
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Shave snow layers
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/item/ShovelItem.java b/net/minecraft/world/item/ShovelItem.java
|
||||
index 75bbe901e79d9ba3250ed2426a36c1c3363c19c1..29849cd8f53daf2da0b9973c805d44376984013c 100644
|
||||
index 887ac9f547ceaf76fd533ae47239a64c29a64b18..29b272ff2e4fe686a0e12b33f6edbe1a412b1590 100644
|
||||
--- a/net/minecraft/world/item/ShovelItem.java
|
||||
+++ b/net/minecraft/world/item/ShovelItem.java
|
||||
@@ -44,6 +44,26 @@ public class ShovelItem extends DiggerItem {
|
||||
@@ -43,6 +43,26 @@ public class ShovelItem extends Item {
|
||||
return InteractionResult.PASS;
|
||||
} else {
|
||||
Player player = context.getPlayer();
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Elytra aeronautics no chunk load
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
|
||||
index 36c0a690e7e9b301c5a3d63fae2c7cbe36ba6cdf..6b625fbd538e5a4073e86e22adfcd382e1efde86 100644
|
||||
index 4785f9d6c53e18419a3df4a1be9c8a4f9d8cadfb..adba1c30d38f9d42c9c763f0ed2321d46363ca96 100644
|
||||
--- a/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -792,7 +792,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -854,7 +854,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
private boolean skipPlayer(ServerPlayer player) {
|
||||
@@ -18,7 +18,7 @@ index 36c0a690e7e9b301c5a3d63fae2c7cbe36ba6cdf..6b625fbd538e5a4073e86e22adfcd382
|
||||
}
|
||||
|
||||
void updatePlayerStatus(ServerPlayer player, boolean track) {
|
||||
@@ -826,6 +827,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -888,6 +889,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
public void move(ServerPlayer player) {
|
||||
@@ -27,10 +27,10 @@ index 36c0a690e7e9b301c5a3d63fae2c7cbe36ba6cdf..6b625fbd538e5a4073e86e22adfcd382
|
||||
|
||||
SectionPos lastSectionPos = player.getLastSectionPos();
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 325300e7ad68b7ad377ff1269bc5d568d663ec3a..b3abfd93b7b4ce47e3382a9f81b82dbb2beb37ae 100644
|
||||
index f1372015cf5991ef80a07e7fcbd1fb9d65e9d74f..0c811363c9b8ac2bed9039ccd86b4c72538e5e4e 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -549,7 +549,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -541,7 +541,7 @@ public class ServerGamePacketListenerImpl
|
||||
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
|
||||
|
||||
// Paper start - Prevent moving into unloaded chunks
|
||||
@@ -40,10 +40,10 @@ index 325300e7ad68b7ad377ff1269bc5d568d663ec3a..b3abfd93b7b4ce47e3382a9f81b82dbb
|
||||
!serverLevel.areChunksLoadedForMove(rootVehicle.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(rootVehicle.position())))
|
||||
)) {
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 25b7fe802216d805b6426a5b0098d8e41fe48a7d..7dc1aaaf590edcd1e7c6c6734c4baeecbfec93a7 100644
|
||||
index 0e5c4aa2b8856c7b88ff90031715a55c4a1bf89e..962eff9d67fc31e444dbe54c95cb6e8274f6713b 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1109,7 +1109,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1092,7 +1092,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ index 25b7fe802216d805b6426a5b0098d8e41fe48a7d..7dc1aaaf590edcd1e7c6c6734c4baeec
|
||||
ProfilerFiller profilerFiller = Profiler.get();
|
||||
profilerFiller.push("move");
|
||||
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7) {
|
||||
@@ -2059,6 +2065,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2053,6 +2059,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.yo = y;
|
||||
this.zo = d1;
|
||||
this.setPos(d, y, d1);
|
||||
@@ -67,11 +67,11 @@ index 25b7fe802216d805b6426a5b0098d8e41fe48a7d..7dc1aaaf590edcd1e7c6c6734c4baeec
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index 39fc3ea891947ddd102f992e7b6c62f9367849e7..9a2ab505fda1c59df99ef384af5fb8bc5d1bf68c 100644
|
||||
index 9f792a7cf9da888e502b79d6b1d1075e9f084f43..e3de8bba5d37c2dc8c91d09e2225463ffbc2f7e5 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -200,6 +200,7 @@ public abstract class Player extends LivingEntity {
|
||||
private int currentImpulseContextResetGraceTime;
|
||||
@@ -210,6 +210,7 @@ public abstract class Player extends LivingEntity {
|
||||
private int currentImpulseContextResetGraceTime = 0;
|
||||
public boolean affectsSpawning = true; // Paper - Affects Spawning API
|
||||
public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET; // Paper - flying fall damage
|
||||
+ public boolean elytraAeronauticsNoChunk = false; // Leaves - Elytra aeronautics
|
||||
@@ -5,27 +5,27 @@ Subject: [PATCH] Cache ignite odds
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/FireBlock.java b/net/minecraft/world/level/block/FireBlock.java
|
||||
index 7340c664fdcf991a2549c8f07f6ab093bbe6e4e8..d9796f683de7c0c12f45f62597792f80c66c60b7 100644
|
||||
index c03ad7be16fbb9f98c28bc09de59bf33d4edf5d7..8c0b2eb643ccaaa921a90dc2963ce4abcede854d 100644
|
||||
--- a/net/minecraft/world/level/block/FireBlock.java
|
||||
+++ b/net/minecraft/world/level/block/FireBlock.java
|
||||
@@ -225,6 +225,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
this.checkBurnOut(level, pos.south(), 300 + i, random, ageValue, pos);
|
||||
// CraftBukkit end
|
||||
BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos();
|
||||
@@ -205,6 +205,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
this.checkBurnOut(level, pos.south(), 300 + i, random, ageValue, pos);
|
||||
// CraftBukkit end
|
||||
BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos();
|
||||
+ Object2IntOpenHashMap<BlockPos> blockPositionIgniteCache = new Object2IntOpenHashMap<>(); // Leaves - cache ignite odds
|
||||
|
||||
for (int i1 = -1; i1 <= 1; i1++) {
|
||||
for (int i2 = -1; i2 <= 1; i2++) {
|
||||
@@ -236,7 +237,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
}
|
||||
for (int i1 = -1; i1 <= 1; i1++) {
|
||||
for (int i2 = -1; i2 <= 1; i2++) {
|
||||
@@ -216,7 +217,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
}
|
||||
|
||||
mutableBlockPos.setWithOffset(pos, i1, i3, i2);
|
||||
- int igniteOdds = this.getIgniteOdds(level, mutableBlockPos);
|
||||
mutableBlockPos.setWithOffset(pos, i1, i3, i2);
|
||||
- int igniteOdds = this.getIgniteOdds(level, mutableBlockPos);
|
||||
+ int igniteOdds = this.getIgniteOdds(level, mutableBlockPos, org.leavesmc.leaves.LeavesConfig.performance.cacheIgniteOdds ? blockPositionIgniteCache : null); // Leaves - cache ignite odds
|
||||
if (igniteOdds > 0) {
|
||||
int i5 = (igniteOdds + 40 + level.getDifficulty().getId() * 7) / (ageValue + 30);
|
||||
if (isIncreasedFireBurnout) {
|
||||
@@ -340,20 +341,33 @@ public class FireBlock extends BaseFireBlock {
|
||||
if (igniteOdds > 0) {
|
||||
int i5 = (igniteOdds + 40 + level.getDifficulty().getId() * 7) / (ageValue + 30);
|
||||
if (isIncreasedFireBurnout) {
|
||||
@@ -319,20 +320,33 @@ public class FireBlock extends BaseFireBlock {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Lava riptide
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/item/TridentItem.java b/net/minecraft/world/item/TridentItem.java
|
||||
index 23284dbeff327d1b8dc89f3a0dc0ee549cec2daa..edf6ac62e068f46f68b76ea1e8a801cfe2611d3e 100644
|
||||
index df629e3f2defce5e65aaf874d7c5ddff71f39c28..a069729494d638e5f0828c12ad1186e748d0677e 100644
|
||||
--- a/net/minecraft/world/item/TridentItem.java
|
||||
+++ b/net/minecraft/world/item/TridentItem.java
|
||||
@@ -78,7 +78,7 @@ public class TridentItem extends Item implements ProjectileItem {
|
||||
@@ -70,7 +70,7 @@ public class TridentItem extends Item implements ProjectileItem {
|
||||
return false;
|
||||
} else {
|
||||
float tridentSpinAttackStrength = EnchantmentHelper.getTridentSpinAttackStrength(stack, player);
|
||||
@@ -17,7 +17,7 @@ index 23284dbeff327d1b8dc89f3a0dc0ee549cec2daa..edf6ac62e068f46f68b76ea1e8a801cf
|
||||
return false;
|
||||
} else if (stack.nextDamageWillBreak()) {
|
||||
return false;
|
||||
@@ -154,7 +154,7 @@ public class TridentItem extends Item implements ProjectileItem {
|
||||
@@ -150,7 +150,7 @@ public class TridentItem extends Item implements ProjectileItem {
|
||||
ItemStack itemInHand = player.getItemInHand(hand);
|
||||
if (itemInHand.nextDamageWillBreak()) {
|
||||
return InteractionResult.FAIL;
|
||||
@@ -5,22 +5,22 @@ Subject: [PATCH] No block update command
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 30a543de1d8b454ffec0c6cd668aad3504cdf95d..0ea8b6c844f85226081408847781f5ccea461bc3 100644
|
||||
index 26a20dea38628c7acd88f172a09b12af02a82d09..e1962e123dc2d6a3cf97ba723532e30863bf400f 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2386,6 +2386,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1786,6 +1786,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
|
||||
@Override
|
||||
public void blockUpdated(BlockPos pos, Block block) {
|
||||
public void updateNeighborsAt(BlockPos pos, Block block, @Nullable Orientation orientation) {
|
||||
+ if (org.leavesmc.leaves.command.NoBlockUpdateCommand.isNoBlockUpdate()) return; // Leaves - no block update
|
||||
if (!this.isDebug()) {
|
||||
// CraftBukkit start
|
||||
if (this.populating) {
|
||||
if (captureBlockStates) { return; } // Paper - Cancel all physics during placement
|
||||
this.neighborUpdater.updateNeighborsAtExceptFromFacing(pos, block, null, orientation);
|
||||
}
|
||||
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
|
||||
index 6bc431cd0724de406c92830d618c26d69bcd1918..a212135f15701cb887b61081c16313105d952890 100644
|
||||
index 88fdef1e4705b2a89b8dbec5a4e40dd38c6e8c64..b5349e377f0a0a843f5f0629c2c867b3fef5261f 100644
|
||||
--- a/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/net/minecraft/world/item/ItemStack.java
|
||||
@@ -484,7 +484,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@@ -479,7 +479,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
net.minecraft.world.level.block.state.BlockState block = serverLevel.getBlockState(newPos);
|
||||
|
||||
if (!(block.getBlock() instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // Containers get placed automatically
|
||||
@@ -28,25 +28,25 @@ index 6bc431cd0724de406c92830d618c26d69bcd1918..a212135f15701cb887b61081c1631310
|
||||
+ if (!org.leavesmc.leaves.command.NoBlockUpdateCommand.isNoBlockUpdate()) block.onPlace(serverLevel, newPos, oldBlock, true, context); // Leaves - no block update
|
||||
}
|
||||
|
||||
serverLevel.notifyAndUpdatePhysics(newPos, null, oldBlock, block, serverLevel.getBlockState(newPos), updateFlag, net.minecraft.world.level.block.Block.UPDATE_LIMIT); // send null chunk as chunk.k() returns false by this point
|
||||
serverLevel.notifyAndUpdatePhysics(newPos, null, oldBlock, block, serverLevel.getBlockState(newPos), updateFlags, net.minecraft.world.level.block.Block.UPDATE_LIMIT); // send null chunk as chunk.k() returns false by this point
|
||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 1776b79309ffd9a8a52f27a144606ed9a441251e..1e4e1a3236fc6b9aa515f2025cdef5a901c64d58 100644
|
||||
index bf731da711ce629c0f9250a7bd4025d363623773..9714752bfe7019b2578b3b993801d797d642ff96 100644
|
||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -405,7 +405,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -413,7 +413,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
return null;
|
||||
} else {
|
||||
if (!this.level.isClientSide && doPlace && (!this.level.captureBlockStates || block instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // CraftBukkit - Don't place while processing the BlockPlaceEvent, unless it's a BlockContainer. Prevents blocks such as TNT from activating when cancelled.
|
||||
- state.onPlace(this.level, pos, blockState, isMoving);
|
||||
+ if (!org.leavesmc.leaves.command.NoBlockUpdateCommand.isNoBlockUpdate()) state.onPlace(this.level, pos, blockState, isMoving); // Leaves - no block update
|
||||
if (!this.level.isClientSide && (flags & 512) == 0 && (!this.level.captureBlockStates || block instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // CraftBukkit - Don't place while processing the BlockPlaceEvent, unless it's a BlockContainer. Prevents blocks such as TNT from activating when cancelled.
|
||||
- state.onPlace(this.level, pos, blockState, flag1);
|
||||
+ if (!org.leavesmc.leaves.command.NoBlockUpdateCommand.isNoBlockUpdate()) state.onPlace(this.level, pos, blockState, flag1); // Leaves - no block update
|
||||
}
|
||||
|
||||
if (state.hasBlockEntity()) {
|
||||
diff --git a/net/minecraft/world/level/material/FlowingFluid.java b/net/minecraft/world/level/material/FlowingFluid.java
|
||||
index e30499bdcd6600e5c9d4a755c1182fb6dff3735f..ce3a74860f4a6b65e6eb1cf422f71ec1f844ecd2 100644
|
||||
index ace1099a12c762b2e73b71dd3551cf351fedf067..0ccc884066b0a217c7b833c33d3fe96dd7ad0a0b 100644
|
||||
--- a/net/minecraft/world/level/material/FlowingFluid.java
|
||||
+++ b/net/minecraft/world/level/material/FlowingFluid.java
|
||||
@@ -475,6 +475,7 @@ public abstract class FlowingFluid extends Fluid {
|
||||
@@ -476,6 +476,7 @@ public abstract class FlowingFluid extends Fluid {
|
||||
|
||||
@Override
|
||||
public void tick(ServerLevel level, BlockPos pos, BlockState blockState, FluidState fluidState) {
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Raider die skip self raid check
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java
|
||||
index 8270d76a753bfd26a4c8ef6610bee5c24ee59cfe..f58a20e7dd6b8dc3fc431d4aba9f91a7c25f2c33 100644
|
||||
index e81ae747fe95c22321fc69791a6509d601826fd6..39a6a4579931d7edb7ab8c072d62cfc9b02791c8 100644
|
||||
--- a/net/minecraft/world/entity/raid/Raider.java
|
||||
+++ b/net/minecraft/world/entity/raid/Raider.java
|
||||
@@ -153,7 +153,7 @@ public abstract class Raider extends PatrollingMonster {
|
||||
@@ -155,7 +155,7 @@ public abstract class Raider extends PatrollingMonster {
|
||||
}
|
||||
|
||||
public boolean hasRaid() {
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Container open passthrough
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/decoration/ItemFrame.java b/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
index 65e1d7c5ac94b1cfb921fa009be59d3e5872f0b5..34a60bc540cd08da0ebec3a37ec0a01da3dd24de 100644
|
||||
index f9a97000b75db7999b1cbe1f72d680d4d7b803b7..91164be32436c003f2456d4510466779e1b576d8 100644
|
||||
--- a/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
+++ b/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
@@ -408,6 +408,20 @@ public class ItemFrame extends HangingEntity {
|
||||
@@ -30,10 +30,10 @@ index 65e1d7c5ac94b1cfb921fa009be59d3e5872f0b5..34a60bc540cd08da0ebec3a37ec0a01d
|
||||
io.papermc.paper.event.player.PlayerItemFrameChangeEvent event = new io.papermc.paper.event.player.PlayerItemFrameChangeEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.ItemFrame) this.getBukkitEntity(), this.getItem().asBukkitCopy(), io.papermc.paper.event.player.PlayerItemFrameChangeEvent.ItemFrameChangeAction.ROTATE);
|
||||
if (!event.callEvent()) {
|
||||
diff --git a/net/minecraft/world/level/block/SignBlock.java b/net/minecraft/world/level/block/SignBlock.java
|
||||
index f33a42b4888dbf46175e0be409aa6c8688d552b9..da815a9a5e447e9a1cf44f54e4fcbb9481d65d86 100644
|
||||
index a06896de4401f184e8c5cc8bad829e6412eaff22..00067809380fb3cff1dd54876c28c7a8d5b0aaee 100644
|
||||
--- a/net/minecraft/world/level/block/SignBlock.java
|
||||
+++ b/net/minecraft/world/level/block/SignBlock.java
|
||||
@@ -106,6 +106,18 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
|
||||
@@ -105,6 +105,18 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
|
||||
} else {
|
||||
return InteractionResult.TRY_WITH_EMPTY_HAND;
|
||||
}
|
||||
@@ -52,7 +52,7 @@ index f33a42b4888dbf46175e0be409aa6c8688d552b9..da815a9a5e447e9a1cf44f54e4fcbb94
|
||||
} else {
|
||||
return InteractionResult.TRY_WITH_EMPTY_HAND;
|
||||
}
|
||||
@@ -131,6 +143,25 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
|
||||
@@ -130,6 +142,25 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
|
||||
return InteractionResult.SUCCESS_SERVER;
|
||||
} else if (flag) {
|
||||
return InteractionResult.SUCCESS_SERVER;
|
||||
@@ -92,7 +92,7 @@ index c723606fa0be811e580ba47de8c9c575583cc930..c768443c8c6a4b05018bbc70d54b6f41
|
||||
int onResize(int bits, T objectAdded);
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/chunk/PalettedContainer.java b/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
index f5da433050fd3060e0335d4002d520ebe8cd691f..afd78a03fb29c633cc8dc811a14df43aff69ba98 100644
|
||||
index 7da7ce0fd19896593e63edc88b492c02f926bba0..0f89bdb35fced1b9e674959ca510d2da9d4d4c5c 100644
|
||||
--- a/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
+++ b/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
@@ -25,6 +25,24 @@ import net.minecraft.util.ThreadingDetector;
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Skip secondary POI sensor if absent
|
||||
This patch is Powered by Gale(https://github.com/GaleMC/Gale)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java b/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
index 6b99afb4f237b5d6def98f3e03492975b795bc95..ef4413c0661800d1d712d89b6a8e95d034e90ae3 100644
|
||||
index f0583076ef62189508a392a76c3fb6b741bbdde9..5ec4a05d14bd083580a333932e88e80af711774c 100644
|
||||
--- a/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
+++ b/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
@@ -22,6 +22,15 @@ public class SecondaryPoiSensor extends Sensor<Villager> {
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Reduce array allocations
|
||||
This patch is Powered by Gale(https://github.com/GaleMC/Gale)
|
||||
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
|
||||
index d21ce54ebb5724c04eadf56a2cde701d5eeb5db2..fa4b8ea36acf031ceafc1812e657c2312eb49599 100644
|
||||
index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..35b5eb517fd8b25e5f755c18f666339a4a09badc 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
|
||||
@@ -29,6 +29,7 @@ import java.util.Arrays;
|
||||
@@ -45,88 +45,33 @@ index d21ce54ebb5724c04eadf56a2cde701d5eeb5db2..fa4b8ea36acf031ceafc1812e657c231
|
||||
} else {
|
||||
this.storage = Arrays.copyOf(this.storage, this.storage.length * 2);
|
||||
diff --git a/net/minecraft/nbt/ByteArrayTag.java b/net/minecraft/nbt/ByteArrayTag.java
|
||||
index 6927124a4ea1f460158bf25679104b6f9e9ccee4..b0e8f47b9fe2b62d03c11a0b95253d7de7b8adac 100644
|
||||
index 6fbb131b472a3093b137d8ced9889777a133bd5b..9372cdd6cef64c8b5019e3f73d7d8512caed0c60 100644
|
||||
--- a/net/minecraft/nbt/ByteArrayTag.java
|
||||
+++ b/net/minecraft/nbt/ByteArrayTag.java
|
||||
@@ -6,6 +6,7 @@ import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
+import org.leavesmc.leaves.util.ArrayConstants;
|
||||
|
||||
public class ByteArrayTag extends CollectionTag<ByteTag> {
|
||||
private static final int SELF_SIZE_IN_BYTES = 24;
|
||||
@@ -174,7 +175,7 @@ public class ByteArrayTag extends CollectionTag<ByteTag> {
|
||||
@@ -144,7 +144,7 @@ public final class ByteArrayTag implements CollectionTag {
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
- this.data = new byte[0];
|
||||
+ this.data = ArrayConstants.emptyByteArray; // Leaves - reduce array allocations
|
||||
+ this.data = org.leavesmc.leaves.util.ArrayConstants.emptyByteArray; // Leaves - reduce array allocations
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/nbt/CompoundTag.java b/net/minecraft/nbt/CompoundTag.java
|
||||
index 361bc458e0bb590c43da60a1cd993a2785ee45e9..9d1e0ba4ecccfc8a251d440d63ed90796981808e 100644
|
||||
--- a/net/minecraft/nbt/CompoundTag.java
|
||||
+++ b/net/minecraft/nbt/CompoundTag.java
|
||||
@@ -18,6 +18,7 @@ import javax.annotation.Nullable;
|
||||
import net.minecraft.CrashReport;
|
||||
import net.minecraft.CrashReportCategory;
|
||||
import net.minecraft.ReportedException;
|
||||
+import org.leavesmc.leaves.util.ArrayConstants;
|
||||
|
||||
public class CompoundTag implements Tag {
|
||||
public static final Codec<CompoundTag> CODEC = Codec.PASSTHROUGH
|
||||
@@ -409,7 +410,7 @@ public class CompoundTag implements Tag {
|
||||
throw new ReportedException(this.createReport(key, ByteArrayTag.TYPE, var3));
|
||||
}
|
||||
|
||||
- return new byte[0];
|
||||
+ return ArrayConstants.emptyByteArray; // Leaves - reduce array allocations
|
||||
}
|
||||
|
||||
public int[] getIntArray(String key) {
|
||||
@@ -421,7 +422,7 @@ public class CompoundTag implements Tag {
|
||||
throw new ReportedException(this.createReport(key, IntArrayTag.TYPE, var3));
|
||||
}
|
||||
|
||||
- return new int[0];
|
||||
+ return ArrayConstants.emptyIntArray; // Leaves - reduce array allocations
|
||||
}
|
||||
|
||||
public long[] getLongArray(String key) {
|
||||
@@ -433,7 +434,7 @@ public class CompoundTag implements Tag {
|
||||
throw new ReportedException(this.createReport(key, LongArrayTag.TYPE, var3));
|
||||
}
|
||||
|
||||
- return new long[0];
|
||||
+ return ArrayConstants.emptyLongArray; // Leaves - reduce array allocations
|
||||
}
|
||||
|
||||
public CompoundTag getCompound(String key) {
|
||||
diff --git a/net/minecraft/nbt/IntArrayTag.java b/net/minecraft/nbt/IntArrayTag.java
|
||||
index 7e27546bcb587d03b6de2ab43244e6c61fdb55f4..9e94f41e61687e2dacafec9c06646ec7f7980b62 100644
|
||||
index a8ea2aeb5a02903a37376fb78b49c10745147411..9b9cc3821f30380d095a8c4b11a246fb2b648df7 100644
|
||||
--- a/net/minecraft/nbt/IntArrayTag.java
|
||||
+++ b/net/minecraft/nbt/IntArrayTag.java
|
||||
@@ -6,6 +6,7 @@ import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
+import org.leavesmc.leaves.util.ArrayConstants;
|
||||
|
||||
public class IntArrayTag extends CollectionTag<IntTag> {
|
||||
private static final int SELF_SIZE_IN_BYTES = 24;
|
||||
@@ -181,7 +182,7 @@ public class IntArrayTag extends CollectionTag<IntTag> {
|
||||
@@ -151,7 +151,7 @@ public final class IntArrayTag implements CollectionTag {
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
- this.data = new int[0];
|
||||
+ this.data = ArrayConstants.emptyIntArray; // Leaves - reduce array allocations
|
||||
+ this.data = org.leavesmc.leaves.util.ArrayConstants.emptyIntArray; // Leaves - reduce array allocations
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java
|
||||
index 364ddf9f25ef3cb97ba788c469fee9dd495b84a7..fd490f139e901c2ac598f1eab7aa8d50c65ef864 100644
|
||||
index 7af8b2cf9ccfeadac1cc60541da31ba6f4dc0edb..284cdbd6034ec8962409abba6da37eab311018cc 100644
|
||||
--- a/net/minecraft/network/Connection.java
|
||||
+++ b/net/minecraft/network/Connection.java
|
||||
@@ -65,6 +65,7 @@ import org.apache.commons.lang3.Validate;
|
||||
@@ -138,10 +83,10 @@ index 364ddf9f25ef3cb97ba788c469fee9dd495b84a7..fd490f139e901c2ac598f1eab7aa8d50
|
||||
public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
private static final float AVERAGE_PACKETS_SMOOTHING = 0.75F;
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index ff80394fcae884f2a6a700de90c7b495862e532b..a9b9928f371581e6b324622aa9c75aac6d285d7c 100644
|
||||
index e1962e123dc2d6a3cf97ba723532e30863bf400f..ec61dcf1a69855ad48de3a46d21ffed9243ceb7a 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -169,6 +169,7 @@ import net.minecraft.world.phys.shapes.Shapes;
|
||||
@@ -165,6 +165,7 @@ import net.minecraft.world.phys.shapes.Shapes;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.ticks.LevelTicks;
|
||||
import org.slf4j.Logger;
|
||||
@@ -150,18 +95,18 @@ index ff80394fcae884f2a6a700de90c7b495862e532b..a9b9928f371581e6b324622aa9c75aac
|
||||
public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLevel, ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel, ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevelReader, ca.spottedleaf.moonrise.patches.chunk_tick_iteration.ChunkTickServerLevel { // Paper - rewrite chunk system // Paper - chunk tick iteration
|
||||
public static final BlockPos END_SPAWN_POINT = new BlockPos(100, 50, 0);
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index b3abfd93b7b4ce47e3382a9f81b82dbb2beb37ae..f0feadb8d4312d6569783c299968a50fe5c2edee 100644
|
||||
index 0c811363c9b8ac2bed9039ccd86b4c72538e5e4e..c81bd1a48944a7e37f35866d3f580378e13fa86f 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -245,6 +245,7 @@ import org.bukkit.inventory.CraftingInventory;
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
import org.bukkit.inventory.SmithingInventory;
|
||||
@@ -236,6 +236,7 @@ import org.bukkit.event.player.PlayerToggleFlightEvent;
|
||||
import org.bukkit.event.player.PlayerToggleSneakEvent;
|
||||
import org.bukkit.event.player.PlayerToggleSprintEvent;
|
||||
// CraftBukkit end
|
||||
+import org.leavesmc.leaves.util.ArrayConstants;
|
||||
|
||||
public class ServerGamePacketListenerImpl
|
||||
extends ServerCommonPacketListenerImpl
|
||||
@@ -803,7 +804,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -796,7 +797,7 @@ public class ServerGamePacketListenerImpl
|
||||
// Paper start
|
||||
final int index;
|
||||
if (packet.getCommand().length() > 64 && ((index = packet.getCommand().indexOf(' ')) == -1 || index >= 64)) {
|
||||
@@ -171,10 +116,10 @@ index b3abfd93b7b4ce47e3382a9f81b82dbb2beb37ae..f0feadb8d4312d6569783c299968a50f
|
||||
}
|
||||
// Paper end
|
||||
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 6689aeacf50d1498e8d23cce696fb4fecbd1cf39..66d74f720f60c85d3b0e0c04e45bbceedc4e314a 100644
|
||||
index 7950f4f88d8a83ed5610b7af4e134557d32da3f0..07342673c333436fc3f4779ffcfa0a451bd524dd 100644
|
||||
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -50,6 +50,7 @@ import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
@@ -49,6 +49,7 @@ import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.util.Waitable;
|
||||
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
|
||||
import org.bukkit.event.player.PlayerPreLoginEvent;
|
||||
@@ -217,22 +162,22 @@ index 50993ce7519a77c6a9d36cb925125adccda7037f..e5124b566e791c1c011b301f910a8926
|
||||
|
||||
public ZeroBitStorage(int size) {
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index e9ec19be9393ccd1e257247de86ba05e51471790..e10f4190393a934d617cd2c7afd05f3a4a6e89f9 100644
|
||||
index 12a63f75d878fcdad83847b20f5a57f7936c7779..ea25b29a5f28a171151cd1ca185a8fc0ceaa248a 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -102,6 +102,7 @@ import org.bukkit.craftbukkit.util.CraftSpawnCategory;
|
||||
@@ -93,6 +93,7 @@ import org.bukkit.craftbukkit.block.CraftBlockState;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
import org.bukkit.entity.SpawnCategory;
|
||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||
// CraftBukkit end
|
||||
+import org.leavesmc.leaves.util.ArrayConstants;
|
||||
|
||||
public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel, ca.spottedleaf.moonrise.patches.chunk_system.world.ChunkSystemEntityGetter { // Paper - rewrite chunk system // Paper - optimise collisions
|
||||
public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCloseable, ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel, ca.spottedleaf.moonrise.patches.chunk_system.world.ChunkSystemEntityGetter { // Paper - rewrite chunk system // Paper - optimise collisions
|
||||
public static final Codec<ResourceKey<Level>> RESOURCE_KEY_CODEC = ResourceKey.codec(Registries.DIMENSION);
|
||||
diff --git a/net/minecraft/world/level/block/ComposterBlock.java b/net/minecraft/world/level/block/ComposterBlock.java
|
||||
index 86f9c284f434a16888beb60b89f460de2c0450a8..e3177018adab3d87eb4af8ac158def96908b041a 100644
|
||||
index a647d76d365a60b95a3eb7927ac426bf70d417f3..056a88405be08bf6acd5c94b6f9d042b15a1ba0a 100644
|
||||
--- a/net/minecraft/world/level/block/ComposterBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ComposterBlock.java
|
||||
@@ -410,7 +410,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -419,7 +419,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
|
||||
@Override
|
||||
public int[] getSlotsForFace(Direction side) {
|
||||
@@ -241,7 +186,7 @@ index 86f9c284f434a16888beb60b89f460de2c0450a8..e3177018adab3d87eb4af8ac158def96
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -445,7 +445,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -454,7 +454,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
|
||||
@Override
|
||||
public int[] getSlotsForFace(Direction side) {
|
||||
@@ -250,7 +195,7 @@ index 86f9c284f434a16888beb60b89f460de2c0450a8..e3177018adab3d87eb4af8ac158def96
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -496,7 +496,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -505,7 +505,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
|
||||
@Override
|
||||
public int[] getSlotsForFace(Direction side) {
|
||||
@@ -260,7 +205,7 @@ index 86f9c284f434a16888beb60b89f460de2c0450a8..e3177018adab3d87eb4af8ac158def96
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
index 2f5fa4310f475ecbb29e69c0461c7d3276f8536d..304940047eee6fab5b763ce13fdd5d7e6f8e70f1 100644
|
||||
index 78b3bdb668320e9cf2fb09b59929fac43cf56aca..f1f3c52a147165881de76b1f94ef57cfc9142a2a 100644
|
||||
--- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -38,13 +38,14 @@ import net.minecraft.world.level.block.AbstractFurnaceBlock;
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Optimize sun burn tick
|
||||
This patch is Powered by Gale(https://github.com/GaleMC/Gale)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 7dc1aaaf590edcd1e7c6c6734c4baeecbfec93a7..3a2bf5f3db1130cae4c7d8dd43b5553d109982be 100644
|
||||
index 962eff9d67fc31e444dbe54c95cb6e8274f6713b..b14422132c67bfd42d55defa2136268291487b70 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -2040,10 +2040,22 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2034,9 +2034,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
@Deprecated
|
||||
public float getLightLevelDependentMagicValue() {
|
||||
@@ -31,15 +31,21 @@ index 7dc1aaaf590edcd1e7c6c6734c4baeecbfec93a7..3a2bf5f3db1130cae4c7d8dd43b5553d
|
||||
+ public float getLightLevelDependentMagicValue(BlockPos pos) {
|
||||
+ return this.level().hasChunkAt(this.getBlockX(), this.getBlockZ()) ? this.level.getLightLevelDependentMagicValue(pos) : 0.0F;
|
||||
}
|
||||
|
||||
public void absSnapTo(double x, double y, double z, float yRot, float xRot) {
|
||||
@@ -2051,6 +2062,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.xRotO = this.getXRot();
|
||||
this.setYHeadRot(yRot); // Paper - Update head rotation
|
||||
}
|
||||
+ // Leaves end - optimize sun burn tick
|
||||
|
||||
public void absMoveTo(double x, double y, double z, float yRot, float xRot) {
|
||||
this.absMoveTo(x, y, z);
|
||||
public void absSnapTo(double x, double y, double z) {
|
||||
double d = Mth.clamp(x, -3.0E7, 3.0E7);
|
||||
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
||||
index 6a9a4ac52602d68f679672e16391304b8e6d8252..12c2b73ff94fb29a6d22917553a67b1cf03b5a68 100644
|
||||
index c83ad2553145b66aad000be3b82fec57f56359ce..c5327b8ac196f4d3b6e291f5202c67a1ab4467a6 100644
|
||||
--- a/net/minecraft/world/entity/Mob.java
|
||||
+++ b/net/minecraft/world/entity/Mob.java
|
||||
@@ -1629,20 +1629,40 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
@@ -1507,20 +1507,43 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
protected void playAttackSound() {
|
||||
}
|
||||
|
||||
@@ -49,10 +55,10 @@ index 6a9a4ac52602d68f679672e16391304b8e6d8252..12c2b73ff94fb29a6d22917553a67b1c
|
||||
+ // Leaves end - optimize sun burn tick
|
||||
+
|
||||
public boolean isSunBurnTick() {
|
||||
if (this.level().isDay() && !this.level().isClientSide) {
|
||||
if (this.level().isBrightOutside() && !this.level().isClientSide) {
|
||||
- float lightLevelDependentMagicValue = this.getLightLevelDependentMagicValue();
|
||||
- BlockPos blockPos = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ());
|
||||
- boolean flag = this.isInWaterRainOrBubble() || this.isInPowderSnow || this.wasInPowderSnow;
|
||||
- boolean flag = this.isInWaterOrRain() || this.isInPowderSnow || this.wasInPowderSnow;
|
||||
- if (lightLevelDependentMagicValue > 0.5F
|
||||
- && this.random.nextFloat() * 30.0F < (lightLevelDependentMagicValue - 0.4F) * 2.0F
|
||||
- && !flag
|
||||
@@ -60,30 +66,32 @@ index 6a9a4ac52602d68f679672e16391304b8e6d8252..12c2b73ff94fb29a6d22917553a67b1c
|
||||
- return true;
|
||||
+ // Leaves start - optimize sun burn tick
|
||||
+ if (!org.leavesmc.leaves.LeavesConfig.performance.optimizeSunBurnTick) {
|
||||
+ float f = this.getLightLevelDependentMagicValue();
|
||||
+ BlockPos blockposition = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ());
|
||||
+ boolean flag = this.isInWaterRainOrBubble() || this.isInPowderSnow || this.wasInPowderSnow;
|
||||
+
|
||||
+ if (f > 0.5F && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && !flag && this.level().canSeeSky(blockposition)) {
|
||||
+ float lightLevelDependentMagicValue = this.getLightLevelDependentMagicValue();
|
||||
+ BlockPos blockPos = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ());
|
||||
+ boolean flag = this.isInWaterOrRain() || this.isInPowderSnow || this.wasInPowderSnow;
|
||||
+ if (lightLevelDependentMagicValue > 0.5F
|
||||
+ && this.random.nextFloat() * 30.0F < (lightLevelDependentMagicValue - 0.4F) * 2.0F
|
||||
+ && !flag
|
||||
+ && this.level().canSeeSky(blockPos)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ } else {
|
||||
+ int positionHashCode = this.position().hashCode();
|
||||
+ if (this.cached_position_hashcode != positionHashCode) {
|
||||
+ this.cached_eye_blockpos = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ());
|
||||
+ this.cached_position_hashcode = positionHashCode;
|
||||
+ }
|
||||
+
|
||||
+ float f = this.getLightLevelDependentMagicValue(cached_eye_blockpos); // Pass BlockPos to getBrightness
|
||||
+
|
||||
+ // Check brightness first
|
||||
+ if (f <= 0.5F) return false;
|
||||
+ if (this.random.nextFloat() * 30.0F >= (f - 0.4F) * 2.0F) return false;
|
||||
+ boolean flag = this.isInWaterRainOrBubble() || this.isInPowderSnow || this.wasInPowderSnow;
|
||||
+ return !flag && this.level().canSeeSky(this.cached_eye_blockpos);
|
||||
}
|
||||
+ } else {
|
||||
+ int positionHashCode = this.position().hashCode();
|
||||
+ if (this.cached_position_hashcode != positionHashCode) {
|
||||
+ this.cached_eye_blockpos = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ());
|
||||
+ this.cached_position_hashcode = positionHashCode;
|
||||
+ }
|
||||
+
|
||||
+ float f = this.getLightLevelDependentMagicValue(cached_eye_blockpos); // Pass BlockPos to getBrightness
|
||||
+
|
||||
+ // Check brightness first
|
||||
+ if (f <= 0.5F) return false;
|
||||
+ if (this.random.nextFloat() * 30.0F >= (f - 0.4F) * 2.0F) return false;
|
||||
+ boolean flag = this.isInWaterOrRain() || this.isInPowderSnow || this.wasInPowderSnow;
|
||||
+ return !flag && this.level().canSeeSky(this.cached_eye_blockpos);
|
||||
}
|
||||
-
|
||||
|
||||
return false;
|
||||
+ // Leaves end - optimize sun burn tick
|
||||
}
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Check frozen ticks before landing block
|
||||
This patch is Powered by Gale(https://github.com/GaleMC/Gale)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 5e7068bf9b5364c382fccfb110ed2a26a5ac1731..9b90d9f9a9317cdec1e2684e68d5ec03a143addc 100644
|
||||
index 6893ca36cd4ae9a62fecedb1167cc6cf797a7f8f..23eb3e6a1e4f59132296d3bad9cbf858270dfe62 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -572,10 +572,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -523,10 +523,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
protected void tryAddFrost() {
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Skip entity move if movement is zero
|
||||
This patch is Powered by Gale(https://github.com/GaleMC/Gale)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 8d96e314911d9985fad3d395f557aec3e04f7cff..3409bdd246acf5105836d2eef7bfed54f2927e6d 100644
|
||||
index b14422132c67bfd42d55defa2136268291487b70..09d357035d2b0a75a70710bf15b34cfae2501a43 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -235,6 +235,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -242,6 +242,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public float yRotO;
|
||||
public float xRotO;
|
||||
private AABB bb = INITIAL_AABB;
|
||||
@@ -17,7 +17,7 @@ index 8d96e314911d9985fad3d395f557aec3e04f7cff..3409bdd246acf5105836d2eef7bfed54
|
||||
public boolean onGround;
|
||||
public boolean horizontalCollision;
|
||||
public boolean verticalCollision;
|
||||
@@ -1086,6 +1087,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1068,6 +1069,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// Paper end - detailed watchdog information
|
||||
|
||||
public void move(MoverType type, Vec3 movement) {
|
||||
@@ -31,7 +31,7 @@ index 8d96e314911d9985fad3d395f557aec3e04f7cff..3409bdd246acf5105836d2eef7bfed54
|
||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||
// Paper start - detailed watchdog information
|
||||
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
||||
@@ -4209,6 +4217,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4174,6 +4182,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public final void setBoundingBox(AABB bb) {
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Skip cloning advancement criteria
|
||||
This patch is Powered by Gale(https://github.com/GaleMC/Gale)
|
||||
|
||||
diff --git a/net/minecraft/advancements/Advancement.java b/net/minecraft/advancements/Advancement.java
|
||||
index d5c824eabf321a2c7600c7081b8d4f3057cfae2e..32a671ffc4c1970c0af918281b031344b07a4029 100644
|
||||
index a1abe9a798e459798ac18d8a9b4756c66eba9721..4bd3babe69b516a1f4938cc3b75ef6e4c6fffe55 100644
|
||||
--- a/net/minecraft/advancements/Advancement.java
|
||||
+++ b/net/minecraft/advancements/Advancement.java
|
||||
@@ -60,7 +60,7 @@ public record Advancement(
|
||||
@@ -61,7 +61,7 @@ public record Advancement(
|
||||
AdvancementRequirements requirements,
|
||||
boolean sendsTelemetryEvent
|
||||
) {
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix villagers dont release memory
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 3409bdd246acf5105836d2eef7bfed54f2927e6d..65e916089fba9e2a3908dafa24634f6cc259e595 100644
|
||||
index 09d357035d2b0a75a70710bf15b34cfae2501a43..591e413dba3459667cf2643e26684c8fae8d4c82 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -3838,7 +3838,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3805,7 +3805,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@ index 3409bdd246acf5105836d2eef7bfed54f2927e6d..65e916089fba9e2a3908dafa24634f6c
|
||||
List<Entity> list = new ArrayList<>(passengers.size());
|
||||
this.ejectPassengers();
|
||||
diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java
|
||||
index 2b83262e4a13eae86df82913ce4f3121e3631a43..6b565fcf91e1d94b649dac90bf3c923930d252f8 100644
|
||||
index e0e0d2ea7fc60e3142c675404d152eca60263240..956b949b42a7041290838dde816d3b79e1f9e0d4 100644
|
||||
--- a/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -1017,4 +1017,19 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
Optional<Long> memory = this.brain.getMemory(MemoryModuleType.LAST_SLEPT);
|
||||
return memory.filter(_long -> gameTime - _long < 24000L).isPresent();
|
||||
@@ -1033,4 +1033,19 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
return super.applyImplicitComponent(component, value);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // Leaves start - fixes a memory leak when villagers get moved to another world
|
||||
@@ -1,19 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Sat, 22 Jul 2023 14:16:25 +0800
|
||||
From: Lumine1909 <133463833+Lumine1909@users.noreply.github.com>
|
||||
Date: Wed, 23 Apr 2025 03:35:07 -0400
|
||||
Subject: [PATCH] Avoid anvil too expensive
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/inventory/AnvilMenu.java b/net/minecraft/world/inventory/AnvilMenu.java
|
||||
index aaa022ac3656d68bad8dbd4c80a90b62fb6f9a16..e9ac7966fc49de16a444d0e991a4b736cfdb0a0d 100644
|
||||
index 65c400444314049d5529f1f76d65fbd6b1ea7af2..eed4ba79dd5328a59121bd9fe81ef1efd563094e 100644
|
||||
--- a/net/minecraft/world/inventory/AnvilMenu.java
|
||||
+++ b/net/minecraft/world/inventory/AnvilMenu.java
|
||||
@@ -260,7 +260,7 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
@@ -259,7 +259,7 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
this.onlyRenaming = true;
|
||||
}
|
||||
|
||||
- if (this.cost.get() >= this.maximumRepairCost && !this.player.getAbilities().instabuild) { // CraftBukkit
|
||||
+ if (this.cost.get() >= this.maximumRepairCost && (!org.leavesmc.leaves.LeavesConfig.modify.avoidAnvilTooExpensive || this.cost.get() == DEFAULT_DENIED_COST) && !this.player.getAbilities().instabuild) { // CraftBukkit // Leaves - avoid anvil too expensive
|
||||
- if (this.cost.get() >= this.maximumRepairCost && !this.player.hasInfiniteMaterials()) { // CraftBukkit
|
||||
+ if (this.cost.get() >= this.maximumRepairCost && (!org.leavesmc.leaves.LeavesConfig.modify.avoidAnvilTooExpensive || this.cost.get() == DEFAULT_DENIED_COST) && !this.player.hasInfiniteMaterials()) { // CraftBukkit // Leaves - avoid anvil too expensive
|
||||
itemStack = ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ Subject: [PATCH] Bow infinity fix
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index 9a2ab505fda1c59df99ef384af5fb8bc5d1bf68c..29bc08bdb42e60553723f30d92706047f910b284 100644
|
||||
index e3de8bba5d37c2dc8c91d09e2225463ffbc2f7e5..3d6b240617d7e9cd16e0691d3de36ae53d13e04d 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2277,7 +2277,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -2165,7 +2165,7 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
if (anyEventCancelled.booleanValue() && !this.abilities.instabuild && this instanceof final ServerPlayer player) this.resyncUsingItem(player); // Paper - resync if no item matched the Predicate
|
||||
- return this.abilities.instabuild ? new ItemStack(Items.ARROW) : ItemStack.EMPTY;
|
||||
+ return this.abilities.instabuild || (org.leavesmc.leaves.LeavesConfig.modify.bowInfinityFix && net.minecraft.world.item.enchantment.EnchantmentHelper.processAmmoUse((ServerLevel) this.level(), shootable, new ItemStack(Items.ARROW), 1) <= 0) ? new ItemStack(Items.ARROW) : ItemStack.EMPTY; // Leaves - infinity fix
|
||||
- return this.hasInfiniteMaterials() ? new ItemStack(Items.ARROW) : ItemStack.EMPTY;
|
||||
+ return this.hasInfiniteMaterials() || (org.leavesmc.leaves.LeavesConfig.modify.bowInfinityFix && net.minecraft.world.item.enchantment.EnchantmentHelper.processAmmoUse((ServerLevel) this.level(), shootable, new ItemStack(Items.ARROW), 1) <= 0) ? new ItemStack(Items.ARROW) : ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Zero tick plants
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/BambooStalkBlock.java b/net/minecraft/world/level/block/BambooStalkBlock.java
|
||||
index d824bb7d86fd9063ec8185f6bc74dc7450c2b73a..7598b403ed10559d271d302a7759f99e41d96dd5 100644
|
||||
index a6249f5852c4ac2432bb60cb4f7a2e0a03abd7dd..29f9866e693dbbf9487cdc15ca8d2f5576cde00c 100644
|
||||
--- a/net/minecraft/world/level/block/BambooStalkBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BambooStalkBlock.java
|
||||
@@ -119,6 +119,10 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
||||
@@ -109,6 +109,10 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
||||
protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
|
||||
if (!state.canSurvive(level, pos)) {
|
||||
level.destroyBlock(pos, true);
|
||||
@@ -20,10 +20,10 @@ index d824bb7d86fd9063ec8185f6bc74dc7450c2b73a..7598b403ed10559d271d302a7759f99e
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/CactusBlock.java b/net/minecraft/world/level/block/CactusBlock.java
|
||||
index 913779c68b178dbbfac3b1dcee0c6342028e5570..590525a5de0119b8a9652a00ec99b10d6cae2c46 100644
|
||||
index 8f6878cc8e72513446895bfc79886075bfcd5565..efbd3aff528cd81a79c522aa44b6348827b8c88d 100644
|
||||
--- a/net/minecraft/world/level/block/CactusBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CactusBlock.java
|
||||
@@ -43,6 +43,10 @@ public class CactusBlock extends Block {
|
||||
@@ -47,6 +47,10 @@ public class CactusBlock extends Block {
|
||||
protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
|
||||
if (!state.canSurvive(level, pos)) {
|
||||
level.destroyBlock(pos, true);
|
||||
@@ -35,7 +35,7 @@ index 913779c68b178dbbfac3b1dcee0c6342028e5570..590525a5de0119b8a9652a00ec99b10d
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/ChorusFlowerBlock.java b/net/minecraft/world/level/block/ChorusFlowerBlock.java
|
||||
index 3af8f150474a8a461c5829850172196b7b9e7bfd..04e392cabf3b5c171d86cb47b29b34d05222d4a4 100644
|
||||
index 32ba79c568ef9e75639f03cd7cc34be569638742..46af89f48716a661c4ca31334299d874d29a0b36 100644
|
||||
--- a/net/minecraft/world/level/block/ChorusFlowerBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ChorusFlowerBlock.java
|
||||
@@ -49,6 +49,9 @@ public class ChorusFlowerBlock extends Block {
|
||||
@@ -49,10 +49,10 @@ index 3af8f150474a8a461c5829850172196b7b9e7bfd..04e392cabf3b5c171d86cb47b29b34d0
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/GrowingPlantHeadBlock.java b/net/minecraft/world/level/block/GrowingPlantHeadBlock.java
|
||||
index 0994f7265322d1f33365a1df0faaffd9df05fcc0..90577291e4a2846a89c59bd5297a99e910378276 100644
|
||||
index fe11f3ec82ebdbdf3d024d7273fb16b6823b1ece..577ba4b329e6d1e224d6ea57b224ad92e1993d65 100644
|
||||
--- a/net/minecraft/world/level/block/GrowingPlantHeadBlock.java
|
||||
+++ b/net/minecraft/world/level/block/GrowingPlantHeadBlock.java
|
||||
@@ -148,4 +148,15 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements
|
||||
@@ -155,4 +155,15 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements
|
||||
protected GrowingPlantHeadBlock getHeadBlock() {
|
||||
return this;
|
||||
}
|
||||
@@ -69,10 +69,10 @@ index 0994f7265322d1f33365a1df0faaffd9df05fcc0..90577291e4a2846a89c59bd5297a99e9
|
||||
+ // Leaves end - zero tick plants
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/SugarCaneBlock.java b/net/minecraft/world/level/block/SugarCaneBlock.java
|
||||
index 63d53f9090caca304c7f8c3f9910c57a6bdbb4d5..1d1e699926c2e244937b34d9f54c627bbd2ce5b4 100644
|
||||
index a8de37e173e244d7a16c19ac8805e0e4327c837a..c6803d4869459b778d6a331950889ae1814422ce 100644
|
||||
--- a/net/minecraft/world/level/block/SugarCaneBlock.java
|
||||
+++ b/net/minecraft/world/level/block/SugarCaneBlock.java
|
||||
@@ -44,6 +44,10 @@ public class SugarCaneBlock extends Block {
|
||||
@@ -43,6 +43,10 @@ public class SugarCaneBlock extends Block {
|
||||
protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
|
||||
if (!state.canSurvive(level, pos)) {
|
||||
level.destroyBlock(pos, true);
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Force peaceful mode switch
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 6540b2d6a1062d883811ce240c49d30d1925b291..67f7a71c70095dccd5a9f1a17a422c2d1854f8da 100644
|
||||
index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..1e6f7c0997efdeb06dbf1450b3d7f5f4ecc4072c 100644
|
||||
--- a/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -181,6 +181,12 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -184,6 +184,12 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
// Paper end - chunk tick iteration optimisations
|
||||
|
||||
@@ -21,7 +21,7 @@ index 6540b2d6a1062d883811ce240c49d30d1925b291..67f7a71c70095dccd5a9f1a17a422c2d
|
||||
|
||||
public ServerChunkCache(
|
||||
ServerLevel level,
|
||||
@@ -507,6 +513,20 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -512,6 +518,20 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
this.lastInhabitedUpdate = gameTime;
|
||||
if (!this.level.isDebug()) {
|
||||
ProfilerFiller profilerFiller = Profiler.get();
|
||||
@@ -41,8 +41,8 @@ index 6540b2d6a1062d883811ce240c49d30d1925b291..67f7a71c70095dccd5a9f1a17a422c2d
|
||||
+ // Leaves end - peaceful mode switch
|
||||
profilerFiller.push("pollingChunks");
|
||||
if (this.level.tickRateManager().runsNormally()) {
|
||||
List<LevelChunk> list = this.tickingChunks;
|
||||
@@ -598,6 +618,14 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
profilerFiller.push("tickingChunks");
|
||||
@@ -568,6 +588,14 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
boolean _boolean = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||
int _int = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
|
||||
List<MobCategory> filteredSpawningCategories;
|
||||
@@ -57,7 +57,7 @@ index 6540b2d6a1062d883811ce240c49d30d1925b291..67f7a71c70095dccd5a9f1a17a422c2d
|
||||
if (_boolean && (this.spawnEnemies || this.spawnFriendlies)) {
|
||||
// Paper start - PlayerNaturallySpawnCreaturesEvent
|
||||
for (ServerPlayer entityPlayer : this.level.players()) {
|
||||
@@ -608,7 +636,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -578,7 +606,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
// Paper end - PlayerNaturallySpawnCreaturesEvent
|
||||
boolean flag = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
||||
@@ -67,10 +67,10 @@ index 6540b2d6a1062d883811ce240c49d30d1925b291..67f7a71c70095dccd5a9f1a17a422c2d
|
||||
filteredSpawningCategories = List.of();
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/NaturalSpawner.java b/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 8fd9c191e5b14fc7dd90e8f7229acd6de97e0f9e..268a4489cc5f7d5358c6cd96e0acbaf65852f7d3 100644
|
||||
index 5427f5e1f0416a8dfa3e9c38c3ce69d6e2bd37a6..acfecf37c6e3efc21d7f2194d9efed79146b1f1d 100644
|
||||
--- a/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -122,16 +122,26 @@ public final class NaturalSpawner {
|
||||
@@ -116,16 +116,26 @@ public final class NaturalSpawner {
|
||||
static Biome getRoughBiome(BlockPos pos, ChunkAccess chunk) {
|
||||
return chunk.getNoiseBiome(QuartPos.fromBlock(pos.getX()), QuartPos.fromBlock(pos.getY()), QuartPos.fromBlock(pos.getZ())).value();
|
||||
}
|
||||
@@ -85,7 +85,7 @@ index 8fd9c191e5b14fc7dd90e8f7229acd6de97e0f9e..268a4489cc5f7d5358c6cd96e0acbaf6
|
||||
+
|
||||
+ public static List<MobCategory> getFilteredSpawningCategories(NaturalSpawner.SpawnState spawnState, boolean spawnFriendlies, boolean spawnEnemies, boolean spawnPassives, ServerLevel level, boolean peacefulModeSwitch) {
|
||||
+ // Leaves end - peaceful mode switch
|
||||
LevelData worlddata = level.getLevelData(); // CraftBukkit - Other mob type spawn tick rate
|
||||
net.minecraft.world.level.storage.LevelData worlddata = level.getLevelData(); // CraftBukkit - Other mob type spawn tick rate
|
||||
// CraftBukkit end
|
||||
List<MobCategory> list = new ArrayList<>(SPAWNING_CATEGORIES.length);
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Replay Mod API
|
||||
This patch is Powered by ReplayMod(https://github.com/ReplayMod)
|
||||
|
||||
diff --git a/net/minecraft/commands/CommandSourceStack.java b/net/minecraft/commands/CommandSourceStack.java
|
||||
index c2b7164a1395842ab95428540782eeda4c7960b0..a00a59989c28429289fc4b65fb0605cc626de56c 100644
|
||||
index cb63e4c264a31788cd1405428af70f7a018910e9..a1e8f25b70b49590fd42b618fcd467cf306650af 100644
|
||||
--- a/net/minecraft/commands/CommandSourceStack.java
|
||||
+++ b/net/minecraft/commands/CommandSourceStack.java
|
||||
@@ -589,7 +589,7 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
|
||||
@@ -588,7 +588,7 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
|
||||
|
||||
@Override
|
||||
public Collection<String> getOnlinePlayerNames() {
|
||||
@@ -81,10 +81,10 @@ index 514f8fbdeb776087608665c35de95294aadf5cf0..2f78ca86f46ea08fdcf4b8047d3d0b04
|
||||
if (players.size() >= resultLimit) {
|
||||
return players;
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 7822cecf362cd8d430d90c0daac6e97c8a8d124b..438bbf36d4f80b38482b89e3ef59e9e48d0f62c2 100644
|
||||
index 7b87939d3f044f4b1d2a8c6492a24ea18855a404..7a09e5252164ac7efa8429aa3e46d8d3b1a0f6da 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1639,7 +1639,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1637,7 +1637,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
private ServerStatus.Players buildPlayerStatus() {
|
||||
@@ -94,7 +94,7 @@ index 7822cecf362cd8d430d90c0daac6e97c8a8d124b..438bbf36d4f80b38482b89e3ef59e9e4
|
||||
if (this.hidesOnlinePlayers()) {
|
||||
return new ServerStatus.Players(maxPlayers, players.size(), List.of());
|
||||
diff --git a/net/minecraft/server/PlayerAdvancements.java b/net/minecraft/server/PlayerAdvancements.java
|
||||
index 0d2fb0f6686422f41d50e4898b26915c21c6ce1c..7012faaf1fa2515d9fdfd39da091b3dcb198ceb7 100644
|
||||
index 82fb9c61ce97c2e88a3252068bb28eb40bda0273..23152dcede95e41303a23415b319952338805d1f 100644
|
||||
--- a/net/minecraft/server/PlayerAdvancements.java
|
||||
+++ b/net/minecraft/server/PlayerAdvancements.java
|
||||
@@ -174,7 +174,7 @@ public class PlayerAdvancements {
|
||||
@@ -107,7 +107,7 @@ index 0d2fb0f6686422f41d50e4898b26915c21c6ce1c..7012faaf1fa2515d9fdfd39da091b3dc
|
||||
}
|
||||
// Leaves end - bot can't get advancement
|
||||
diff --git a/net/minecraft/server/commands/OpCommand.java b/net/minecraft/server/commands/OpCommand.java
|
||||
index 5c0a04db38821dbb0cba2bb6f0787f113d167efd..cd153db93f709c3142942fac88ae3ca2226a65b3 100644
|
||||
index 814bb2981ab32b216b7953e9b14fe09e96cc7c89..45f884bf598b38ec45baf423b84f52931cb019da 100644
|
||||
--- a/net/minecraft/server/commands/OpCommand.java
|
||||
+++ b/net/minecraft/server/commands/OpCommand.java
|
||||
@@ -25,7 +25,7 @@ public class OpCommand {
|
||||
@@ -120,10 +120,10 @@ index 5c0a04db38821dbb0cba2bb6f0787f113d167efd..cd153db93f709c3142942fac88ae3ca2
|
||||
.filter(player -> !playerList.isOp(player.getGameProfile()))
|
||||
.map(player -> player.getGameProfile().getName()),
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 9a4bb86ebb893def457ad3fd896eb2a5e699f140..439bc4a93deb6fe134a9b1de4ca73a8c785d46db 100644
|
||||
index ec61dcf1a69855ad48de3a46d21ffed9243ceb7a..c091c5d7a71821b51c37dbcbd1c12f92cf3ba0b3 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2649,7 +2649,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -2644,7 +2644,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
if (entity instanceof ServerPlayer serverPlayer) {
|
||||
ServerLevel.this.players.add(serverPlayer);
|
||||
// Leaves start - skip
|
||||
@@ -132,7 +132,7 @@ index 9a4bb86ebb893def457ad3fd896eb2a5e699f140..439bc4a93deb6fe134a9b1de4ca73a8c
|
||||
ServerLevel.this.realPlayers.add(serverPlayer);
|
||||
}
|
||||
// Leaves end - skip
|
||||
@@ -2720,7 +2720,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -2715,7 +2715,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
if (entity instanceof ServerPlayer serverPlayer) {
|
||||
ServerLevel.this.players.remove(serverPlayer);
|
||||
// Leaves start - skip
|
||||
@@ -142,7 +142,7 @@ index 9a4bb86ebb893def457ad3fd896eb2a5e699f140..439bc4a93deb6fe134a9b1de4ca73a8c
|
||||
}
|
||||
// Leaves end - skip
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 46d93b9c063cb056f3051ebe0f3558f5b4f55bea..5cbc1a5296aa2b6b267a8fa1f3edb9cf7857b8cf 100644
|
||||
index 1a1815b754252775bbffc03850b2d09d0d63a108..b46caaacd25264b9e9387483528bc6cfbe22b7c2 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -131,6 +131,7 @@ public abstract class PlayerList {
|
||||
@@ -273,7 +273,7 @@ index 46d93b9c063cb056f3051ebe0f3558f5b4f55bea..5cbc1a5296aa2b6b267a8fa1f3edb9cf
|
||||
public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie cookie) {
|
||||
player.isRealPlayer = true; // Paper
|
||||
player.loginTime = System.currentTimeMillis(); // Paper - Replace OfflinePlayer#getLastPlayed
|
||||
@@ -307,6 +421,7 @@ public abstract class PlayerList {
|
||||
@@ -309,6 +423,7 @@ public abstract class PlayerList {
|
||||
|
||||
// player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // CraftBukkit - replaced with loop below
|
||||
this.players.add(player);
|
||||
@@ -281,7 +281,7 @@ index 46d93b9c063cb056f3051ebe0f3558f5b4f55bea..5cbc1a5296aa2b6b267a8fa1f3edb9cf
|
||||
this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below
|
||||
@@ -376,6 +491,12 @@ public abstract class PlayerList {
|
||||
@@ -380,6 +495,12 @@ public abstract class PlayerList {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -294,7 +294,7 @@ index 46d93b9c063cb056f3051ebe0f3558f5b4f55bea..5cbc1a5296aa2b6b267a8fa1f3edb9cf
|
||||
onlinePlayers.add(entityplayer1); // Paper - Use single player info update packet on join
|
||||
}
|
||||
// Paper start - Use single player info update packet on join
|
||||
@@ -510,6 +631,43 @@ public abstract class PlayerList {
|
||||
@@ -514,6 +635,43 @@ public abstract class PlayerList {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,10 +335,10 @@ index 46d93b9c063cb056f3051ebe0f3558f5b4f55bea..5cbc1a5296aa2b6b267a8fa1f3edb9cf
|
||||
+ }
|
||||
+ // Leaves stop - replay mod api
|
||||
+
|
||||
public net.kyori.adventure.text.Component remove(ServerPlayer player) { // CraftBukkit - return string // Paper - return Component
|
||||
public @Nullable net.kyori.adventure.text.Component remove(ServerPlayer player) { // CraftBukkit - return string // Paper - return Component
|
||||
// Paper start - Fix kick event leave message not being sent
|
||||
return this.remove(player, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? player.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(player.getDisplayName())));
|
||||
@@ -585,6 +743,7 @@ public abstract class PlayerList {
|
||||
@@ -589,6 +747,7 @@ public abstract class PlayerList {
|
||||
player.retireScheduler(); // Paper - Folia schedulers
|
||||
player.getAdvancements().stopListening();
|
||||
this.players.remove(player);
|
||||
@@ -346,7 +346,7 @@ index 46d93b9c063cb056f3051ebe0f3558f5b4f55bea..5cbc1a5296aa2b6b267a8fa1f3edb9cf
|
||||
this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
this.server.getCustomBossEvents().onPlayerDisconnect(player);
|
||||
UUID uuid = player.getUUID();
|
||||
@@ -681,7 +840,7 @@ public abstract class PlayerList {
|
||||
@@ -679,7 +838,7 @@ public abstract class PlayerList {
|
||||
// return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameProfile)
|
||||
// ? Component.translatable("multiplayer.disconnect.server_full")
|
||||
// : null;
|
||||
@@ -52,10 +52,10 @@ index 7b9e2a1a208b46a69c16e6afd8b502259893574f..aa0db0cbbcfa079c43dbed6679abf999
|
||||
DeprecatedTranslationsInfo deprecatedTranslationsInfo = DeprecatedTranslationsInfo.loadFromDefaultResource();
|
||||
Map<String, String> map = new HashMap<>();
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 765521cae8bc1c65e3a390d018190646e39c4eb0..92f45558661007e761b48f59ff7f04d67f77f5ed 100644
|
||||
index e4946438d0c1fb9d2be616cb95768f890b32f286..8ed391f61b0eb50d26ce8250c652433e896d5ae4 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -227,6 +227,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -186,6 +186,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
|
||||
|
||||
org.leavesmc.leaves.LeavesConfig.init((java.io.File) options.valueOf("leaves-settings")); // Leaves - Server Config
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix minecraft hopper not work without player
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/vehicle/MinecartHopper.java b/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
index 8341e7f01606fca90e69384c16fc19bb9e20d1b7..deea1c6bcfbca04b0e9b45869eab5b8c5bbb17ca 100644
|
||||
index a56d9cdeb6589a053ffaaf2cd599a98ae0a0989a..eb94eb2fe717f6432e458deefb39f37600d890fc 100644
|
||||
--- a/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
@@ -99,6 +99,13 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
@@ -100,6 +100,13 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] RNG Fishing
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/projectile/FishingHook.java b/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index f2bf0cdbd29438ca51b74ae2fcdf49dba0d52804..1d3c2be401d9239b8e6cabfe016518ffcffcb83b 100644
|
||||
index d81da09fe1546f487fb8d845d56c032c39d3dfa5..ffd10570a008e8638be7f58d4c03f2d8d7b1a798 100644
|
||||
--- a/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -525,7 +525,7 @@ public class FishingHook extends Projectile {
|
||||
@@ -515,7 +515,7 @@ public class FishingHook extends Projectile {
|
||||
.withLuck(this.luck + playerOwner.getLuck())
|
||||
.create(LootContextParamSets.FISHING);
|
||||
LootTable lootTable = this.level().getServer().reloadableRegistries().getLootTable(BuiltInLootTables.FISHING);
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Wool Hopper Counter
|
||||
This patch is Powered by fabric-carpet(https://github.com/gnembon/fabric-carpet)
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
index 50bc72f736e9e7a9839a853254a81f9add03bacf..bd8d949ff0f3d0b6a893d3b3ae608da380e715f0 100644
|
||||
index a2fe5fdf50ae731e423821a0d1c52141b478e0be..7140571ef324f823942bc2c528cb66dac9e91d94 100644
|
||||
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
@@ -428,6 +428,13 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -432,6 +432,13 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
// Paper end - Perf: Optimize Hoppers
|
||||
|
||||
private static boolean ejectItems(Level level, BlockPos pos, HopperBlockEntity blockEntity) {
|
||||
@@ -23,7 +23,7 @@ index 50bc72f736e9e7a9839a853254a81f9add03bacf..bd8d949ff0f3d0b6a893d3b3ae608da3
|
||||
Container attachedContainer = getAttachedContainer(level, pos, blockEntity);
|
||||
if (attachedContainer == null) {
|
||||
return false;
|
||||
@@ -494,6 +501,26 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -498,6 +505,26 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Spider jockeys drop gapples
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/monster/Spider.java b/net/minecraft/world/entity/monster/Spider.java
|
||||
index af0305079a367899708ee2bbac82aefaa9129d2f..e9a4734cddc33785ca6811f8f566904ace78fd78 100644
|
||||
index 60c4ac37bb491af13f9f9bf730b85bbe544cf81d..5618ae7758a893bf87e65270b639f7f46a7c032c 100644
|
||||
--- a/net/minecraft/world/entity/monster/Spider.java
|
||||
+++ b/net/minecraft/world/entity/monster/Spider.java
|
||||
@@ -139,6 +139,18 @@ public class Spider extends Monster {
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Force Void Trade
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/npc/AbstractVillager.java b/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
index 18a087a52070b9bdee4d02ff3fc6a3c063e444d4..dba596ac7a26401a6f4d8726bcea0caf067af10e 100644
|
||||
index a375fad192cc09ba83775d5e37c1bb351730e6c4..203e6819aa39de7e932125acb8a0de224918bb6f 100644
|
||||
--- a/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
+++ b/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
@@ -60,6 +60,7 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@@ -43,6 +43,7 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@Nullable
|
||||
protected MerchantOffers offers;
|
||||
private final SimpleContainer inventory = new SimpleContainer(8, (org.bukkit.craftbukkit.entity.CraftAbstractVillager) this.getBukkitEntity()); // CraftBukkit - add argument
|
||||
@@ -16,7 +16,7 @@ index 18a087a52070b9bdee4d02ff3fc6a3c063e444d4..dba596ac7a26401a6f4d8726bcea0caf
|
||||
|
||||
public AbstractVillager(EntityType<? extends AbstractVillager> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
@@ -154,7 +155,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@@ -144,7 +145,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@Override
|
||||
public void processTrade(MerchantOffer offer, @Nullable io.papermc.paper.event.player.PlayerPurchaseEvent event) { // The MerchantRecipe passed in here is the one set by the PlayerPurchaseEvent
|
||||
if (event == null || event.willIncreaseTradeUses()) {
|
||||
@@ -31,7 +31,7 @@ index 18a087a52070b9bdee4d02ff3fc6a3c063e444d4..dba596ac7a26401a6f4d8726bcea0caf
|
||||
}
|
||||
if (event == null || event.isRewardingExp()) {
|
||||
this.rewardTradeXp(offer);
|
||||
@@ -166,7 +173,7 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@@ -156,7 +163,7 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@Override
|
||||
public void notifyTrade(MerchantOffer offer) {
|
||||
// offer.increaseUses(); // Paper - Add PlayerTradeEvent and PlayerPurchaseEvent
|
||||
@@ -40,7 +40,7 @@ index 18a087a52070b9bdee4d02ff3fc6a3c063e444d4..dba596ac7a26401a6f4d8726bcea0caf
|
||||
// this.rewardTradeXp(offer); // Paper - Add PlayerTradeEvent and PlayerPurchaseEvent
|
||||
if (this.tradingPlayer instanceof ServerPlayer) {
|
||||
CriteriaTriggers.TRADE.trigger((ServerPlayer)this.tradingPlayer, this, offer.getResult());
|
||||
@@ -183,7 +190,7 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@@ -173,7 +180,7 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@Override
|
||||
public void notifyTradeUpdated(ItemStack stack) {
|
||||
if (!this.level().isClientSide && this.ambientSoundTime > -this.getAmbientSoundInterval() + 20) {
|
||||
@@ -49,7 +49,7 @@ index 18a087a52070b9bdee4d02ff3fc6a3c063e444d4..dba596ac7a26401a6f4d8726bcea0caf
|
||||
this.makeSound(this.getTradeUpdatedSound(!stack.isEmpty()));
|
||||
}
|
||||
}
|
||||
@@ -235,6 +242,12 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@@ -219,6 +226,12 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
}
|
||||
|
||||
protected void stopTrading() {
|
||||
@@ -62,7 +62,7 @@ index 18a087a52070b9bdee4d02ff3fc6a3c063e444d4..dba596ac7a26401a6f4d8726bcea0caf
|
||||
this.setTradingPlayer(null);
|
||||
}
|
||||
|
||||
@@ -313,4 +326,10 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@@ -297,4 +310,10 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
public boolean stillValid(Player player) {
|
||||
return this.getTradingPlayer() == player && this.isAlive() && player.canInteractWithEntity(this, 4.0);
|
||||
}
|
||||
@@ -74,18 +74,18 @@ index 18a087a52070b9bdee4d02ff3fc6a3c063e444d4..dba596ac7a26401a6f4d8726bcea0caf
|
||||
+ // Leaves end - force void trade
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java
|
||||
index 6b565fcf91e1d94b649dac90bf3c923930d252f8..31c2fb7780b822bf63543c4526739b9d3faad7d8 100644
|
||||
index 956b949b42a7041290838dde816d3b79e1f9e0d4..1b906f04852637046f03d71f54f950f04c086c46 100644
|
||||
--- a/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -380,6 +380,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -383,6 +383,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
}
|
||||
|
||||
private void startTrading(Player player) {
|
||||
+ this.voidTrade = false; // Leaves - force void trade
|
||||
this.updateSpecialPrices(player);
|
||||
this.setTradingPlayer(player);
|
||||
this.openTradingScreen(player, this.getDisplayName(), this.getVillagerData().getLevel());
|
||||
@@ -632,8 +633,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
this.openTradingScreen(player, this.getDisplayName(), this.getVillagerData().level());
|
||||
@@ -622,8 +623,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@Override
|
||||
protected void rewardTradeXp(MerchantOffer offer) {
|
||||
int i = 3 + this.random.nextInt(4);
|
||||
@@ -101,10 +101,10 @@ index 6b565fcf91e1d94b649dac90bf3c923930d252f8..31c2fb7780b822bf63543c4526739b9d
|
||||
this.updateMerchantTimer = 40;
|
||||
this.increaseProfessionLevelOnUpdate = true;
|
||||
diff --git a/net/minecraft/world/entity/npc/WanderingTrader.java b/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
index 6655d06e2011e20e7346dfe57527795269094d8a..8ebf885ceb13a8b5e5b3db74fc7ee859d10f3845 100644
|
||||
index 70cc20483905d3877e2ffb51afb4902bd59f0cd0..066d18609f7f8aa5c14e95e09b454cb7d15f2ed7 100644
|
||||
--- a/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
+++ b/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
@@ -133,9 +133,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||
@@ -123,9 +123,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||
return InteractionResult.CONSUME;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ index 6655d06e2011e20e7346dfe57527795269094d8a..8ebf885ceb13a8b5e5b3db74fc7ee859
|
||||
return InteractionResult.SUCCESS;
|
||||
} else {
|
||||
diff --git a/net/minecraft/world/inventory/MerchantMenu.java b/net/minecraft/world/inventory/MerchantMenu.java
|
||||
index 3019790d5eccef23c710e77615243551fcc676b0..9a87c729dd7289dc3cccfcf50087db7dc354f895 100644
|
||||
index d59f67ffe34201c63e3d9706a4434f33b6732edb..bee1d5c30a6ee9b14a23fbcf1c479417f1776ddb 100644
|
||||
--- a/net/minecraft/world/inventory/MerchantMenu.java
|
||||
+++ b/net/minecraft/world/inventory/MerchantMenu.java
|
||||
@@ -25,7 +25,7 @@ public class MerchantMenu extends AbstractContainerMenu {
|
||||
@@ -132,7 +132,7 @@ index 3019790d5eccef23c710e77615243551fcc676b0..9a87c729dd7289dc3cccfcf50087db7d
|
||||
private int merchantLevel;
|
||||
private boolean showProgressBar;
|
||||
diff --git a/net/minecraft/world/item/trading/MerchantOffer.java b/net/minecraft/world/item/trading/MerchantOffer.java
|
||||
index 6c06350751db7543d5bde7723121d9d9dbb79071..262cfdd05f013b2bbc2066ad4f0625ae291213b9 100644
|
||||
index 9333c63f217e1207eced37c5be150e192f2fcc3e..0b1a086d3f101b42d95304c69f9e69f4c6c7d906 100644
|
||||
--- a/net/minecraft/world/item/trading/MerchantOffer.java
|
||||
+++ b/net/minecraft/world/item/trading/MerchantOffer.java
|
||||
@@ -39,6 +39,7 @@ public class MerchantOffer {
|
||||
@@ -178,10 +178,10 @@ index 6c06350751db7543d5bde7723121d9d9dbb79071..262cfdd05f013b2bbc2066ad4f0625ae
|
||||
|
||||
public void setToOutOfStock() {
|
||||
diff --git a/net/minecraft/world/level/block/EndGatewayBlock.java b/net/minecraft/world/level/block/EndGatewayBlock.java
|
||||
index 84a1bd5e40e635962d795506861447851e443eee..5c6bc04c241f13a8c09527a39f89fa52feb0eb76 100644
|
||||
index 68914268ca9350a6c1d794e011e1f9a8aecd609c..f22d502df5f444703a248fff50c864d2924c4549 100644
|
||||
--- a/net/minecraft/world/level/block/EndGatewayBlock.java
|
||||
+++ b/net/minecraft/world/level/block/EndGatewayBlock.java
|
||||
@@ -108,6 +108,17 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal {
|
||||
@@ -109,6 +109,17 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal {
|
||||
public TeleportTransition getPortalDestination(ServerLevel level, Entity entity, BlockPos pos) {
|
||||
if (level.getBlockEntity(pos) instanceof TheEndGatewayBlockEntity theEndGatewayBlockEntity) {
|
||||
Vec3 portalPosition = theEndGatewayBlockEntity.getPortalPosition(level, pos);
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] CCE update suppression
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
index 7794e66211af34ecca8524d3ca7e0d928f0ab0eb..fca50f68625050daabcae3a3b615cf88cce41111 100644
|
||||
index fef902077b69830b570d1adf86603f45b4f6a839..c34318fdc454ea31655c3c3aa5dbedd3d922ee24 100644
|
||||
--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
@@ -236,7 +236,9 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
||||
@@ -185,7 +185,9 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
||||
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos pos) {
|
||||
// Leaves start - fix update suppression crash
|
||||
try {
|
||||
@@ -19,7 +19,7 @@ index 7794e66211af34ecca8524d3ca7e0d928f0ab0eb..fca50f68625050daabcae3a3b615cf88
|
||||
} catch (ClassCastException ex) {
|
||||
if (org.leavesmc.leaves.LeavesConfig.modify.updateSuppressionCrashFix) {
|
||||
throw new org.leavesmc.leaves.util.UpdateSuppressionException(pos, this);
|
||||
@@ -244,7 +246,6 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
||||
@@ -193,7 +195,6 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Disable offline warn if use proxy
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 92f45558661007e761b48f59ff7f04d67f77f5ed..c301cc8b76295750b8dd0c6d7f8e5b11a275bb15 100644
|
||||
index 8ed391f61b0eb50d26ce8250c652433e896d5ae4..46eabb498758052cc1ce1b4f46d9c033df14b8ef 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -288,7 +288,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -246,7 +246,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
String proxyFlavor = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "Velocity" : "BungeeCord";
|
||||
String proxyLink = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "https://docs.papermc.io/velocity/security" : "http://www.spigotmc.org/wiki/firewall-guide/";
|
||||
// Paper end - Add Velocity IP Forwarding Support
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Armor stand cant kill by mob projectile
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index dfae614a67476d649be2a8c2cd8258abe12842e3..cb42b92dd66305be342b7bd7457fda504e6165e9 100644
|
||||
index e3c4bc0776b213b4e9f2d8739ea3308a40328d5f..d1fa03b09f1a45459a02d6522760962aa936f19f 100644
|
||||
--- a/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -484,6 +484,15 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -413,6 +413,15 @@ public class ArmorStand extends LivingEntity {
|
||||
// CraftBukkit end
|
||||
boolean isCanBreakArmorStand = damageSource.is(DamageTypeTags.CAN_BREAK_ARMOR_STAND);
|
||||
boolean isAlwaysKillsArmorStands = damageSource.is(DamageTypeTags.ALWAYS_KILLS_ARMOR_STANDS);
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Make Item tick vanilla
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 4f5db8203189a413f410fe7648e4995bae171918..e3cdb823b6d76e62725b6428651dacfe20fc4154 100644
|
||||
index 0cb2d5cd37171cd6e01748ed3d2ce99da1a15e3f..71c5dd7e58ecc3f4dce0c942a8ce88cb8898cf99 100644
|
||||
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -133,6 +133,9 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -140,6 +140,9 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
// Paper start - EAR 2
|
||||
@Override
|
||||
public void inactiveTick() {
|
||||
@@ -18,7 +18,7 @@ index 4f5db8203189a413f410fe7648e4995bae171918..e3cdb823b6d76e62725b6428651dacfe
|
||||
super.inactiveTick();
|
||||
if (this.pickupDelay > 0 && this.pickupDelay != 32767) {
|
||||
this.pickupDelay--;
|
||||
@@ -150,6 +153,8 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -157,6 +160,8 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
// CraftBukkit end
|
||||
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
||||
}
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Copper Bulb 1 gt delay
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/CopperBulbBlock.java b/net/minecraft/world/level/block/CopperBulbBlock.java
|
||||
index d3d3ad8bb33313e735eec559f854fb76bdf84cc2..4e346b1e77042a17bb28fb510196ff3bbde5bc92 100644
|
||||
index 25caeb117d9a49fa00f46ec895a35dee8242aacd..ce1d34f28f9318b741df074fccddfe91f16b57cf 100644
|
||||
--- a/net/minecraft/world/level/block/CopperBulbBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CopperBulbBlock.java
|
||||
@@ -32,14 +32,26 @@ public class CopperBulbBlock extends Block {
|
||||
@@ -5,19 +5,19 @@ Subject: [PATCH] Crafter 1 gt delay
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/CrafterBlock.java b/net/minecraft/world/level/block/CrafterBlock.java
|
||||
index 5f5966278faf86ed9b28955c80ba845c0cb75595..f5e3c1e4e13d14eac45622742391495ec6b3d925 100644
|
||||
index 38b03c7b02bdfc579e5e126c12de3d878e26d188..4faacd60632b9cf8c3384b4fa2720795cb69a9c2 100644
|
||||
--- a/net/minecraft/world/level/block/CrafterBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CrafterBlock.java
|
||||
@@ -82,7 +82,7 @@ public class CrafterBlock extends BaseEntityBlock {
|
||||
@@ -75,7 +75,7 @@ public class CrafterBlock extends BaseEntityBlock {
|
||||
boolean triggeredValue = state.getValue(TRIGGERED);
|
||||
BlockEntity blockEntity = level.getBlockEntity(pos);
|
||||
if (hasNeighborSignal && !triggeredValue) {
|
||||
- level.scheduleTick(pos, this, 4);
|
||||
+ level.scheduleTick(pos, this, !org.leavesmc.leaves.LeavesConfig.modify.oldMC.crafter1gt ? 4 : 1); // Leaves - crafter 1 gt delay
|
||||
level.setBlock(pos, state.setValue(TRIGGERED, Boolean.valueOf(true)), 2);
|
||||
level.setBlock(pos, state.setValue(TRIGGERED, true), 2);
|
||||
this.setBlockEntityTriggered(blockEntity, true);
|
||||
} else if (!hasNeighborSignal && triggeredValue) {
|
||||
@@ -132,7 +132,7 @@ public class CrafterBlock extends BaseEntityBlock {
|
||||
@@ -125,7 +125,7 @@ public class CrafterBlock extends BaseEntityBlock {
|
||||
@Override
|
||||
public void setPlacedBy(Level level, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) {
|
||||
if (state.getValue(TRIGGERED)) {
|
||||
@@ -21,7 +21,7 @@ index a814512fcfb85312474ae2c2c21443843bf57831..2b0349568f38321c893a8ffa16607350
|
||||
public MoonriseRegionFileIO.RegionDataController.WriteData moonrise$startWrite(
|
||||
final int chunkX, final int chunkZ, final CompoundTag compound
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java b/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
|
||||
index 98fbc5c8044bd945d64569f13412a6e7e49a4e7f..01e9a0076632f3be8bd15fa6793ed6296fe4c2bb 100644
|
||||
index 709df35246fb328cda21679b53d44d9f96206cb3..8fa38dcff5987e109423a2ed0a86abc9c5c195cd 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
|
||||
@@ -1260,7 +1260,7 @@ public final class MoonriseRegionFileIO {
|
||||
@@ -54,10 +54,10 @@ index 51c126735ace8fdde89ad97b5cab62f244212db0..a6573e327ace16b7ea320eb1440ffcbc
|
||||
+ public void moonrise$write(final org.leavesmc.leaves.region.IRegionFile regionFile) throws IOException; // Leaves - more region format
|
||||
}
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 438bbf36d4f80b38482b89e3ef59e9e48d0f62c2..164b8dc3f247aedd37bce24a7acb6ab1858e7d20 100644
|
||||
index 7a09e5252164ac7efa8429aa3e46d8d3b1a0f6da..434561ae48c8d6b71c2158338e6e6b08c787d04b 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -951,10 +951,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -943,10 +943,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
if (flush) {
|
||||
for (ServerLevel serverLevel2 : this.getAllLevels()) {
|
||||
@@ -71,10 +71,10 @@ index 438bbf36d4f80b38482b89e3ef59e9e48d0f62c2..164b8dc3f247aedd37bce24a7acb6ab1
|
||||
|
||||
return flag;
|
||||
diff --git a/net/minecraft/util/worldupdate/WorldUpgrader.java b/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
index e0bcda2ddea0d6633445a7440fbf0d18e50a7653..cb2cd0b4f4e5f2c85cdd9e73b1d2a34d6643989f 100644
|
||||
index 559bd4eef7174b04f5aa71b982ba34cbace8da8a..391fe4678b476e58e77db26b3b20d761ffa01579 100644
|
||||
--- a/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
+++ b/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
@@ -72,7 +72,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
@@ -75,7 +75,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
volatile int skipped;
|
||||
final Reference2FloatMap<ResourceKey<Level>> progressMap = Reference2FloatMaps.synchronize(new Reference2FloatOpenHashMap<>());
|
||||
volatile Component status = Component.translatable("optimizeWorld.stage.counting");
|
||||
@@ -83,7 +83,7 @@ index e0bcda2ddea0d6633445a7440fbf0d18e50a7653..cb2cd0b4f4e5f2c85cdd9e73b1d2a34d
|
||||
final DimensionDataStorage overworldDataStorage;
|
||||
|
||||
public WorldUpgrader(
|
||||
@@ -261,7 +261,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
@@ -272,7 +272,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
}
|
||||
|
||||
private static List<WorldUpgrader.FileToUpgrade> getAllChunkPositions(RegionStorageInfo regionStorageInfo, Path path) {
|
||||
@@ -92,7 +92,7 @@ index e0bcda2ddea0d6633445a7440fbf0d18e50a7653..cb2cd0b4f4e5f2c85cdd9e73b1d2a34d
|
||||
if (files == null) {
|
||||
return List.of();
|
||||
} else {
|
||||
@@ -274,7 +274,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
@@ -285,7 +285,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
int i1 = Integer.parseInt(matcher.group(2)) << 5;
|
||||
List<ChunkPos> list1 = Lists.newArrayList();
|
||||
|
||||
@@ -101,7 +101,7 @@ index e0bcda2ddea0d6633445a7440fbf0d18e50a7653..cb2cd0b4f4e5f2c85cdd9e73b1d2a34d
|
||||
for (int i2 = 0; i2 < 32; i2++) {
|
||||
for (int i3 = 0; i3 < 32; i3++) {
|
||||
ChunkPos chunkPos = new ChunkPos(i2 + i, i3 + i1);
|
||||
@@ -322,7 +322,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
@@ -333,7 +333,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
|
||||
protected abstract boolean tryProcessOnePosition(T chunkStorage, ChunkPos chunkPos, ResourceKey<Level> dimension);
|
||||
|
||||
@@ -110,7 +110,7 @@ index e0bcda2ddea0d6633445a7440fbf0d18e50a7653..cb2cd0b4f4e5f2c85cdd9e73b1d2a34d
|
||||
if (WorldUpgrader.this.recreateRegionFiles) {
|
||||
if (this.previousWriteFuture != null) {
|
||||
this.previousWriteFuture.join();
|
||||
@@ -424,7 +424,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
@@ -438,7 +438,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ index e0bcda2ddea0d6633445a7440fbf0d18e50a7653..cb2cd0b4f4e5f2c85cdd9e73b1d2a34d
|
||||
|
||||
class PoiUpgrader extends WorldUpgrader.SimpleRegionStorageUpgrader {
|
||||
diff --git a/net/minecraft/world/level/chunk/storage/RegionFile.java b/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
index 0c41177462cca5c4bbab6490e323b9535fd6300f..bb6b482271da00586acb438fd7648f8f4cd5586b 100644
|
||||
index 22f3aa1674664906e8ec45372d758d79017e3987..1d9b2a315d3c18df3c0dfc0e8daac18c4d7462b7 100644
|
||||
--- a/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
+++ b/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.util.profiling.jfr.JvmProfiler;
|
||||
@@ -132,16 +132,16 @@ index 0c41177462cca5c4bbab6490e323b9535fd6300f..bb6b482271da00586acb438fd7648f8f
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final int MAX_CHUNK_SIZE = 500 * 1024 * 1024; // Paper - don't write garbage data to disk if writing serialization fails
|
||||
private static final int SECTOR_BYTES = 4096;
|
||||
@@ -124,7 +124,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
@@ -130,7 +130,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
return this.recalculateCount.get();
|
||||
}
|
||||
|
||||
// note: only call for CHUNK regionfiles
|
||||
- boolean recalculateHeader() throws IOException {
|
||||
+ public boolean recalculateHeader() throws IOException { // Leaves - more region format
|
||||
if (!this.canRecalcHeader) {
|
||||
return false;
|
||||
}
|
||||
@@ -786,7 +786,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
@@ -794,7 +794,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ index 0c41177462cca5c4bbab6490e323b9535fd6300f..bb6b482271da00586acb438fd7648f8f
|
||||
int offsetIndex = getOffsetIndex(chunkPos);
|
||||
int i = this.offsets.get(offsetIndex);
|
||||
int sectorNumber = getSectorNumber(i);
|
||||
@@ -904,7 +904,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
@@ -912,7 +912,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -159,7 +159,7 @@ index 0c41177462cca5c4bbab6490e323b9535fd6300f..bb6b482271da00586acb438fd7648f8f
|
||||
regionFile.write(this.pos, ByteBuffer.wrap(this.buf, 0, this.count));
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
@@ -970,11 +970,11 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
@@ -978,11 +978,11 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
return (x & 31) + (z & 31) * 32;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ index 0c41177462cca5c4bbab6490e323b9535fd6300f..bb6b482271da00586acb438fd7648f8f
|
||||
final int offset = getChunkIndex(x, z);
|
||||
boolean previous = this.oversized[offset] == 1;
|
||||
this.oversized[offset] = (byte) (oversized ? 1 : 0);
|
||||
@@ -1013,7 +1013,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
@@ -1021,7 +1021,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
return this.path.getParent().resolve(this.path.getFileName().toString().replaceAll("\\.mca$", "") + "_oversized_" + x + "_" + z + ".nbt");
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ index 0c41177462cca5c4bbab6490e323b9535fd6300f..bb6b482271da00586acb438fd7648f8f
|
||||
try (DataInputStream out = new DataInputStream(new java.io.BufferedInputStream(new java.util.zip.InflaterInputStream(Files.newInputStream(file))))) {
|
||||
return net.minecraft.nbt.NbtIo.read((java.io.DataInput) out);
|
||||
diff --git a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..2689ba38ba9d2703078cd4f9f2c6d17610260bb3 100644
|
||||
index 384f2cd090d6d23bd1308d6e82c24338f2bf55d1..cda0b6d72edeab285362e674e52d1c85b70c3f98 100644
|
||||
--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -18,7 +18,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -291,7 +291,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..2689ba38ba9d2703078cd4f9f2c6d176
|
||||
|
||||
final DataInputStream input = regionFile == null ? null : regionFile.getChunkDataInputStream(new ChunkPos(chunkX, chunkZ));
|
||||
|
||||
@@ -237,7 +247,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -262,7 +272,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
// Paper start - rewrite chunk system
|
||||
@@ -300,7 +300,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..2689ba38ba9d2703078cd4f9f2c6d176
|
||||
return this.getRegionFile(chunkcoordintpair, false);
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
@@ -249,7 +259,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -274,7 +284,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
this.isChunkData = isChunkDataFolder(this.folder); // Paper - recalculate region file headers
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..2689ba38ba9d2703078cd4f9f2c6d176
|
||||
// Paper start - rewrite chunk system
|
||||
if (existingOnly) {
|
||||
return this.moonrise$getRegionFileIfExists(chunkPos.x, chunkPos.z);
|
||||
@@ -257,7 +267,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -282,7 +292,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
synchronized (this) {
|
||||
final long key = ChunkPos.asLong(chunkPos.x >> REGION_SHIFT, chunkPos.z >> REGION_SHIFT);
|
||||
|
||||
@@ -318,7 +318,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..2689ba38ba9d2703078cd4f9f2c6d176
|
||||
if (ret != null) {
|
||||
return ret;
|
||||
}
|
||||
@@ -266,13 +276,22 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -291,13 +301,22 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
this.regionCache.removeLast().close();
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..2689ba38ba9d2703078cd4f9f2c6d176
|
||||
|
||||
this.regionCache.putAndMoveToFirst(key, ret);
|
||||
|
||||
@@ -286,7 +305,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -311,7 +330,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.");
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..2689ba38ba9d2703078cd4f9f2c6d176
|
||||
synchronized (regionfile) {
|
||||
try (DataInputStream datainputstream = regionfile.getChunkDataInputStream(chunkCoordinate)) {
|
||||
CompoundTag oversizedData = regionfile.getOversizedData(chunkCoordinate.x, chunkCoordinate.z);
|
||||
@@ -321,7 +340,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -346,7 +365,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@Nullable
|
||||
public CompoundTag read(ChunkPos chunkPos) throws IOException {
|
||||
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
||||
@@ -361,7 +361,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..2689ba38ba9d2703078cd4f9f2c6d176
|
||||
if (regionFile == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -360,7 +379,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -385,7 +404,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
|
||||
public void scanChunk(ChunkPos chunkPos, StreamTagVisitor visitor) throws IOException {
|
||||
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
||||
@@ -370,7 +370,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..2689ba38ba9d2703078cd4f9f2c6d176
|
||||
if (regionFile == null) {
|
||||
return;
|
||||
}
|
||||
@@ -374,7 +393,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -399,7 +418,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
}
|
||||
|
||||
public void write(ChunkPos chunkPos, @Nullable CompoundTag chunkData) throws IOException { // Paper - rewrite chunk system - public
|
||||
@@ -379,7 +379,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..2689ba38ba9d2703078cd4f9f2c6d176
|
||||
// Paper start - rewrite chunk system
|
||||
if (regionFile == null) {
|
||||
// if the RegionFile doesn't exist, no point in deleting from it
|
||||
@@ -404,7 +423,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -429,7 +448,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
// Paper start - rewrite chunk system
|
||||
synchronized (this) {
|
||||
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();
|
||||
@@ -388,7 +388,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..2689ba38ba9d2703078cd4f9f2c6d176
|
||||
try {
|
||||
regionFile.close();
|
||||
} catch (final IOException ex) {
|
||||
@@ -420,7 +439,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -445,7 +464,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
// Paper start - rewrite chunk system
|
||||
synchronized (this) {
|
||||
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();
|
||||
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Thu, 18 Jan 2024 12:31:31 +0800
|
||||
Subject: [PATCH] No TNT place update
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/TntBlock.java b/net/minecraft/world/level/block/TntBlock.java
|
||||
index 93d6e05578622b057d8e973c71f880a17036a6b5..807b2d9bde6d9a365feff13adc4a8b546bec6d0c 100644
|
||||
--- a/net/minecraft/world/level/block/TntBlock.java
|
||||
+++ b/net/minecraft/world/level/block/TntBlock.java
|
||||
@@ -47,7 +47,7 @@ public class TntBlock extends Block {
|
||||
@Override
|
||||
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) {
|
||||
if (!oldState.is(state.getBlock())) {
|
||||
- if (level.hasNeighborSignal(pos) && prime(level, pos, () -> org.bukkit.craftbukkit.event.CraftEventFactory.callTNTPrimeEvent(level, pos, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.REDSTONE, null, null))) { // CraftBukkit - TNTPrimeEvent
|
||||
+ if (level.hasNeighborSignal(pos) && !org.leavesmc.leaves.LeavesConfig.modify.noTNTPlaceUpdate && prime(level, pos, () -> org.bukkit.craftbukkit.event.CraftEventFactory.callTNTPrimeEvent(level, pos, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.REDSTONE, null, null))) { // CraftBukkit - TNTPrimeEvent // Leaves - prevent update
|
||||
level.removeBlock(pos, false);
|
||||
}
|
||||
}
|
||||
@@ -5,14 +5,14 @@ Subject: [PATCH] Servux Protocol
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 439bc4a93deb6fe134a9b1de4ca73a8c785d46db..dd7df1616d215020a65ce5d048f1b6f01469c86f 100644
|
||||
index c091c5d7a71821b51c37dbcbd1c12f92cf3ba0b3..66e5b969c23e4468dce90bb2cd455da2f5e912aa 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2192,6 +2192,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -2205,6 +2205,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
}
|
||||
|
||||
this.lastSpawnChunkRadius = i;
|
||||
+ org.leavesmc.leaves.protocol.servux.ServuxHudDataProtocol.refreshSpawnMetadata = true; // Leaves - servux
|
||||
}
|
||||
|
||||
public LongSet getForcedChunks() {
|
||||
public LongSet getForceLoadedChunks() {
|
||||
@@ -0,0 +1,23 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Wed, 5 Feb 2025 23:42:44 +0800
|
||||
Subject: [PATCH] Fast resume
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index ea25b29a5f28a171151cd1ca185a8fc0ceaa248a..c5b7b97d54380084ca91a4e14310c855f000c63d 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -1201,7 +1201,11 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
}
|
||||
|
||||
if ((flags & 1) != 0) {
|
||||
- this.updateNeighborsAt(pos, blockState.getBlock());
|
||||
+ // Leaves start - Placing locked hopper doesn't send NC updates.
|
||||
+ if (!(blockState.getBlock() instanceof net.minecraft.world.level.block.HopperBlock) || blockState.getValue(net.minecraft.world.level.block.HopperBlock.ENABLED)) {
|
||||
+ this.updateNeighborsAt(pos, blockState.getBlock());
|
||||
+ }
|
||||
+ // Leaves end - Placing locked hopper doesn't send NC updates.
|
||||
if (!this.isClientSide && state.hasAnalogOutputSignal()) {
|
||||
this.updateNeighbourForOutputSignal(pos, newState.getBlock());
|
||||
}
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Renewable deepslate
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/LiquidBlock.java b/net/minecraft/world/level/block/LiquidBlock.java
|
||||
index 19d1906e9d4e92ff49a833bca03a7308ee8059e3..928b4196d4fe359dffa11be3b32a52761378a347 100644
|
||||
index 7320b416e8d660419018b0699f49ab6f45a3373b..553c6b298ec5929dba6acd859bd38bfbe293838b 100644
|
||||
--- a/net/minecraft/world/level/block/LiquidBlock.java
|
||||
+++ b/net/minecraft/world/level/block/LiquidBlock.java
|
||||
@@ -190,7 +190,7 @@ public class LiquidBlock extends Block implements BucketPickup {
|
||||
@@ -15,13 +15,13 @@ index 19d1906e9d4e92ff49a833bca03a7308ee8059e3..928b4196d4fe359dffa11be3b32a5276
|
||||
- Block block = level.getFluidState(pos).isSource() ? Blocks.OBSIDIAN : Blocks.COBBLESTONE;
|
||||
+ Block block = level.getFluidState(pos).isSource() ? Blocks.OBSIDIAN : (org.leavesmc.leaves.LeavesConfig.modify.renewableDeepslate && level.dimension() == Level.OVERWORLD && pos.getY() < 0 ? Blocks.COBBLED_DEEPSLATE : Blocks.COBBLESTONE); // Leaves - renewable deepslate
|
||||
// CraftBukkit start
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(level, pos, block.defaultBlockState())) {
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(level, pos, block.defaultBlockState(), 3)) {
|
||||
this.fizz(level, pos);
|
||||
diff --git a/net/minecraft/world/level/material/LavaFluid.java b/net/minecraft/world/level/material/LavaFluid.java
|
||||
index 6f135caffb7638c6156f00341aeac12b50cea99d..b4116b109e251e878b42e16edbaea07ac8256294 100644
|
||||
index 033f252248b671e35135269dd2df6e7ca4585604..5bea04f4d70566e6791bef49e32c775cc5546d6c 100644
|
||||
--- a/net/minecraft/world/level/material/LavaFluid.java
|
||||
+++ b/net/minecraft/world/level/material/LavaFluid.java
|
||||
@@ -211,7 +211,7 @@ public abstract class LavaFluid extends FlowingFluid {
|
||||
@@ -223,7 +223,7 @@ public abstract class LavaFluid extends FlowingFluid {
|
||||
if (this.is(FluidTags.LAVA) && fluidState1.is(FluidTags.WATER)) {
|
||||
if (blockState.getBlock() instanceof LiquidBlock) {
|
||||
// CraftBukkit start
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Renewable sponges
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/monster/Guardian.java b/net/minecraft/world/entity/monster/Guardian.java
|
||||
index c8e249b8f7ee8e9c075169ec988f5a0d459a3767..a4b9511114ff7422691962b7a01d3084dae1ecc1 100644
|
||||
index a36f0181e1aa24538d6c868a8675da89427bdeae..ed2dcdf0e6716e51ccbd9901e8538af7323396dc 100644
|
||||
--- a/net/minecraft/world/entity/monster/Guardian.java
|
||||
+++ b/net/minecraft/world/entity/monster/Guardian.java
|
||||
@@ -452,6 +452,28 @@ public class Guardian extends Monster {
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Renewable coral
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/CoralFanBlock.java b/net/minecraft/world/level/block/CoralFanBlock.java
|
||||
index 9530fa0793ed0904b17f8972d09f98a97b2cecb0..0bc0c1f7f86f0893b571218c313c49ea90790a34 100644
|
||||
index a10af527340d26b9cfd59f73a2518ce31ea5c464..5beaa24e96f3057cfd38df691306c78fcedf669c 100644
|
||||
--- a/net/minecraft/world/level/block/CoralFanBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CoralFanBlock.java
|
||||
@@ -13,7 +13,7 @@ import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
@@ -30,7 +30,7 @@ index 9530fa0793ed0904b17f8972d09f98a97b2cecb0..0bc0c1f7f86f0893b571218c313c49ea
|
||||
+ // Leaves end - renewable coral
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/CoralPlantBlock.java b/net/minecraft/world/level/block/CoralPlantBlock.java
|
||||
index d1a4dd8ef1ad9d7fb8ae434fc096a9d5b9c5b69d..27df4f7ab514600aaa8dd65a3fee8c280a915a46 100644
|
||||
index 20396db7afb93bc8ea5b7ae28a76ca82bd1a4535..9fc66adcb3ffdbfee5ad6b76a01e396634a6f4e5 100644
|
||||
--- a/net/minecraft/world/level/block/CoralPlantBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CoralPlantBlock.java
|
||||
@@ -16,7 +16,7 @@ import net.minecraft.world.level.material.Fluids;
|
||||
@@ -42,7 +42,7 @@ index d1a4dd8ef1ad9d7fb8ae434fc096a9d5b9c5b69d..27df4f7ab514600aaa8dd65a3fee8c28
|
||||
public static final MapCodec<CoralPlantBlock> CODEC = RecordCodecBuilder.mapCodec(
|
||||
instance -> instance.group(CoralBlock.DEAD_CORAL_FIELD.forGetter(coralPlantBlock -> coralPlantBlock.deadBlock), propertiesCodec())
|
||||
.apply(instance, CoralPlantBlock::new)
|
||||
@@ -79,4 +79,12 @@ public class CoralPlantBlock extends BaseCoralPlantTypeBlock {
|
||||
@@ -78,4 +78,12 @@ public class CoralPlantBlock extends BaseCoralPlantTypeBlock {
|
||||
protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) {
|
||||
return SHAPE;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ index abb8519ede1c2271c98497a8e3336f0ad89c340d..f5009d112b32ce91296ed84310bb9bf4
|
||||
return false;
|
||||
} else {
|
||||
diff --git a/net/minecraft/world/level/levelgen/feature/CoralFeature.java b/net/minecraft/world/level/levelgen/feature/CoralFeature.java
|
||||
index d62e64a7663141a5e7223fb6c1358f3799ec1c3e..f0a9a461bfa9b128cc71537e58e0f1ade02a6698 100644
|
||||
index 2569754d96694edbc1fe64e6048d6ec26cbe243e..88d38433ffb78fbdd04d9adf53d584c492dc8ec7 100644
|
||||
--- a/net/minecraft/world/level/levelgen/feature/CoralFeature.java
|
||||
+++ b/net/minecraft/world/level/levelgen/feature/CoralFeature.java
|
||||
@@ -31,7 +31,7 @@ public abstract class CoralFeature extends Feature<NoneFeatureConfiguration> {
|
||||
@@ -1,14 +1,14 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Wed, 5 Feb 2025 23:42:44 +0800
|
||||
From: Lumine1909 <133463833+Lumine1909@users.noreply.github.com>
|
||||
Date: Wed, 23 Apr 2025 04:01:49 -0400
|
||||
Subject: [PATCH] Fast resume
|
||||
|
||||
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java
|
||||
index b5817aa8f537593f6d9fc6b612c82ccccb250ac7..920d925159ad8088de3e751591d464d22ffd2c06 100644
|
||||
index f473999938840562b1007a789600342e5796a123..5411e5ae14cf302563ef71caaee9ba95b5835a31 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java
|
||||
@@ -603,6 +603,49 @@ public final class ChunkHolderManager {
|
||||
@@ -656,6 +656,49 @@ public final class ChunkHolderManager {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,14 +55,14 @@ index b5817aa8f537593f6d9fc6b612c82ccccb250ac7..920d925159ad8088de3e751591d464d2
|
||||
+ }
|
||||
+ // Leaves end - add custom ticket
|
||||
+
|
||||
public <T> boolean removeTicketAtLevel(final TicketType<T> type, final ChunkPos chunkPos, final int level, final T identifier) {
|
||||
return this.removeTicketAtLevel(type, CoordinateUtils.getChunkKey(chunkPos), level, identifier);
|
||||
}
|
||||
private void removeTicketCounter(final TicketType type, final long pos) {
|
||||
final long[] counterTypes = ((ChunkSystemTicketType<?>)(Object)type).moonrise$getCounterTypes();
|
||||
if (counterTypes.length == 0) {
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 164b8dc3f247aedd37bce24a7acb6ab1858e7d20..26e6fc29125fb129cbeb4c736dff222d4fe648b9 100644
|
||||
index 434561ae48c8d6b71c2158338e6e6b08c787d04b..684e8b09f8334c35553e8c09e92fc218fdb3440b 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -744,6 +744,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -742,6 +742,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
this.getBotList().loadResume(); // Leaves - load resident bot
|
||||
|
||||
@@ -70,7 +70,7 @@ index 164b8dc3f247aedd37bce24a7acb6ab1858e7d20..26e6fc29125fb129cbeb4c736dff222d
|
||||
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.POSTWORLD);
|
||||
this.server.spark.registerCommandBeforePlugins(this.server); // Paper - spark
|
||||
this.server.spark.enableAfterPlugins(this.server); // Paper - spark
|
||||
@@ -990,6 +991,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -982,6 +983,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
|
||||
public void stopServer() {
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Vanilla hopper
|
||||
This is a temporary solution designed to attempt to restore the vanilla behavior of the funnel while preserving optimizations as much as possible. It should ultimately be replaced by the optimization solution provided by lithium.
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
index bd8d949ff0f3d0b6a893d3b3ae608da380e715f0..5c29416b677d6b19db6bba43f69b465feb2dcb3d 100644
|
||||
index 7140571ef324f823942bc2c528cb66dac9e91d94..93dc766b1c4093b1d2bdf7f97951ea82a51cf4e4 100644
|
||||
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
@@ -281,36 +281,48 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -285,36 +285,48 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
ItemStack movedItem = origItemStack;
|
||||
final int originalItemCount = origItemStack.getCount();
|
||||
final int movedItemCount = Math.min(level.spigotConfig.hopperAmount, originalItemCount);
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Old hopper suckin behavior
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
index 5c29416b677d6b19db6bba43f69b465feb2dcb3d..c9aa375b7e584f6fa300a9e11528237fa336519d 100644
|
||||
index 93dc766b1c4093b1d2bdf7f97951ea82a51cf4e4..4d270a77cbb043e16360ae1f2bf03bf0ae32eb38 100644
|
||||
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
@@ -593,7 +593,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -597,7 +597,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
|
||||
return false;
|
||||
} else {
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix falling block's block location
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 65e916089fba9e2a3908dafa24634f6cc259e595..ceca4c395358f27fea805dec558e10cd2989d891 100644
|
||||
index 591e413dba3459667cf2643e26684c8fae8d4c82..02a9f5809e857646b9ab572220f77cf7e6287f4e 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4829,6 +4829,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4801,6 +4801,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
int floor = Mth.floor(x);
|
||||
int floor1 = Mth.floor(y);
|
||||
int floor2 = Mth.floor(z);
|
||||
@@ -18,10 +18,10 @@ index c6e4f72825c868b416ce2e81fc6d9b5bfdbd85f2..5c4d0a9297387503f48cb4c1d6db6aed
|
||||
.encodeStart(provider.createSerializationContext(JsonOps.INSTANCE), component)
|
||||
.getOrThrow(JsonParseException::new);
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 01bab5294ae27624d8941d55bbe676cb1ea73966..3a0a2df3511b23990ca402ca5b032c2ca7a7d1de 100644
|
||||
index b46caaacd25264b9e9387483528bc6cfbe22b7c2..dde94150dbb09cfc7b17fa7748b6d40fcaf868c1 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -445,6 +445,12 @@ public abstract class PlayerList {
|
||||
@@ -449,6 +449,12 @@ public abstract class PlayerList {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Allow grindstone overstacking
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index f5a6d01037235b120e13cde9134e5ac0fc2d2c00..2a470ea583b7f192e8dd07f25867dd51dc1ec3e7 100644
|
||||
index ca02b10c0491e7f5b41157ce8613c299c91d13c0..b15dbce0bb39d7f736c9f05c942e0acb4e55de72 100644
|
||||
--- a/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -746,10 +746,15 @@ public abstract class AbstractContainerMenu {
|
||||
@@ -747,10 +747,15 @@ public abstract class AbstractContainerMenu {
|
||||
public abstract boolean stillValid(Player player);
|
||||
|
||||
protected boolean moveItemStackTo(ItemStack stack, int startIndex, int endIndex, boolean reverseDirection) {
|
||||
@@ -24,7 +24,7 @@ index f5a6d01037235b120e13cde9134e5ac0fc2d2c00..2a470ea583b7f192e8dd07f25867dd51
|
||||
if (isCheck) {
|
||||
stack = stack.copy();
|
||||
}
|
||||
@@ -814,6 +819,14 @@ public abstract class AbstractContainerMenu {
|
||||
@@ -815,6 +820,14 @@ public abstract class AbstractContainerMenu {
|
||||
// Paper end - Add PlayerTradeEvent and PlayerPurchaseEvent
|
||||
if (itemx.isEmpty() && slotx.mayPlace(stack)) {
|
||||
int i1 = slotx.getMaxStackSize(stack);
|
||||
@@ -40,7 +40,7 @@ index f5a6d01037235b120e13cde9134e5ac0fc2d2c00..2a470ea583b7f192e8dd07f25867dd51
|
||||
if (isCheck) {
|
||||
stack.shrink(Math.min(stack.getCount(), i1));
|
||||
diff --git a/net/minecraft/world/inventory/GrindstoneMenu.java b/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
index f85bd2a90c2694d96f67cc3701a9bbf081fe8475..5245ba03d101b51be33ca4952e8c8f788483d3cc 100644
|
||||
index 6eaa468c90a826f9fdecf2cf672c4893122d2504..b7ef712181c88bac7ccb505147013405cb05c6cb 100644
|
||||
--- a/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
+++ b/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
@@ -178,7 +178,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable MC-67
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index ceca4c395358f27fea805dec558e10cd2989d891..ca599cbb240f9ae0a7d83cc13684e37e4bbeeb65 100644
|
||||
index 02a9f5809e857646b9ab572220f77cf7e6287f4e..0d23af29875829316d1684b1303bd62e18efbad2 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -3988,6 +3988,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3953,6 +3953,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public boolean canTeleport(Level fromLevel, Level toLevel) {
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Disable end gateway portal entity ticking
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/EndGatewayBlock.java b/net/minecraft/world/level/block/EndGatewayBlock.java
|
||||
index 5c6bc04c241f13a8c09527a39f89fa52feb0eb76..e686b2d9ef8bd7fe200226faef9f52f4feeeaed3 100644
|
||||
index f22d502df5f444703a248fff50c864d2924c4549..356f074106d416c7e5b2524490a51cc83931c114 100644
|
||||
--- a/net/minecraft/world/level/block/EndGatewayBlock.java
|
||||
+++ b/net/minecraft/world/level/block/EndGatewayBlock.java
|
||||
@@ -122,11 +122,14 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal {
|
||||
@@ -123,11 +123,14 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal {
|
||||
if (portalPosition == null) {
|
||||
return null;
|
||||
} else {
|
||||
@@ -5,15 +5,15 @@ Subject: [PATCH] Disable crystal-portal proximity check
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/item/EndCrystalItem.java b/net/minecraft/world/item/EndCrystalItem.java
|
||||
index 1bc4c8be71b445f64134548a85fd81442298c0f1..a1d8b38b20efd7ef0fa6a8d92d218fada66d446e 100644
|
||||
index 05ec512839898f96d9769bb0d00f6ba11dda0c4b..27b225344c34e561d4913b3a6ca1c4a42d22ef41 100644
|
||||
--- a/net/minecraft/world/item/EndCrystalItem.java
|
||||
+++ b/net/minecraft/world/item/EndCrystalItem.java
|
||||
@@ -27,7 +27,7 @@ public class EndCrystalItem extends Item {
|
||||
if (!blockState.is(Blocks.OBSIDIAN) && !blockState.is(Blocks.BEDROCK)) {
|
||||
return InteractionResult.FAIL;
|
||||
} else {
|
||||
- BlockPos blockPos = clickedPos.above(); final BlockPos aboveBlockPosition = blockPos; // Paper - OBFHELPER
|
||||
+ BlockPos blockPos = clickedPos.above(); // final BlockPos aboveBlockPosition = blockPos; // Paper - OBFHELPER // Leaves
|
||||
- BlockPos blockPos = clickedPos.above(); final BlockPos aboveBlockPos = blockPos; // Paper - OBFHELPER
|
||||
+ BlockPos blockPos = clickedPos.above(); // final BlockPos aboveBlockPos = blockPos; // Paper - OBFHELPER // Leaves
|
||||
if (!level.isEmptyBlock(blockPos)) {
|
||||
return InteractionResult.FAIL;
|
||||
} else {
|
||||
@@ -21,16 +21,16 @@ index 1bc4c8be71b445f64134548a85fd81442298c0f1..a1d8b38b20efd7ef0fa6a8d92d218fad
|
||||
level.gameEvent(context.getPlayer(), GameEvent.ENTITY_PLACE, blockPos);
|
||||
EndDragonFight dragonFight = ((ServerLevel)level).getDragonFight();
|
||||
if (dragonFight != null) {
|
||||
- dragonFight.tryRespawn(aboveBlockPosition); // Paper - Perf: Do crystal-portal proximity check before entity lookup
|
||||
+ dragonFight.tryRespawn(); // dragonFight.tryRespawn(aboveBlockPosition); // Paper - Perf: Do crystal-portal proximity check before entity lookup // Leaves
|
||||
- dragonFight.tryRespawn(aboveBlockPos); // Paper - Perf: Do crystal-portal proximity check before entity lookup
|
||||
+ dragonFight.tryRespawn(); //dragonFight.tryRespawn(aboveBlockPos); // Paper - Perf: Do crystal-portal proximity check before entity lookup // Leaves
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/dimension/end/EndDragonFight.java b/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index 5a28a821bb401f8f1465b085c9ffda52ba9a0a9f..b03c5fde5cc62a26f8bb7632b1a684755a6e5649 100644
|
||||
index 18a567b676f0bfcd725f19c5ed9e3fdbc8e65573..ffcd4bf2e8186ae7022f77131dc83c0006a9e1e4 100644
|
||||
--- a/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
+++ b/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -575,12 +575,14 @@ public class EndDragonFight {
|
||||
@@ -576,12 +576,14 @@ public class EndDragonFight {
|
||||
}
|
||||
|
||||
public boolean tryRespawn() { // CraftBukkit - return boolean
|
||||
@@ -45,7 +45,7 @@ index 5a28a821bb401f8f1465b085c9ffda52ba9a0a9f..b03c5fde5cc62a26f8bb7632b1a68475
|
||||
if (this.dragonKilled && this.respawnStage == null) {
|
||||
BlockPos blockPos = this.portalLocation;
|
||||
if (blockPos == null) {
|
||||
@@ -595,6 +597,7 @@ public class EndDragonFight {
|
||||
@@ -596,6 +598,7 @@ public class EndDragonFight {
|
||||
|
||||
blockPos = this.portalLocation;
|
||||
}
|
||||
@@ -53,7 +53,7 @@ index 5a28a821bb401f8f1465b085c9ffda52ba9a0a9f..b03c5fde5cc62a26f8bb7632b1a68475
|
||||
// Paper start - Perf: Do crystal-portal proximity check before entity lookup
|
||||
if (placedEndCrystalPos != null) {
|
||||
// The end crystal must be 0 or 1 higher than the portal origin
|
||||
@@ -610,7 +613,7 @@ public class EndDragonFight {
|
||||
@@ -611,7 +614,7 @@ public class EndDragonFight {
|
||||
}
|
||||
}
|
||||
// Paper end - Perf: Do crystal-portal proximity check before entity lookup
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Can disable LivingEntity aiStep alive check
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 07f9e7d657d8800fda6731ac2f15873d6481f3fb..b1b738bcd20cbc927bdbac6ab10e28f79fd8a23b 100644
|
||||
index 23eb3e6a1e4f59132296d3bad9cbf858270dfe62..99770b07d967f42fe436e25579b6f3c0578da441 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3173,7 +3173,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3233,7 +3233,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix fortress mob spawn
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/biome/MobSpawnSettings.java b/net/minecraft/world/level/biome/MobSpawnSettings.java
|
||||
index 2d256b201df3afa1cf5879fdc931a1aa684110e4..6b8903bc4ec86302d6b5444742db22518fe91a8e 100644
|
||||
index db3b8a237d63255aa9ffd70c88a093002a6bd770..e7d3bac0d14d3bd701a37552a0faffc130bc61cc 100644
|
||||
--- a/net/minecraft/world/level/biome/MobSpawnSettings.java
|
||||
+++ b/net/minecraft/world/level/biome/MobSpawnSettings.java
|
||||
@@ -175,6 +175,14 @@ public class MobSpawnSettings {
|
||||
@@ -155,6 +155,14 @@ public class MobSpawnSettings {
|
||||
this.maxCount = maxCount;
|
||||
}
|
||||
|
||||
@@ -22,4 +22,4 @@ index 2d256b201df3afa1cf5879fdc931a1aa684110e4..6b8903bc4ec86302d6b5444742db2251
|
||||
+
|
||||
@Override
|
||||
public String toString() {
|
||||
return EntityType.getKey(this.type) + "*(" + this.minCount + "-" + this.maxCount + "):" + this.getWeight();
|
||||
return EntityType.getKey(this.type) + "*(" + this.minCount + "-" + this.maxCount + ")";
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix FallingBlockEntity Duplicate
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/item/FallingBlockEntity.java b/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index 5746587666c7cb788764aab2f6ccf0f3ac5c282f..35d5dd7ca192ae384ecfd858e7c898c9f4b841b4 100644
|
||||
index 31edd0d45ac6c38887e4cebffe5a7cf377b47466..b6e188cf9f224a9c4b75339acd0306758bf0cb71 100644
|
||||
--- a/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -401,7 +401,7 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -382,7 +382,7 @@ public class FallingBlockEntity extends Entity {
|
||||
ResourceKey<Level> resourceKey1 = this.level().dimension();
|
||||
boolean flag = (resourceKey1 == Level.END || resourceKey == Level.END) && resourceKey1 != resourceKey;
|
||||
Entity entity = super.teleport(teleportTransition);
|
||||
@@ -0,0 +1,127 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Wed, 14 Aug 2024 01:48:14 +0800
|
||||
Subject: [PATCH] Old BlockEntity behaviour
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/ChiseledBookShelfBlock.java b/net/minecraft/world/level/block/ChiseledBookShelfBlock.java
|
||||
index eb315a50a83dc7230d7ad66f4daeb0d632679941..b1694ff1f7c492fb53ec14d7dc7eb8e6ee07f7d9 100644
|
||||
--- a/net/minecraft/world/level/block/ChiseledBookShelfBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ChiseledBookShelfBlock.java
|
||||
@@ -182,7 +182,32 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock {
|
||||
|
||||
@Override
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
- Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
+ // Leaves start - behaviour 1.21.1-
|
||||
+ if (!org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.oldBlockEntityBehaviour) {
|
||||
+ Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ BlockState newState = level.getBlockState(pos);
|
||||
+ if (state.is(newState.getBlock())) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ BlockEntity blockEntity = level.getBlockEntity(pos);
|
||||
+ if (blockEntity instanceof ChiseledBookShelfBlockEntity bookshelf) {
|
||||
+ if (!bookshelf.isEmpty()) {
|
||||
+ for (int slot = 0; slot < 6; slot++) {
|
||||
+ ItemStack item = bookshelf.getItem(slot);
|
||||
+ if (!item.isEmpty()) {
|
||||
+ Containers.dropItemStack(level, pos.getX(), pos.getY(), pos.getZ(), item);
|
||||
+ }
|
||||
+ }
|
||||
+ bookshelf.clearContent();
|
||||
+ level.updateNeighbourForOutputSignal(pos, this);
|
||||
+ }
|
||||
+ }
|
||||
+ super.onRemove(state, level, pos, state, movedByPiston);
|
||||
+ // Leaves end - behaviour 1.21.1-
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/world/level/block/LecternBlock.java b/net/minecraft/world/level/block/LecternBlock.java
|
||||
index 5a9b601b7bf7e80b04ebd8f5c8b7d121031132c7..7e815a070d8c3e631efd73fa578cde766416ab47 100644
|
||||
--- a/net/minecraft/world/level/block/LecternBlock.java
|
||||
+++ b/net/minecraft/world/level/block/LecternBlock.java
|
||||
@@ -202,6 +202,7 @@ public class LecternBlock extends BaseEntityBlock {
|
||||
if (state.getValue(POWERED)) {
|
||||
updateBelow(level, pos, state);
|
||||
}
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.oldBlockEntityBehaviour) super.onRemove(state, level, pos, state, movedByPiston); // Leaves - behaviour 1.21.1-
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/world/level/block/SculkSensorBlock.java b/net/minecraft/world/level/block/SculkSensorBlock.java
|
||||
index f0101e88140f480c1a94f899744991f78c9e3756..7279debafadafc32253ce141c45e89e750cdc044 100644
|
||||
--- a/net/minecraft/world/level/block/SculkSensorBlock.java
|
||||
+++ b/net/minecraft/world/level/block/SculkSensorBlock.java
|
||||
@@ -134,6 +134,7 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg
|
||||
if (getPhase(state) == SculkSensorPhase.ACTIVE) {
|
||||
updateNeighbours(level, pos, state);
|
||||
}
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.oldBlockEntityBehaviour) super.onRemove(state, level, pos, state, movedByPiston); // Leaves - behaviour 1.21.1-
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
index c34318fdc454ea31655c3c3aa5dbedd3d922ee24..3268a025e329b7e6d75453c445f045e6f8fb68e7 100644
|
||||
--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
@@ -154,7 +154,20 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
||||
|
||||
@Override
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
- Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
+ // Leaves start - behaviour 1.21.1-
|
||||
+ if (!org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.oldBlockEntityBehaviour) {
|
||||
+ Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
+ return;
|
||||
+ }
|
||||
+ BlockState newState = level.getBlockState(pos);
|
||||
+ if (!state.is(newState.getBlock())) {
|
||||
+ BlockEntity blockEntity = level.getBlockEntity(pos);
|
||||
+ if (blockEntity instanceof ShulkerBoxBlockEntity) {
|
||||
+ level.updateNeighbourForOutputSignal(pos, state.getBlock());
|
||||
+ }
|
||||
+ super.onRemove(state, level, pos, newState, movedByPiston);
|
||||
+ }
|
||||
+ // Leaves end = behaviour 1.21.1-
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/world/level/block/entity/BlockEntity.java b/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index a1075c26d55cc01219acd94d0138f81aa9d34c48..ff5b882c2f1d1b02c3170baebbda6155588a944b 100644
|
||||
--- a/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -63,7 +63,7 @@ public abstract class BlockEntity {
|
||||
}
|
||||
|
||||
public boolean isValidBlockState(BlockState state) {
|
||||
- return this.type.isValid(state);
|
||||
+ return org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.oldBlockEntityBehaviour || this.type.isValid(state); // Leaves - behaviour 1.21.1-
|
||||
}
|
||||
|
||||
public static BlockPos getPosFromTag(ChunkPos chunkPos, CompoundTag tag) {
|
||||
diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index bbb1abfbfe7afd7b631cf269c1e338697cd016d2..8ec5731b0cfd5b987cb464d7b2d737f3425882f7 100644
|
||||
--- a/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -174,6 +174,15 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
}
|
||||
|
||||
+ // Leaves start - behaviour 1.21.1-
|
||||
+ protected void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean movedByPiston) {
|
||||
+ org.spigotmc.AsyncCatcher.catchOp("block remove");
|
||||
+ if (state.hasBlockEntity() && !state.is(newState.getBlock())) {
|
||||
+ level.removeBlockEntity(pos);
|
||||
+ }
|
||||
+ }
|
||||
+ // Leaves end - behaviour 1.21.1-
|
||||
+
|
||||
// CraftBukkit start
|
||||
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston, @Nullable net.minecraft.world.item.context.UseOnContext context) {
|
||||
this.onPlace(state, level, pos, oldState, movedByPiston);
|
||||
@@ -21,12 +21,12 @@ index 80f17f33f670018240c854df589cf90cdeab6e70..4c6ce6a4a730033802651b0c0052fc46
|
||||
if (raidAt == null || raidAt.getRaidOmenLevel() < raidAt.getMaxRaidOmenLevel()) {
|
||||
serverPlayer.addEffect(new MobEffectInstance(MobEffects.RAID_OMEN, 600, amplifier));
|
||||
diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java
|
||||
index f58a20e7dd6b8dc3fc431d4aba9f91a7c25f2c33..ce692698260d4751b13d5b26f7d9403c72b413c6 100644
|
||||
index 39a6a4579931d7edb7ab8c072d62cfc9b02791c8..91c9b45a3bec7f4e6d4df8975ee456e9e54ff26e 100644
|
||||
--- a/net/minecraft/world/entity/raid/Raider.java
|
||||
+++ b/net/minecraft/world/entity/raid/Raider.java
|
||||
@@ -125,6 +125,43 @@ public abstract class Raider extends PatrollingMonster {
|
||||
@@ -127,6 +127,43 @@ public abstract class Raider extends PatrollingMonster {
|
||||
|
||||
currentRaid.removeFromRaid(this, false);
|
||||
currentRaid.removeFromRaid(serverLevel, this, false);
|
||||
}
|
||||
+
|
||||
+ // Leaves start - Revert raid changes
|
||||
@@ -5,15 +5,15 @@ Subject: [PATCH] Allow anvil destroy item entities
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/item/FallingBlockEntity.java b/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index 35d5dd7ca192ae384ecfd858e7c898c9f4b841b4..ce4995fe70e885aa7ad1cc191ccd4cdd5e5b9681 100644
|
||||
index b6e188cf9f224a9c4b75339acd0306758bf0cb71..ff8cd3d52bf9f3d117abfd7022d7f2ac8525e46a 100644
|
||||
--- a/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -278,7 +278,7 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -275,7 +275,7 @@ public class FallingBlockEntity extends Entity {
|
||||
if (ceil < 0) {
|
||||
return false;
|
||||
} else {
|
||||
- Predicate<Entity> predicate = EntitySelector.NO_CREATIVE_OR_SPECTATOR.and(EntitySelector.LIVING_ENTITY_STILL_ALIVE);
|
||||
+ Predicate<Entity> predicate = org.leavesmc.leaves.LeavesConfig.modify.oldMC.allowAnvilDestroyItemEntities ? EntitySelector.NO_CREATIVE_OR_SPECTATOR : EntitySelector.NO_CREATIVE_OR_SPECTATOR.and(EntitySelector.LIVING_ENTITY_STILL_ALIVE); // Leaves - Allow anvil destroy item entities
|
||||
DamageSource damageSource = this.blockState.getBlock() instanceof Fallable fallable
|
||||
DamageSource damageSource1 = this.blockState.getBlock() instanceof Fallable fallable
|
||||
? fallable.getFallDamageSource(this)
|
||||
: this.damageSources().fallingBlock(this);
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix Incorrect Collision Behavior for Block Shape
|
||||
|
||||
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java b/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java
|
||||
index e04bd54744335fb5398c6e4f7ce8b981f35bfb7d..b3c9d4f5f2ebf8fe981999ea9465e0f5754c5d6f 100644
|
||||
index a97a2a8492f3858e3b622d26768b4d819c9b47a7..8a85fa0dbfb6e273cc77ff896e5c6a7deb94467b 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java
|
||||
@@ -101,6 +101,14 @@ public final class CollisionUtil {
|
||||
@@ -23,7 +23,7 @@ index e04bd54744335fb5398c6e4f7ce8b981f35bfb7d..b3c9d4f5f2ebf8fe981999ea9465e0f5
|
||||
// assume !isEmpty(target) && abs(source_move) >= COLLISION_EPSILON
|
||||
public static double collideX(final AABB target, final AABB source, final double source_move) {
|
||||
if ((source.minY - target.maxY) < -COLLISION_EPSILON && (source.maxY - target.minY) > COLLISION_EPSILON &&
|
||||
@@ -2015,7 +2023,10 @@ public final class CollisionUtil {
|
||||
@@ -2014,7 +2022,10 @@ public final class CollisionUtil {
|
||||
AABB singleAABB = ((CollisionVoxelShape)blockCollision).moonrise$getSingleAABBRepresentation();
|
||||
if (singleAABB != null) {
|
||||
singleAABB = singleAABB.move((double)blockX, (double)blockY, (double)blockZ);
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Disable vault blacklist
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/vault/VaultServerData.java b/net/minecraft/world/level/block/entity/vault/VaultServerData.java
|
||||
index 9bf95455f93a17c53bf457d90fd30a3595227569..f580b2431edf8768a60c57de84da64682d017d8f 100644
|
||||
index c73ccb38eb4cd5995a9005f3319acad2605c6a2b..5500eeafb5c8d15049a5308c18323f549d7fde3e 100644
|
||||
--- a/net/minecraft/world/level/block/entity/vault/VaultServerData.java
|
||||
+++ b/net/minecraft/world/level/block/entity/vault/VaultServerData.java
|
||||
@@ -61,7 +61,7 @@ public class VaultServerData {
|
||||
@@ -57,7 +57,7 @@ public class VaultServerData {
|
||||
}
|
||||
|
||||
boolean hasRewardedPlayer(Player player) {
|
||||
@@ -17,7 +17,7 @@ index 9bf95455f93a17c53bf457d90fd30a3595227569..f580b2431edf8768a60c57de84da6468
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -70,6 +70,7 @@ public class VaultServerData {
|
||||
@@ -66,6 +66,7 @@ public class VaultServerData {
|
||||
addToRewardedPlayers(player.getUUID());
|
||||
}
|
||||
public boolean addToRewardedPlayers(final java.util.UUID player) {
|
||||
@@ -26,7 +26,7 @@ index 9bf95455f93a17c53bf457d90fd30a3595227569..f580b2431edf8768a60c57de84da6468
|
||||
// Paper end - Vault API
|
||||
if (this.rewardedPlayers.size() > 128) {
|
||||
diff --git a/net/minecraft/world/level/block/entity/vault/VaultSharedData.java b/net/minecraft/world/level/block/entity/vault/VaultSharedData.java
|
||||
index 50d6ff126a35ce8613175b550dac50cd82c43f9d..13ba4407b639ca64224348dd898c30d1256b13fa 100644
|
||||
index 036087f8085f05b43703ceca3413e0b8ac0a412b..a55c773f37cf8a50954d9a0f28868e42d94ad90e 100644
|
||||
--- a/net/minecraft/world/level/block/entity/vault/VaultSharedData.java
|
||||
+++ b/net/minecraft/world/level/block/entity/vault/VaultSharedData.java
|
||||
@@ -68,8 +68,8 @@ public class VaultSharedData {
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix EntityPortalExitEvent logic
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index ca599cbb240f9ae0a7d83cc13684e37e4bbeeb65..4de7f2a2257c7071ecf1f06ab30cc6e31c5ce065 100644
|
||||
index 0d23af29875829316d1684b1303bd62e18efbad2..e158d366c663d297df8c38269f223e59cb174de5 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -3790,19 +3790,29 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3757,19 +3757,29 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
if (this.portalProcess != null) { // if in a portal
|
||||
org.bukkit.craftbukkit.entity.CraftEntity bukkitEntity = this.getBukkitEntity();
|
||||
@@ -23,20 +23,21 @@ index ca599cbb240f9ae0a7d83cc13684e37e4bbeeb65..4de7f2a2257c7071ecf1f06ab30cc6e3
|
||||
|
||||
+ // Leaves start - fix
|
||||
// Only change the target if actually needed, since we reset relative flags
|
||||
- if (!event.isCancelled() && event.getTo() != null && (!event.getTo().equals(event.getFrom()) || !event.getAfter().equals(event.getBefore()))) {
|
||||
- if (!event.isCancelled() && event.getTo() != null && (!event.getTo().equals(event.getFrom()) || !event.getAfter().equals(event.getBefore()))) { // todo this looks broken
|
||||
- to = event.getTo().clone();
|
||||
- velocity = org.bukkit.craftbukkit.util.CraftVector.toNMS(event.getAfter());
|
||||
+ if (event.isCancelled() || (!to.equals(event.getTo()) || !after.equals(event.getAfter()))) {
|
||||
- velocity = org.bukkit.craftbukkit.util.CraftVector.toVec3(event.getAfter());
|
||||
- teleportTransition = new TeleportTransition(((org.bukkit.craftbukkit.CraftWorld) to.getWorld()).getHandle(), org.bukkit.craftbukkit.util.CraftLocation.toVec3(to), velocity, to.getYaw(), to.getPitch(), teleportTransition.missingRespawnBlock(), teleportTransition.asPassenger(), Set.of(), teleportTransition.postTeleportTransition(), teleportTransition.cause());
|
||||
+ celled() || (!to.equals(event.getTo()) || !after.equals(event.getAfter()))) {
|
||||
+ if (!event.isCancelled()) {
|
||||
+ if (event.getTo() != null) {
|
||||
+ to = event.getTo().clone();
|
||||
+ }
|
||||
+ velocity = org.bukkit.craftbukkit.util.CraftVector.toNMS(event.getAfter());
|
||||
+ velocity = org.bukkit.craftbukkit.util.CraftVector.toVec3(event.getAfter());
|
||||
+ } else {
|
||||
+ to = event.getFrom().clone();
|
||||
+ velocity = Vec3.ZERO;
|
||||
+ }
|
||||
teleportTransition = new TeleportTransition(((org.bukkit.craftbukkit.CraftWorld) to.getWorld()).getHandle(), org.bukkit.craftbukkit.util.CraftLocation.toVec3D(to), velocity, to.getYaw(), to.getPitch(), teleportTransition.missingRespawnBlock(), teleportTransition.asPassenger(), Set.of(), teleportTransition.postTeleportTransition(), teleportTransition.cause());
|
||||
+ teleportTransition = new TeleportTransition(((org.bukkit.craftbukkit.CraftWorld) to.getWorld()).getHandle(), org.bukkit.craftbukkit.util.CraftLocation.toVec3D(to), velocity, to.getYaw(), to.getPitch(), teleportTransition.missingRespawnBlock(), teleportTransition.asPassenger(), Set.of(), teleportTransition.postTeleportTransition(), teleportTransition.cause());
|
||||
}
|
||||
+ // Leaves end - fix
|
||||
}
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix CraftPortalEvent logic
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/EndPortalBlock.java b/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
index c11366dd69e1c51bdab45c625b07c15ce2e42cb6..31ac2e7047065333d5033ea2ef4c56877a425ee7 100644
|
||||
index cf2b105c98a3b22b9bea59cbafcd598657dc92b5..22ffa5743f95d28f29084f1dd357015aee032711 100644
|
||||
--- a/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
+++ b/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
@@ -102,9 +102,9 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal {
|
||||
@@ -103,9 +103,9 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal {
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Xaero Map Protocol
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 9187e876a3e226a9f28af32630122f2ead72b6f3..2aafa4a3e5314b69bbb8deedb5df3a8979efc5d9 100644
|
||||
index dde94150dbb09cfc7b17fa7748b6d40fcaf868c1..5c68d9c2a8a129a5294dd76804848ebe8fd61a1d 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1323,6 +1323,7 @@ public abstract class PlayerList {
|
||||
@@ -1327,6 +1327,7 @@ public abstract class PlayerList {
|
||||
player.connection.send(new ClientboundInitializeBorderPacket(worldBorder));
|
||||
player.connection.send(new ClientboundSetTimePacket(level.getGameTime(), level.getDayTime(), level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)));
|
||||
player.connection.send(new ClientboundSetDefaultSpawnPositionPacket(level.getSharedSpawnPos(), level.getSharedSpawnAngle()));
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Skip negligible planar movement multiplication
|
||||
This patch is Powered by Gale(https://github.com/Dreeam-qwq/Gale)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 7bb90470233aaaf13b71dddbef7d227018c4622f..1871a020dc3a66abef4acce3d2953a90262d3f3b 100644
|
||||
index e158d366c663d297df8c38269f223e59cb174de5..ea3f3ee068d73958164cdb8dcea3623f06db24d0 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1223,8 +1223,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1218,8 +1218,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ Subject: [PATCH] Skippable raid height check
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/raid/Raid.java b/net/minecraft/world/entity/raid/Raid.java
|
||||
index 41b0db439b425b052bd1469daa6620a435ca852b..f14cdeb3d63b5b8e5bd0074aa245f1b5bd7ef0d3 100644
|
||||
index eb7208b03240d647ace22c41ac665d3030407196..1858e49e981b00d943e63290619ca7ee2c5aba62 100644
|
||||
--- a/net/minecraft/world/entity/raid/Raid.java
|
||||
+++ b/net/minecraft/world/entity/raid/Raid.java
|
||||
@@ -660,7 +660,7 @@ public class Raid {
|
||||
int i2 = this.center.getX() + Mth.floor(Mth.cos(f2) * 32.0F * f) + this.level.random.nextInt(3) * Mth.floor(f);
|
||||
int i3 = this.center.getZ() + Mth.floor(Mth.sin(f2) * 32.0F * f) + this.level.random.nextInt(3) * Mth.floor(f);
|
||||
int height = this.level.getHeight(Heightmap.Types.WORLD_SURFACE, i2, i3);
|
||||
@@ -666,7 +666,7 @@ public class Raid {
|
||||
int i2 = this.center.getX() + Mth.floor(Mth.cos(f2) * 32.0F * f) + level.random.nextInt(3) * Mth.floor(f);
|
||||
int i3 = this.center.getZ() + Mth.floor(Mth.sin(f2) * 32.0F * f) + level.random.nextInt(3) * Mth.floor(f);
|
||||
int height = level.getHeight(Heightmap.Types.WORLD_SURFACE, i2, i3);
|
||||
- if (Mth.abs(height - this.center.getY()) <= 96) {
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.oldMC.raid.skipHeightCheck || Mth.abs(height - this.center.getY()) <= 96) { // Leaves - skippable
|
||||
mutableBlockPos.set(i2, height, i3);
|
||||
if (!this.level.isVillage(mutableBlockPos) || i <= 7) {
|
||||
if (!level.isVillage(mutableBlockPos) || i <= 7) {
|
||||
int i4 = 10;
|
||||
@@ -5,25 +5,25 @@ Subject: [PATCH] Support REI protocol
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index d89a1aa9355205883412eaaf535dad30f945a4dc..33e05636164144b3d2bdbd091c72583728cc294e 100644
|
||||
index 5c68d9c2a8a129a5294dd76804848ebe8fd61a1d..a87bc493c11391833578c1faa5cf8fe246b7bf98 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1624,6 +1624,7 @@ public abstract class PlayerList {
|
||||
@@ -1628,6 +1628,7 @@ public abstract class PlayerList {
|
||||
serverPlayer.getRecipeBook().sendInitialRecipeBook(serverPlayer);
|
||||
}
|
||||
org.leavesmc.leaves.protocol.BBORProtocol.onDataPackReload(); // Leaves - bbor
|
||||
+ org.leavesmc.leaves.protocol.rei.REIServerProtocol.onRecipeReload(); // Leaves - rei
|
||||
}
|
||||
|
||||
|
||||
public boolean isAllowCommandsForAllPlayers() {
|
||||
diff --git a/net/minecraft/world/item/crafting/SmithingTransformRecipe.java b/net/minecraft/world/item/crafting/SmithingTransformRecipe.java
|
||||
index 143601053a6aeea4396f8e0ee0746ff7d5bbb323..0af83ec1fe3aa85c6bfc814a1339a54e9d3725d6 100644
|
||||
index 9bc0a9c3577d63a0ad5489bfd4c07d5006245c5f..08d6569cf84155b868d3480ac7b4d23b6317a4f2 100644
|
||||
--- a/net/minecraft/world/item/crafting/SmithingTransformRecipe.java
|
||||
+++ b/net/minecraft/world/item/crafting/SmithingTransformRecipe.java
|
||||
@@ -87,6 +87,12 @@ public class SmithingTransformRecipe implements SmithingRecipe {
|
||||
@@ -83,6 +83,12 @@ public class SmithingTransformRecipe implements SmithingRecipe {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+ // Leaves start
|
||||
+ public ItemStack getResult() {
|
||||
+ return this.result.copy();
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Vanilla player display name
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index eba1717566a8ea534bbf149e0593cc7656df2db9..311d4abc9cbd99e6b03135dadbd8ee93e7bc4a48 100644
|
||||
index 4d2576d4824769a1ef76a93e673da823bededc49..8764f6d497a5df9dc94ae4e041d3d07bc2a1e4e2 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -449,7 +449,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -477,7 +477,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
|
||||
// CraftBukkit start
|
||||
this.displayName = this.getScoreboardName();
|
||||
@@ -5,18 +5,18 @@ Subject: [PATCH] Fix SculkCatalyst exp skip
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index b1b738bcd20cbc927bdbac6ab10e28f79fd8a23b..e61e5c5b3777c8861f090ada2a4ddaaf88116329 100644
|
||||
index 99770b07d967f42fe436e25579b6f3c0578da441..1f8da709d3873171403557b04b1def8e77c1c343 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -293,6 +293,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
protected float appliedScale = 1.0F;
|
||||
@@ -264,6 +264,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
protected final EntityEquipment equipment;
|
||||
// CraftBukkit start
|
||||
public int expToDrop;
|
||||
+ public int expToReward; // Leaves - exp fix
|
||||
public ArrayList<DefaultDrop> drops = new ArrayList<>(); // Paper - Restore vanilla drops behavior
|
||||
public List<DefaultDrop> drops = new java.util.ArrayList<>(); // Paper - Restore vanilla drops behavior
|
||||
public final org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes;
|
||||
public boolean collides = true;
|
||||
@@ -1743,6 +1744,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1829,6 +1830,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
entity.killedEntity((ServerLevel) this.level(), this);
|
||||
}
|
||||
this.gameEvent(GameEvent.ENTITY_DIE);
|
||||
@@ -24,8 +24,8 @@ index b1b738bcd20cbc927bdbac6ab10e28f79fd8a23b..e61e5c5b3777c8861f090ada2a4ddaaf
|
||||
} else {
|
||||
this.dead = false;
|
||||
this.setHealth((float) deathEvent.getReviveHealth());
|
||||
@@ -1817,7 +1819,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.drops = new ArrayList<>();
|
||||
@@ -1902,7 +1904,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.drops = new java.util.ArrayList<>();
|
||||
// this.dropEquipment(level); // CraftBukkit - moved up
|
||||
// CraftBukkit end
|
||||
- this.dropExperience(level, damageSource.getEntity());
|
||||
@@ -34,7 +34,7 @@ index b1b738bcd20cbc927bdbac6ab10e28f79fd8a23b..e61e5c5b3777c8861f090ada2a4ddaaf
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
index 1638eccef431fb68775af624110f1968f0c6dabd..117748f385cecabef890d27af55d88abee6adf4b 100644
|
||||
index 2627583ab12d886b1fba0b1d1e599f942926b499..be09fa81ed1e58a271156299dacf49be649eecfc 100644
|
||||
--- a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
@@ -96,8 +96,7 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
|
||||
@@ -1,19 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Thu, 18 Jan 2024 12:31:31 +0800
|
||||
Subject: [PATCH] No TNT place update
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/TntBlock.java b/net/minecraft/world/level/block/TntBlock.java
|
||||
index 9dca05fb66ce3ff9e0c3e31978bf4d5d9e139b8e..bc960220f4d9854a73990ce06c598a86e56fa558 100644
|
||||
--- a/net/minecraft/world/level/block/TntBlock.java
|
||||
+++ b/net/minecraft/world/level/block/TntBlock.java
|
||||
@@ -45,7 +45,7 @@ public class TntBlock extends Block {
|
||||
@Override
|
||||
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) {
|
||||
if (!oldState.is(state.getBlock())) {
|
||||
- if (level.hasNeighborSignal(pos) && org.bukkit.craftbukkit.event.CraftEventFactory.callTNTPrimeEvent(level, pos, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.REDSTONE, null, null)) { // CraftBukkit - TNTPrimeEvent
|
||||
+ if (!org.leavesmc.leaves.LeavesConfig.modify.noTNTPlaceUpdate & level.hasNeighborSignal(pos) && org.bukkit.craftbukkit.event.CraftEventFactory.callTNTPrimeEvent(level, pos, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.REDSTONE, null, null)) { // CraftBukkit - TNTPrimeEvent
|
||||
// Paper start - TNTPrimeEvent
|
||||
org.bukkit.block.Block tntBlock = org.bukkit.craftbukkit.block.CraftBlock.at(level, pos);
|
||||
if (!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.REDSTONE, null).callEvent()) {
|
||||
@@ -1,23 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Fortern <blueten.ki@gmail.com>
|
||||
Date: Sat, 20 Jan 2024 02:50:56 +0800
|
||||
Subject: [PATCH] Placing locked hopper no longer send NC updates
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index 2d0b54c56f89f05a3babf257ca17e6ca32f54d96..9b5e0c569cc17475f6cb4a5c7bed3e39b9ae5b5e 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -1213,7 +1213,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
}
|
||||
|
||||
if ((i & 1) != 0) {
|
||||
- this.blockUpdated(blockposition, iblockdata1.getBlock());
|
||||
+ // Leaves start - Placing locked hopper doesn't send NC updates.
|
||||
+ if (!(iblockdata.getBlock() instanceof net.minecraft.world.level.block.HopperBlock) || iblockdata.getValue(net.minecraft.world.level.block.HopperBlock.ENABLED)) {
|
||||
+ this.blockUpdated(blockposition, iblockdata1.getBlock());
|
||||
+ }
|
||||
+ // Leaves end - Placing locked hopper doesn't send NC updates.
|
||||
if (!this.isClientSide && iblockdata.hasAnalogOutputSignal()) {
|
||||
this.updateNeighbourForOutputSignal(blockposition, newBlock.getBlock());
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Wed, 14 Aug 2024 01:48:14 +0800
|
||||
Subject: [PATCH] Old BlockEntity behaviour
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/ChiseledBookShelfBlock.java b/net/minecraft/world/level/block/ChiseledBookShelfBlock.java
|
||||
index 1411c6b0471281827b9d21958c0c7d962809898f..2aa08b7da25f159640e0640482d40c69b060bb9f 100644
|
||||
--- a/net/minecraft/world/level/block/ChiseledBookShelfBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ChiseledBookShelfBlock.java
|
||||
@@ -192,7 +192,14 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock {
|
||||
}
|
||||
|
||||
chiseledBookShelfBlockEntity.clearContent();
|
||||
- flag = true;
|
||||
+ // Leaves start - behaviour 1.21.1-
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.oldBlockEntityBehaviour) {
|
||||
+ flag = false;
|
||||
+ level.updateNeighbourForOutputSignal(pos, this);
|
||||
+ } else {
|
||||
+ flag = true;
|
||||
+ }
|
||||
+ // Leaves end - behaviour 1.21.1-
|
||||
} else {
|
||||
flag = false;
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/LecternBlock.java b/net/minecraft/world/level/block/LecternBlock.java
|
||||
index 82fcae1f8b4149f13adf5118287718812518f8bf..d6e4e2f9d762d512d22a4da3736f997d2cd9624d 100644
|
||||
--- a/net/minecraft/world/level/block/LecternBlock.java
|
||||
+++ b/net/minecraft/world/level/block/LecternBlock.java
|
||||
@@ -237,10 +237,11 @@ public class LecternBlock extends BaseEntityBlock {
|
||||
this.popBook(state, level, pos);
|
||||
}
|
||||
|
||||
- super.onRemove(state, level, pos, newState, isMoving);
|
||||
+ if (!org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.oldBlockEntityBehaviour) super.onRemove(state, level, pos, newState, isMoving); // Leaves - behaviour 1.21.1-
|
||||
if (state.getValue(POWERED)) {
|
||||
updateBelow(level, pos, state);
|
||||
}
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.oldBlockEntityBehaviour) super.onRemove(state, level, pos, newState, isMoving); // Leaves - behaviour 1.21.1-
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/SculkSensorBlock.java b/net/minecraft/world/level/block/SculkSensorBlock.java
|
||||
index 2fd1bae800b7dca0a58b572095e2c58012412481..237e5a48dc345cae90aa9921251fe48d1c2470e1 100644
|
||||
--- a/net/minecraft/world/level/block/SculkSensorBlock.java
|
||||
+++ b/net/minecraft/world/level/block/SculkSensorBlock.java
|
||||
@@ -138,10 +138,11 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg
|
||||
@Override
|
||||
protected void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean movedByPiston) {
|
||||
if (!state.is(newState.getBlock())) {
|
||||
- super.onRemove(state, level, pos, newState, movedByPiston);
|
||||
+ if (!org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.oldBlockEntityBehaviour) super.onRemove(state, level, pos, newState, movedByPiston); // Leaves - behaviour 1.21.1-
|
||||
if (getPhase(state) == SculkSensorPhase.ACTIVE) {
|
||||
updateNeighbours(level, pos, state);
|
||||
}
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.oldBlockEntityBehaviour) super.onRemove(state, level, pos, newState, movedByPiston); // Leaves - behaviour 1.21.1-
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
index fca50f68625050daabcae3a3b615cf88cce41111..a5786b13f21781c2e85a6a7910ce42005f8951c8 100644
|
||||
--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
@@ -178,10 +178,11 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
||||
protected void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
if (!state.is(newState.getBlock())) {
|
||||
BlockEntity blockEntity = level.getBlockEntity(pos);
|
||||
- super.onRemove(state, level, pos, newState, isMoving);
|
||||
+ if (!org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.oldBlockEntityBehaviour) super.onRemove(state, level, pos, newState, isMoving); // Leaves - behaviour 1.21.1-
|
||||
if (blockEntity instanceof ShulkerBoxBlockEntity) {
|
||||
level.updateNeighbourForOutputSignal(pos, state.getBlock());
|
||||
}
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.oldBlockEntityBehaviour) super.onRemove(state, level, pos, newState, isMoving); // Leaves - behaviour 1.21.1-
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/BlockEntity.java b/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index 77618757c0e678532dbab814aceed83f7f1cd892..fa78fc79b6000832d8623e632d845cf942496428 100644
|
||||
--- a/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -55,7 +55,7 @@ public abstract class BlockEntity {
|
||||
}
|
||||
|
||||
public boolean isValidBlockState(BlockState state) {
|
||||
- return this.type.isValid(state);
|
||||
+ return org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.oldBlockEntityBehaviour || this.type.isValid(state); // Leaves - behaviour 1.21.1-
|
||||
}
|
||||
|
||||
public static BlockPos getPosFromTag(CompoundTag tag) {
|
||||
@@ -0,0 +1,19 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
set /p increment=Enter a value to add on file number:
|
||||
|
||||
for %%f in (*-*) do (
|
||||
set "filename=%%~nf"
|
||||
set "ext=%%~xf"
|
||||
|
||||
:: Extract prefix and suffix
|
||||
for /f "tokens=1* delims=-" %%a in ("!filename!") do (
|
||||
set /a newnum=1%%a + %increment%
|
||||
set "newprefix=!newnum:~1!"
|
||||
ren "%%f" "!newprefix!-%%b!ext!"
|
||||
)
|
||||
)
|
||||
|
||||
echo Done renaming.
|
||||
pause
|
||||
Reference in New Issue
Block a user