Solved compiler errors

Apparently "worldobj" was changed into "world" since the last Forge
update?
This commit is contained in:
Mathijs Riezebos 2017-01-11 15:47:37 +01:00
parent 3a282486d3
commit 1bd31a5d82
4 changed files with 18 additions and 18 deletions

View file

@ -93,13 +93,13 @@ public class ClosingRiftFX extends Particle
this.setParticleTextureIndex(this.baseTextureIndex + (7 - this.particleAge * 8 / this.particleMaxAge)); this.setParticleTextureIndex(this.baseTextureIndex + (7 - this.particleAge * 8 / this.particleMaxAge));
// this.motionY -= 0.004D; // 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.motionX *= 0.9100000262260437D;
this.motionY *= 0.9100000262260437D; this.motionY *= 0.9100000262260437D;
this.motionZ *= 0.9100000262260437D; this.motionZ *= 0.9100000262260437D;
if (this.trail && this.particleAge < this.particleMaxAge / 2 && (this.particleAge + this.particleMaxAge) % 2 == 0) { 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.setRBGColorF(this.particleRed, this.particleGreen, this.particleBlue);
var1.particleAge = var1.particleMaxAge / 2; var1.particleAge = var1.particleMaxAge / 2;

View file

@ -43,7 +43,7 @@ public class TileEntityDimDoor extends DDTileEntityBase
@Override @Override
public float[] getRenderColor(Random rand) { public float[] getRenderColor(Random rand) {
float[] rgbaColor = {1,1,1,1}; 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[0] = rand.nextFloat() * 0.5F + 0.4F;
rgbaColor[1] = rand.nextFloat() * 0.05F; rgbaColor[1] = rand.nextFloat() * 0.05F;
rgbaColor[2] = rand.nextFloat() * 0.05F; rgbaColor[2] = rand.nextFloat() * 0.05F;

View file

@ -37,7 +37,7 @@ public class TileEntityRift extends DDTileEntityBase implements ITickable {
@Override @Override
public void update() { public void update() {
if (worldObj.getBlockState(pos).getBlock() != ModBlocks.blockRift) { if (world.getBlockState(pos).getBlock() != ModBlocks.blockRift) {
invalidate(); invalidate();
return; return;
} }
@ -61,10 +61,10 @@ public class TileEntityRift extends DDTileEntityBase implements ITickable {
} }
private void spawnEndermen() { 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 // 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) { if (entity != null && entity instanceof EntityEnderman) {
return; return;
} }
@ -72,16 +72,16 @@ public class TileEntityRift extends DDTileEntityBase implements ITickable {
if (random.nextInt(MAX_ENDERMAN_SPAWNING_CHANCE) < ENDERMAN_SPAWNING_CHANCE) { if (random.nextInt(MAX_ENDERMAN_SPAWNING_CHANCE) < ENDERMAN_SPAWNING_CHANCE) {
// Endermen will only spawn from groups of rifts // Endermen will only spawn from groups of rifts
if (updateNearestRift()) { if (updateNearestRift()) {
List<EntityEnderman> list = worldObj.getEntitiesWithinAABB(EntityEnderman.class, List<EntityEnderman> 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)); new AxisAlignedBB(pos.getX() - 9, pos.getY() - 3, pos.getZ() - 9, pos.getX() + 9, pos.getY() + 3, pos.getZ() + 9));
if (list.isEmpty()) { 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); 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) { 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) { if (player != null) {
enderman.setAttackTarget(player); enderman.setAttackTarget(player);
} }
@ -92,7 +92,7 @@ public class TileEntityRift extends DDTileEntityBase implements ITickable {
} }
private void closeRift() { private void closeRift() {
worldObj.setBlockToAir(pos); world.setBlockToAir(pos);
growth--; growth--;
} }

View file

@ -7,14 +7,14 @@ public class TileEntityTransTrapdoor extends DDTileEntityBase {
@Override @Override
public float[] getRenderColor(Random rand) { public float[] getRenderColor(Random rand) {
float[] rgbaColor = {1,1,1,1}; float[] rgbaColor = {1,1,1,1};
if (this.worldObj.provider.getDimension() == -1) { if (this.world.provider.getDimension() == -1) {
rgbaColor[0] = worldObj.rand.nextFloat() * 0.5F + 0.4F; rgbaColor[0] = world.rand.nextFloat() * 0.5F + 0.4F;
rgbaColor[1] = worldObj.rand.nextFloat() * 0.05F; rgbaColor[1] = world.rand.nextFloat() * 0.05F;
rgbaColor[2] = worldObj.rand.nextFloat() * 0.05F; rgbaColor[2] = world.rand.nextFloat() * 0.05F;
} else { } else {
rgbaColor[0] = worldObj.rand.nextFloat() * 0.5F + 0.1F; rgbaColor[0] = world.rand.nextFloat() * 0.5F + 0.1F;
rgbaColor[1] = worldObj.rand.nextFloat() * 0.4F + 0.4F; rgbaColor[1] = world.rand.nextFloat() * 0.4F + 0.4F;
rgbaColor[2] = worldObj.rand.nextFloat() * 0.6F + 0.5F; rgbaColor[2] = world.rand.nextFloat() * 0.6F + 0.5F;
} }
return rgbaColor; return rgbaColor;
} }