mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
add pufferfish back to purpur
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
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 c482f598c79c8ff32fdcdf8cd1ac7920f4050862..8d4bd88270747bf905ce87573492382cb175d57b 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -269,6 +269,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, ";
|
||||
@@ -298,6 +299,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);
|
||||
Reference in New Issue
Block a user