diff --git a/src/minecraft/biomesoplenty/handlers/EntityEventHandler.java b/src/minecraft/biomesoplenty/handlers/EntityEventHandler.java index 86f77b613..813217a06 100644 --- a/src/minecraft/biomesoplenty/handlers/EntityEventHandler.java +++ b/src/minecraft/biomesoplenty/handlers/EntityEventHandler.java @@ -25,6 +25,7 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.event.Event.Result; import net.minecraftforge.event.ForgeSubscribe; +import net.minecraftforge.event.entity.EntityEvent; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn; @@ -100,6 +101,25 @@ public class EntityEventHandler } } + @ForgeSubscribe + public void chunkEntered(EntityEvent.EnteringChunk event) + { + if (event.entity != null) + { + if (event.entity instanceof EntityPlayer) + { + EntityPlayer player = (EntityPlayer)event.entity; + World world = player.worldObj; + + int x = MathHelper.floor_double(player.posX); + int y = MathHelper.floor_double(player.boundingBox.minY); + int z = MathHelper.floor_double(player.posZ); + + int biomeID = world.getBiomeGenForCoords(x, z).biomeID; + } + } + } + @ForgeSubscribe public void entityInteract(EntityInteractEvent event) {