mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +01:00
bleh
This commit is contained in:
parent
c2209f0596
commit
3a56a962b2
1 changed files with 4 additions and 3 deletions
|
@ -10,6 +10,9 @@
|
||||||
|
|
||||||
package de.ellpeck.actuallyadditions.mod.tile;
|
package de.ellpeck.actuallyadditions.mod.tile;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor;
|
import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
||||||
|
@ -21,8 +24,6 @@ import net.minecraft.util.EnumParticleTypes;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.world.WorldServer;
|
import net.minecraft.world.WorldServer;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
public class TileEntityRangedCollector extends TileEntityInventoryBase implements IButtonReactor{
|
public class TileEntityRangedCollector extends TileEntityInventoryBase implements IButtonReactor{
|
||||||
|
|
||||||
public static final int RANGE = 6;
|
public static final int RANGE = 6;
|
||||||
|
@ -53,7 +54,7 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void activateOnPulse(){
|
public void activateOnPulse(){
|
||||||
ArrayList<EntityItem> items = (ArrayList<EntityItem>)this.world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(this.pos.getX()-RANGE, this.pos.getY()-RANGE, this.pos.getZ()-RANGE, this.pos.getX()+RANGE, this.pos.getY()+RANGE, this.pos.getZ()+RANGE));
|
List<EntityItem> items = this.world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(this.pos.getX()-RANGE, this.pos.getY()-RANGE, this.pos.getZ()-RANGE, this.pos.getX()+RANGE, this.pos.getY()+RANGE, this.pos.getZ()+RANGE));
|
||||||
if(!items.isEmpty()){
|
if(!items.isEmpty()){
|
||||||
for(EntityItem item : items){
|
for(EntityItem item : items){
|
||||||
if(!item.isDead && !item.cannotPickup() && StackUtil.isValid(item.getItem())){
|
if(!item.isDead && !item.cannotPickup() && StackUtil.isValid(item.getItem())){
|
||||||
|
|
Loading…
Reference in a new issue