Created the proper rendering for the crystal clusters while in hand

This commit is contained in:
WayofTime 2016-02-25 22:00:02 -05:00
parent 19fec96bfd
commit ea24e7edd8
15 changed files with 261 additions and 7 deletions

View file

@ -37,6 +37,11 @@ public class ItemComponent extends Item
public static final String REAGENT_SEVERANCE = "reagentSeverance";
public static final String REAGENT_TELEPOSITION = "reagentTeleposition";
public static final String REAGENT_TRANSPOSITION = "reagentTransposition";
public static final String CRYSTAL_DEFAULT = "crystalDefault";
public static final String CRYSTAL_CORROSIVE = "crystalCorrosive";
public static final String CRYSTAL_VENGEFUL = "crystalVengeful";
public static final String CRYSTAL_DESTRUCTIVE = "crystalDestructive";
public static final String CRYSTAL_STEADFAST = "crystalSteadfast";
public ItemComponent()
{
@ -71,6 +76,11 @@ public class ItemComponent extends Item
names.add(16, REAGENT_SEVERANCE);
names.add(17, REAGENT_TELEPOSITION);
names.add(18, REAGENT_TRANSPOSITION);
names.add(19, CRYSTAL_DEFAULT);
names.add(20, CRYSTAL_CORROSIVE);
names.add(21, CRYSTAL_VENGEFUL);
names.add(22, CRYSTAL_DESTRUCTIVE);
names.add(23, CRYSTAL_STEADFAST);
}
@Override

View file

@ -1,9 +1,16 @@
package WayofTime.bloodmagic.item.block;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import WayofTime.bloodmagic.api.soul.EnumDemonWillType;
import WayofTime.bloodmagic.tile.TileDemonCrystal;
public class ItemBlockDemonCrystal extends ItemBlock
{
@ -24,4 +31,21 @@ public class ItemBlockDemonCrystal extends ItemBlock
{
return meta;
}
@Override
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState newState)
{
if (super.placeBlockAt(stack, player, world, pos, side, hitX, hitY, hitZ, newState))
{
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileDemonCrystal)
{
((TileDemonCrystal) tile).setPlacement(side);
}
return true;
}
return false;
}
}