Some of genereating flora

This commit is contained in:
Vincent Lee committed 2015-11-24 01:10:03 -06:00
1 parent 605e38337a
commit b4d9c3ded8
16 files changed
+70 -76

No files matched your search

@@ -55,10 +55,6 @@ public class SubTileEntity {
supertile = tile;
}
public boolean canUpdate() {
return true;
}
public void onUpdate() {
ticksExisted++;
}
@@ -14,11 +14,6 @@ import vazkii.botania.api.subtile.SubTileEntity;
public class SubTileDecor extends SubTileEntity {
@Override
public boolean canUpdate() {
return false;
}
public static class Daybloom extends SubTileDecor { }
public static class Nightshade extends SubTileDecor { }
public static class Hydroangeas extends SubTileDecor { }
@@ -11,7 +11,7 @@
package vazkii.botania.common.block.subtile;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraft.util.EnumFacing;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.mana.IManaPool;
import vazkii.botania.api.subtile.SubTileEntity;
@@ -28,15 +28,15 @@ public class SubTileManastar extends SubTileEntity {
super.onUpdate();
int mana = 0;
for(ForgeDirection dir : LibMisc.CARDINAL_DIRECTIONS) {
TileEntity tile = supertile.getWorld().getTileEntity(supertile.xCoord + dir.offsetX, supertile.yCoord, supertile.zCoord + dir.offsetZ);
for(EnumFacing dir : LibMisc.CARDINAL_DIRECTIONS) {
TileEntity tile = supertile.getWorld().getTileEntity(supertile.getPos().offset(dir));
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.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);
Botania.proxy.wispFX(supertile.getWorld(), supertile.getPos().getX() + 0.55 + Math.random() * 0.2 - 0.1, supertile.getPos().getY() + 0.75 + Math.random() * 0.2 - 0.1, supertile.getPos().getZ() + 0.5, more ? 0.05F : 1F, 0.05F, more ? 1F : 0.05F, (float) Math.random() / 7, (float) -Math.random() / 50);
}
if(ticksExisted % 60 == 0)
@@ -13,6 +13,7 @@ package vazkii.botania.common.block.subtile;
import net.minecraft.block.Block;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.lexicon.LexiconEntry;
@@ -28,15 +29,15 @@ public class SubTilePureDaisy extends SubTileEntity {
private static final String TAG_POSITION = "position";
private static final String TAG_TICKS_REMAINING = "ticksRemaining";
private static final int[][] POSITIONS = new int[][] {
{ -1, 0, -1 },
{ -1, 0, 0 },
{ -1, 0, 1 },
{ 0, 0, 1 },
{ 1, 0, 1 },
{ 1, 0, 0 },
{ 1, 0, -1 },
{ 0, 0, -1 },
private static final BlockPos[] POSITIONS = {
new BlockPos(-1, 0, -1 ),
new BlockPos(-1, 0, 0 ),
new BlockPos(-1, 0, 1 ),
new BlockPos(0, 0, 1 ),
new BlockPos(1, 0, 1 ),
new BlockPos(1, 0, 0 ),
new BlockPos(1, 0, -1 ),
new BlockPos(0, 0, -1 ),
};
int positionAt = 0;
@@ -50,11 +51,11 @@ public class SubTilePureDaisy extends SubTileEntity {
if(positionAt == POSITIONS.length)
positionAt = 0;
int[] acoords = POSITIONS[positionAt];
BlockPos coords = new BlockPos(supertile.xCoord + acoords[0], supertile.yCoord + acoords[1], supertile.zCoord + acoords[2]);
BlockPos acoords = POSITIONS[positionAt];
BlockPos coords = supertile.getPos().add(acoords);
World world = supertile.getWorld();
if(!world.isAirBlock(coords.posX, coords.posY, coords.posZ)) {
Block block = world.getBlock(coords.posX, coords.posY, coords.posZ);
if(!world.isAirBlock(coords)) {
Block block = world.getBlockState(coords).getBlock();
int meta = world.getBlockMetadata(coords.posX, coords.posY, coords.posZ);
RecipePureDaisy recipe = null;
for(RecipePureDaisy recipe_ : BotaniaAPI.pureDaisyRecipes)
@@ -31,7 +31,7 @@ public class SubTileArcaneRose extends SubTileGenerating {
if(mana >= getMaxMana())
return;
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));
List<EntityPlayer> players = supertile.getWorld().getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(supertile.getPos().add(-RANGE, -RANGE, -RANGE), supertile.getPos().add(RANGE + 1, RANGE + 1, RANGE + 1)));
for(EntityPlayer player : players)
if(ExperienceHelper.getPlayerXP(player) >= 1 && player.onGround) {
ExperienceHelper.drainPlayerXP(player, 1);
@@ -16,6 +16,7 @@ import java.util.ArrayList;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraftforge.common.util.ForgeDirection;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.ISubTileContainer;
@@ -31,6 +32,7 @@ public class SubTileDaybloom extends SubTilePassiveGenerating {
private static final String TAG_SAVED_POSITION = "savedPosition";
int primePositionX, primePositionY, primePositionZ;
BlockPos primePosition;
boolean savedPosition;
@Override
@@ -42,7 +42,7 @@ public class SubTileEndoflame extends SubTileGenerating {
if(mana < getMaxMana() && !supertile.getWorld().isRemote) {
boolean didSomething = false;
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));
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.getPos().add(-RANGE, -RANGE, -RANGE), supertile.getPos().add(RANGE + 1, RANGE + 1, 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.getWorld().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "botania:endoflame", 0.2F, 1F);
supertile.getWorld().playSoundEffect(supertile.getPos().getX(), supertile.getPos().getY(), supertile.getPos().getZ(), "botania:endoflame", 0.2F, 1F);
if(stack.stackSize == 0)
item.setDead();
@@ -71,7 +71,7 @@ public class SubTileEndoflame extends SubTileGenerating {
}
} else {
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);
Botania.proxy.wispFX(supertile.getWorld(), supertile.getPos().getX() + 0.55 + Math.random() * 0.2 - 0.1, supertile.getPos().getY() + 0.55 + Math.random() * 0.2 - 0.1, supertile.getPos().getZ() + 0.5, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
burnTime--;
}
@@ -14,6 +14,8 @@ import java.util.List;
import net.minecraft.entity.item.EntityTNTPrimed;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.MathHelper;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.RadiusDescriptor;
@@ -30,9 +32,9 @@ public class SubTileEntropinnyum extends SubTileGenerating {
super.onUpdate();
if(mana == 0) {
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));
List<EntityTNTPrimed> tnts = supertile.getWorld().getEntitiesWithinAABB(EntityTNTPrimed.class, new AxisAlignedBB(supertile.getPos().add(-RANGE, -RANGE, -RANGE), supertile.getPos().add(RANGE + 1, RANGE + 1, RANGE + 1)));
for(EntityTNTPrimed tnt : tnts) {
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(tnt.fuse == 1 && !tnt.isDead && !supertile.getWorld().getBlockState(new BlockPos(tnt)).getBlock().getMaterial().isLiquid()) {
if(!supertile.getWorld().isRemote) {
tnt.setDead();
mana += getMaxMana();
@@ -43,7 +45,7 @@ public class SubTileEntropinnyum extends SubTileGenerating {
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.getWorld().spawnParticle("hugeexplosion", tnt.posX, tnt.posY, tnt.posZ, 1D, 0D, 0D);
supertile.getWorld().spawnParticle(EnumParticleTypes.EXPLOSION_HUGE, tnt.posX, tnt.posY, tnt.posZ, 1D, 0D, 0D);
return;
}
}
@@ -43,15 +43,15 @@ public class SubTileGourmaryllis extends SubTileGenerating {
}
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));
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.getPos().add(-RANGE, -RANGE, -RANGE), supertile.getPos().add(RANGE + 1, RANGE + 1, RANGE + 1)));
for(EntityItem item : items) {
ItemStack stack = item.getEntityItem();
if(stack != null && stack.getItem() instanceof ItemFood && !item.isDead) {
if(cooldown == 0) {
int val = ((ItemFood) stack.getItem()).func_150905_g(stack);
int val = ((ItemFood) stack.getItem()).getHealAmount(stack);
storedMana = val * val * 64;
cooldown = val * 10;
supertile.getWorld().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "random.eat", 0.2F, 0.5F + (float) Math.random() * 0.5F);
supertile.getWorld().playSoundEffect(supertile.getPos().getX(), supertile.getPos().getY(), supertile.getPos().getZ(), "random.eat", 0.2F, 0.5F + (float) Math.random() * 0.5F);
sync();
}
@@ -199,7 +199,7 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
@Override
public int getDelayBetweenPassiveGeneration() {
boolean rain = supertile.getWorld().getWorldChunkManager().getBiomeGenAt(supertile.xCoord, supertile.zCoord).getIntRainfall() > 0 && (supertile.getWorld().isRaining() || supertile.getWorld().isThundering());
boolean rain = supertile.getWorld().getBiomeGenForCoords(supertile.getPos()).getIntRainfall() > 0 && (supertile.getWorld().isRaining() || supertile.getWorld().isThundering());
return rain ? 1 : 2;
}
@@ -12,6 +12,8 @@ package vazkii.botania.common.block.subtile.generating;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCake;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockPos;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.RadiusDescriptor;
import vazkii.botania.api.subtile.SubTileGenerating;
@@ -31,18 +33,17 @@ public class SubTileKekimurus extends SubTileGenerating {
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.getWorld().getBlock(x, y, z);
BlockPos pos = supertile.getPos().add(i - RANGE, j - RANGE, k - RANGE);
IBlockState state = supertile.getWorld().getBlockState(pos);
Block block = state.getBlock();
if(block instanceof BlockCake) {
int meta = supertile.getWorld().getBlockMetadata(x, y, z) + 1;
if(meta == 6)
supertile.getWorld().setBlockToAir(x, y, z);
else supertile.getWorld().setBlockMetadataWithNotify(x, y, z, meta, 1 | 2);
int nextSlicesEaten = ((Integer) state.getValue(BlockCake.BITES)) + 1;
if(nextSlicesEaten == 6)
supertile.getWorld().setBlockToAir(pos);
else supertile.getWorld().setBlockState(pos, state.withProperty(BlockCake.BITES, nextSlicesEaten), 1 | 2);
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);
supertile.getWorld().playAuxSFX(2001, pos, Block.getStateId(state.withProperty(BlockCake.BITES, nextSlicesEaten)));
supertile.getWorld().playSoundEffect(supertile.getPos().getX(), supertile.getPos().getY(), supertile.getPos().getZ(), "random.eat", 1F, 0.5F + (float) Math.random() * 0.5F);
this.mana += mana;
sync();
return;
@@ -16,12 +16,13 @@ import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.RadiusDescriptor;
import vazkii.botania.api.subtile.SubTileGenerating;
@@ -55,27 +56,23 @@ public class SubTileMunchdew extends SubTileGenerating {
eatLeaves : {
if(getMaxMana() - mana >= manaPerLeaf && !supertile.getWorld().isRemote && ticksExisted % 4 == 0) {
List<BlockPos> coords = new ArrayList();
int x = supertile.xCoord;
int y = supertile.yCoord;
int z = supertile.zCoord;
BlockPos pos = supertile.getPos();
for(int i = -RANGE; i < RANGE + 1; i++)
for(int j = 0; j < RANGE_Y; j++)
for(int k = -RANGE; k < RANGE + 1; k++) {
int xp = x + i;
int yp = y + j;
int zp = z + k;
Block block = supertile.getWorld().getBlock(xp, yp, zp);
BlockPos pos_ = pos.add(i, j, k);
Block block = supertile.getWorld().getBlockState(pos_).getBlock();
if(block.getMaterial() == Material.leaves) {
boolean exposed = false;
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
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)) {
for(EnumFacing dir : EnumFacing.VALUES)
if(supertile.getWorld().getBlockState(pos_.offset(dir)).getBlock().isAir(supertile.getWorld(), pos_.offset(dir))) {
exposed = true;
break;
}
if(exposed)
coords.add(new BlockPos(xp, yp, zp));
coords.add(pos_);
}
}
@@ -84,13 +81,12 @@ public class SubTileMunchdew extends SubTileGenerating {
Collections.shuffle(coords);
BlockPos breakCoords = coords.get(0);
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);
IBlockState state = supertile.getWorld().getBlockState(breakCoords);
supertile.getWorld().setBlockToAir(breakCoords);
ticksWithoutEating = 0;
ateOnce = true;
if(ConfigHandler.blockBreakParticles)
supertile.getWorld().playAuxSFX(2001, breakCoords.posX, breakCoords.posY, breakCoords.posZ, Block.getIdFromBlock(block) + (meta << 12));
supertile.getWorld().playAuxSFX(2001, breakCoords, Block.getStateId(state));
mana += manaPerLeaf;
}
}
@@ -14,6 +14,8 @@ import java.util.List;
import net.minecraft.entity.monster.EntitySlime;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
@@ -36,7 +38,7 @@ public class SubTileNarslimmus extends SubTileGenerating {
super.onUpdate();
if(ticksExisted % 5 == 0) {
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));
List<EntitySlime> slimes = supertile.getWorld().getEntitiesWithinAABB(EntitySlime.class, new AxisAlignedBB(supertile.getPos().add(-RANGE, -RANGE, -RANGE), supertile.getPos().add(RANGE + 1, RANGE + 1, RANGE + 1)));
for(EntitySlime slime : slimes) {
if(slime.getEntityData().getBoolean(TAG_WORLD_SPAWNED) && !slime.isDead) {
int size = slime.getSlimeSize();
@@ -55,7 +57,7 @@ public class SubTileNarslimmus extends SubTileGenerating {
float f2 = MathHelper.sin(f) * size * 0.5F * f1;
float f3 = MathHelper.cos(f) * size * 0.5F * f1;
float f4 = slime.worldObj.rand.nextFloat() * size * 0.5F * f1;
slime.worldObj.spawnParticle("slime", slime.posX + f2, slime.boundingBox.minY + f4, slime.posZ + f3, 0.0D, 0.0D, 0.0D);
slime.worldObj.spawnParticle(EnumParticleTypes.SLIME, slime.posX + f2, slime.getEntityBoundingBox().minY + f4, slime.posZ + f3, 0.0D, 0.0D, 0.0D);
}
break;
}
@@ -92,7 +94,7 @@ public class SubTileNarslimmus extends SubTileGenerating {
}
public static boolean isSlimeChunk(World world, int x, int z) {
Chunk chunk = world.getChunkFromBlockCoords(x, z);
Chunk chunk = world.getChunkFromBlockCoords(new BlockPos(x, 0, z));
return chunk.getRandomWithSeed(987234911L).nextInt(10) == 0;
}
@@ -17,6 +17,7 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.ISubTileContainer;
@@ -46,11 +47,9 @@ public class SubTileRafflowsia extends SubTileGenerating {
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.getWorld().getBlock(x, y, z);
TileEntity tile = supertile.getWorld().getTileEntity(x, y, z);
BlockPos pos = supertile.getPos().add(i - RANGE, j - RANGE, k - RANGE);
Block block = supertile.getWorld().getBlockState(pos).getBlock();
TileEntity tile = supertile.getWorld().getTileEntity(pos);
if(tile instanceof ISubTileContainer) {
SubTileEntity stile = ((ISubTileContainer) tile).getSubTile();
String name = stile.getUnlocalizedName();
@@ -67,9 +66,9 @@ public class SubTileRafflowsia extends SubTileGenerating {
float mod = 1F / lastFlowerTimes;
int meta = supertile.getWorld().getBlockMetadata(x, y, z) + 1;
supertile.getWorld().setBlockToAir(x, y, z);
supertile.getWorld().setBlockToAir(pos);
supertile.getWorld().playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
supertile.getWorld().playAuxSFX(2001, pos, Block.getIdFromBlock(block) + (meta << 12));
this.mana += mana * mod;
sync();
return;
@@ -45,7 +45,7 @@ public class SubTileSpectrolus extends SubTileGenerating {
if(!supertile.getWorld().isRemote) {
Item wool = Item.getItemFromBlock(Blocks.wool);
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));
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.getPos().add(-RANGE, -RANGE, -RANGE), supertile.getPos().add(RANGE + 1, RANGE + 1, RANGE + 1)));
for(EntityItem item : items) {
ItemStack stack = item.getEntityItem();
if(stack != null && stack.getItem() == wool) {
@@ -99,7 +99,7 @@ public class SubTileSpectrolus extends SubTileGenerating {
mc.fontRendererObj.drawStringWithShadow(stackName, x + 20, y + 5, color);
RenderHelper.enableGUIStandardItemLighting();
RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, stack, x, y);
mc.getRenderItem().renderItemAndEffectIntoGUI(stack, x, y);
RenderHelper.disableStandardItemLighting();
}
@@ -29,7 +29,7 @@ public class SubTileThermalily extends SubTileHydroangeas {
@Override
public void doBurnParticles() {
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);
Botania.proxy.wispFX(supertile.getWorld(), supertile.getPos().getX() + 0.55 + Math.random() * 0.2 - 0.1, supertile.getPos().getY() + 0.9 + Math.random() * 0.2 - 0.1, supertile.getPos().getZ() + 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.getWorld().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "botania:thermalily", 0.2F, 1F);
supertile.getWorld().playSoundEffect(supertile.getPos().getX(), supertile.getPos().getY(), supertile.getPos().getZ(), "botania:thermalily", 0.2F, 1F);
}
@Override