Added flame particles to the incense altar for when it is actually operating.

This commit is contained in:
WayofTime 2016-02-04 21:20:29 -05:00
parent fd671f2902
commit 333c6d71d2
2 changed files with 18 additions and 3 deletions

View file

@ -1,12 +1,12 @@
package WayofTime.bloodmagic.registry;
import WayofTime.bloodmagic.api.BloodMagicAPI;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.registry.GameRegistry;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.ConfigHandler;
import WayofTime.bloodmagic.api.BloodMagicAPI;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.block.BlockAlchemyArray;
import WayofTime.bloodmagic.block.BlockAltar;
@ -28,7 +28,6 @@ import WayofTime.bloodmagic.block.BlockRitualStone;
import WayofTime.bloodmagic.block.BlockSoulForge;
import WayofTime.bloodmagic.block.BlockSpectral;
import WayofTime.bloodmagic.block.BlockTeleposer;
import WayofTime.bloodmagic.block.BlockTestSpellBlock;
import WayofTime.bloodmagic.item.block.ItemBlockBloodRune;
import WayofTime.bloodmagic.item.block.ItemBlockBloodStoneBrick;
import WayofTime.bloodmagic.item.block.ItemBlockCrystal;

View file

@ -12,7 +12,9 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.ITickable;
import net.minecraft.world.WorldServer;
import WayofTime.bloodmagic.api.incense.EnumTranquilityType;
import WayofTime.bloodmagic.api.incense.IIncensePath;
import WayofTime.bloodmagic.api.incense.IncenseTranquilityRegistry;
@ -51,9 +53,23 @@ public class TileIncenseAltar extends TileInventory implements ITickable
recheckConstruction();
}
boolean hasPerformed = false;
for (EntityPlayer player : playerList)
{
PlayerSacrificeHelper.incrementIncense(player, 0, incenseAddition, incenseAddition / 100); //TODO: Figure out what the hell you are doing.
if (PlayerSacrificeHelper.incrementIncense(player, 0, incenseAddition, incenseAddition / 100))
{
hasPerformed = true;
}
}
if (hasPerformed)
{
if (worldObj.rand.nextInt(4) == 0 && worldObj instanceof WorldServer)
{
WorldServer server = (WorldServer) worldObj;
server.spawnParticle(EnumParticleTypes.FLAME, pos.getX() + 0.5, pos.getY() + 1.2, pos.getZ() + 0.5, 1, 0.02, 0.03, 0.02, 0, new int[0]);
}
}
}