mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 11:54:47 +00:00
ScriptWorld:
-Increased the accuracy of rayCastPos().
This commit is contained in:
1 parent
0e9ddd75b6
commit
a8a0528275
3 files changed
+234
-32
No files matched your search
@@ -162,11 +162,7 @@ public class ScriptLivingBase<T extends EntityLivingBase> extends ScriptEntity<T
|
||||
}
|
||||
|
||||
public IBlock getLookingAtBlock(int maxDistance, boolean stopOnBlock, boolean stopOnLiquid, boolean stopOnCollision) {
|
||||
Vec3 lookVec = entity.getLookVec();
|
||||
return getWorld().rayCastBlock(
|
||||
new double[] {entity.posX, entity.posY+entity.getEyeHeight(), entity.posZ},
|
||||
new double[] {lookVec.xCoord, lookVec.yCoord, lookVec.zCoord},
|
||||
maxDistance, stopOnBlock, stopOnLiquid, stopOnCollision);
|
||||
return NpcAPI.Instance().getIBlock(getWorld(),getLookingAtPos(maxDistance, stopOnBlock, stopOnLiquid, stopOnCollision));
|
||||
}
|
||||
|
||||
public IBlock getLookingAtBlock(int maxDistance) {
|
||||
|
||||
Reference in new issue
Block a user