From 258c257722f8728c3b5119b8b09c6932938d0efe Mon Sep 17 00:00:00 2001 From: Alkalus Date: Sun, 10 Sep 2017 00:11:09 +1000 Subject: + Added a debug item for clearing big areas. + Started using BlockPos. % Changed some loading of blocks. ^ Version Bump. --- src/Java/gtPlusPlus/core/util/entity/EntityUtils.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Java/gtPlusPlus/core/util/entity') diff --git a/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java b/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java index a10c0ce4d1..60b05a308f 100644 --- a/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java +++ b/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java @@ -2,6 +2,7 @@ package gtPlusPlus.core.util.entity; import cpw.mods.fml.common.registry.EntityRegistry; import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.util.array.BlockPos; import ic2.core.IC2Potion; import ic2.core.item.armor.ItemArmorHazmat; import net.minecraft.block.Block; @@ -35,6 +36,13 @@ public class EntityUtils { final int blockZ = MathHelper.floor_double(parEntity.posZ); return parEntity.worldObj.getBlock(blockX, blockY, blockZ); } + + public static BlockPos findBlockPosUnderEntity(final Entity parEntity){ + final int blockX = MathHelper.floor_double(parEntity.posX); + final int blockY = MathHelper.floor_double(parEntity.boundingBox.minY)-1; + final int blockZ = MathHelper.floor_double(parEntity.posZ); + return new BlockPos(blockX, blockY, blockZ); + } //TODO public static void registerEntityToBiomeSpawns(final Class classy, final EnumCreatureType EntityType, final BiomeGenBase baseBiomeGen){ -- cgit