MarkNutt0 Posted December 13, 2019 Share Posted December 13, 2019 hi, im looking for a way to check if is/contains an entity rather than a block, ive tried stuff like this but cant seem to get it to work: if (mc.world.getBlockState(pos).getBlock() == null) cheers Quote Link to comment Share on other sites More sharing options...
SerpentDagger Posted December 14, 2019 Share Posted December 14, 2019 (edited) 13 hours ago, MarkNutt0 said: a way to check if is/contains an entity You can create an AxisAlignedBB in the location of interest and use one of World's get-entities-within-bounding-box methods. One of these is World#getEntitiesWithinAABBExcludingEntity(), but there are several, each with slightly different names/purposes. Edited December 14, 2019 by SerpentDagger Quote Fancy 3D Graphing Calculator mod, with many different coordinate systems. Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.