mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-30 17:17:55 +00:00
Put some braces back
These blocks were not strictly needed but helped readability. I didn't mean for the reformatter to change them while dealing with the "this" problem. It also removed some braces in switch statements but who cares.
This commit is contained in:
@@ -223,6 +223,7 @@ public final class Generator<T>
|
||||
mw.visitEnd();
|
||||
}
|
||||
|
||||
{
|
||||
MethodVisitor mw = cw.visitMethod( ACC_PUBLIC, METHOD_NAME, methodDesc, null, EXCEPTIONS );
|
||||
mw.visitCode();
|
||||
|
||||
@@ -276,6 +277,7 @@ public final class Generator<T>
|
||||
|
||||
mw.visitMaxs( 0, 0 );
|
||||
mw.visitEnd();
|
||||
}
|
||||
|
||||
cw.visitEnd();
|
||||
|
||||
|
@@ -32,8 +32,7 @@ public class CommentedConfigSpec extends ConfigSpec
|
||||
@Override
|
||||
public int correct( Config config )
|
||||
{
|
||||
return correct( config, ( action, path, incorrectValue, correctedValue ) -> {
|
||||
} );
|
||||
return correct( config, ( action, path, incorrectValue, correctedValue ) -> { } );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -56,7 +56,7 @@ public final class Config
|
||||
System.setProperty( "nightconfig.preserveInsertionOrder", "true" );
|
||||
|
||||
serverSpec = new CommentedConfigSpec();
|
||||
// General computers
|
||||
{ // General computers
|
||||
serverSpec.comment( "computer_space_limit",
|
||||
"The disk space limit for computers and turtles, in bytes" );
|
||||
serverSpec.define( "computer_space_limit", ComputerCraft.computerSpaceLimit );
|
||||
@@ -93,8 +93,9 @@ public final class Config
|
||||
"Require players to be in creative mode and be opped in order to interact with command computers." +
|
||||
"This is the default behaviour for vanilla's Command blocks." );
|
||||
serverSpec.define( "command_require_creative", ComputerCraft.commandRequireCreative );
|
||||
}
|
||||
|
||||
// Execution
|
||||
{ // Execution
|
||||
serverSpec.comment( "execution",
|
||||
"Controls execution behaviour of computers. This is largely intended for fine-tuning " +
|
||||
"servers, and generally shouldn't need to be touched" );
|
||||
@@ -116,8 +117,9 @@ public final class Config
|
||||
"Note, we will quite possibly go over this limit, as there's no way to tell how long a will take " +
|
||||
"- this aims to be the upper bound of the average time." );
|
||||
serverSpec.defineInRange( "execution.max_main_computer_time", (int) TimeUnit.NANOSECONDS.toMillis( ComputerCraft.maxMainComputerTime ), 1, Integer.MAX_VALUE );
|
||||
}
|
||||
|
||||
// HTTP
|
||||
{ // HTTP
|
||||
serverSpec.comment( "http", "Controls the HTTP API" );
|
||||
|
||||
serverSpec.comment( "http.enabled",
|
||||
@@ -145,8 +147,9 @@ public final class Config
|
||||
serverSpec.comment( "http.max_websockets",
|
||||
"The number of websockets a computer can have open at one time. Set to 0 for unlimited." );
|
||||
serverSpec.defineInRange( "http.max_websockets", ComputerCraft.httpMaxWebsockets, 1, Integer.MAX_VALUE );
|
||||
}
|
||||
|
||||
// Peripherals
|
||||
{ // Peripherals
|
||||
serverSpec.comment( "peripheral", "Various options relating to peripherals." );
|
||||
|
||||
serverSpec.comment( "peripheral.command_block_enabled",
|
||||
@@ -182,8 +185,9 @@ public final class Config
|
||||
"in a single tick. \n" +
|
||||
"Set to 0 to disable." );
|
||||
serverSpec.defineInRange( "peripheral.monitor_bandwidth", (int) ComputerCraft.monitorBandwidth, 0, Integer.MAX_VALUE );
|
||||
}
|
||||
|
||||
// Turtles
|
||||
{ // Turtles
|
||||
serverSpec.comment( "turtle", "Various options relating to turtles." );
|
||||
|
||||
serverSpec.comment( "turtle.need_fuel",
|
||||
@@ -208,7 +212,9 @@ public final class Config
|
||||
serverSpec.comment( "turtle.disabled_actions",
|
||||
"A list of turtle actions which are disabled." );
|
||||
serverSpec.defineList( "turtle.disabled_actions", Collections.emptyList(), x -> x instanceof String && getAction( (String) x ) != null );
|
||||
}
|
||||
|
||||
{ // Terminal sizes
|
||||
serverSpec.comment( "term_sizes", "Configure the size of various computer's terminals.\n" +
|
||||
"Larger terminals require more bandwidth, so use with care." );
|
||||
|
||||
@@ -223,6 +229,7 @@ public final class Config
|
||||
serverSpec.comment( "term_sizes.monitor", "Maximum size of monitors (in blocks)" );
|
||||
serverSpec.defineInRange( "term_sizes.monitor.width", ComputerCraft.monitorWidth, 1, 32 );
|
||||
serverSpec.defineInRange( "term_sizes.monitor.height", ComputerCraft.monitorHeight, 1, 32 );
|
||||
}
|
||||
|
||||
clientSpec = new CommentedConfigSpec();
|
||||
|
||||
@@ -331,7 +338,7 @@ public final class Config
|
||||
ComputerCraft.floppySpaceLimit = serverConfig.<Integer>get( "floppy_space_limit" );
|
||||
ComputerCraft.maximumFilesOpen = serverConfig.<Integer>get( "maximum_open_files" );
|
||||
ComputerCraft.disableLua51Features = serverConfig.<Boolean>get( "disable_lua51_features" );
|
||||
ComputerCraft.defaultComputerSettings = serverConfig.get( "default_computer_settings" );
|
||||
ComputerCraft.defaultComputerSettings = serverConfig.<String>get( "default_computer_settings" );
|
||||
ComputerCraft.debugEnable = serverConfig.<Boolean>get( "debug_enabled" );
|
||||
ComputerCraft.logComputerErrors = serverConfig.<Boolean>get( "log_computer_errors" );
|
||||
ComputerCraft.commandRequireCreative = serverConfig.<Boolean>get( "command_require_creative" );
|
||||
|
Reference in New Issue
Block a user