From 1bd31a5d82671117b8374c538f7c0f2f07fa5b0d Mon Sep 17 00:00:00 2001 From: Mathijs Riezebos Date: Wed, 11 Jan 2017 15:47:37 +0100 Subject: [PATCH] Solved compiler errors Apparently "worldobj" was changed into "world" since the last Forge update? --- .../zixiken/dimdoors/client/ClosingRiftFX.java | 4 ++-- .../dimdoors/tileentities/TileEntityDimDoor.java | 2 +- .../dimdoors/tileentities/TileEntityRift.java | 16 ++++++++-------- .../tileentities/TileEntityTransTrapdoor.java | 14 +++++++------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/zixiken/dimdoors/client/ClosingRiftFX.java b/src/main/java/com/zixiken/dimdoors/client/ClosingRiftFX.java index 6319fcad..48e23d53 100644 --- a/src/main/java/com/zixiken/dimdoors/client/ClosingRiftFX.java +++ b/src/main/java/com/zixiken/dimdoors/client/ClosingRiftFX.java @@ -93,13 +93,13 @@ public class ClosingRiftFX extends Particle this.setParticleTextureIndex(this.baseTextureIndex + (7 - this.particleAge * 8 / this.particleMaxAge)); // this.motionY -= 0.004D; - this.moveEntity(this.motionX, this.motionY, this.motionZ); + this.move(this.motionX, this.motionY, this.motionZ); this.motionX *= 0.9100000262260437D; this.motionY *= 0.9100000262260437D; this.motionZ *= 0.9100000262260437D; if (this.trail && this.particleAge < this.particleMaxAge / 2 && (this.particleAge + this.particleMaxAge) % 2 == 0) { - ClosingRiftFX var1 = new ClosingRiftFX(this.worldObj, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D); + ClosingRiftFX var1 = new ClosingRiftFX(this.world, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D); var1.setRBGColorF(this.particleRed, this.particleGreen, this.particleBlue); var1.particleAge = var1.particleMaxAge / 2; diff --git a/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityDimDoor.java b/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityDimDoor.java index 38da9f69..7bce154e 100644 --- a/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityDimDoor.java +++ b/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityDimDoor.java @@ -43,7 +43,7 @@ public class TileEntityDimDoor extends DDTileEntityBase @Override public float[] getRenderColor(Random rand) { float[] rgbaColor = {1,1,1,1}; - if (this.worldObj.provider.getDimension() == -1) { + if (this.world.provider.getDimension() == -1) { rgbaColor[0] = rand.nextFloat() * 0.5F + 0.4F; rgbaColor[1] = rand.nextFloat() * 0.05F; rgbaColor[2] = rand.nextFloat() * 0.05F; diff --git a/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityRift.java b/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityRift.java index 12006263..126e773a 100644 --- a/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityRift.java +++ b/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityRift.java @@ -37,7 +37,7 @@ public class TileEntityRift extends DDTileEntityBase implements ITickable { @Override public void update() { - if (worldObj.getBlockState(pos).getBlock() != ModBlocks.blockRift) { + if (world.getBlockState(pos).getBlock() != ModBlocks.blockRift) { invalidate(); return; } @@ -61,10 +61,10 @@ public class TileEntityRift extends DDTileEntityBase implements ITickable { } private void spawnEndermen() { - if (worldObj.isRemote) return; + if (world.isRemote) return; // Ensure that this rift is only spawning one Enderman at a time, to prevent hordes of Endermen - Entity entity = worldObj.getEntityByID(this.spawnedEndermenID); + Entity entity = world.getEntityByID(this.spawnedEndermenID); if (entity != null && entity instanceof EntityEnderman) { return; } @@ -72,16 +72,16 @@ public class TileEntityRift extends DDTileEntityBase implements ITickable { if (random.nextInt(MAX_ENDERMAN_SPAWNING_CHANCE) < ENDERMAN_SPAWNING_CHANCE) { // Endermen will only spawn from groups of rifts if (updateNearestRift()) { - List list = worldObj.getEntitiesWithinAABB(EntityEnderman.class, + List list = world.getEntitiesWithinAABB(EntityEnderman.class, new AxisAlignedBB(pos.getX() - 9, pos.getY() - 3, pos.getZ() - 9, pos.getX() + 9, pos.getY() + 3, pos.getZ() + 9)); if (list.isEmpty()) { - EntityEnderman enderman = new EntityEnderman(worldObj); + EntityEnderman enderman = new EntityEnderman(world); enderman.setLocationAndAngles(pos.getX() + 0.5, pos.getY() - 1, pos.getZ() + 0.5, 5, 6); - worldObj.spawnEntityInWorld(enderman); + world.spawnEntity(enderman); if (random.nextInt(MAX_HOSTILE_ENDERMAN_CHANCE) < HOSTILE_ENDERMAN_CHANCE) { - EntityPlayer player = this.worldObj.getClosestPlayerToEntity(enderman, 50); + EntityPlayer player = this.world.getClosestPlayerToEntity(enderman, 50); if (player != null) { enderman.setAttackTarget(player); } @@ -92,7 +92,7 @@ public class TileEntityRift extends DDTileEntityBase implements ITickable { } private void closeRift() { - worldObj.setBlockToAir(pos); + world.setBlockToAir(pos); growth--; } diff --git a/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityTransTrapdoor.java b/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityTransTrapdoor.java index c5dc9929..ea54fa45 100644 --- a/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityTransTrapdoor.java +++ b/src/main/java/com/zixiken/dimdoors/tileentities/TileEntityTransTrapdoor.java @@ -7,14 +7,14 @@ public class TileEntityTransTrapdoor extends DDTileEntityBase { @Override public float[] getRenderColor(Random rand) { float[] rgbaColor = {1,1,1,1}; - if (this.worldObj.provider.getDimension() == -1) { - rgbaColor[0] = worldObj.rand.nextFloat() * 0.5F + 0.4F; - rgbaColor[1] = worldObj.rand.nextFloat() * 0.05F; - rgbaColor[2] = worldObj.rand.nextFloat() * 0.05F; + if (this.world.provider.getDimension() == -1) { + rgbaColor[0] = world.rand.nextFloat() * 0.5F + 0.4F; + rgbaColor[1] = world.rand.nextFloat() * 0.05F; + rgbaColor[2] = world.rand.nextFloat() * 0.05F; } else { - rgbaColor[0] = worldObj.rand.nextFloat() * 0.5F + 0.1F; - rgbaColor[1] = worldObj.rand.nextFloat() * 0.4F + 0.4F; - rgbaColor[2] = worldObj.rand.nextFloat() * 0.6F + 0.5F; + rgbaColor[0] = world.rand.nextFloat() * 0.5F + 0.1F; + rgbaColor[1] = world.rand.nextFloat() * 0.4F + 0.4F; + rgbaColor[2] = world.rand.nextFloat() * 0.6F + 0.5F; } return rgbaColor; }