Fix some config checks still using the old fields (#6193)

This commit is contained in:
ichttt 2019-10-15 23:54:47 +02:00 committed by LexManos
parent a8bd5e7ece
commit c98abaaa42
6 changed files with 19 additions and 13 deletions

View File

@ -47,7 +47,7 @@
BlockPos blockpos2 = chunkrender4.func_178568_j().func_177982_a(8, 8, 8);
boolean flag3 = blockpos2.func_177951_i(blockpos1) < 768.0D;
- if (!chunkrender4.func_188281_o() && !flag3) {
+ if (net.minecraftforge.common.ForgeMod.alwaysSetupTerrainOffThread || !chunkrender4.func_188281_o() && !flag3) {
+ if (net.minecraftforge.common.ForgeConfig.CLIENT.alwaysSetupTerrainOffThread.get() || !chunkrender4.func_188281_o() && !flag3) {
this.field_175009_l.add(chunkrender4);
} else {
this.field_72777_q.func_213239_aq().func_76320_a("build near");

View File

@ -255,7 +255,7 @@ public class ForgeHooksClient
skyInit = true;
GameSettings settings = Minecraft.getInstance().gameSettings;
int[] ranges = ForgeMod.blendRanges;
int[] ranges = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34 };
int distance = 0;
if (settings.fancyGraphics && ranges.length > 0)
{

View File

@ -29,6 +29,7 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.ForgeMod;
import net.minecraftforge.fml.loading.FMLConfig;
import net.minecraftforge.versions.forge.ForgeVersion;
import net.minecraftforge.fml.VersionChecker;
import net.minecraftforge.fml.client.ClientModLoader;
@ -66,7 +67,7 @@ public class NotificationModUpdateScreen extends Screen
@Override
public void render(int mouseX, int mouseY, float partialTicks)
{
if (showNotification == null || !showNotification.shouldDraw() || ForgeMod.disableVersionCheck)
if (showNotification == null || !showNotification.shouldDraw() || !FMLConfig.runVersionCheck())
{
return;
}

View File

@ -34,6 +34,7 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.ForgeConfig;
import net.minecraftforge.common.ForgeMod;
import net.minecraftforge.common.model.IModelState;
import net.minecraftforge.common.model.TRSRTransformation;
@ -209,7 +210,7 @@ final class FancyMissingModel implements IUnbakedModel
case HEAD:
break;
case GUI:
if (ForgeMod.zoomInMissingModelTextInGui)
if (ForgeConfig.CLIENT.zoomInMissingModelTextInGui.get())
{
transform = new TRSRTransformation(null, new Quat4f(1, 1, 1, 1), new Vector3f(4, 4, 4), null);
big = false;

View File

@ -32,10 +32,8 @@ import net.minecraft.client.renderer.color.BlockColors;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IEnviromentBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.IWorldReader;
import net.minecraftforge.client.model.data.IModelData;
import net.minecraftforge.common.ForgeMod;
import net.minecraftforge.common.ForgeConfig;
public class ForgeBlockModelRenderer extends BlockModelRenderer
{
@ -54,7 +52,7 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
@Override
public boolean renderModelFlat(IEnviromentBlockReader world, IBakedModel model, BlockState state, BlockPos pos, BufferBuilder buffer, boolean checkSides, Random rand, long seed, IModelData modelData)
{
if(ForgeMod.forgeLightPipelineEnabled)
if(ForgeConfig.CLIENT.forgeLightPipelineEnabled.get())
{
VertexBufferConsumer consumer = consumerFlat.get();
consumer.setBuffer(buffer);
@ -74,7 +72,7 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
@Override
public boolean renderModelSmooth(IEnviromentBlockReader world, IBakedModel model, BlockState state, BlockPos pos, BufferBuilder buffer, boolean checkSides, Random rand, long seed, IModelData modelData)
{
if(ForgeMod.forgeLightPipelineEnabled)
if(ForgeConfig.CLIENT.forgeLightPipelineEnabled.get())
{
VertexBufferConsumer consumer = consumerSmooth.get();
consumer.setBuffer(buffer);

View File

@ -77,13 +77,22 @@ public class ForgeMod implements WorldPersistenceHooks.WorldPersistenceHook
public static final String VERSION_CHECK_CAT = "version_checking";
private static final Logger LOGGER = LogManager.getLogger();
private static final Marker FORGEMOD = MarkerManager.getMarker("FORGEMOD");
//TODO: Remove all of these, use ForgeConfig instead
@Deprecated
public static int[] blendRanges = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34 };
@Deprecated
public static boolean disableVersionCheck = false;
@Deprecated
public static boolean forgeLightPipelineEnabled = true;
@Deprecated
public static boolean zoomInMissingModelTextInGui = false;
@Deprecated
public static boolean disableStairSlabCulling = false; // Also known as the "DontCullStairsBecauseIUseACrappyTexturePackThatBreaksBasicBlockShapesSoICantTrustBasicBlockCulling" flag
@Deprecated
public static boolean alwaysSetupTerrainOffThread = false; // In WorldRenderer.setupTerrain, always force the chunk render updates to be queued to the thread
@Deprecated
public static boolean logCascadingWorldGeneration = true; // see Chunk#logCascadingWorldGeneration()
@Deprecated
public static boolean fixVanillaCascading = false; // There are various places in vanilla that cause cascading worldgen. Enabling this WILL change where blocks are placed to prevent this.
// DO NOT contact Forge about worldgen not 'matching' vanilla if this flag is set.
@ -124,10 +133,7 @@ public class ForgeMod implements WorldPersistenceHooks.WorldPersistenceHook
MinecraftForge.EVENT_BUS.register(MinecraftForge.INTERNAL_HANDLER);
MinecraftForge.EVENT_BUS.register(this);
if (!ForgeMod.disableVersionCheck)
{
VersionChecker.startVersionCheck();
}
VersionChecker.startVersionCheck();
/*
* We can't actually add any of these, because vanilla clients will choke on unknown argument types