Fix a mistake cause Biome generation crash.

master
mckuhei 2 years ago
parent fd88bbef5b
commit 67c5a63279

@ -16,7 +16,7 @@ public class BiomeCache
/**
* The map of keys to BiomeCacheBlocks. Keys are based on the chunk x, z coordinates as (x | z << 32).
*/
private HashMap cacheMap = new HashMap();
private HashMap<ChunkCoordIntPair, BiomeCacheBlock> cacheMap = new HashMap<>();
/** The list of cached BiomeCacheBlocks */
private List cache = new ArrayList();
@ -32,7 +32,7 @@ public class BiomeCache
public BiomeCacheBlock getBiomeCacheBlock(BigInteger par1, BigInteger par2)
{
BiomeCacheBlock var5 = (BiomeCacheBlock) cacheMap.computeIfAbsent(new ChunkCoordIntPair(par1.shiftRight(4), par2.shiftRight(4)), key -> {
BiomeCacheBlock cache = new BiomeCacheBlock(BiomeCache.this, par1, par2);
BiomeCacheBlock cache = new BiomeCacheBlock(BiomeCache.this, key.chunkXPos, key.chunkZPos);
this.cache.add(cache);
return cache;
});

@ -1025,7 +1025,7 @@ public abstract class EntityPlayer extends EntityLiving implements ICommandSende
this.experienceTotal = par1NBTTagCompound.getInteger("XpTotal");
if(par1NBTTagCompound.hasKey("PosXBig")) {
this.posXBig = par1NBTTagCompound.getBigDecimal("PosXBig");
this.posXBig = par1NBTTagCompound.getBigDecimal("PosXBig");
this.posZBig = par1NBTTagCompound.getBigDecimal("PosZBig");
setPosition(posXBig, posY, posZBig);
}

@ -26,10 +26,10 @@ public class GenLayerIsland extends GenLayer
}
}
// TODO: What the fuck is this???
// if (par1 > -par3 && par1 <= 0 && par2 > -par4 && par2 <= 0)
// {
// var5[-par1 + -par2 * par3] = 1;
// }
if (par1.compareTo(BigInteger.valueOf(-par3)) > 0 && par1.signum() != 1 /*<= 0*/ && par2.compareTo(BigInteger.valueOf(-par4)) > 0 && par2.signum() != 1 /*<= 0*/)
{
var5[-par1.intValueExact() + -par2.intValueExact() * par3] = 1;
}
return var5;
}

Loading…
Cancel
Save