mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-29 08:26:37 +01:00
Fix chute item dupe (#939)
This commit is contained in:
parent
d1e9b76a24
commit
fc459732fc
3 changed files with 6 additions and 2 deletions
|
@ -82,7 +82,7 @@ public class AirCurrent {
|
|||
protected void tickAffectedEntities(World world, Direction facing) {
|
||||
for (Iterator<Entity> iterator = caughtEntities.iterator(); iterator.hasNext();) {
|
||||
Entity entity = iterator.next();
|
||||
if (!entity.getBoundingBox()
|
||||
if (!entity.isAlive() || !entity.getBoundingBox()
|
||||
.intersects(bounds)) {
|
||||
iterator.remove();
|
||||
continue;
|
||||
|
|
|
@ -153,6 +153,8 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
|||
|
||||
for (ItemEntity itemEntity : world.getEntitiesWithinAABB(ItemEntity.class,
|
||||
new AxisAlignedBB(pos.down()).shrink(.125f))) {
|
||||
if (!itemEntity.isAlive() || !itemEntity.onGround)
|
||||
continue;
|
||||
ItemStack stack = itemEntity.getItem();
|
||||
Optional<PressingRecipe> recipe = getRecipe(stack);
|
||||
if (!recipe.isPresent())
|
||||
|
@ -233,7 +235,7 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
|||
for (Entity entity : world.getEntitiesWithinAABBExcludingEntity(null, bb)) {
|
||||
if (!(entity instanceof ItemEntity))
|
||||
continue;
|
||||
if (!entity.isAlive())
|
||||
if (!entity.isAlive() || !entity.onGround)
|
||||
continue;
|
||||
ItemEntity itemEntity = (ItemEntity) entity;
|
||||
pressedItems.add(itemEntity.getItem());
|
||||
|
|
|
@ -223,6 +223,8 @@ public class ChuteTileEntity extends SmartTileEntity implements IHaveGoggleInfor
|
|||
AxisAlignedBB searchArea =
|
||||
new AxisAlignedBB(center.add(0, -bottomPullDistance - 0.5, 0), center.add(0, -0.5, 0)).grow(.45f);
|
||||
for (ItemEntity itemEntity : world.getEntitiesWithinAABB(ItemEntity.class, searchArea)) {
|
||||
if (!itemEntity.isAlive())
|
||||
continue;
|
||||
ItemStack entityItem = itemEntity.getItem();
|
||||
if (!canAcceptItem(entityItem))
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue