Updated changelog and added recipes. Also created behaviour for the crystals to drop single crystals.

This commit is contained in:
WayofTime 2016-02-27 19:34:42 -05:00
parent 620023d098
commit 7106579201
4 changed files with 60 additions and 2 deletions

View file

@ -24,10 +24,15 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.altar.IAltarManipulator;
import WayofTime.bloodmagic.api.iface.IAltarReader;
import WayofTime.bloodmagic.api.soul.EnumDemonWillType;
import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler;
import WayofTime.bloodmagic.item.ItemComponent;
import WayofTime.bloodmagic.item.ItemDemonCrystal;
import WayofTime.bloodmagic.tile.TileAltar;
import WayofTime.bloodmagic.tile.TileDemonCrystal;
import WayofTime.bloodmagic.util.Utils;
public class BlockDemonCrystal extends BlockContainer
{
@ -158,7 +163,7 @@ public class BlockDemonCrystal extends BlockContainer
world.removeTileEntity(pos);
}
private ItemStack getItemStackDropped(EnumDemonWillType type, int crystalNumber)
public static ItemStack getItemStackDropped(EnumDemonWillType type, int crystalNumber)
{
ItemStack stack = null;
switch (type)
@ -190,6 +195,26 @@ public class BlockDemonCrystal extends BlockContainer
return 0;
}
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ)
{
if (world.isRemote)
{
return true;
}
TileDemonCrystal crystal = (TileDemonCrystal) world.getTileEntity(pos);
if (PlayerDemonWillHandler.getTotalDemonWill(EnumDemonWillType.DEFAULT, player) > 1024)
{
crystal.dropSingleCrystal();
world.markBlockForUpdate(pos);
}
return true;
}
// @Override
// public java.util.List<ItemStack> getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
// {