comment out code that isn't currently needed and was causing a crash
This commit is contained in:
@@ -2,9 +2,6 @@ package backsun.lod.proxy;
|
||||
|
||||
import backsun.lod.renderer.LodRenderer;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraftforge.client.event.FOVUpdateEvent;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.event.terraingen.PopulateChunkEvent;
|
||||
@@ -62,28 +59,28 @@ public class ClientProxy extends CommonProxy
|
||||
@SubscribeEvent
|
||||
public void chunkLoadEvent(ChunkEvent event)
|
||||
{
|
||||
Chunk ch = event.getChunk();
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
if(renderer != null && ch != null && renderer.biomes != null && mc.world != null && mc.world.getBiomeProvider() != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(distanceToPlayer(ch.x * 16, 70, ch.z * 16, mc.player.posX, 70, mc.player.posZ) > mc.gameSettings.renderDistanceChunks * 16 * 2)
|
||||
{
|
||||
int biome = Biome.getIdForBiome(ch.getBiome(new BlockPos(ch.x, 70, ch.z), mc.world.getBiomeProvider()));
|
||||
renderer.biomes[ch.x+32][ch.z+32] = biome;
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer.biomes[ch.x+32][ch.z+32] = -1;
|
||||
}
|
||||
}
|
||||
catch(IndexOutOfBoundsException e)
|
||||
{
|
||||
// TODO fix so this isn't needed
|
||||
}
|
||||
|
||||
}
|
||||
// Chunk ch = event.getChunk();
|
||||
// Minecraft mc = Minecraft.getMinecraft();
|
||||
// if(renderer != null && ch != null && renderer.biomes != null && mc.world != null && mc.world.getBiomeProvider() != null)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// if(distanceToPlayer(ch.x * 16, 70, ch.z * 16, mc.player.posX, 70, mc.player.posZ) > mc.gameSettings.renderDistanceChunks * 16 * 2)
|
||||
// {
|
||||
// int biome = Biome.getIdForBiome(ch.getBiome(new BlockPos(ch.x, 70, ch.z), mc.world.getBiomeProvider()));
|
||||
// renderer.biomes[ch.x+32][ch.z+32] = biome;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// renderer.biomes[ch.x+32][ch.z+32] = -1;
|
||||
// }
|
||||
// }
|
||||
// catch(IndexOutOfBoundsException e)
|
||||
// {
|
||||
// // TODO fix so this isn't needed
|
||||
// }
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user