mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Updated Upstream (Paper & Pufferfish)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@990be16 Iterate over entity array copy for entity scheduler PaperMC/Paper@3f6c4b0 Add event for player editing sign (#9300) PaperMC/Paper@7103f81 Only tick item frames if players can see it (#9377) PaperMC/Paper@cf0f013 Avoid duplicate death event call for armorstands (#9223) PaperMC/Paper@8582999 Deprecate duplicate chat completion methods (#9401) PaperMC/Paper@e4b40dd Fix entity selectors while spectating (#9402) PaperMC/Paper@82cd69f [ci skip] Update Repo style and change project url in README (#9407) PaperMC/Paper@2c9c5e4 Fix replenishable container entities save/load existing contents (#9417) PaperMC/Paper@437e8da Improve command function perm level checks (#9411) PaperMC/Paper@225c950 Hotfix double entity removal making entity scheduler retire call PaperMC/Paper@fead63e Add option to disable NoteBlock and Tripwire updates (#9368) Pufferfish Changes: pufferfish-gg/Pufferfish@50f3124 Updated Upstream (Paper) pufferfish-gg/Pufferfish@5673490 Add option to suppress null ID disconnections in logs pufferfish-gg/Pufferfish@1e911fb Fix issue with that last patch
This commit is contained in:
@@ -98,46 +98,18 @@ index 3c6d97b51c6fec130b80e5965afa2c49d48843c9..b456cb8efd8f0be8a6860c82462ce9bd
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/NoteBlock.java b/src/main/java/net/minecraft/world/level/block/NoteBlock.java
|
||||
index 910864cfeac085648e6c671b0f9480417324d36e..6bc29eeb5771a3dc9aa23c7d184c895717797b36 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/NoteBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/NoteBlock.java
|
||||
@@ -58,11 +58,13 @@ public class NoteBlock extends Block {
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext ctx) {
|
||||
+ if (org.purpurmc.purpur.PurpurConfig.disableNoteBlockUpdates) return this.defaultBlockState(); // Purpur
|
||||
return this.setInstrument(ctx.getLevel(), ctx.getClickedPos(), this.defaultBlockState());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
|
||||
+ if (org.purpurmc.purpur.PurpurConfig.disableNoteBlockUpdates) return state; // Purpur
|
||||
boolean flag = direction.getAxis() == Direction.Axis.Y;
|
||||
|
||||
return flag ? this.setInstrument(world, pos, state) : super.updateShape(state, direction, neighborState, world, pos, neighborPos);
|
||||
@@ -78,6 +80,7 @@ public class NoteBlock extends Block {
|
||||
state = world.getBlockState(pos); // CraftBukkit - SPIGOT-5617: update in case changed in event
|
||||
}
|
||||
|
||||
+ if (!org.purpurmc.purpur.PurpurConfig.disableNoteBlockUpdates) // Purpur
|
||||
world.setBlock(pos, (BlockState) state.setValue(NoteBlock.POWERED, flag1), 3);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 8575753af39d19e485f915e3e12e377c325b4751..e829e215d1fe80cdaf9162268011912081f4c5ee 100644
|
||||
index 8575753af39d19e485f915e3e12e377c325b4751..17270d303cc41822ca4073ea0bb23c05b0409121 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -249,6 +249,15 @@ public class PurpurConfig {
|
||||
@@ -249,6 +249,13 @@ public class PurpurConfig {
|
||||
allowWaterPlacementInTheEnd = getBoolean("settings.allow-water-placement-in-the-end", allowWaterPlacementInTheEnd);
|
||||
}
|
||||
|
||||
+ public static boolean disableMushroomBlockUpdates = false;
|
||||
+ public static boolean disableNoteBlockUpdates = false;
|
||||
+ public static boolean disableChorusPlantUpdates = false;
|
||||
+ private static void blockUpdatesSettings() {
|
||||
+ disableMushroomBlockUpdates = getBoolean("settings.blocks.disable-mushroom-updates", disableMushroomBlockUpdates);
|
||||
+ disableNoteBlockUpdates = getBoolean("settings.blocks.disable-note-block-updates", disableNoteBlockUpdates);
|
||||
+ disableChorusPlantUpdates = getBoolean("settings.blocks.disable-chorus-plant-updates", disableChorusPlantUpdates);
|
||||
+ }
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user