mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 13:09:42 +00:00
Luminizers can now move items.
This commit is contained in:
1 parent
e08df30363
commit
14cd05f7e2
3 files changed
+19
-10
No files matched your search
@@ -15,7 +15,9 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -80,9 +82,12 @@ public class BlockLightLauncher extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
if(!relays.isEmpty()) {
|
||||
List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1));
|
||||
AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||
List<Entity> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, aabb);
|
||||
entities.addAll(world.getEntitiesWithinAABB(EntityItem.class, aabb));
|
||||
|
||||
if(!entities.isEmpty()) {
|
||||
for(EntityLivingBase entity : entities) {
|
||||
for(Entity entity : entities) {
|
||||
TileLightRelay relay = relays.get(world.rand.nextInt(relays.size()));
|
||||
relay.mountEntity(entity);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user