Fixed BetterGrass crash

This commit is contained in:
peytonplayz595 2023-09-02 08:27:54 -05:00
parent 4f7f57212d
commit 294ae032ec
2 changed files with 6 additions and 4 deletions

View File

@ -16,9 +16,9 @@ import net.minecraft.world.IBlockAccess;
public class BetterGrass { public class BetterGrass {
private static IBakedModel modelEmpty = new SimpleBakedModel(new ArrayList(), new ArrayList(), false, false, (EaglerTextureAtlasSprite)null, (ItemCameraTransforms)null); private static IBakedModel modelEmpty = new SimpleBakedModel(new ArrayList(), new ArrayList(), false, false, (EaglerTextureAtlasSprite)null, (ItemCameraTransforms)null);
private static IBakedModel modelCubeMycelium = null; private static IBakedModel modelCubeMycelium = BlockModelUtils.makeModelCube((String)"minecraft:blocks/mycelium_top", -1);
private static IBakedModel modelCubeGrassSnowy = null; private static IBakedModel modelCubeGrassSnowy = BlockModelUtils.makeModelCube((String)"minecraft:blocks/snow", -1);
private static IBakedModel modelCubeGrass = null; private static IBakedModel modelCubeGrass = BlockModelUtils.makeModelCube((String)"minecraft:blocks/grass_top", 0);
public static void update() { public static void update() {
modelCubeGrass = BlockModelUtils.makeModelCube((String)"minecraft:blocks/grass_top", 0); modelCubeGrass = BlockModelUtils.makeModelCube((String)"minecraft:blocks/grass_top", 0);

View File

@ -39,7 +39,7 @@ import net.minecraft.entity.player.EnumPlayerModelParts;
import net.minecraft.network.play.client.C15PacketClientSettings; import net.minecraft.network.play.client.C15PacketClientSettings;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.world.EnumDifficulty; import net.minecraft.world.EnumDifficulty;
import net.PeytonPlayz585.shadow.BetterGrass;
import net.PeytonPlayz585.shadow.ClearWater; import net.PeytonPlayz585.shadow.ClearWater;
/**+ /**+
@ -581,6 +581,8 @@ public class GameSettings {
this.ofBetterGrass = 1; this.ofBetterGrass = 1;
} }
BetterGrass.update();
this.mc.renderGlobal.loadRenderers(); this.mc.renderGlobal.loadRenderers();
} }