mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Closes #1255
This commit is contained in:
parent
9e2cfa2770
commit
0b0530abaa
1 changed files with 3 additions and 1 deletions
|
@ -48,6 +48,7 @@ import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Vec3i;
|
||||||
import net.minecraft.world.WorldServer;
|
import net.minecraft.world.WorldServer;
|
||||||
import net.minecraftforge.common.util.FakePlayerFactory;
|
import net.minecraftforge.common.util.FakePlayerFactory;
|
||||||
|
|
||||||
|
@ -192,7 +193,8 @@ public class MethodHandler implements IMethodHandler {
|
||||||
|
|
||||||
//Converting the Items
|
//Converting the Items
|
||||||
AxisAlignedBB aabb = new AxisAlignedBB(tile.getPosition().getX(), tile.getPosition().getY(), tile.getPosition().getZ(), hitBlock.getX() + 1, hitBlock.getY() + 1, hitBlock.getZ() + 1);
|
AxisAlignedBB aabb = new AxisAlignedBB(tile.getPosition().getX(), tile.getPosition().getY(), tile.getPosition().getZ(), hitBlock.getX() + 1, hitBlock.getY() + 1, hitBlock.getZ() + 1);
|
||||||
aabb.grow(0.02, 0.02, 0.02);
|
Vec3i dir = tile.getOrientation().getDirectionVec();
|
||||||
|
aabb = aabb.grow(0.02, 0.02, 0.02).expand(dir.getX(), dir.getY(), dir.getZ());
|
||||||
List<EntityItem> items = tile.getWorldObject().getEntitiesWithinAABB(EntityItem.class, aabb);
|
List<EntityItem> items = tile.getWorldObject().getEntitiesWithinAABB(EntityItem.class, aabb);
|
||||||
for (EntityItem item : items) {
|
for (EntityItem item : items) {
|
||||||
ItemStack stack = item.getItem();
|
ItemStack stack = item.getItem();
|
||||||
|
|
Loading…
Reference in a new issue