According to lexicon sparks only read from top of inventory

This commit is contained in:
Vincent Lee committed 2016-03-07 13:36:27 -06:00
1 parent 1229141b2f
commit bb89013f1e
2 files changed
+3 -2

No files matched your search

@@ -23,6 +23,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import vazkii.botania.api.corporea.ICorporeaSpark;
@@ -190,7 +191,7 @@ public class EntityCorporeaSpark extends Entity implements ICorporeaSpark {
int x = MathHelper.floor_double(posX);
int y = MathHelper.floor_double(posY - 1);
int z = MathHelper.floor_double(posZ);
return InventoryHelper2.getInventory(worldObj, new BlockPos(x, y, z), null);
return InventoryHelper2.getInventory(worldObj, new BlockPos(x, y, z), EnumFacing.UP);
}
@Override
@@ -42,7 +42,7 @@ public class ItemCorporeaSpark extends ItemMod {
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float xv, float yv, float zv) {
TileEntity tile = world.getTileEntity(pos);
if(tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null) && !CorporeaHelper.doesBlockHaveSpark(world, pos)) {
if(tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP) && !CorporeaHelper.doesBlockHaveSpark(world, pos)) {
stack.stackSize--;
if(!world.isRemote) {
EntityCorporeaSpark spark = new EntityCorporeaSpark(world);