mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-25 06:24:54 +00:00
Fix #19 Transmuting Effect Causes Server Crash
This commit is contained in:
1 parent
2c5e6ca041
commit
8e11456ea3
3 files changed
+17
-17
No files matched your search
@@ -59,14 +59,14 @@ public class AlleleEffectCrumbling extends AlleleEffect
|
||||
{
|
||||
World world = housing.getWorld();
|
||||
// Get random coords within territory
|
||||
int xCoord = (int)(housing.getTerritoryModifier(genome, 1f) * genome.getTerritory()[0]);
|
||||
xCoord = housing.getXCoord() + world.rand.nextInt(xCoord) - xCoord / 2;
|
||||
int yCoord = (int)(housing.getTerritoryModifier(genome, 1f) * genome.getTerritory()[1]);
|
||||
yCoord = housing.getYCoord() + world.rand.nextInt(yCoord) - yCoord / 2;
|
||||
int zCoord = (int)(housing.getTerritoryModifier(genome, 1f) * genome.getTerritory()[0]);
|
||||
zCoord = housing.getZCoord() + world.rand.nextInt(zCoord) - zCoord / 2;
|
||||
int xRange = (int)(housing.getTerritoryModifier(genome, 1f) * genome.getTerritory()[0]);
|
||||
int yRange = (int)(housing.getTerritoryModifier(genome, 1f) * genome.getTerritory()[1]);
|
||||
int zRange = (int)(housing.getTerritoryModifier(genome, 1f) * genome.getTerritory()[2]);
|
||||
|
||||
int xCoord = housing.getXCoord() + world.rand.nextInt(xRange) - xRange / 2;
|
||||
int yCoord = housing.getYCoord() + world.rand.nextInt(yRange) - yRange / 2;
|
||||
int zCoord = housing.getZCoord() + world.rand.nextInt(zRange) - zRange / 2;
|
||||
|
||||
boolean success = false;
|
||||
Block block = world.getBlock(xCoord, yCoord, zCoord);
|
||||
if (block != null)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user