mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@7b3b593 [ci skip] Update checkout action in workflow (#8510) PaperMC/Paper@36869cc Fix new block data in EntityChangeBlockEvent for silverfish when mobGriefing isn't enabled (#8099) PaperMC/Paper@2432233 Add allow server listing & text filtering client options (#7595) PaperMC/Paper@954e6f0 Fix a bunch more forceDrops for dropping items (#8095) PaperMC/Paper@32d95e9 Track projectile source for fireworks from dispensers (#8044) PaperMC/Paper@0249750 Fix EntityArgument suggestion permissions to align with EntitySelector#checkPermissions (#8511) PaperMC/Paper@8acb05d Make CommandSyntaxException implement ComponentMessageThrowable (#8513) PaperMC/Paper@c264018 [ci skip] Undo modification to removed patches in latest commit (#8512) PaperMC/Paper@304ab35 [ci skip] Remove old todo file PaperMC/Paper@8a4b752 Fix wrong descriptor in ASMEventExecutorGenerator (#8506) PaperMC/Paper@b743144 Fix MC-147659 (#8423) PaperMC/Paper@aaf5e39 Deprecate unused VehicleEntityCollisionEvent methods (#8498)
44 lines
2.8 KiB
Diff
44 lines
2.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <Blake.Galbreath@Gmail.com>
|
|
Date: Sat, 29 Jan 2022 19:39:44 -0600
|
|
Subject: [PATCH] Fill command max area option
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/commands/FillCommand.java b/src/main/java/net/minecraft/server/commands/FillCommand.java
|
|
index 99fbb24dabe867ed4956a2996543107f58a57193..5c81c64540579fbacc335a3fadf4bf59f853dc39 100644
|
|
--- a/src/main/java/net/minecraft/server/commands/FillCommand.java
|
|
+++ b/src/main/java/net/minecraft/server/commands/FillCommand.java
|
|
@@ -59,8 +59,10 @@ public class FillCommand {
|
|
|
|
private static int fillBlocks(CommandSourceStack source, BoundingBox range, BlockInput block, FillCommand.Mode mode, @Nullable Predicate<BlockInWorld> filter) throws CommandSyntaxException {
|
|
int i = range.getXSpan() * range.getYSpan() * range.getZSpan();
|
|
- if (i > 32768) {
|
|
- throw ERROR_AREA_TOO_LARGE.create(32768, i);
|
|
+ // Purpur start
|
|
+ if (i > org.purpurmc.purpur.PurpurConfig.commandFillMaxArea) {
|
|
+ throw ERROR_AREA_TOO_LARGE.create(org.purpurmc.purpur.PurpurConfig.commandFillMaxArea, i);
|
|
+ // Purpur end
|
|
} else {
|
|
List<BlockPos> list = Lists.newArrayList();
|
|
ServerLevel serverLevel = source.getLevel();
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
index 6cb9acea12fdc75ea540096dc84f91e8ba9c6236..65f2c37e667f78c4f2bb59e5db7f870d2534513a 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
@@ -274,6 +274,7 @@ public class PurpurConfig {
|
|
public static float commandCompassBarProgressPercent = 1.0F;
|
|
public static int commandCompassBarTickInterval = 5;
|
|
public static boolean commandGamemodeRequiresPermission = false;
|
|
+ public static int commandFillMaxArea = 32768;
|
|
public static boolean hideHiddenPlayersFromEntitySelector = false;
|
|
public static String uptimeFormat = "<days><hours><minutes><seconds>";
|
|
public static String uptimeDay = "%02d day, ";
|
|
@@ -303,6 +304,7 @@ public class PurpurConfig {
|
|
commandCompassBarTickInterval = getInt("settings.command.compass.tick-interval", commandCompassBarTickInterval);
|
|
|
|
commandGamemodeRequiresPermission = getBoolean("settings.command.gamemode.requires-specific-permission", commandGamemodeRequiresPermission);
|
|
+ commandFillMaxArea = getInt("settings.command.fill.max-area", commandFillMaxArea);
|
|
hideHiddenPlayersFromEntitySelector = getBoolean("settings.command.hide-hidden-players-from-entity-selector", hideHiddenPlayersFromEntitySelector);
|
|
uptimeFormat = getString("settings.command.uptime.format", uptimeFormat);
|
|
uptimeDay = getString("settings.command.uptime.day", uptimeDay);
|