Rafflowsia can now eat anything except itself

This commit is contained in:
Vincent Lee committed 2017-07-30 17:18:49 -05:00
1 parent 966406d195
commit a2a0ba4275
1 file changed
+3 -6
@@ -49,13 +49,13 @@ public class SubTileRafflowsia extends SubTileGenerating {
for(int j = 0; j < RANGE * 2 + 1; j++)
for(int k = 0; k < RANGE * 2 + 1; k++) {
BlockPos pos = supertile.getPos().add(i - RANGE, j - RANGE, k - RANGE);
supertile.getWorld().getBlockState(pos).getBlock();
TileEntity tile = supertile.getWorld().getTileEntity(pos);
if(tile instanceof ISubTileContainer) {
SubTileEntity stile = ((ISubTileContainer) tile).getSubTile();
String name = stile.getUnlocalizedName();
if(stile instanceof SubTileGenerating && !(stile instanceof SubTileRafflowsia)) {
if(!(stile instanceof SubTileRafflowsia)) {
boolean last = name.equals(lastFlower);
if(last)
lastFlowerTimes++;
@@ -66,10 +66,7 @@ public class SubTileRafflowsia extends SubTileGenerating {
float mod = 1F / lastFlowerTimes;
IBlockState state = supertile.getWorld().getBlockState(pos);
supertile.getWorld().setBlockToAir(pos);
supertile.getWorld().playEvent(2001, pos, Block.getStateId(state));
getWorld().destroyBlock(pos, false);
this.mana += mana * mod;
sync();
return;