Added Arcane Ashes to draw alchemy arrays.
This commit is contained in:
parent
adef7f1ce9
commit
1b9f72b494
11 changed files with 86 additions and 27 deletions
|
@ -1,16 +1,13 @@
|
|||
package WayofTime.bloodmagic.block;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
|
@ -19,7 +16,7 @@ import net.minecraftforge.fml.relauncher.Side;
|
|||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.tile.TileAlchemyArray;
|
||||
import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry;
|
||||
import WayofTime.bloodmagic.tile.TileAlchemyArray;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
|
||||
|
@ -33,6 +30,7 @@ public class BlockAlchemyArray extends BlockContainer
|
|||
setUnlocalizedName(Constants.Mod.MODID + ".alchemyArray");
|
||||
setCreativeTab(BloodMagic.tabBloodMagic);
|
||||
this.setHardness(0.1f);
|
||||
this.setBlockBounds(0, 0, 0, 1, 0.1f, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -54,12 +52,6 @@ public class BlockAlchemyArray extends BlockContainer
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List list, Entity collidingEntity)
|
||||
{
|
||||
this.setBlockBounds(0, 0, 0, 1, 0.1f, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
|
@ -72,13 +64,16 @@ public class BlockAlchemyArray extends BlockContainer
|
|||
|
||||
if (playerItem != null)
|
||||
{
|
||||
if (array.getStackInSlot(0) == null)
|
||||
if (array.getStackInSlot(0) == null && AlchemyArrayRecipeRegistry.getRecipeForInput(playerItem) != null)
|
||||
{
|
||||
Utils.insertItemToTile(array, player, 0);
|
||||
} else
|
||||
} else if (array.getStackInSlot(0) != null && AlchemyArrayRecipeRegistry.getAlchemyArrayEffect(array.getStackInSlot(0), playerItem) != null)
|
||||
{
|
||||
Utils.insertItemToTile(array, player, 1);
|
||||
array.attemptCraft();
|
||||
} else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue