Skip to content

Commit

Permalink
Fix entity detection in smelteries
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Sep 11, 2014
1 parent 448d29e commit 8ab25ca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,10 @@ public void updateEntity ()
void detectEntities ()
{
// todo: fix this with min-max pos instead of center pos
/*
if (centerPos == null)
if (minPos == null || maxPos == null)
return;

AxisAlignedBB box = AxisAlignedBB.getBoundingBox(centerPos.x, centerPos.y, centerPos.z, centerPos.x + 1.0D, centerPos.y + 1.0D, centerPos.z + 1.0D).expand(1.0D, 0.0D, 1.0D);
AxisAlignedBB box = AxisAlignedBB.getBoundingBox(minPos.x, minPos.y, minPos.z, maxPos.x+1, minPos.y + layers, maxPos.z+1);

List list = worldObj.getEntitiesWithinAABB(Entity.class, box);
for (Object o : list)
Expand Down Expand Up @@ -383,7 +382,6 @@ else if (PHConstruct.throwableSmeltery && o instanceof EntityItem)
handleItemEntity((EntityItem) o);
}
}
*/
}

private void handleItemEntity (EntityItem item)
Expand Down

0 comments on commit 8ab25ca

Please sign in to comment.