mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-02-14 01:50:04 +00:00
Allow configuring max monitor render distance
64 blocks out to be enough for anyone. But just in case. Closes #494
This commit is contained in:
parent
8f069a9b72
commit
89c1b2771d
@ -82,6 +82,7 @@ public final class ComputerCraft
|
||||
public static int modemHighAltitudeRangeDuringStorm = 384;
|
||||
public static int maxNotesPerTick = 8;
|
||||
public static MonitorRenderer monitorRenderer = MonitorRenderer.BEST;
|
||||
public static double monitorDistanceSq = 4096;
|
||||
public static long monitorBandwidth = 1_000_000;
|
||||
|
||||
public static boolean turtlesNeedFuel = true;
|
||||
|
@ -85,6 +85,7 @@ public final class Config
|
||||
private static final ConfigValue<Boolean> genericPeripheral;
|
||||
|
||||
private static final ConfigValue<MonitorRenderer> monitorRenderer;
|
||||
private static final ConfigValue<Integer> monitorDistance;
|
||||
|
||||
private static final ForgeConfigSpec serverSpec;
|
||||
private static final ForgeConfigSpec clientSpec;
|
||||
@ -311,6 +312,10 @@ public final class Config
|
||||
.comment( "The renderer to use for monitors. Generally this should be kept at \"best\" - if " +
|
||||
"monitors have performance issues, you may wish to experiment with alternative renderers." )
|
||||
.defineEnum( "monitor_renderer", MonitorRenderer.BEST );
|
||||
monitorDistance = clientBuilder
|
||||
.comment( "The maximum distance monitors will render at. This defaults to the standard tile entity limit, " +
|
||||
"but may be extended if you wish to build larger monitors." )
|
||||
.defineInRange( "monitor_distance", 64, 16, 1024 );
|
||||
clientSpec = clientBuilder.build();
|
||||
}
|
||||
|
||||
@ -379,6 +384,7 @@ public final class Config
|
||||
|
||||
// Client
|
||||
ComputerCraft.monitorRenderer = monitorRenderer.get();
|
||||
ComputerCraft.monitorDistanceSq = monitorDistance.get() * monitorDistance.get();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
@ -688,4 +688,10 @@ public class TileMonitor extends TileGeneric
|
||||
return new AxisAlignedBB( pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1 );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxRenderDistanceSquared()
|
||||
{
|
||||
return ComputerCraft.monitorDistanceSq;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user