Java Code Examples for net.minecraft.entity.player.EntityPlayer#getDistanceSqToCenter()
The following examples show how to use
net.minecraft.entity.player.EntityPlayer#getDistanceSqToCenter() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CoordsFinder.java From ForgeHax with MIT License | 4 votes |
private boolean pastDistance(EntityPlayer player, BlockPos pos, double dist) { return player.getDistanceSqToCenter(pos) >= Math.pow(dist, 2); }
Example 2
Source File: OpenTileEntity.java From OpenModsLib with MIT License | 4 votes |
public boolean isValid(EntityPlayer player) { return (world.getTileEntity(pos) == this) && (player.getDistanceSqToCenter(pos) <= 64.0D); }