mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 19:05:16 +00:00
Shotgun tile.getWorldObj into tile.getWorld. May cause some individual errors but fix later
This commit is contained in:
1 parent
f6cfeedd1d
commit
67d5d65902
72 files changed
+231
-231
No files matched your search
@@ -237,7 +237,7 @@ public final class CorporeaHelper {
|
||||
return null;
|
||||
|
||||
TileEntity tile = (TileEntity) inv;
|
||||
return getSparkForBlock(tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord);
|
||||
return getSparkForBlock(tile.getWorld(), tile.xCoord, tile.yCoord, tile.zCoord);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.world.World;
|
||||
public final class VanillaPacketDispatcher {
|
||||
|
||||
public static void dispatchTEToNearbyPlayers(TileEntity tile) {
|
||||
World world = tile.getWorldObj();
|
||||
World world = tile.getWorld();
|
||||
List players = world.playerEntities;
|
||||
for(Object player : players)
|
||||
if(player instanceof EntityPlayerMP) {
|
||||
|
||||
@@ -73,16 +73,16 @@ public class SubTileFunctional extends SubTileEntity {
|
||||
if(acceptsRedstone()) {
|
||||
redstoneSignal = 0;
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
int redstoneSide = supertile.getWorldObj().getIndirectPowerLevelTo(supertile.xCoord + dir.offsetX, supertile.yCoord + dir.offsetY, supertile.zCoord + dir.offsetZ, dir.ordinal());
|
||||
int redstoneSide = supertile.getWorld().getIndirectPowerLevelTo(supertile.xCoord + dir.offsetX, supertile.yCoord + dir.offsetY, supertile.zCoord + dir.offsetZ, dir.ordinal());
|
||||
redstoneSignal = Math.max(redstoneSignal, redstoneSide);
|
||||
}
|
||||
}
|
||||
|
||||
if(supertile.getWorldObj().isRemote) {
|
||||
if(supertile.getWorld().isRemote) {
|
||||
double particleChance = 1F - (double) mana / (double) getMaxMana() / 3.5F;
|
||||
Color color = new Color(getColor());
|
||||
if(Math.random() > particleChance)
|
||||
BotaniaAPI.internalHandler.sparkleFX(supertile.getWorldObj(), supertile.xCoord + 0.3 + Math.random() * 0.5, supertile.yCoord + 0.5 + Math.random() * 0.5, supertile.zCoord + 0.3 + Math.random() * 0.5, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random(), 5);
|
||||
BotaniaAPI.internalHandler.sparkleFX(supertile.getWorld(), supertile.xCoord + 0.3 + Math.random() * 0.5, supertile.yCoord + 0.5 + Math.random() * 0.5, supertile.zCoord + 0.3 + Math.random() * 0.5, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random(), 5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,9 +93,9 @@ public class SubTileFunctional extends SubTileEntity {
|
||||
|
||||
if(cachedPoolCoordinates != null) {
|
||||
needsNew = false;
|
||||
if(supertile.getWorldObj().blockExists(cachedPoolCoordinates.posX, cachedPoolCoordinates.posY, cachedPoolCoordinates.posZ)) {
|
||||
if(supertile.getWorld().blockExists(cachedPoolCoordinates.posX, cachedPoolCoordinates.posY, cachedPoolCoordinates.posZ)) {
|
||||
needsNew = true;
|
||||
TileEntity tileAt = supertile.getWorldObj().getTileEntity(cachedPoolCoordinates.posX, cachedPoolCoordinates.posY, cachedPoolCoordinates.posZ);
|
||||
TileEntity tileAt = supertile.getWorld().getTileEntity(cachedPoolCoordinates.posX, cachedPoolCoordinates.posY, cachedPoolCoordinates.posZ);
|
||||
if(tileAt != null && tileAt instanceof IManaPool && !tileAt.isInvalid()) {
|
||||
linkedPool = tileAt;
|
||||
needsNew = false;
|
||||
@@ -104,17 +104,17 @@ public class SubTileFunctional extends SubTileEntity {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
TileEntity tileAt = supertile.getWorldObj().getTileEntity(linkedPool.xCoord, linkedPool.yCoord, linkedPool.zCoord);
|
||||
TileEntity tileAt = supertile.getWorld().getTileEntity(linkedPool.xCoord, linkedPool.yCoord, linkedPool.zCoord);
|
||||
if(tileAt != null && tileAt instanceof IManaPool)
|
||||
linkedPool = tileAt;
|
||||
}
|
||||
|
||||
if(needsNew && ticksExisted == 1) { // Only for new flowers
|
||||
IManaNetwork network = BotaniaAPI.internalHandler.getManaNetworkInstance();
|
||||
int size = network.getAllPoolsInWorld(supertile.getWorldObj()).size();
|
||||
int size = network.getAllPoolsInWorld(supertile.getWorld()).size();
|
||||
if(BotaniaAPI.internalHandler.shouldForceCheck() || size != sizeLastCheck) {
|
||||
ChunkCoordinates coords = new ChunkCoordinates(supertile.xCoord, supertile.yCoord, supertile.zCoord);
|
||||
linkedPool = network.getClosestPool(coords, supertile.getWorldObj(), RANGE);
|
||||
linkedPool = network.getClosestPool(coords, supertile.getWorld(), RANGE);
|
||||
sizeLastCheck = size;
|
||||
}
|
||||
}
|
||||
@@ -207,7 +207,7 @@ public class SubTileFunctional extends SubTileEntity {
|
||||
}
|
||||
|
||||
public boolean isValidBinding() {
|
||||
return linkedPool != null && !linkedPool.isInvalid() && supertile.getWorldObj().getTileEntity(linkedPool.xCoord, linkedPool.yCoord, linkedPool.zCoord) == linkedPool;
|
||||
return linkedPool != null && !linkedPool.isInvalid() && supertile.getWorld().getTileEntity(linkedPool.xCoord, linkedPool.yCoord, linkedPool.zCoord) == linkedPool;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -71,7 +71,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
|
||||
if(canGeneratePassively()) {
|
||||
int delay = getDelayBetweenPassiveGeneration();
|
||||
if(delay > 0 && ticksExisted % delay == 0 && !supertile.getWorldObj().isRemote) {
|
||||
if(delay > 0 && ticksExisted % delay == 0 && !supertile.getWorld().isRemote) {
|
||||
if(shouldSyncPassiveGeneration())
|
||||
sync();
|
||||
addMana(getValueForPassiveGeneration());
|
||||
@@ -82,27 +82,27 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
if(acceptsRedstone()) {
|
||||
redstoneSignal = 0;
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
int redstoneSide = supertile.getWorldObj().getIndirectPowerLevelTo(supertile.xCoord + dir.offsetX, supertile.yCoord + dir.offsetY, supertile.zCoord + dir.offsetZ, dir.ordinal());
|
||||
int redstoneSide = supertile.getWorld().getIndirectPowerLevelTo(supertile.xCoord + dir.offsetX, supertile.yCoord + dir.offsetY, supertile.zCoord + dir.offsetZ, dir.ordinal());
|
||||
redstoneSignal = Math.max(redstoneSignal, redstoneSide);
|
||||
}
|
||||
}
|
||||
|
||||
if(supertile.getWorldObj().isRemote) {
|
||||
if(supertile.getWorld().isRemote) {
|
||||
double particleChance = 1F - (double) mana / (double) getMaxMana() / 3.5F;
|
||||
Color color = new Color(getColor());
|
||||
if(Math.random() > particleChance)
|
||||
BotaniaAPI.internalHandler.sparkleFX(supertile.getWorldObj(), supertile.xCoord + 0.3 + Math.random() * 0.5, supertile.yCoord + 0.5 + Math.random() * 0.5, supertile.zCoord + 0.3 + Math.random() * 0.5, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random(), 5);
|
||||
BotaniaAPI.internalHandler.sparkleFX(supertile.getWorld(), supertile.xCoord + 0.3 + Math.random() * 0.5, supertile.yCoord + 0.5 + Math.random() * 0.5, supertile.zCoord + 0.3 + Math.random() * 0.5, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random(), 5);
|
||||
}
|
||||
|
||||
boolean passive = isPassiveFlower();
|
||||
if(!supertile.getWorldObj().isRemote) {
|
||||
if(!supertile.getWorld().isRemote) {
|
||||
int muhBalance = BotaniaAPI.internalHandler.getPassiveFlowerDecay();
|
||||
|
||||
if(passive && muhBalance > 0 && passiveDecayTicks > muhBalance) {
|
||||
supertile.getWorldObj().playAuxSFX(2001, supertile.xCoord, supertile.yCoord, supertile.zCoord, Block.getIdFromBlock(supertile.getBlockType()));
|
||||
if(supertile.getWorldObj().getBlock(supertile.xCoord, supertile.yCoord - 1, supertile.zCoord).isSideSolid(supertile.getWorldObj(), supertile.xCoord, supertile.yCoord - 1, supertile.zCoord, ForgeDirection.UP))
|
||||
supertile.getWorldObj().setBlock(supertile.xCoord, supertile.yCoord, supertile.zCoord, Blocks.deadbush);
|
||||
else supertile.getWorldObj().setBlockToAir(supertile.xCoord, supertile.yCoord, supertile.zCoord);
|
||||
supertile.getWorld().playAuxSFX(2001, supertile.xCoord, supertile.yCoord, supertile.zCoord, Block.getIdFromBlock(supertile.getBlockType()));
|
||||
if(supertile.getWorld().getBlock(supertile.xCoord, supertile.yCoord - 1, supertile.zCoord).isSideSolid(supertile.getWorld(), supertile.xCoord, supertile.yCoord - 1, supertile.zCoord, ForgeDirection.UP))
|
||||
supertile.getWorld().setBlock(supertile.xCoord, supertile.yCoord, supertile.zCoord, Blocks.deadbush);
|
||||
else supertile.getWorld().setBlockToAir(supertile.xCoord, supertile.yCoord, supertile.zCoord);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,9 +117,9 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
|
||||
if(cachedCollectorCoordinates != null) {
|
||||
needsNew = false;
|
||||
if(supertile.getWorldObj().blockExists(cachedCollectorCoordinates.posX, cachedCollectorCoordinates.posY, cachedCollectorCoordinates.posZ)) {
|
||||
if(supertile.getWorld().blockExists(cachedCollectorCoordinates.posX, cachedCollectorCoordinates.posY, cachedCollectorCoordinates.posZ)) {
|
||||
needsNew = true;
|
||||
TileEntity tileAt = supertile.getWorldObj().getTileEntity(cachedCollectorCoordinates.posX, cachedCollectorCoordinates.posY, cachedCollectorCoordinates.posZ);
|
||||
TileEntity tileAt = supertile.getWorld().getTileEntity(cachedCollectorCoordinates.posX, cachedCollectorCoordinates.posY, cachedCollectorCoordinates.posZ);
|
||||
if(tileAt != null && tileAt instanceof IManaCollector && !tileAt.isInvalid()) {
|
||||
linkedCollector = tileAt;
|
||||
needsNew = false;
|
||||
@@ -128,17 +128,17 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
TileEntity tileAt = supertile.getWorldObj().getTileEntity(linkedCollector.xCoord, linkedCollector.yCoord, linkedCollector.zCoord);
|
||||
TileEntity tileAt = supertile.getWorld().getTileEntity(linkedCollector.xCoord, linkedCollector.yCoord, linkedCollector.zCoord);
|
||||
if(tileAt != null && tileAt instanceof IManaCollector)
|
||||
linkedCollector = tileAt;
|
||||
}
|
||||
|
||||
if(needsNew && ticksExisted == 1) { // New flowers only
|
||||
IManaNetwork network = BotaniaAPI.internalHandler.getManaNetworkInstance();
|
||||
int size = network.getAllCollectorsInWorld(supertile.getWorldObj()).size();
|
||||
int size = network.getAllCollectorsInWorld(supertile.getWorld()).size();
|
||||
if(BotaniaAPI.internalHandler.shouldForceCheck() || size != sizeLastCheck) {
|
||||
ChunkCoordinates coords = new ChunkCoordinates(supertile.xCoord, supertile.yCoord, supertile.zCoord);
|
||||
linkedCollector = network.getClosestCollector(coords, supertile.getWorldObj(), RANGE);
|
||||
linkedCollector = network.getClosestCollector(coords, supertile.getWorld(), RANGE);
|
||||
sizeLastCheck = size;
|
||||
}
|
||||
}
|
||||
@@ -298,7 +298,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
|
||||
|
||||
public boolean isValidBinding() {
|
||||
return linkedCollector != null && !linkedCollector.isInvalid() && supertile.getWorldObj().getTileEntity(linkedCollector.xCoord, linkedCollector.yCoord, linkedCollector.zCoord) == linkedCollector;
|
||||
return linkedCollector != null && !linkedCollector.isInvalid() && supertile.getWorld().getTileEntity(linkedCollector.xCoord, linkedCollector.yCoord, linkedCollector.zCoord) == linkedCollector;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -51,7 +51,7 @@ public class RenderTileAvatar extends TileEntitySpecialRenderer {
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
int meta = avatar.getWorldObj() != null ? avatar.getBlockMetadata() : 0;
|
||||
int meta = avatar.getWorld() != null ? avatar.getBlockMetadata() : 0;
|
||||
|
||||
GL11.glTranslatef(0.5F, 1.6F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
|
||||
@@ -41,7 +41,7 @@ public class RenderTileBellows extends TileEntitySpecialRenderer {
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
int meta = bellows.getWorldObj() != null ? bellows.getBlockMetadata() : 0;
|
||||
int meta = bellows.getWorld() != null ? bellows.getBlockMetadata() : 0;
|
||||
|
||||
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
|
||||
@@ -71,7 +71,7 @@ public class RenderTileBrewery extends TileEntitySpecialRenderer {
|
||||
float s = 0.25F;
|
||||
GL11.glScalef(s, s, s);
|
||||
GL11.glScalef(2F, 2F, 2F);
|
||||
if(!ForgeHooksClient.renderEntityItem(new EntityItem(brewery.getWorldObj(), brewery.xCoord, brewery.yCoord, brewery.zCoord, stack), stack, 0F, 0F, brewery.getWorldObj().rand, mc.renderEngine, RenderBlocks.getInstance(), 1)) {
|
||||
if(!ForgeHooksClient.renderEntityItem(new EntityItem(brewery.getWorld(), brewery.xCoord, brewery.yCoord, brewery.zCoord, stack), stack, 0F, 0F, brewery.getWorld().rand, mc.renderEngine, RenderBlocks.getInstance(), 1)) {
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
if(stack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(stack.getItem()).getRenderType())) {
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
|
||||
@@ -40,14 +40,14 @@ public class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer {
|
||||
TileCorporeaCrystalCube cube = (TileCorporeaCrystalCube) tileentity;
|
||||
|
||||
if(entity == null)
|
||||
entity = new EntityItem(cube.getWorldObj(), cube.xCoord, cube.yCoord, cube.zCoord, new ItemStack(Blocks.stone));
|
||||
entity = new EntityItem(cube.getWorld(), cube.xCoord, cube.yCoord, cube.zCoord, new ItemStack(Blocks.stone));
|
||||
|
||||
entity.age = ClientTickHandler.ticksInGame;
|
||||
ItemStack stack = cube.getRequestTarget();
|
||||
entity.setEntityItemStack(stack);
|
||||
|
||||
double time = ClientTickHandler.ticksInGame + f;
|
||||
double worldTicks = tileentity.getWorldObj() == null ? 0 : time;
|
||||
double worldTicks = tileentity.getWorld() == null ? 0 : time;
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
@@ -48,7 +48,7 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer {
|
||||
|
||||
if(enchanter.itemToEnchant != null) {
|
||||
if(item == null)
|
||||
item = new EntityItem(enchanter.getWorldObj(), enchanter.xCoord, enchanter.yCoord + 1, enchanter.zCoord, enchanter.itemToEnchant);
|
||||
item = new EntityItem(enchanter.getWorld(), enchanter.xCoord, enchanter.yCoord + 1, enchanter.zCoord, enchanter.itemToEnchant);
|
||||
|
||||
item.age = ClientTickHandler.ticksInGame;
|
||||
item.setEntityItemStack(enchanter.itemToEnchant);
|
||||
|
||||
@@ -38,15 +38,15 @@ public class RenderTileFloatingFlower extends TileEntitySpecialRenderer {
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
|
||||
double worldTime = tile.getWorldObj() == null ? 0 : (double) (ClientTickHandler.ticksInGame + t);
|
||||
if(tile.getWorldObj() != null)
|
||||
double worldTime = tile.getWorld() == null ? 0 : (double) (ClientTickHandler.ticksInGame + t);
|
||||
if(tile.getWorld() != null)
|
||||
worldTime += new Random(tile.xCoord ^ tile.yCoord ^ tile.zCoord).nextInt(1000);
|
||||
|
||||
GL11.glTranslatef(0.5F, 0F, 0.5F);
|
||||
GL11.glRotatef(-((float) worldTime * 0.5F), 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.5F, 0F, -0.5F);
|
||||
|
||||
if(tile.getWorldObj() != null) {
|
||||
if(tile.getWorld() != null) {
|
||||
GL11.glTranslatef(0F, (float) Math.sin(worldTime * 0.05F) * 0.1F, 0F);
|
||||
GL11.glRotatef(4F * (float) Math.sin(worldTime * 0.04F), 1F, 0F, 0F);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class RenderTileHourglass extends TileEntitySpecialRenderer {
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
|
||||
int wtime = tileentity.getWorldObj() == null ? 0 : ClientTickHandler.ticksInGame;
|
||||
int wtime = tileentity.getWorld() == null ? 0 : ClientTickHandler.ticksInGame;
|
||||
if(wtime != 0)
|
||||
wtime += new Random(tileentity.xCoord ^ tileentity.yCoord ^ tileentity.zCoord).nextInt(360);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public class RenderTileIncensePlate extends TileEntitySpecialRenderer {
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float ticks) {
|
||||
TileIncensePlate plate = (TileIncensePlate) tileentity;
|
||||
|
||||
int meta = plate.getWorldObj() != null ? plate.getBlockMetadata() : 0;
|
||||
int meta = plate.getWorld() != null ? plate.getBlockMetadata() : 0;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
@@ -57,8 +57,8 @@ public class RenderTilePool extends TileEntitySpecialRenderer {
|
||||
float a = MultiblockRenderHandler.rendering ? 0.6F : 1F;
|
||||
GL11.glColor4f(1F, 1F, 1F, a);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
boolean inf = tileentity.getWorldObj() == null ? forceMeta == 1 : tileentity.getBlockMetadata() == 1;
|
||||
boolean dil = tileentity.getWorldObj() == null ? forceMeta == 2 : tileentity.getBlockMetadata() == 2;
|
||||
boolean inf = tileentity.getWorld() == null ? forceMeta == 1 : tileentity.getBlockMetadata() == 1;
|
||||
boolean dil = tileentity.getWorld() == null ? forceMeta == 2 : tileentity.getBlockMetadata() == 2;
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(inf ? textureInf : dil ? textureDil : texture);
|
||||
|
||||
@@ -89,10 +89,10 @@ public class RenderTilePool extends TileEntitySpecialRenderer {
|
||||
float v = 1F / 8F;
|
||||
float w = -v * 3.5F;
|
||||
|
||||
if(pool.getWorldObj() != null) {
|
||||
Block below = pool.getWorldObj().getBlock(pool.xCoord, pool.yCoord - 1, pool.zCoord);
|
||||
if(pool.getWorld() != null) {
|
||||
Block below = pool.getWorld().getBlock(pool.xCoord, pool.yCoord - 1, pool.zCoord);
|
||||
if(below instanceof IPoolOverlayProvider) {
|
||||
IIcon overlay = ((IPoolOverlayProvider) below).getIcon(pool.getWorldObj(), pool.xCoord, pool.yCoord - 1, pool.zCoord);
|
||||
IIcon overlay = ((IPoolOverlayProvider) below).getIcon(pool.getWorld(), pool.xCoord, pool.yCoord - 1, pool.zCoord);
|
||||
if(overlay != null) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
|
||||
@@ -41,7 +41,7 @@ public class RenderTilePump extends TileEntitySpecialRenderer {
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
int meta = pump.getWorldObj() != null ? pump.getBlockMetadata() : 0;
|
||||
int meta = pump.getWorld() != null ? pump.getBlockMetadata() : 0;
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class RenderTilePylon extends TileEntitySpecialRenderer {
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
float a = MultiblockRenderHandler.rendering ? 0.6F : 1F;
|
||||
GL11.glColor4f(1F, 1F, 1F, a);
|
||||
if(tileentity.getWorldObj() != null) {
|
||||
if(tileentity.getWorld() != null) {
|
||||
green = tileentity.getBlockMetadata() == 1;
|
||||
pink = tileentity.getBlockMetadata() == 2;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class RenderTilePylon extends TileEntitySpecialRenderer {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(pink ? texturePinkOld : green ? textureGreenOld : textureOld);
|
||||
else Minecraft.getMinecraft().renderEngine.bindTexture(pink ? texturePink : green ? textureGreen : texture);
|
||||
|
||||
double worldTime = tileentity.getWorldObj() == null ? 0 : (double) (ClientTickHandler.ticksInGame + pticks);
|
||||
double worldTime = tileentity.getWorld() == null ? 0 : (double) (ClientTickHandler.ticksInGame + pticks);
|
||||
|
||||
if(tileentity != null)
|
||||
worldTime += new Random(tileentity.xCoord ^ tileentity.yCoord ^ tileentity.zCoord).nextInt(360);
|
||||
|
||||
@@ -74,7 +74,7 @@ public class RenderTileRuneAltar extends TileEntitySpecialRenderer {
|
||||
mc.renderEngine.bindTexture(stack.getItem() instanceof ItemBlock ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture);
|
||||
|
||||
GL11.glScalef(2F, 2F, 2F);
|
||||
if(!ForgeHooksClient.renderEntityItem(new EntityItem(altar.getWorldObj(), altar.xCoord, altar.yCoord, altar.zCoord, stack), stack, 0F, 0F, altar.getWorldObj().rand, mc.renderEngine, renderBlocks, 1)) {
|
||||
if(!ForgeHooksClient.renderEntityItem(new EntityItem(altar.getWorld(), altar.xCoord, altar.yCoord, altar.zCoord, stack), stack, 0F, 0F, altar.getWorld().rand, mc.renderEngine, renderBlocks, 1)) {
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
if(stack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(stack.getItem()).getRenderType())) {
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
|
||||
@@ -77,7 +77,7 @@ public class RenderTileSpreader extends TileEntitySpecialRenderer {
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
double worldTicks = tileentity.getWorldObj() == null ? 0 : time;
|
||||
double worldTicks = tileentity.getWorld() == null ? 0 : time;
|
||||
GL11.glRotatef((float) worldTicks % 360, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(0F, (float) Math.sin(worldTicks / 20.0) * 0.05F, 0F);
|
||||
model.renderCube();
|
||||
|
||||
@@ -43,7 +43,7 @@ public class RenderTileTeruTeruBozu extends TileEntitySpecialRenderer {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ClientProxy.dootDoot ? textureHalloween : texture);
|
||||
GL11.glRotatef(180F, 1F, 0F, 0F);
|
||||
double time = Botania.proxy.getWorldElapsedTicks() + f;
|
||||
boolean hasWorld = tileentity.getWorldObj() != null;
|
||||
boolean hasWorld = tileentity.getWorld() != null;
|
||||
if(hasWorld)
|
||||
time += new Random(tileentity.xCoord ^ tileentity.yCoord ^ tileentity.zCoord).nextInt(1000);
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
|
||||
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
int meta = potato.getWorldObj() == null ? 3 : potato.getBlockMetadata();
|
||||
int meta = potato.getWorld() == null ? 3 : potato.getBlockMetadata();
|
||||
float rotY = meta * 90F - 180F;
|
||||
GL11.glRotatef(rotY, 0F, 1F, 0F);
|
||||
|
||||
|
||||
@@ -29,14 +29,14 @@ public class SubTileManastar extends SubTileEntity {
|
||||
|
||||
int mana = 0;
|
||||
for(ForgeDirection dir : LibMisc.CARDINAL_DIRECTIONS) {
|
||||
TileEntity tile = supertile.getWorldObj().getTileEntity(supertile.xCoord + dir.offsetX, supertile.yCoord, supertile.zCoord + dir.offsetZ);
|
||||
TileEntity tile = supertile.getWorld().getTileEntity(supertile.xCoord + dir.offsetX, supertile.yCoord, supertile.zCoord + dir.offsetZ);
|
||||
if(tile instanceof IManaPool)
|
||||
mana += ((IManaPool) tile).getCurrentMana();
|
||||
}
|
||||
|
||||
if(manaLastTick != -1 && mana != manaLastTick && Math.random() > 0.6) {
|
||||
boolean more = mana > manaLastTick;
|
||||
Botania.proxy.wispFX(supertile.getWorldObj(), supertile.xCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.75 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5, more ? 0.05F : 1F, 0.05F, more ? 1F : 0.05F, (float) Math.random() / 7, (float) -Math.random() / 50);
|
||||
Botania.proxy.wispFX(supertile.getWorld(), supertile.xCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.75 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5, more ? 0.05F : 1F, 0.05F, more ? 1F : 0.05F, (float) Math.random() / 7, (float) -Math.random() / 50);
|
||||
}
|
||||
|
||||
if(ticksExisted % 60 == 0)
|
||||
|
||||
@@ -52,7 +52,7 @@ public class SubTilePureDaisy extends SubTileEntity {
|
||||
|
||||
int[] acoords = POSITIONS[positionAt];
|
||||
ChunkCoordinates coords = new ChunkCoordinates(supertile.xCoord + acoords[0], supertile.yCoord + acoords[1], supertile.zCoord + acoords[2]);
|
||||
World world = supertile.getWorldObj();
|
||||
World world = supertile.getWorld();
|
||||
if(!world.isAirBlock(coords.posX, coords.posY, coords.posZ)) {
|
||||
Block block = world.getBlock(coords.posX, coords.posY, coords.posZ);
|
||||
int meta = world.getBlockMetadata(coords.posX, coords.posY, coords.posZ);
|
||||
@@ -67,7 +67,7 @@ public class SubTilePureDaisy extends SubTileEntity {
|
||||
if(recipe != null) {
|
||||
ticksRemaining[positionAt] = ticksRemaining[positionAt] - 1;
|
||||
|
||||
Botania.proxy.sparkleFX(supertile.getWorldObj(), coords.posX + Math.random(), coords.posY + Math.random(), coords.posZ + Math.random(), 1F, 1F, 1F, (float) Math.random(), 5);
|
||||
Botania.proxy.sparkleFX(supertile.getWorld(), coords.posX + Math.random(), coords.posY + Math.random(), coords.posZ + Math.random(), 1F, 1F, 1F, (float) Math.random(), 5);
|
||||
|
||||
if(ticksRemaining[positionAt] <= 0) {
|
||||
ticksRemaining[positionAt] = 200;
|
||||
@@ -78,10 +78,10 @@ public class SubTilePureDaisy extends SubTileEntity {
|
||||
double y = coords.posY + Math.random() + 0.5;
|
||||
double z = coords.posZ + Math.random();
|
||||
|
||||
Botania.proxy.wispFX(supertile.getWorldObj(), x, y, z, 1F, 1F, 1F, (float) Math.random() / 2F);
|
||||
Botania.proxy.wispFX(supertile.getWorld(), x, y, z, 1F, 1F, 1F, (float) Math.random() / 2F);
|
||||
}
|
||||
if(ConfigHandler.blockBreakParticles)
|
||||
supertile.getWorldObj().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(recipe.getOutput()) + (recipe.getOutputMeta() << 12));
|
||||
supertile.getWorld().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(recipe.getOutput()) + (recipe.getOutputMeta() << 12));
|
||||
}
|
||||
}
|
||||
} else ticksRemaining[positionAt] = 200;
|
||||
@@ -97,7 +97,7 @@ public class SubTilePureDaisy extends SubTileEntity {
|
||||
public void readFromPacketNBT(NBTTagCompound cmp) {
|
||||
positionAt = cmp.getInteger(TAG_POSITION);
|
||||
|
||||
if(supertile.getWorldObj() != null && !supertile.getWorldObj().isRemote)
|
||||
if(supertile.getWorld() != null && !supertile.getWorld().isRemote)
|
||||
for(int i = 0; i < ticksRemaining.length; i++)
|
||||
ticksRemaining[i] = cmp.getInteger(TAG_TICKS_REMAINING + i);
|
||||
}
|
||||
|
||||
+9
-9
@@ -34,22 +34,22 @@ public class SubTileAgricarnation extends SubTileFunctional {
|
||||
|
||||
if(ticksExisted % 6 == 0 && redstoneSignal == 0) {
|
||||
int range = getRange();
|
||||
int x = supertile.xCoord + supertile.getWorldObj().rand.nextInt(range * 2 + 1) - range;
|
||||
int z = supertile.zCoord + supertile.getWorldObj().rand.nextInt(range * 2 + 1) - range;
|
||||
int x = supertile.xCoord + supertile.getWorld().rand.nextInt(range * 2 + 1) - range;
|
||||
int z = supertile.zCoord + supertile.getWorld().rand.nextInt(range * 2 + 1) - range;
|
||||
|
||||
for(int i = 4; i > -2; i--) {
|
||||
int y = supertile.yCoord + i;
|
||||
|
||||
if(supertile.getWorldObj().isAirBlock(x, y, z))
|
||||
if(supertile.getWorld().isAirBlock(x, y, z))
|
||||
continue;
|
||||
|
||||
if(isPlant(x, y, z) && mana > 5) {
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
Block block = supertile.getWorld().getBlock(x, y, z);
|
||||
mana -= 5;
|
||||
supertile.getWorldObj().scheduleBlockUpdate(x, y, z, block, 1);
|
||||
supertile.getWorld().scheduleBlockUpdate(x, y, z, block, 1);
|
||||
if(ConfigHandler.blockBreakParticles)
|
||||
supertile.getWorldObj().playAuxSFX(2005, x, y, z, 6 + supertile.getWorldObj().rand.nextInt(4));
|
||||
supertile.getWorldObj().playSoundEffect(x, y, z, "botania:agricarnation", 0.1F, 0.5F + (float) Math.random() * 0.5F);
|
||||
supertile.getWorld().playAuxSFX(2005, x, y, z, 6 + supertile.getWorld().rand.nextInt(4));
|
||||
supertile.getWorld().playSoundEffect(x, y, z, "botania:agricarnation", 0.1F, 0.5F + (float) Math.random() * 0.5F);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -63,12 +63,12 @@ public class SubTileAgricarnation extends SubTileFunctional {
|
||||
}
|
||||
|
||||
boolean isPlant(int x, int y, int z) {
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
Block block = supertile.getWorld().getBlock(x, y, z);
|
||||
if(block == Blocks.grass || block == Blocks.leaves || block == Blocks.leaves2 || block instanceof BlockBush && !(block instanceof BlockCrops) && !(block instanceof BlockSapling))
|
||||
return false;
|
||||
|
||||
Material mat = block.getMaterial();
|
||||
return mat != null && (mat == Material.plants || mat == Material.cactus || mat == Material.grass || mat == Material.leaves || mat == Material.gourd) && block instanceof IGrowable && ((IGrowable) block).func_149851_a(supertile.getWorldObj(), x, y, z, supertile.getWorldObj().isRemote);
|
||||
return mat != null && (mat == Material.plants || mat == Material.cactus || mat == Material.grass || mat == Material.leaves || mat == Material.gourd) && block instanceof IGrowable && ((IGrowable) block).func_149851_a(supertile.getWorld(), x, y, z, supertile.getWorld().isRemote);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -49,7 +49,7 @@ public class SubTileBellethorn extends SubTileFunctional {
|
||||
|
||||
if(ticksExisted % 5 == 0) {
|
||||
int range = getRange();
|
||||
List<EntityLivingBase> entities = supertile.getWorldObj().getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(supertile.xCoord - range, supertile.yCoord, supertile.zCoord - range, supertile.xCoord + range + 1, supertile.yCoord + 1, supertile.zCoord + range + 1));
|
||||
List<EntityLivingBase> entities = supertile.getWorld().getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(supertile.xCoord - range, supertile.yCoord, supertile.zCoord - range, supertile.xCoord + range + 1, supertile.yCoord + 1, supertile.zCoord + range + 1));
|
||||
IEntitySelector selector = getSelector();
|
||||
|
||||
for(EntityLivingBase entity : entities) {
|
||||
|
||||
@@ -47,10 +47,10 @@ public class SubTileBubbell extends SubTileFunctional {
|
||||
for(int j = -range; j < range + 1; j++)
|
||||
for(int k = -range; k < range + 1; k++)
|
||||
if(MathHelper.pointDistanceSpace(i, j, k, 0, 0, 0) < range) {
|
||||
Block block = supertile.getWorldObj().getBlock(supertile.xCoord + i, supertile.yCoord + j, supertile.zCoord + k);
|
||||
Block block = supertile.getWorld().getBlock(supertile.xCoord + i, supertile.yCoord + j, supertile.zCoord + k);
|
||||
if(block.getMaterial() == Material.water) {
|
||||
supertile.getWorldObj().setBlock(supertile.xCoord + i, supertile.yCoord + j, supertile.zCoord + k, ModBlocks.fakeAir, 0, 2);
|
||||
TileFakeAir air = (TileFakeAir) supertile.getWorldObj().getTileEntity(supertile.xCoord + i, supertile.yCoord + j, supertile.zCoord + k);
|
||||
supertile.getWorld().setBlock(supertile.xCoord + i, supertile.yCoord + j, supertile.zCoord + k, ModBlocks.fakeAir, 0, 2);
|
||||
TileFakeAir air = (TileFakeAir) supertile.getWorld().getTileEntity(supertile.xCoord + i, supertile.yCoord + j, supertile.zCoord + k);
|
||||
air.setFlower(supertile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,16 +33,16 @@ public class SubTileClayconia extends SubTileFunctional {
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(!supertile.getWorldObj().isRemote && ticksExisted % 5 == 0) {
|
||||
if(!supertile.getWorld().isRemote && ticksExisted % 5 == 0) {
|
||||
int manaCost = 80;
|
||||
if(mana >= manaCost) {
|
||||
ChunkCoordinates coords = getCoordsToPut();
|
||||
if(coords != null) {
|
||||
supertile.getWorldObj().setBlockToAir(coords.posX, coords.posY, coords.posZ);
|
||||
supertile.getWorld().setBlockToAir(coords.posX, coords.posY, coords.posZ);
|
||||
if(ConfigHandler.blockBreakParticles)
|
||||
supertile.getWorldObj().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(Block.getBlockFromName("sand")));
|
||||
EntityItem item = new EntityItem(supertile.getWorldObj(), coords.posX + 0.5, coords.posY + 0.5, coords.posZ + 0.5, new ItemStack(Items.clay_ball));
|
||||
supertile.getWorldObj().spawnEntityInWorld(item);
|
||||
supertile.getWorld().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(Block.getBlockFromName("sand")));
|
||||
EntityItem item = new EntityItem(supertile.getWorld(), coords.posX + 0.5, coords.posY + 0.5, coords.posZ + 0.5, new ItemStack(Items.clay_ball));
|
||||
supertile.getWorld().spawnEntityInWorld(item);
|
||||
mana -= manaCost;
|
||||
}
|
||||
}
|
||||
@@ -58,14 +58,14 @@ public class SubTileClayconia extends SubTileFunctional {
|
||||
int x = supertile.xCoord + i;
|
||||
int y = supertile.yCoord + j;
|
||||
int z = supertile.zCoord + k;
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
Block block = supertile.getWorld().getBlock(x, y, z);
|
||||
if(block == Block.getBlockFromName("sand"))
|
||||
possibleCoords.add(new ChunkCoordinates(x, y, z));
|
||||
}
|
||||
|
||||
if(possibleCoords.isEmpty())
|
||||
return null;
|
||||
return possibleCoords.get(supertile.getWorldObj().rand.nextInt(possibleCoords.size()));
|
||||
return possibleCoords.get(supertile.getWorld().rand.nextInt(possibleCoords.size()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,8 +37,8 @@ public class SubTileDaffomill extends SubTileFunctional {
|
||||
super.onUpdate();
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(orientation + 2);
|
||||
if(supertile.getWorldObj().rand.nextInt(4) == 0)
|
||||
Botania.proxy.wispFX(supertile.getWorldObj(), supertile.xCoord + Math.random(), supertile.yCoord + Math.random(), supertile.zCoord + Math.random(), 0.05F, 0.05F, 0.05F, 0.25F + (float) Math.random() * 0.15F, dir.offsetX * 0.1F, dir.offsetY * 0.1F, dir.offsetZ * 0.1F);
|
||||
if(supertile.getWorld().rand.nextInt(4) == 0)
|
||||
Botania.proxy.wispFX(supertile.getWorld(), supertile.xCoord + Math.random(), supertile.yCoord + Math.random(), supertile.zCoord + Math.random(), 0.05F, 0.05F, 0.05F, 0.25F + (float) Math.random() * 0.15F, dir.offsetX * 0.1F, dir.offsetY * 0.1F, dir.offsetZ * 0.1F);
|
||||
|
||||
if(windTicks == 0 && mana > 0) {
|
||||
windTicks = 20;
|
||||
@@ -49,7 +49,7 @@ public class SubTileDaffomill extends SubTileFunctional {
|
||||
AxisAlignedBB axis = aabbForOrientation();
|
||||
|
||||
if(axis != null) {
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, axis);
|
||||
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, axis);
|
||||
for(EntityItem item : items) {
|
||||
item.motionX += dir.offsetX * 0.05;
|
||||
item.motionY += dir.offsetY * 0.05;
|
||||
|
||||
@@ -43,8 +43,8 @@ public class SubTileExoflame extends SubTileFunctional {
|
||||
int y = supertile.yCoord + j;
|
||||
int z = supertile.zCoord + k;
|
||||
|
||||
TileEntity tile = supertile.getWorldObj().getTileEntity(x, y, z);
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
TileEntity tile = supertile.getWorld().getTileEntity(x, y, z);
|
||||
Block block = supertile.getWorld().getBlock(x, y, z);
|
||||
if(tile != null) {
|
||||
if(tile instanceof TileEntityFurnace && (block == Blocks.furnace || block == Blocks.lit_furnace)) {
|
||||
TileEntityFurnace furnace = (TileEntityFurnace) tile;
|
||||
@@ -52,7 +52,7 @@ public class SubTileExoflame extends SubTileFunctional {
|
||||
if(canSmelt && mana > 2) {
|
||||
if(furnace.furnaceBurnTime < 2) {
|
||||
if(furnace.furnaceBurnTime == 0)
|
||||
BlockFurnace.updateFurnaceBlockState(true, supertile.getWorldObj(), x, y, z);
|
||||
BlockFurnace.updateFurnaceBlockState(true, supertile.getWorld(), x, y, z);
|
||||
furnace.furnaceBurnTime = 200;
|
||||
mana = Math.max(0, mana - cost);
|
||||
}
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@ public class SubTileFallenKanade extends SubTileFunctional {
|
||||
|
||||
final int cost = 120;
|
||||
|
||||
if(!supertile.getWorldObj().isRemote && supertile.getWorldObj().provider.dimensionId != 1) {
|
||||
List<EntityPlayer> players = supertile.getWorldObj().getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
if(!supertile.getWorld().isRemote && supertile.getWorld().provider.dimensionId != 1) {
|
||||
List<EntityPlayer> players = supertile.getWorld().getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
for(EntityPlayer player : players) {
|
||||
if(player.getActivePotionEffect(Potion.regeneration) == null && mana >= cost ) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 60, 2));
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public class SubTileHeiseiDream extends SubTileFunctional {
|
||||
|
||||
final int cost = 100;
|
||||
|
||||
List<IMob> mobs = supertile.getWorldObj().getEntitiesWithinAABB(IMob.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
List<IMob> mobs = supertile.getWorld().getEntitiesWithinAABB(IMob.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
if(mobs.size() > 1 && mana >= cost)
|
||||
for(IMob mob : mobs) {
|
||||
if(mob instanceof EntityLiving) {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(redstoneSignal > 0 || supertile.getWorldObj().isRemote)
|
||||
if(redstoneSignal > 0 || supertile.getWorld().isRemote)
|
||||
return;
|
||||
|
||||
boolean pulledAny = false;
|
||||
@@ -63,7 +63,7 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
int y = supertile.yCoord;
|
||||
int z = supertile.zCoord;
|
||||
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(x - range, y - range, z - range, x + range + 1, y + range + 1, z + range + 1));
|
||||
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(x - range, y - range, z - range, x + range + 1, y + range + 1, z + range + 1));
|
||||
for(EntityItem item : items) {
|
||||
if(item.age < 60 || item.age >= 105 && item.age < 110 || item.isDead)
|
||||
continue;
|
||||
@@ -79,7 +79,7 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
int y_ = y + dir.offsetY;
|
||||
int z_ = z + dir.offsetZ;
|
||||
|
||||
IInventory inv = InventoryHelper.getInventory(supertile.getWorldObj(), x_, y_, z_);
|
||||
IInventory inv = InventoryHelper.getInventory(supertile.getWorld(), x_, y_, z_);
|
||||
if(inv != null) {
|
||||
List<ItemStack> filter = getFilterForInventory(inv, x_, y_, z_, true);
|
||||
boolean canAccept = canAcceptItem(stack, filter, filterType);
|
||||
@@ -152,13 +152,13 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
List<ItemStack> filter = new ArrayList();
|
||||
|
||||
if(recursiveForDoubleChests) {
|
||||
TileEntity tileEntity = supertile.getWorldObj().getTileEntity(x, y, z);
|
||||
Block chest = supertile.getWorldObj().getBlock(x, y, z);
|
||||
TileEntity tileEntity = supertile.getWorld().getTileEntity(x, y, z);
|
||||
Block chest = supertile.getWorld().getBlock(x, y, z);
|
||||
|
||||
if(tileEntity instanceof TileEntityChest)
|
||||
for(ForgeDirection dir : LibMisc.CARDINAL_DIRECTIONS)
|
||||
if(supertile.getWorldObj().getBlock(x + dir.offsetX, y, z + dir.offsetZ) == chest) {
|
||||
filter.addAll(getFilterForInventory((IInventory) supertile.getWorldObj().getTileEntity(x + dir.offsetX, y, z + dir.offsetZ), x + dir.offsetX, y, z + dir.offsetZ, false));
|
||||
if(supertile.getWorld().getBlock(x + dir.offsetX, y, z + dir.offsetZ) == chest) {
|
||||
filter.addAll(getFilterForInventory((IInventory) supertile.getWorld().getTileEntity(x + dir.offsetX, y, z + dir.offsetZ), x + dir.offsetX, y, z + dir.offsetZ, false));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -169,7 +169,7 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
|
||||
for(ForgeDirection dir : LibMisc.CARDINAL_DIRECTIONS) {
|
||||
AxisAlignedBB aabb = new AxisAlignedBB(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, x + dir.offsetX + 1, y + dir.offsetY + 1, z + dir.offsetZ + 1);
|
||||
List<EntityItemFrame> frames = supertile.getWorldObj().getEntitiesWithinAABB(EntityItemFrame.class, aabb);
|
||||
List<EntityItemFrame> frames = supertile.getWorld().getEntitiesWithinAABB(EntityItemFrame.class, aabb);
|
||||
for(EntityItemFrame frame : frames) {
|
||||
int orientation = frame.hangingDirection;
|
||||
if(orientationToDir[orientation] == dir.ordinal())
|
||||
|
||||
@@ -36,7 +36,7 @@ public class SubTileHyacidus extends SubTileFunctional {
|
||||
|
||||
final int cost = 20;
|
||||
|
||||
List<EntityLivingBase> entities = supertile.getWorldObj().getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
List<EntityLivingBase> entities = supertile.getWorld().getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
for(EntityLivingBase entity : entities) {
|
||||
if(!(entity instanceof EntityPlayer) && entity.getActivePotionEffect(Potion.poison) == null && mana >= cost && !entity.worldObj.isRemote && entity.getCreatureAttribute() != EnumCreatureAttribute.UNDEAD) {
|
||||
entity.addPotionEffect(new PotionEffect(Potion.poison.id, 60, 0));
|
||||
|
||||
+9
-9
@@ -31,19 +31,19 @@ public class SubTileJadedAmaranthus extends SubTileFunctional {
|
||||
if(redstoneSignal > 0)
|
||||
return;
|
||||
|
||||
if(mana >= COST && !supertile.getWorldObj().isRemote && ticksExisted % 30 == 0) {
|
||||
int x = supertile.xCoord - RANGE + supertile.getWorldObj().rand.nextInt(RANGE * 2 + 1);
|
||||
if(mana >= COST && !supertile.getWorld().isRemote && ticksExisted % 30 == 0) {
|
||||
int x = supertile.xCoord - RANGE + supertile.getWorld().rand.nextInt(RANGE * 2 + 1);
|
||||
int y = supertile.yCoord + RANGE;
|
||||
int z = supertile.zCoord - RANGE + supertile.getWorldObj().rand.nextInt(RANGE * 2 + 1);
|
||||
int z = supertile.zCoord - RANGE + supertile.getWorld().rand.nextInt(RANGE * 2 + 1);
|
||||
|
||||
for(int i = 0; i < RANGE * 2; i++) {
|
||||
Block blockAbove = supertile.getWorldObj().getBlock(x, y + 1, z);
|
||||
if((supertile.getWorldObj().isAirBlock(x, y + 1, z) || blockAbove.isReplaceable(supertile.getWorldObj(), x, y + 1, z)) && blockAbove.getMaterial() != Material.water && ModBlocks.flower.canPlaceBlockAt(supertile.getWorldObj(), x, y + 1, z)) {
|
||||
int color = supertile.getWorldObj().rand.nextInt(16);
|
||||
if(ModBlocks.flower.canBlockStay(supertile.getWorldObj(), x, y + 1, z)) {
|
||||
Block blockAbove = supertile.getWorld().getBlock(x, y + 1, z);
|
||||
if((supertile.getWorld().isAirBlock(x, y + 1, z) || blockAbove.isReplaceable(supertile.getWorld(), x, y + 1, z)) && blockAbove.getMaterial() != Material.water && ModBlocks.flower.canPlaceBlockAt(supertile.getWorld(), x, y + 1, z)) {
|
||||
int color = supertile.getWorld().rand.nextInt(16);
|
||||
if(ModBlocks.flower.canBlockStay(supertile.getWorld(), x, y + 1, z)) {
|
||||
if(ConfigHandler.blockBreakParticles)
|
||||
supertile.getWorldObj().playAuxSFX(2001, x, y + 1, z, Block.getIdFromBlock(ModBlocks.flower) + (color << 12));
|
||||
supertile.getWorldObj().setBlock(x, y + 1, z, ModBlocks.flower, color, 1 | 2);
|
||||
supertile.getWorld().playAuxSFX(2001, x, y + 1, z, Block.getIdFromBlock(ModBlocks.flower) + (color << 12));
|
||||
supertile.getWorld().setBlock(x, y + 1, z, ModBlocks.flower, color, 1 | 2);
|
||||
}
|
||||
|
||||
mana -= COST;
|
||||
|
||||
@@ -30,7 +30,7 @@ public class SubTileLoonuim extends SubTileFunctional {
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
if(redstoneSignal == 0 && ticksExisted % 200 == 0 && mana >= COST) {
|
||||
Random rand = supertile.getWorldObj().rand;
|
||||
Random rand = supertile.getWorld().rand;
|
||||
|
||||
ItemStack stack;
|
||||
do {
|
||||
@@ -38,13 +38,13 @@ public class SubTileLoonuim extends SubTileFunctional {
|
||||
} while(stack == null || BotaniaAPI.looniumBlacklist.contains(stack.getItem()));
|
||||
|
||||
int bound = RANGE * 2 + 1;
|
||||
EntityItem entity = new EntityItem(supertile.getWorldObj(), supertile.xCoord - RANGE + rand.nextInt(bound) , supertile.yCoord + 1, supertile.zCoord - RANGE + rand.nextInt(bound), stack);
|
||||
EntityItem entity = new EntityItem(supertile.getWorld(), supertile.xCoord - RANGE + rand.nextInt(bound) , supertile.yCoord + 1, supertile.zCoord - RANGE + rand.nextInt(bound), stack);
|
||||
entity.motionX = 0;
|
||||
entity.motionY = 0;
|
||||
entity.motionZ = 0;
|
||||
|
||||
if(!supertile.getWorldObj().isRemote)
|
||||
supertile.getWorldObj().spawnEntityInWorld(entity);
|
||||
if(!supertile.getWorld().isRemote)
|
||||
supertile.getWorld().spawnEntityInWorld(entity);
|
||||
|
||||
mana -= COST;
|
||||
sync();
|
||||
|
||||
+8
-8
@@ -53,16 +53,16 @@ public class SubTileMarimorphosis extends SubTileFunctional {
|
||||
if(redstoneSignal > 0)
|
||||
return;
|
||||
|
||||
if(!supertile.getWorldObj().isRemote && mana >= COST && ticksExisted % 2 == 0) {
|
||||
if(!supertile.getWorld().isRemote && mana >= COST && ticksExisted % 2 == 0) {
|
||||
ChunkCoordinates coords = getCoordsToPut();
|
||||
if(coords != null) {
|
||||
ItemStack stack = getStoneToPut(coords);
|
||||
if(stack != null) {
|
||||
Block block = Block.getBlockFromItem(stack.getItem());
|
||||
int meta = stack.getItemDamage();
|
||||
supertile.getWorldObj().setBlock(coords.posX, coords.posY, coords.posZ, block, meta, 1 | 2);
|
||||
supertile.getWorld().setBlock(coords.posX, coords.posY, coords.posZ, block, meta, 1 | 2);
|
||||
if(ConfigHandler.blockBreakParticles)
|
||||
supertile.getWorldObj().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(block) + (meta << 12));
|
||||
supertile.getWorld().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(block) + (meta << 12));
|
||||
|
||||
mana -= COST;
|
||||
sync();
|
||||
@@ -72,7 +72,7 @@ public class SubTileMarimorphosis extends SubTileFunctional {
|
||||
}
|
||||
|
||||
public ItemStack getStoneToPut(ChunkCoordinates coords) {
|
||||
List<Type> types = Arrays.asList(BiomeDictionary.getTypesForBiome(supertile.getWorldObj().getBiomeGenForCoords(coords.posX, coords.posZ)));
|
||||
List<Type> types = Arrays.asList(BiomeDictionary.getTypesForBiome(supertile.getWorld().getBiomeGenForCoords(coords.posX, coords.posZ)));
|
||||
|
||||
List<Integer> values = new ArrayList();
|
||||
for(int i = 0; i < 8; i++) {
|
||||
@@ -84,7 +84,7 @@ public class SubTileMarimorphosis extends SubTileFunctional {
|
||||
values.add(i);
|
||||
}
|
||||
|
||||
return new ItemStack(ModFluffBlocks.biomeStoneA, 1, values.get(supertile.getWorldObj().rand.nextInt(values.size())));
|
||||
return new ItemStack(ModFluffBlocks.biomeStoneA, 1, values.get(supertile.getWorld().rand.nextInt(values.size())));
|
||||
}
|
||||
|
||||
public ChunkCoordinates getCoordsToPut() {
|
||||
@@ -99,14 +99,14 @@ public class SubTileMarimorphosis extends SubTileFunctional {
|
||||
int x = supertile.xCoord + i;
|
||||
int y = supertile.yCoord + j;
|
||||
int z = supertile.zCoord + k;
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
if(block != null && block.isReplaceableOreGen(supertile.getWorldObj(), x, y, z, Blocks.stone))
|
||||
Block block = supertile.getWorld().getBlock(x, y, z);
|
||||
if(block != null && block.isReplaceableOreGen(supertile.getWorld(), x, y, z, Blocks.stone))
|
||||
possibleCoords.add(new ChunkCoordinates(x, y, z));
|
||||
}
|
||||
|
||||
if(possibleCoords.isEmpty())
|
||||
return null;
|
||||
return possibleCoords.get(supertile.getWorldObj().rand.nextInt(possibleCoords.size()));
|
||||
return possibleCoords.get(supertile.getWorld().rand.nextInt(possibleCoords.size()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,7 +31,7 @@ public class SubTileMedumone extends SubTileFunctional {
|
||||
super.onUpdate();
|
||||
|
||||
if(mana > 0) {
|
||||
List<EntityLivingBase> entities = supertile.getWorldObj().getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + 1, supertile.zCoord + RANGE + 1));
|
||||
List<EntityLivingBase> entities = supertile.getWorld().getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + 1, supertile.zCoord + RANGE + 1));
|
||||
|
||||
for(EntityLivingBase entity : entities)
|
||||
if(!(entity instanceof EntityPlayer)) {
|
||||
|
||||
@@ -47,17 +47,17 @@ public class SubTileOrechid extends SubTileFunctional {
|
||||
return;
|
||||
|
||||
int cost = getCost();
|
||||
if(!supertile.getWorldObj().isRemote && mana >= cost && ticksExisted % getDelay() == 0) {
|
||||
if(!supertile.getWorld().isRemote && mana >= cost && ticksExisted % getDelay() == 0) {
|
||||
ChunkCoordinates coords = getCoordsToPut();
|
||||
if(coords != null) {
|
||||
ItemStack stack = getOreToPut();
|
||||
if(stack != null) {
|
||||
Block block = Block.getBlockFromItem(stack.getItem());
|
||||
int meta = stack.getItemDamage();
|
||||
supertile.getWorldObj().setBlock(coords.posX, coords.posY, coords.posZ, block, meta, 1 | 2);
|
||||
supertile.getWorld().setBlock(coords.posX, coords.posY, coords.posZ, block, meta, 1 | 2);
|
||||
if(ConfigHandler.blockBreakParticles)
|
||||
supertile.getWorldObj().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(block) + (meta << 12));
|
||||
supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "botania:orechid", 2F, 1F);
|
||||
supertile.getWorld().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(block) + (meta << 12));
|
||||
supertile.getWorld().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "botania:orechid", 2F, 1F);
|
||||
|
||||
mana -= cost;
|
||||
sync();
|
||||
@@ -72,7 +72,7 @@ public class SubTileOrechid extends SubTileFunctional {
|
||||
for(String s : map.keySet())
|
||||
values.add(new StringRandomItem(map.get(s), s));
|
||||
|
||||
String ore = ((StringRandomItem) WeightedRandom.getRandomItem(supertile.getWorldObj().rand, values)).s;
|
||||
String ore = ((StringRandomItem) WeightedRandom.getRandomItem(supertile.getWorld().rand, values)).s;
|
||||
|
||||
List<ItemStack> ores = OreDictionary.getOres(ore);
|
||||
|
||||
@@ -106,14 +106,14 @@ public class SubTileOrechid extends SubTileFunctional {
|
||||
int x = supertile.xCoord + i;
|
||||
int y = supertile.yCoord + j;
|
||||
int z = supertile.zCoord + k;
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
if(block != null && block.isReplaceableOreGen(supertile.getWorldObj(), x, y, z, source))
|
||||
Block block = supertile.getWorld().getBlock(x, y, z);
|
||||
if(block != null && block.isReplaceableOreGen(supertile.getWorld(), x, y, z, source))
|
||||
possibleCoords.add(new ChunkCoordinates(x, y, z));
|
||||
}
|
||||
|
||||
if(possibleCoords.isEmpty())
|
||||
return null;
|
||||
return possibleCoords.get(supertile.getWorldObj().rand.nextInt(possibleCoords.size()));
|
||||
return possibleCoords.get(supertile.getWorld().rand.nextInt(possibleCoords.size()));
|
||||
}
|
||||
|
||||
public boolean canOperate() {
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ public class SubTileOrechidIgnem extends SubTileOrechid {
|
||||
|
||||
@Override
|
||||
public boolean canOperate() {
|
||||
return supertile.getWorldObj().provider.isHellWorld;
|
||||
return supertile.getWorld().provider.isHellWorld;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-4
@@ -31,11 +31,11 @@ public class SubTilePollidisiac extends SubTileFunctional {
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(!supertile.getWorldObj().isRemote) {
|
||||
if(!supertile.getWorld().isRemote) {
|
||||
int manaCost = 12;
|
||||
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord, supertile.zCoord - RANGE, supertile.xCoord + 1 + RANGE, supertile.yCoord + 1, supertile.zCoord + 1 +RANGE));
|
||||
List<EntityAnimal> animals = supertile.getWorldObj().getEntitiesWithinAABB(EntityAnimal.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord, supertile.zCoord - RANGE, supertile.xCoord + 1 +RANGE, supertile.yCoord + 1, supertile.zCoord + 1 +RANGE));
|
||||
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord, supertile.zCoord - RANGE, supertile.xCoord + 1 + RANGE, supertile.yCoord + 1, supertile.zCoord + 1 +RANGE));
|
||||
List<EntityAnimal> animals = supertile.getWorld().getEntitiesWithinAABB(EntityAnimal.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord, supertile.zCoord - RANGE, supertile.xCoord + 1 +RANGE, supertile.yCoord + 1, supertile.zCoord + 1 +RANGE));
|
||||
for(EntityAnimal animal : animals) {
|
||||
if(mana < manaCost)
|
||||
break;
|
||||
@@ -56,7 +56,7 @@ public class SubTilePollidisiac extends SubTileFunctional {
|
||||
|
||||
ReflectionHelper.setPrivateValue(EntityAnimal.class, animal, 1200, LibObfuscation.IN_LOVE);
|
||||
animal.setTarget(null);
|
||||
supertile.getWorldObj().setEntityState(animal, (byte)18);
|
||||
supertile.getWorld().setEntityState(animal, (byte)18);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-12
@@ -76,7 +76,7 @@ public class SubTileRannuncarpus extends SubTileFunctional {
|
||||
int y = supertile.yCoord;
|
||||
int z = supertile.zCoord;
|
||||
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(x - RANGE, y - RANGE_Y, z - RANGE, x + RANGE + 1, y + RANGE_Y, z + RANGE + 1));
|
||||
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(x - RANGE, y - RANGE_Y, z - RANGE, x + RANGE + 1, y + RANGE_Y, z + RANGE + 1));
|
||||
for(EntityItem item : items) {
|
||||
if(item.age < 60 || item.isDead)
|
||||
continue;
|
||||
@@ -91,9 +91,9 @@ public class SubTileRannuncarpus extends SubTileFunctional {
|
||||
int xp = x + i;
|
||||
int yp = y + j;
|
||||
int zp = z + l;
|
||||
Block blockAbove = supertile.getWorldObj().getBlock(xp, yp + 1, zp);
|
||||
Block blockAbove = supertile.getWorld().getBlock(xp, yp + 1, zp);
|
||||
|
||||
if(filter.equals(supertile.getWorldObj(), xp, yp, zp) && (blockAbove.isAir(supertile.getWorldObj(), xp, yp + 1, zp) || blockAbove.isReplaceable(supertile.getWorldObj(), xp, yp + 1, zp)))
|
||||
if(filter.equals(supertile.getWorld(), xp, yp, zp) && (blockAbove.isAir(supertile.getWorld(), xp, yp + 1, zp) || blockAbove.isReplaceable(supertile.getWorld(), xp, yp + 1, zp)))
|
||||
validPositions.add(new ChunkCoordinates(xp, yp + 1, zp));
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class SubTileRannuncarpus extends SubTileFunctional {
|
||||
}
|
||||
|
||||
|
||||
if(!validPositions.isEmpty() && !supertile.getWorldObj().isRemote) {
|
||||
if(!validPositions.isEmpty() && !supertile.getWorld().isRemote) {
|
||||
Block blockToPlace = null;
|
||||
if(stackItem instanceof ItemBlock)
|
||||
blockToPlace = ((ItemBlock) stackItem).field_150939_a;
|
||||
@@ -111,23 +111,23 @@ public class SubTileRannuncarpus extends SubTileFunctional {
|
||||
blockToPlace = Blocks.redstone_wire;
|
||||
|
||||
if(blockToPlace != null) {
|
||||
ChunkCoordinates coords = validPositions.get(supertile.getWorldObj().rand.nextInt(validPositions.size()));
|
||||
if(blockToPlace.canPlaceBlockAt(supertile.getWorldObj(), coords.posX, coords.posY, coords.posZ)) {
|
||||
supertile.getWorldObj().setBlock(coords.posX, coords.posY, coords.posZ, blockToPlace, stack.getItemDamage(), 1 | 2);
|
||||
ChunkCoordinates coords = validPositions.get(supertile.getWorld().rand.nextInt(validPositions.size()));
|
||||
if(blockToPlace.canPlaceBlockAt(supertile.getWorld(), coords.posX, coords.posY, coords.posZ)) {
|
||||
supertile.getWorld().setBlock(coords.posX, coords.posY, coords.posZ, blockToPlace, stack.getItemDamage(), 1 | 2);
|
||||
if(ConfigHandler.blockBreakParticles)
|
||||
supertile.getWorldObj().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(blockToPlace) + (stack.getItemDamage() << 12));
|
||||
supertile.getWorld().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(blockToPlace) + (stack.getItemDamage() << 12));
|
||||
validPositions.remove(coords);
|
||||
|
||||
TileEntity tile = supertile.getWorldObj().getTileEntity(coords.posX, coords.posY, coords.posZ);
|
||||
TileEntity tile = supertile.getWorld().getTileEntity(coords.posX, coords.posY, coords.posZ);
|
||||
if(tile != null && tile instanceof ISubTileContainer) {
|
||||
ISubTileContainer container = (ISubTileContainer) tile;
|
||||
String subtileName = ItemBlockSpecialFlower.getType(stack);
|
||||
container.setSubTile(subtileName);
|
||||
SubTileEntity subtile = container.getSubTile();
|
||||
subtile.onBlockPlacedBy(supertile.getWorldObj(), coords.posX, coords.posY, coords.posZ, null, stack);
|
||||
subtile.onBlockPlacedBy(supertile.getWorld(), coords.posX, coords.posY, coords.posZ, null, stack);
|
||||
}
|
||||
|
||||
if(!supertile.getWorldObj().isRemote) {
|
||||
if(!supertile.getWorld().isRemote) {
|
||||
stack.stackSize--;
|
||||
if(stack.stackSize == 0)
|
||||
item.setDead();
|
||||
@@ -145,7 +145,7 @@ public class SubTileRannuncarpus extends SubTileFunctional {
|
||||
}
|
||||
|
||||
public BlockData getUnderlyingBlock() {
|
||||
return new BlockData(supertile.getWorldObj(), supertile.xCoord, supertile.yCoord - (supertile instanceof IFloatingFlower ? 1 : 2), supertile.zCoord);
|
||||
return new BlockData(supertile.getWorld(), supertile.xCoord, supertile.yCoord - (supertile instanceof IFloatingFlower ? 1 : 2), supertile.zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -50,7 +50,7 @@ public class SubTileSolegnolia extends SubTileFunctional {
|
||||
|
||||
public static boolean hasSolegnoliaAround(Entity e) {
|
||||
for(SubTileSolegnolia flower : existingFlowers) {
|
||||
if(flower.mana == 0 || flower.redstoneSignal > 0 || flower.supertile.getWorldObj() != e.worldObj || flower.supertile.getWorldObj().getTileEntity(flower.supertile.xCoord, flower.supertile.yCoord, flower.supertile.zCoord) != flower.supertile)
|
||||
if(flower.mana == 0 || flower.redstoneSignal > 0 || flower.supertile.getWorld() != e.worldObj || flower.supertile.getWorld().getTileEntity(flower.supertile.xCoord, flower.supertile.yCoord, flower.supertile.zCoord) != flower.supertile)
|
||||
continue;
|
||||
|
||||
double range = flower.getRange();
|
||||
|
||||
+3
-3
@@ -47,13 +47,13 @@ public class SubTileSpectranthemum extends SubTileFunctional {
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(redstoneSignal == 0 && supertile.getWorldObj().blockExists(bindX, bindY, bindZ)) {
|
||||
if(redstoneSignal == 0 && supertile.getWorld().blockExists(bindX, bindY, bindZ)) {
|
||||
int x = supertile.xCoord;
|
||||
int y = supertile.yCoord;
|
||||
int z = supertile.zCoord;
|
||||
|
||||
boolean did = false;
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(x - RANGE, y - RANGE, z - RANGE, x + RANGE + 1, y + RANGE, z + RANGE + 1));
|
||||
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(x - RANGE, y - RANGE, z - RANGE, x + RANGE + 1, y + RANGE, z + RANGE + 1));
|
||||
for(EntityItem item : items) {
|
||||
if(item.age < 60 || item.isDead || item.getEntityData().getBoolean(TAG_TELEPORTED))
|
||||
continue;
|
||||
@@ -71,7 +71,7 @@ public class SubTileSpectranthemum extends SubTileFunctional {
|
||||
item.getEntityData().setBoolean(TAG_TELEPORTED, true);
|
||||
item.motionX = item.motionY = item.motionZ = 0;
|
||||
spawnExplosionParticles(item);
|
||||
if(!supertile.getWorldObj().isRemote) {
|
||||
if(!supertile.getWorld().isRemote) {
|
||||
mana -= cost;
|
||||
did = true;
|
||||
}
|
||||
|
||||
+3
-3
@@ -39,7 +39,7 @@ public class SubTileTangleberrie extends SubTileFunctional {
|
||||
double range = getRange();
|
||||
|
||||
AxisAlignedBB boundingBox = new AxisAlignedBB(x1 - range, y1 - range, z1 - range, x1 + range + 1, y1 + range + 1, z1 + range + 1);
|
||||
List<EntityLivingBase> entities = supertile.getWorldObj().getEntitiesWithinAABB(EntityLivingBase.class, boundingBox);
|
||||
List<EntityLivingBase> entities = supertile.getWorld().getEntitiesWithinAABB(EntityLivingBase.class, boundingBox);
|
||||
|
||||
for(EntityLivingBase entity : entities) {
|
||||
if(entity instanceof EntityPlayer || entity instanceof IBossDisplayData)
|
||||
@@ -53,8 +53,8 @@ public class SubTileTangleberrie extends SubTileFunctional {
|
||||
|
||||
if(distance > maxDist && distance < range) {
|
||||
MathHelper.setEntityMotionFromVector(entity, new Vector3(x1, y1, z1), getMotionVelocity());
|
||||
if(supertile.getWorldObj().rand.nextInt(3) == 0)
|
||||
Botania.proxy.sparkleFX(supertile.getWorldObj(), x2 + Math.random() * entity.width, y2 + Math.random() * entity.height, z2 + Math.random() * entity.width, 0.5F, 0.5F, 0.5F, 1F, 3);
|
||||
if(supertile.getWorld().rand.nextInt(3) == 0)
|
||||
Botania.proxy.sparkleFX(supertile.getWorld(), x2 + Math.random() * entity.width, y2 + Math.random() * entity.height, z2 + Math.random() * entity.width, 0.5F, 0.5F, 0.5F, 1F, 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class SubTileTigerseye extends SubTileFunctional {
|
||||
|
||||
boolean shouldAfffect = mana >= cost;
|
||||
|
||||
List<EntityLiving> entities = supertile.getWorldObj().getEntitiesWithinAABB(EntityLiving.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE_Y, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE_Y + 1, supertile.zCoord + RANGE + 1));
|
||||
List<EntityLiving> entities = supertile.getWorld().getEntitiesWithinAABB(EntityLiving.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE_Y, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE_Y + 1, supertile.zCoord + RANGE + 1));
|
||||
|
||||
for(EntityLiving entity : entities) {
|
||||
List<EntityAITaskEntry> entries = new ArrayList(entity.tasks.taskEntries);
|
||||
|
||||
@@ -82,7 +82,7 @@ public class SubTileVinculotus extends SubTileFunctional {
|
||||
if(event.entity instanceof EntityEnderman) {
|
||||
List<SubTileVinculotus> possibleFlowers = new ArrayList();
|
||||
for(SubTileVinculotus flower : existingFlowers) {
|
||||
if(flower.redstoneSignal > 0 || flower.mana <= cost || flower.supertile.getWorldObj() != event.entity.worldObj || flower.supertile.getWorldObj().getTileEntity(flower.supertile.xCoord, flower.supertile.yCoord, flower.supertile.zCoord) != flower.supertile)
|
||||
if(flower.redstoneSignal > 0 || flower.mana <= cost || flower.supertile.getWorld() != event.entity.worldObj || flower.supertile.getWorld().getTileEntity(flower.supertile.xCoord, flower.supertile.yCoord, flower.supertile.zCoord) != flower.supertile)
|
||||
continue;
|
||||
|
||||
double x = flower.supertile.xCoord + 0.5;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class SubTileArcaneRose extends SubTileGenerating {
|
||||
if(mana >= getMaxMana())
|
||||
return;
|
||||
|
||||
List<EntityPlayer> players = supertile.getWorldObj().getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + 1, supertile.zCoord + RANGE + 1));
|
||||
List<EntityPlayer> players = supertile.getWorld().getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + 1, supertile.zCoord + RANGE + 1));
|
||||
for(EntityPlayer player : players)
|
||||
if(ExperienceHelper.getPlayerXP(player) >= 1 && player.onGround) {
|
||||
ExperienceHelper.drainPlayerXP(player, 1);
|
||||
|
||||
+4
-4
@@ -45,7 +45,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(!supertile.getWorldObj().isRemote && redstoneSignal > 0 && ticksExisted % SPEED == 0)
|
||||
if(!supertile.getWorld().isRemote && redstoneSignal > 0 && ticksExisted % SPEED == 0)
|
||||
runSimulation();
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
}
|
||||
|
||||
int getCellGeneration(int x, int y, int z) {
|
||||
TileEntity tile = supertile.getWorldObj().getTileEntity(x, y, z);
|
||||
TileEntity tile = supertile.getWorld().getTileEntity(x, y, z);
|
||||
if(tile instanceof TileCell)
|
||||
return ((TileCell) tile).isSameFlower(supertile) ? ((TileCell) tile).getGeneration() : 0;
|
||||
|
||||
@@ -163,7 +163,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
}
|
||||
|
||||
void setBlockForGeneration(int x, int y, int z, int gen, int prevGen) {
|
||||
World world = supertile.getWorldObj();
|
||||
World world = supertile.getWorld();
|
||||
Block blockAt = world.getBlock(x, y, z);
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(gen == -2) {
|
||||
@@ -174,7 +174,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
if(gen < 0 || gen > MAX_GENERATIONS)
|
||||
world.setBlockToAir(x, y, z);
|
||||
else ((TileCell) tile).setGeneration(supertile, gen);
|
||||
} else if(gen >= 0 && blockAt.isAir(supertile.getWorldObj(), x, y, z)) {
|
||||
} else if(gen >= 0 && blockAt.isAir(supertile.getWorld(), x, y, z)) {
|
||||
world.setBlock(x, y, z, ModBlocks.cellBlock);
|
||||
tile = world.getTileEntity(x, y, z);
|
||||
((TileCell) tile).setGeneration(supertile, gen);
|
||||
|
||||
@@ -43,7 +43,7 @@ public class SubTileDaybloom extends SubTilePassiveGenerating {
|
||||
super.onUpdate();
|
||||
|
||||
if(isPrime() && (!savedPosition || primePositionX != supertile.xCoord || primePositionY != supertile.yCoord || primePositionZ != supertile.zCoord))
|
||||
supertile.getWorldObj().setBlockToAir(supertile.xCoord, supertile.yCoord, supertile.zCoord);
|
||||
supertile.getWorld().setBlockToAir(supertile.xCoord, supertile.yCoord, supertile.zCoord);
|
||||
}
|
||||
|
||||
public void setPrimusPosition() {
|
||||
@@ -64,8 +64,8 @@ public class SubTileDaybloom extends SubTilePassiveGenerating {
|
||||
|
||||
@Override
|
||||
public boolean canGeneratePassively() {
|
||||
boolean rain = supertile.getWorldObj().getWorldChunkManager().getBiomeGenAt(supertile.xCoord, supertile.zCoord).getIntRainfall() > 0 && (supertile.getWorldObj().isRaining() || supertile.getWorldObj().isThundering());
|
||||
return supertile.getWorldObj().isDaytime() && !rain && supertile.getWorldObj().canBlockSeeTheSky(supertile.xCoord, supertile.yCoord + 1, supertile.zCoord);
|
||||
boolean rain = supertile.getWorld().getWorldChunkManager().getBiomeGenAt(supertile.xCoord, supertile.zCoord).getIntRainfall() > 0 && (supertile.getWorld().isRaining() || supertile.getWorld().isThundering());
|
||||
return supertile.getWorld().isDaytime() && !rain && supertile.getWorld().canBlockSeeTheSky(supertile.xCoord, supertile.yCoord + 1, supertile.zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,7 +76,7 @@ public class SubTileDaybloom extends SubTilePassiveGenerating {
|
||||
public int getSurroundingFlowers() {
|
||||
int flowers = 0;
|
||||
for(ForgeDirection dir : LibMisc.CARDINAL_DIRECTIONS) {
|
||||
TileEntity tile = supertile.getWorldObj().getTileEntity(supertile.xCoord + dir.offsetX, supertile.yCoord, supertile.zCoord + dir.offsetZ);
|
||||
TileEntity tile = supertile.getWorld().getTileEntity(supertile.xCoord + dir.offsetX, supertile.yCoord, supertile.zCoord + dir.offsetZ);
|
||||
if(tile != null && tile instanceof ISubTileContainer) {
|
||||
ISubTileContainer flower = (ISubTileContainer) tile;
|
||||
if(flower.getSubTile() != null && flower.getSubTile().getClass() == getClass()) {
|
||||
@@ -89,7 +89,7 @@ public class SubTileDaybloom extends SubTilePassiveGenerating {
|
||||
|
||||
float m = 0.045F;
|
||||
if(ticksExisted % 10 == 0)
|
||||
Botania.proxy.wispFX(supertile.getWorldObj(), supertile.xCoord + 0.5, supertile.yCoord + 0.05, supertile.zCoord + 0.5, r, g, b, 0.1F, dir.offsetX * m, dir.offsetY * m, dir.offsetZ * m);
|
||||
Botania.proxy.wispFX(supertile.getWorld(), supertile.xCoord + 0.5, supertile.yCoord + 0.05, supertile.zCoord + 0.5, r, g, b, 0.1F, dir.offsetX * m, dir.offsetY * m, dir.offsetZ * m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@ public class SubTileEndoflame extends SubTileGenerating {
|
||||
|
||||
if(linkedCollector != null) {
|
||||
if(burnTime == 0) {
|
||||
if(mana < getMaxMana() && !supertile.getWorldObj().isRemote) {
|
||||
if(mana < getMaxMana() && !supertile.getWorld().isRemote) {
|
||||
boolean didSomething = false;
|
||||
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
for(EntityItem item : items) {
|
||||
if(item.age >= 59 && !item.isDead) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
@@ -54,7 +54,7 @@ public class SubTileEndoflame extends SubTileGenerating {
|
||||
this.burnTime = Math.min(FUEL_CAP, burnTime) / 2;
|
||||
|
||||
stack.stackSize--;
|
||||
supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "botania:endoflame", 0.2F, 1F);
|
||||
supertile.getWorld().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "botania:endoflame", 0.2F, 1F);
|
||||
|
||||
if(stack.stackSize == 0)
|
||||
item.setDead();
|
||||
@@ -70,8 +70,8 @@ public class SubTileEndoflame extends SubTileGenerating {
|
||||
sync();
|
||||
}
|
||||
} else {
|
||||
if(supertile.getWorldObj().rand.nextInt(8) == 0)
|
||||
Botania.proxy.wispFX(supertile.getWorldObj(), supertile.xCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
|
||||
if(supertile.getWorld().rand.nextInt(8) == 0)
|
||||
Botania.proxy.wispFX(supertile.getWorld(), supertile.xCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
|
||||
|
||||
burnTime--;
|
||||
}
|
||||
|
||||
+5
-5
@@ -30,20 +30,20 @@ public class SubTileEntropinnyum extends SubTileGenerating {
|
||||
super.onUpdate();
|
||||
|
||||
if(mana == 0) {
|
||||
List<EntityTNTPrimed> tnts = supertile.getWorldObj().getEntitiesWithinAABB(EntityTNTPrimed.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
List<EntityTNTPrimed> tnts = supertile.getWorld().getEntitiesWithinAABB(EntityTNTPrimed.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
for(EntityTNTPrimed tnt : tnts) {
|
||||
if(tnt.fuse == 1 && !tnt.isDead && !supertile.getWorldObj().getBlock(MathHelper.floor_double(tnt.posX), MathHelper.floor_double(tnt.posY), MathHelper.floor_double(tnt.posZ)).getMaterial().isLiquid()) {
|
||||
if(!supertile.getWorldObj().isRemote) {
|
||||
if(tnt.fuse == 1 && !tnt.isDead && !supertile.getWorld().getBlock(MathHelper.floor_double(tnt.posX), MathHelper.floor_double(tnt.posY), MathHelper.floor_double(tnt.posZ)).getMaterial().isLiquid()) {
|
||||
if(!supertile.getWorld().isRemote) {
|
||||
tnt.setDead();
|
||||
mana += getMaxMana();
|
||||
supertile.getWorldObj().playSoundEffect(tnt.posX, tnt.posY, tnt.posZ, "random.explode", 0.2F, (1F + (supertile.getWorldObj().rand.nextFloat() - supertile.getWorldObj().rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
supertile.getWorld().playSoundEffect(tnt.posX, tnt.posY, tnt.posZ, "random.explode", 0.2F, (1F + (supertile.getWorld().rand.nextFloat() - supertile.getWorld().rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
sync();
|
||||
}
|
||||
|
||||
for(int i = 0; i < 50; i++)
|
||||
Botania.proxy.sparkleFX(tnt.worldObj, tnt.posX + Math.random() * 4 - 2, tnt.posY + Math.random() * 4 - 2, tnt.posZ + Math.random() * 4 - 2, 1F, (float) Math.random() * 0.25F, (float) Math.random() * 0.25F, (float) (Math.random() * 0.65F + 1.25F), 12);
|
||||
|
||||
supertile.getWorldObj().spawnParticle("hugeexplosion", tnt.posX, tnt.posY, tnt.posZ, 1D, 0D, 0D);
|
||||
supertile.getWorld().spawnParticle("hugeexplosion", tnt.posX, tnt.posY, tnt.posZ, 1D, 0D, 0D);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -36,14 +36,14 @@ public class SubTileGourmaryllis extends SubTileGenerating {
|
||||
|
||||
if(cooldown > 0)
|
||||
cooldown--;
|
||||
if(cooldown == 0 && !supertile.getWorldObj().isRemote) {
|
||||
if(cooldown == 0 && !supertile.getWorld().isRemote) {
|
||||
mana = Math.min(getMaxMana(), mana + storedMana);
|
||||
storedMana = 0;
|
||||
sync();
|
||||
}
|
||||
|
||||
if(!supertile.getWorldObj().isRemote) {
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
if(!supertile.getWorld().isRemote) {
|
||||
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
for(EntityItem item : items) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(stack != null && stack.getItem() instanceof ItemFood && !item.isDead) {
|
||||
@@ -51,7 +51,7 @@ public class SubTileGourmaryllis extends SubTileGenerating {
|
||||
int val = ((ItemFood) stack.getItem()).func_150905_g(stack);
|
||||
storedMana = val * val * 64;
|
||||
cooldown = val * 10;
|
||||
supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "random.eat", 0.2F, 0.5F + (float) Math.random() * 0.5F);
|
||||
supertile.getWorld().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "random.eat", 0.2F, 0.5F + (float) Math.random() * 0.5F);
|
||||
sync();
|
||||
}
|
||||
|
||||
|
||||
+13
-13
@@ -47,12 +47,12 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
|
||||
if(cooldown > 0) {
|
||||
cooldown--;
|
||||
for(int i = 0; i < 3; i++)
|
||||
Botania.proxy.wispFX(supertile.getWorldObj(), supertile.xCoord + 0.5 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.5 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5 + Math.random() * 0.2 - 0.1, 0.1F, 0.1F, 0.1F, (float) Math.random() / 6, (float) -Math.random() / 30);
|
||||
Botania.proxy.wispFX(supertile.getWorld(), supertile.xCoord + 0.5 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.5 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5 + Math.random() * 0.2 - 0.1, 0.1F, 0.1F, 0.1F, (float) Math.random() / 6, (float) -Math.random() / 30);
|
||||
return;
|
||||
}
|
||||
|
||||
if(burnTime == 0) {
|
||||
if(mana < getMaxMana() && !supertile.getWorldObj().isRemote) {
|
||||
if(mana < getMaxMana() && !supertile.getWorld().isRemote) {
|
||||
List<int[]> offsets = Arrays.asList(OFFSETS);
|
||||
Collections.shuffle(offsets);
|
||||
|
||||
@@ -63,17 +63,17 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
|
||||
};
|
||||
|
||||
Material search = getMaterialToSearchFor();
|
||||
if(supertile.getWorldObj().getBlock(positions[0], supertile.yCoord, positions[1]).getMaterial() == search && (getBlockToSearchBelow() == null || supertile.getWorldObj().getBlock(positions[0], supertile.yCoord - 1, positions[1]) == getBlockToSearchBelow()) && supertile.getWorldObj().getBlockMetadata(positions[0], supertile.yCoord, positions[1]) == 0) {
|
||||
if(supertile.getWorld().getBlock(positions[0], supertile.yCoord, positions[1]).getMaterial() == search && (getBlockToSearchBelow() == null || supertile.getWorld().getBlock(positions[0], supertile.yCoord - 1, positions[1]) == getBlockToSearchBelow()) && supertile.getWorld().getBlockMetadata(positions[0], supertile.yCoord, positions[1]) == 0) {
|
||||
if(search != Material.water)
|
||||
supertile.getWorldObj().setBlockToAir(positions[0], supertile.yCoord, positions[1]);
|
||||
supertile.getWorld().setBlockToAir(positions[0], supertile.yCoord, positions[1]);
|
||||
else {
|
||||
int waterAround = 0;
|
||||
for(ForgeDirection dir : LibMisc.CARDINAL_DIRECTIONS)
|
||||
if(supertile.getWorldObj().getBlock(positions[0] + dir.offsetX, supertile.yCoord, positions[1] + dir.offsetZ).getMaterial() == search)
|
||||
if(supertile.getWorld().getBlock(positions[0] + dir.offsetX, supertile.yCoord, positions[1] + dir.offsetZ).getMaterial() == search)
|
||||
waterAround++;
|
||||
|
||||
if(waterAround < 2)
|
||||
supertile.getWorldObj().setBlockToAir(positions[0], supertile.yCoord, positions[1]);
|
||||
supertile.getWorld().setBlockToAir(positions[0], supertile.yCoord, positions[1]);
|
||||
}
|
||||
|
||||
burnTime += getBurnTime();
|
||||
@@ -84,7 +84,7 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(supertile.getWorldObj().rand.nextInt(8) == 0)
|
||||
if(supertile.getWorld().rand.nextInt(8) == 0)
|
||||
doBurnParticles();
|
||||
burnTime--;
|
||||
if(burnTime == 0) {
|
||||
@@ -97,7 +97,7 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
|
||||
public int getSurroundingFlowers() {
|
||||
int flowers = 0;
|
||||
for(int[] offsetArray : OFFSETS) {
|
||||
TileEntity tile = supertile.getWorldObj().getTileEntity(supertile.xCoord + offsetArray[0], supertile.yCoord, supertile.zCoord + offsetArray[1]);
|
||||
TileEntity tile = supertile.getWorld().getTileEntity(supertile.xCoord + offsetArray[0], supertile.yCoord, supertile.zCoord + offsetArray[1]);
|
||||
if(tile != null && tile instanceof ISubTileContainer) {
|
||||
ISubTileContainer flower = (ISubTileContainer) tile;
|
||||
if(flower.getSubTile() != null && flower.getSubTile().getClass() == getClass()) {
|
||||
@@ -110,7 +110,7 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
|
||||
|
||||
float m = 0.045F;
|
||||
if(ticksExisted % 10 == 0)
|
||||
Botania.proxy.wispFX(supertile.getWorldObj(), supertile.xCoord + 0.5, supertile.yCoord + 0.05, supertile.zCoord + 0.5, r, g, b, 0.1F, offsetArray[0] * m, 0, offsetArray[1] * m);
|
||||
Botania.proxy.wispFX(supertile.getWorld(), supertile.xCoord + 0.5, supertile.yCoord + 0.05, supertile.zCoord + 0.5, r, g, b, 0.1F, offsetArray[0] * m, 0, offsetArray[1] * m);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,7 +119,7 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
|
||||
}
|
||||
|
||||
public void doBurnParticles() {
|
||||
Botania.proxy.wispFX(supertile.getWorldObj(), supertile.xCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5, 0.05F, 0.05F, 0.7F, (float) Math.random() / 6, (float) -Math.random() / 60);
|
||||
Botania.proxy.wispFX(supertile.getWorld(), supertile.xCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5, 0.05F, 0.05F, 0.7F, (float) Math.random() / 6, (float) -Math.random() / 60);
|
||||
}
|
||||
|
||||
public Material getMaterialToSearchFor() {
|
||||
@@ -131,7 +131,7 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
|
||||
}
|
||||
|
||||
public void playSound() {
|
||||
supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "random.drink", 0.01F, 0.5F + (float) Math.random() * 0.5F);
|
||||
supertile.getWorld().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "random.drink", 0.01F, 0.5F + (float) Math.random() * 0.5F);
|
||||
}
|
||||
|
||||
public int getBurnTime() {
|
||||
@@ -194,12 +194,12 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
|
||||
@Override
|
||||
public boolean canGeneratePassively() {
|
||||
int adj = getSurroundingFlowers();
|
||||
return supertile.getWorldObj().rand.nextInt(adj + 1) == 0 && burnTime > 0;
|
||||
return supertile.getWorld().rand.nextInt(adj + 1) == 0 && burnTime > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDelayBetweenPassiveGeneration() {
|
||||
boolean rain = supertile.getWorldObj().getWorldChunkManager().getBiomeGenAt(supertile.xCoord, supertile.zCoord).getIntRainfall() > 0 && (supertile.getWorldObj().isRaining() || supertile.getWorldObj().isThundering());
|
||||
boolean rain = supertile.getWorld().getWorldChunkManager().getBiomeGenAt(supertile.xCoord, supertile.zCoord).getIntRainfall() > 0 && (supertile.getWorld().isRaining() || supertile.getWorld().isThundering());
|
||||
return rain ? 1 : 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,22 +27,22 @@ public class SubTileKekimurus extends SubTileGenerating {
|
||||
|
||||
int mana = 1800;
|
||||
|
||||
if(getMaxMana() - this.mana >= mana && !supertile.getWorldObj().isRemote && ticksExisted % 80 == 0) {
|
||||
if(getMaxMana() - this.mana >= mana && !supertile.getWorld().isRemote && ticksExisted % 80 == 0) {
|
||||
for(int i = 0; i < RANGE * 2 + 1; i++)
|
||||
for(int j = 0; j < RANGE * 2 + 1; j++)
|
||||
for(int k = 0; k < RANGE * 2 + 1; k++) {
|
||||
int x = supertile.xCoord + i - RANGE;
|
||||
int y = supertile.yCoord + j - RANGE;
|
||||
int z = supertile.zCoord + k - RANGE;
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
Block block = supertile.getWorld().getBlock(x, y, z);
|
||||
if(block instanceof BlockCake) {
|
||||
int meta = supertile.getWorldObj().getBlockMetadata(x, y, z) + 1;
|
||||
int meta = supertile.getWorld().getBlockMetadata(x, y, z) + 1;
|
||||
if(meta == 6)
|
||||
supertile.getWorldObj().setBlockToAir(x, y, z);
|
||||
else supertile.getWorldObj().setBlockMetadataWithNotify(x, y, z, meta, 1 | 2);
|
||||
supertile.getWorld().setBlockToAir(x, y, z);
|
||||
else supertile.getWorld().setBlockMetadataWithNotify(x, y, z, meta, 1 | 2);
|
||||
|
||||
supertile.getWorldObj().playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
|
||||
supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "random.eat", 1F, 0.5F + (float) Math.random() * 0.5F);
|
||||
supertile.getWorld().playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
|
||||
supertile.getWorld().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "random.eat", 1F, 0.5F + (float) Math.random() * 0.5F);
|
||||
this.mana += mana;
|
||||
sync();
|
||||
return;
|
||||
|
||||
@@ -53,7 +53,7 @@ public class SubTileMunchdew extends SubTileGenerating {
|
||||
|
||||
int manaPerLeaf = 160;
|
||||
eatLeaves : {
|
||||
if(getMaxMana() - mana >= manaPerLeaf && !supertile.getWorldObj().isRemote && ticksExisted % 4 == 0) {
|
||||
if(getMaxMana() - mana >= manaPerLeaf && !supertile.getWorld().isRemote && ticksExisted % 4 == 0) {
|
||||
List<ChunkCoordinates> coords = new ArrayList();
|
||||
int x = supertile.xCoord;
|
||||
int y = supertile.yCoord;
|
||||
@@ -65,11 +65,11 @@ public class SubTileMunchdew extends SubTileGenerating {
|
||||
int xp = x + i;
|
||||
int yp = y + j;
|
||||
int zp = z + k;
|
||||
Block block = supertile.getWorldObj().getBlock(xp, yp, zp);
|
||||
Block block = supertile.getWorld().getBlock(xp, yp, zp);
|
||||
if(block.getMaterial() == Material.leaves) {
|
||||
boolean exposed = false;
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
if(supertile.getWorldObj().getBlock(xp + dir.offsetX, yp + dir.offsetY, zp + dir.offsetZ).isAir(supertile.getWorldObj(), xp + dir.offsetX, yp + dir.offsetY, zp + dir.offsetZ)) {
|
||||
if(supertile.getWorld().getBlock(xp + dir.offsetX, yp + dir.offsetY, zp + dir.offsetZ).isAir(supertile.getWorld(), xp + dir.offsetX, yp + dir.offsetY, zp + dir.offsetZ)) {
|
||||
exposed = true;
|
||||
break;
|
||||
}
|
||||
@@ -84,13 +84,13 @@ public class SubTileMunchdew extends SubTileGenerating {
|
||||
|
||||
Collections.shuffle(coords);
|
||||
ChunkCoordinates breakCoords = coords.get(0);
|
||||
Block block = supertile.getWorldObj().getBlock(breakCoords.posX, breakCoords.posY, breakCoords.posZ);
|
||||
int meta = supertile.getWorldObj().getBlockMetadata(breakCoords.posX, breakCoords.posY, breakCoords.posZ);
|
||||
supertile.getWorldObj().setBlockToAir(breakCoords.posX, breakCoords.posY, breakCoords.posZ);
|
||||
Block block = supertile.getWorld().getBlock(breakCoords.posX, breakCoords.posY, breakCoords.posZ);
|
||||
int meta = supertile.getWorld().getBlockMetadata(breakCoords.posX, breakCoords.posY, breakCoords.posZ);
|
||||
supertile.getWorld().setBlockToAir(breakCoords.posX, breakCoords.posY, breakCoords.posZ);
|
||||
ticksWithoutEating = 0;
|
||||
ateOnce = true;
|
||||
if(ConfigHandler.blockBreakParticles)
|
||||
supertile.getWorldObj().playAuxSFX(2001, breakCoords.posX, breakCoords.posY, breakCoords.posZ, Block.getIdFromBlock(block) + (meta << 12));
|
||||
supertile.getWorld().playAuxSFX(2001, breakCoords.posX, breakCoords.posY, breakCoords.posZ, Block.getIdFromBlock(block) + (meta << 12));
|
||||
mana += manaPerLeaf;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class SubTileNarslimmus extends SubTileGenerating {
|
||||
super.onUpdate();
|
||||
|
||||
if(ticksExisted % 5 == 0) {
|
||||
List<EntitySlime> slimes = supertile.getWorldObj().getEntitiesWithinAABB(EntitySlime.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE, supertile.zCoord + RANGE + 1));
|
||||
List<EntitySlime> slimes = supertile.getWorld().getEntitiesWithinAABB(EntitySlime.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE, supertile.zCoord + RANGE + 1));
|
||||
for(EntitySlime slime : slimes) {
|
||||
if(slime.getEntityData().getBoolean(TAG_WORLD_SPAWNED) && !slime.isDead) {
|
||||
int size = slime.getSlimeSize();
|
||||
|
||||
@@ -22,7 +22,7 @@ public class SubTileNightshade extends SubTileDaybloom {
|
||||
|
||||
@Override
|
||||
public boolean canGeneratePassively() {
|
||||
return !super.canGeneratePassively() && !supertile.getWorldObj().isDaytime();
|
||||
return !super.canGeneratePassively() && !supertile.getWorld().isDaytime();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,15 +42,15 @@ public class SubTileRafflowsia extends SubTileGenerating {
|
||||
|
||||
int mana = 2100;
|
||||
|
||||
if(getMaxMana() - this.mana >= mana && !supertile.getWorldObj().isRemote && ticksExisted % 40 == 0) {
|
||||
if(getMaxMana() - this.mana >= mana && !supertile.getWorld().isRemote && ticksExisted % 40 == 0) {
|
||||
for(int i = 0; i < RANGE * 2 + 1; i++)
|
||||
for(int j = 0; j < RANGE * 2 + 1; j++)
|
||||
for(int k = 0; k < RANGE * 2 + 1; k++) {
|
||||
int x = supertile.xCoord + i - RANGE;
|
||||
int y = supertile.yCoord + j - RANGE;
|
||||
int z = supertile.zCoord + k - RANGE;
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
TileEntity tile = supertile.getWorldObj().getTileEntity(x, y, z);
|
||||
Block block = supertile.getWorld().getBlock(x, y, z);
|
||||
TileEntity tile = supertile.getWorld().getTileEntity(x, y, z);
|
||||
if(tile instanceof ISubTileContainer) {
|
||||
SubTileEntity stile = ((ISubTileContainer) tile).getSubTile();
|
||||
String name = stile.getUnlocalizedName();
|
||||
@@ -66,10 +66,10 @@ public class SubTileRafflowsia extends SubTileGenerating {
|
||||
|
||||
float mod = 1F / lastFlowerTimes;
|
||||
|
||||
int meta = supertile.getWorldObj().getBlockMetadata(x, y, z) + 1;
|
||||
supertile.getWorldObj().setBlockToAir(x, y, z);
|
||||
int meta = supertile.getWorld().getBlockMetadata(x, y, z) + 1;
|
||||
supertile.getWorld().setBlockToAir(x, y, z);
|
||||
|
||||
supertile.getWorldObj().playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
|
||||
supertile.getWorld().playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
|
||||
this.mana += mana * mod;
|
||||
sync();
|
||||
return;
|
||||
|
||||
@@ -43,9 +43,9 @@ public class SubTileSpectrolus extends SubTileGenerating {
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(!supertile.getWorldObj().isRemote) {
|
||||
if(!supertile.getWorld().isRemote) {
|
||||
Item wool = Item.getItemFromBlock(Blocks.wool);
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
|
||||
for(EntityItem item : items) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(stack != null && stack.getItem() == wool) {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class SubTileThermalily extends SubTileHydroangeas {
|
||||
|
||||
@Override
|
||||
public void doBurnParticles() {
|
||||
Botania.proxy.wispFX(supertile.getWorldObj(), supertile.xCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.9 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
|
||||
Botania.proxy.wispFX(supertile.getWorld(), supertile.xCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.9 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -49,7 +49,7 @@ public class SubTileThermalily extends SubTileHydroangeas {
|
||||
|
||||
@Override
|
||||
public void playSound() {
|
||||
supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "botania:thermalily", 0.2F, 1F);
|
||||
supertile.getWorld().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "botania:thermalily", 0.2F, 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -178,7 +178,7 @@ public class TileAlfPortal extends TileMod {
|
||||
pos = CONVERTER_X_Z_FP.apply(pos);
|
||||
|
||||
float motionMul = 0.2F;
|
||||
Botania.proxy.wispFX(getWorldObj(), xCoord + pos[0], yCoord + pos[1], zCoord + pos[2], (float) (Math.random() * 0.25F), (float) (Math.random() * 0.5F + 0.5F), (float) (Math.random() * 0.25F), (float) (Math.random() * 0.15F + 0.1F), (float) (Math.random() - 0.5F) * motionMul, (float) (Math.random() - 0.5F) * motionMul, (float) (Math.random() - 0.5F) * motionMul);
|
||||
Botania.proxy.wispFX(getWorld(), xCoord + pos[0], yCoord + pos[1], zCoord + pos[2], (float) (Math.random() * 0.25F), (float) (Math.random() * 0.5F + 0.5F), (float) (Math.random() * 0.25F), (float) (Math.random() * 0.15F + 0.1F), (float) (Math.random() - 0.5F) * motionMul, (float) (Math.random() - 0.5F) * motionMul, (float) (Math.random() - 0.5F) * motionMul);
|
||||
}
|
||||
|
||||
public boolean onWanded() {
|
||||
|
||||
@@ -102,7 +102,7 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor
|
||||
|
||||
if(cooldown > 0) {
|
||||
cooldown--;
|
||||
Botania.proxy.wispFX(getWorldObj(), xCoord + Math.random(), yCoord + 0.8, zCoord + Math.random(), 0.2F, 0.2F, 0.2F, 0.2F, -0.025F);
|
||||
Botania.proxy.wispFX(getWorld(), xCoord + Math.random(), yCoord + 0.8, zCoord + Math.random(), 0.2F, 0.2F, 0.2F, 0.2F, -0.025F);
|
||||
}
|
||||
|
||||
int newSignal = 0;
|
||||
|
||||
@@ -28,7 +28,7 @@ public class TileManaDetector extends TileMod implements IManaCollisionGhost {
|
||||
|
||||
if(expectedMeta == 1)
|
||||
for(int i = 0; i < 4; i++)
|
||||
Botania.proxy.sparkleFX(getWorldObj(), xCoord + Math.random(), yCoord + Math.random(), zCoord + Math.random(), 1F, 0.2F, 0.2F, 0.7F + 0.5F * (float) Math.random(), 5);
|
||||
Botania.proxy.sparkleFX(getWorld(), xCoord + Math.random(), yCoord + Math.random(), zCoord + Math.random(), 1F, 0.2F, 0.2F, 0.7F + 0.5F * (float) Math.random(), 5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class TileManaVoid extends TileMod implements IClientManaHandler {
|
||||
public void recieveMana(int mana) {
|
||||
if(mana > 0)
|
||||
for(int i = 0; i < 10; i++)
|
||||
Botania.proxy.sparkleFX(getWorldObj(), xCoord + Math.random(), yCoord + Math.random(), zCoord + Math.random(), 0.2F, 0.2F, 0.2F, 0.7F + 0.5F * (float) Math.random(), 5);
|
||||
Botania.proxy.sparkleFX(getWorld(), xCoord + Math.random(), yCoord + Math.random(), zCoord + Math.random(), 0.2F, 0.2F, 0.2F, 0.7F + 0.5F * (float) Math.random(), 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -70,7 +70,7 @@ public final class ManaNetworkHandler implements IManaNetwork {
|
||||
}
|
||||
|
||||
private synchronized boolean isIn(TileEntity tile, Map<World, List<TileSignature>> map) {
|
||||
List<TileSignature> list = map.get(tile.getWorldObj());
|
||||
List<TileSignature> list = map.get(tile.getWorld());
|
||||
if(list == null)
|
||||
return false;
|
||||
|
||||
@@ -106,7 +106,7 @@ public final class ManaNetworkHandler implements IManaNetwork {
|
||||
}
|
||||
|
||||
private synchronized void remove(Map<World, List<TileSignature>> map, TileEntity tile) {
|
||||
World world = tile.getWorldObj();
|
||||
World world = tile.getWorld();
|
||||
|
||||
if(!map.containsKey(world))
|
||||
return;
|
||||
@@ -120,7 +120,7 @@ public final class ManaNetworkHandler implements IManaNetwork {
|
||||
}
|
||||
|
||||
private synchronized void add(Map<World, List<TileSignature>> map, TileEntity tile) {
|
||||
World world = tile.getWorldObj();
|
||||
World world = tile.getWorld();
|
||||
|
||||
List<TileSignature> tiles;
|
||||
if(!map.containsKey(world))
|
||||
@@ -129,7 +129,7 @@ public final class ManaNetworkHandler implements IManaNetwork {
|
||||
tiles = map.get(world);
|
||||
|
||||
if(!tiles.contains(tile))
|
||||
tiles.add(new TileSignature(tile, tile.getWorldObj().isRemote));
|
||||
tiles.add(new TileSignature(tile, tile.getWorld().isRemote));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -192,7 +192,7 @@ public class InventoryHelper {
|
||||
public static IInventory getInventory(IInventory inventory) {
|
||||
if(inventory instanceof TileEntityChest) {
|
||||
TileEntity te = (TileEntity)inventory;
|
||||
return getInventory(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord);
|
||||
return getInventory(te.getWorld(), te.xCoord, te.yCoord, te.zCoord);
|
||||
}
|
||||
return inventory;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
|
||||
}
|
||||
|
||||
public EntityManaBurst(IManaSpreader spreader, boolean fake) {
|
||||
this(((TileEntity)spreader).getWorldObj());
|
||||
this(((TileEntity)spreader).getWorld());
|
||||
|
||||
TileEntity tile = (TileEntity) spreader;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class TriggerManaDetector extends StatementBase implements ITriggerIntern
|
||||
|
||||
@Override
|
||||
public boolean isTriggerActive(IStatementContainer source, IStatementParameter[] parameters) {
|
||||
World world = source.getTile().getWorldObj();
|
||||
World world = source.getTile().getWorld();
|
||||
int x = source.getTile().xCoord, y = source.getTile().yCoord, z = source.getTile().zCoord;
|
||||
|
||||
boolean output = world.getEntitiesWithinAABB(IManaBurst.class, new AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1)).size() != 0;
|
||||
|
||||
@@ -160,7 +160,7 @@ public class ItemManaMirror extends ItemMod implements IManaItem, ICoordBoundIte
|
||||
if(pool != null) {
|
||||
pool.recieveMana(mana);
|
||||
TileEntity tile = (TileEntity) pool;
|
||||
tile.getWorldObj().func_147453_f(tile.xCoord, tile.yCoord, tile.zCoord, tile.getWorldObj().getBlock(tile.xCoord, tile.yCoord, tile.zCoord));
|
||||
tile.getWorld().func_147453_f(tile.xCoord, tile.yCoord, tile.zCoord, tile.getWorld().getBlock(tile.xCoord, tile.yCoord, tile.zCoord));
|
||||
}
|
||||
}*/
|
||||
|
||||
@@ -168,7 +168,7 @@ public class ItemManaMirror extends ItemMod implements IManaItem, ICoordBoundIte
|
||||
ItemNBTHelper.setInt(stack, TAG_POS_X, pool == null ? 0 : pool.xCoord);
|
||||
ItemNBTHelper.setInt(stack, TAG_POS_Y, pool == null ? -1 : pool.yCoord);
|
||||
ItemNBTHelper.setInt(stack, TAG_POS_Z, pool == null ? 0 : pool.zCoord);
|
||||
ItemNBTHelper.setInt(stack, TAG_DIM, pool == null ? 0 : pool.getWorldObj().provider.dimensionId);
|
||||
ItemNBTHelper.setInt(stack, TAG_DIM, pool == null ? 0 : pool.getWorld().provider.dimensionId);
|
||||
}
|
||||
|
||||
public ChunkCoordinates getPoolCoords(ItemStack stack) {
|
||||
|
||||
@@ -89,7 +89,7 @@ public class ItemDiviningRod extends ItemMod implements IManaUsingItem, IAvatarW
|
||||
@Override
|
||||
public void onAvatarUpdate(IAvatarTile tile, ItemStack stack) {
|
||||
TileEntity te = (TileEntity) tile;
|
||||
World world = te.getWorldObj();
|
||||
World world = te.getWorld();
|
||||
if(tile.getCurrentMana() >= COST && tile.getElapsedFunctionalTicks() % 200 == 0 && tile.isEnabled()) {
|
||||
doHighlight(world, te.xCoord, te.yCoord, te.zCoord, 18, te.xCoord ^ te.yCoord ^ te.zCoord);
|
||||
tile.recieveMana(-COST);
|
||||
|
||||
@@ -73,7 +73,7 @@ public class ItemFireRod extends ItemMod implements IManaUsingItem, IAvatarWield
|
||||
@Override
|
||||
public void onAvatarUpdate(IAvatarTile tile, ItemStack stack) {
|
||||
TileEntity te = (TileEntity) tile;
|
||||
World world = te.getWorldObj();
|
||||
World world = te.getWorld();
|
||||
|
||||
if(!world.isRemote && tile.getCurrentMana() >= COST && tile.getElapsedFunctionalTicks() % 300 == 0 && tile.isEnabled()) {
|
||||
EntityFlameRing entity = new EntityFlameRing(world);
|
||||
|
||||
@@ -98,7 +98,7 @@ public class ItemMissileRod extends ItemMod implements IManaUsingItem, IAvatarWi
|
||||
@Override
|
||||
public void onAvatarUpdate(IAvatarTile tile, ItemStack stack) {
|
||||
TileEntity te = (TileEntity) tile;
|
||||
World world = te.getWorldObj();
|
||||
World world = te.getWorld();
|
||||
if(tile.getCurrentMana() >= COST_AVATAR && tile.getElapsedFunctionalTicks() % 3 == 0 && tile.isEnabled())
|
||||
if(spawnMissile(world, null, te.xCoord + 0.5 + (Math.random() - 0.5 * 0.1), te.yCoord + 2.5 + (Math.random() - 0.5 * 0.1), te.zCoord + (Math.random() - 0.5 * 0.1))) {
|
||||
if(!world.isRemote)
|
||||
|
||||
@@ -138,7 +138,7 @@ public class ItemRainbowRod extends ItemMod implements IManaUsingItem, IAvatarWi
|
||||
@Override
|
||||
public void onAvatarUpdate(IAvatarTile tile, ItemStack stack) {
|
||||
TileEntity te = (TileEntity) tile;
|
||||
World world = te.getWorldObj();
|
||||
World world = te.getWorld();
|
||||
|
||||
if(world.isRemote || tile.getCurrentMana() < MANA_COST_AVATAR * 25 || !tile.isEnabled())
|
||||
return;
|
||||
|
||||
@@ -155,7 +155,7 @@ public class ItemTornadoRod extends ItemMod implements IManaUsingItem, IAvatarWi
|
||||
@Override
|
||||
public void onAvatarUpdate(IAvatarTile tile, ItemStack stack) {
|
||||
TileEntity te = (TileEntity) tile;
|
||||
World world = te.getWorldObj();
|
||||
World world = te.getWorld();
|
||||
if(tile.getCurrentMana() >= COST && tile.isEnabled()) {
|
||||
int range = 5;
|
||||
int rangeY = 3;
|
||||
|
||||
Reference in new issue
Block a user