SHOW:
|
|
- or go back to the newest paste.
1 | public static final double playerDetectRange = 5; | |
2 | public void updateTick(World world, int i, int j, int k, Random random) | |
3 | { | |
4 | - | EntityPlayer player = world.getClosestPlayer(i, j, k, 0); |
4 | + | |
5 | EntityPlayer player = world.getClosestPlayer(i, j, k, playerDetectRange); | |
6 | - | int range = 5; |
6 | + | |
7 | - | if(player.posX > i - range || player.posX < i + range) |
7 | + |