mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 18:13:48 +01:00
Limit the light
This commit is contained in:
parent
c785fe5705
commit
e56da570e8
3 changed files with 13 additions and 2 deletions
|
@ -62,4 +62,8 @@ public abstract class ContraptionLighter<C extends Contraption> implements ILigh
|
||||||
|
|
||||||
return bounds;
|
return bounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GridAlignedBB getBounds() {
|
||||||
|
return bounds;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,9 @@ import static org.lwjgl.opengl.GL20.glUseProgram;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
||||||
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
|
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.backend.Backend;
|
import com.jozufozu.flywheel.backend.Backend;
|
||||||
|
@ -79,7 +82,9 @@ public class ContraptionRenderDispatcher {
|
||||||
if (Minecraft.getInstance().isGamePaused()) return;
|
if (Minecraft.getInstance().isGamePaused()) return;
|
||||||
|
|
||||||
for (RenderedContraption contraption : RENDERERS.values()) {
|
for (RenderedContraption contraption : RENDERERS.values()) {
|
||||||
contraption.getLighter().tick(contraption);
|
ContraptionLighter<?> lighter = contraption.getLighter();
|
||||||
|
if (lighter.getBounds().volume() < AllConfigs.CLIENT.maxContraptionLightVolume.get())
|
||||||
|
lighter.tick(contraption);
|
||||||
|
|
||||||
contraption.kinetics.tick();
|
contraption.kinetics.tick();
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,8 @@ public class CClient extends ConfigBase {
|
||||||
b(true, "enableRainbowDebug", "Show colourful debug information while the F3-Menu is open.");
|
b(true, "enableRainbowDebug", "Show colourful debug information while the F3-Menu is open.");
|
||||||
public ConfigBool experimentalRendering =
|
public ConfigBool experimentalRendering =
|
||||||
b(true, "experimentalRendering", "Use modern OpenGL features to drastically increase performance.");
|
b(true, "experimentalRendering", "Use modern OpenGL features to drastically increase performance.");
|
||||||
|
public ConfigInt maxContraptionLightVolume = i(16384, 0, Integer.MAX_VALUE, "maximumContraptionLightVolume",
|
||||||
|
"The maximum amount of blocks for which to try and calculate dynamic contraption lighting. Decrease if large contraption cause too much lag");
|
||||||
public ConfigInt overlayOffsetX = i(20, Integer.MIN_VALUE, Integer.MAX_VALUE, "overlayOffsetX",
|
public ConfigInt overlayOffsetX = i(20, Integer.MIN_VALUE, Integer.MAX_VALUE, "overlayOffsetX",
|
||||||
"Offset the overlay from goggle- and hover- information by this many pixels on the X axis; Use /create overlay");
|
"Offset the overlay from goggle- and hover- information by this many pixels on the X axis; Use /create overlay");
|
||||||
public ConfigInt overlayOffsetY = i(0, Integer.MIN_VALUE, Integer.MAX_VALUE, "overlayOffsetY",
|
public ConfigInt overlayOffsetY = i(0, Integer.MIN_VALUE, Integer.MAX_VALUE, "overlayOffsetY",
|
||||||
|
|
Loading…
Reference in a new issue