mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-11 21:57:40 +00:00
world.rayCastBlock uses double[] for parameters
This commit is contained in:
1 parent
77ee403720
commit
3d02ce3ce0
3 files changed
+12
-10
No files matched your search
@@ -479,10 +479,11 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
}
|
||||
|
||||
public IBlock getLookingAtBlock(int maxDistance) {
|
||||
Vec3 posVec = Vec3.createVectorHelper(player.posX,
|
||||
player.posY+player.getEyeHeight(), player.posZ);
|
||||
Vec3 lookVec = player.getLookVec();
|
||||
return getWorld().rayCastBlock(posVec, lookVec, maxDistance);
|
||||
return getWorld().rayCastBlock(
|
||||
new double[] {player.posX, player.posY+player.getEyeHeight(), player.posZ},
|
||||
new double[] {lookVec.xCoord, lookVec.yCoord, lookVec.zCoord},
|
||||
maxDistance);
|
||||
}
|
||||
|
||||
public ITimers getTimers() {
|
||||
|
||||
Reference in new issue
Block a user