mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 19:29:31 +00:00
Some particles, sounds and fixes.
This commit is contained in:
1 parent
4895445971
commit
ccf76f8932
3 files changed
+12
-5
No files matched your search
@@ -55,7 +55,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]);
|
||||
Block block =supertile.getWorldObj().getBlock(coords.posX, coords.posY, coords.posZ);
|
||||
Block block = supertile.getWorldObj().getBlock(coords.posX, coords.posY, coords.posZ);
|
||||
if(block != Blocks.air) {
|
||||
String oredict = OreDictionary.getOreName(OreDictionary.getOreID(new ItemStack(block, 1, supertile.getWorldObj().getBlockMetadata(coords.posX, coords.posY, coords.posZ))));
|
||||
Block output = oredict.equals("stone") ? ModBlocks.livingrock : oredict.endsWith("logWood") ? ModBlocks.livingwood : null;
|
||||
@@ -75,6 +75,7 @@ public class SubTilePureDaisy extends SubTileEntity {
|
||||
|
||||
Botania.proxy.wispFX(supertile.getWorldObj(), x, y, z, 1F, 1F, 1F, (float) Math.random() / 2F);
|
||||
}
|
||||
supertile.getWorldObj().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(block) + (supertile.getWorldObj().getBlockMetadata(coords.posX, coords.posY, coords.posZ) << 12));
|
||||
}
|
||||
} else ticksRemaining[positionAt] = 200;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ package vazkii.botania.common.block.subtile.functional;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBush;
|
||||
import net.minecraft.block.BlockCrops;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
@@ -35,9 +36,12 @@ public class SubTileAgricarnation extends SubTileFunctional {
|
||||
continue;
|
||||
|
||||
if(isPlant(x, y, z) && mana > 5) {
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
mana -= 5;
|
||||
supertile.getWorldObj().scheduleBlockUpdate(x, y, z, block, 1);
|
||||
supertile.getWorldObj().playAuxSFX(2005, x, y, z, 6 + supertile.getWorldObj().rand.nextInt(4));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,7 +49,7 @@ public class SubTileAgricarnation extends SubTileFunctional {
|
||||
|
||||
boolean isPlant(int x, int y, int z) {
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
if(block == Blocks.grass || block == Blocks.leaves || block == Blocks.leaves2 || block instanceof BlockBush)
|
||||
if(block == Blocks.grass || block == Blocks.leaves || block == Blocks.leaves2 || (block instanceof BlockBush && !(block instanceof BlockCrops)))
|
||||
return false;
|
||||
|
||||
Material mat = block.getMaterial();
|
||||
|
||||
@@ -40,10 +40,12 @@ public class SubTileJadedAmaranthus extends SubTileFunctional {
|
||||
|
||||
for(int i = 0; i < range * 2; i++) {
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
if((block == Blocks.grass || block == Blocks.dirt || block == Blocks.farmland) && supertile.getWorldObj().isAirBlock(x, y + 1, z)) {
|
||||
if((block == Blocks.grass || block == Blocks.dirt || block == Blocks.farmland) && (supertile.getWorldObj().isAirBlock(x, y + 1, z) || supertile.getWorldObj().getBlock(x, y + 1, z).isReplaceable(supertile.getWorldObj(), x, y + 1, z))) {
|
||||
int color = supertile.getWorldObj().rand.nextInt(16);
|
||||
if(ModBlocks.flower.canBlockStay(supertile.getWorldObj(), x, y + 1, z))
|
||||
if(ModBlocks.flower.canBlockStay(supertile.getWorldObj(), x, y + 1, z)) {
|
||||
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);
|
||||
}
|
||||
|
||||
mana -= COST;
|
||||
sync();
|
||||
|
||||
Reference in new issue
Block a user