Package net.minecraft.util
Class Vec3
- java.lang.Object
-
- net.zxmushroom63.plugins.BaseData
-
- net.zxmushroom63.plugins.PluginData
-
- net.minecraft.util.Vec3
-
- All Implemented Interfaces:
org.teavm.jso.JSObject
public class Vec3 extends PluginData
+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.zxmushroom63.plugins.BaseData
BaseData.BooleanCallback, BaseData.BooleanCallbackArr, BaseData.DataBooleanCallback, BaseData.DataBooleanCallbackArr, BaseData.DataDoubleCallback, BaseData.DataDoubleCallbackArr, BaseData.DataFloatCallback, BaseData.DataFloatCallbackArr, BaseData.DataIntCallback, BaseData.DataIntCallbackArr, BaseData.DataObjectCallback, BaseData.DataObjectCallbackArr, BaseData.DataStringCallback, BaseData.DataStringCallbackArr, BaseData.DataVoidCallback, BaseData.DoubleCallback, BaseData.DoubleCallbackArr, BaseData.FloatCallback, BaseData.FloatCallbackArr, BaseData.IntCallback, BaseData.IntCallbackArr, BaseData.ObjectCallback, BaseData.ObjectCallbackArr, BaseData.StringCallback, BaseData.StringCallbackArr, BaseData.VoidCallback
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vec3
add(Vec3 vec)
Vec3
addVector(double x, double y, double z)
+ Adds the specified x,y,z vector components to this vector and returns the resulting vector.Vec3
crossProduct(Vec3 vec)
+ Returns a new vector with the result of this vector x the specified vector.double
distanceTo(Vec3 vec)
+ Euclidean distance between this and the specified vector, returned as double.double
dotProduct(Vec3 vec)
static Vec3
fromPluginData(BaseData data)
Vec3
getIntermediateWithXValue(Vec3 vec, double x)
+ Returns a new vector with x value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.Vec3
getIntermediateWithYValue(Vec3 vec, double y)
+ Returns a new vector with y value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.Vec3
getIntermediateWithZValue(Vec3 vec, double z)
+ Returns a new vector with z value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.double
lengthVector()
+ Returns the length of the vector.void
loadPluginData(BaseData data)
PluginData
makePluginData()
Vec3
normalize()
+ Normalizes the vector to a length of 1 (except if it is the zero vector)Vec3
rotatePitch(float pitch)
Vec3
rotateYaw(float yaw)
double
squareDistanceTo(Vec3 vec)
+ The square of the Euclidean distance between this and the specified vector.Vec3
subtract(double x, double y, double z)
Vec3
subtract(Vec3 vec)
Vec3
subtractReverse(Vec3 vec)
+ Returns a new vector with the result of the specified vector minus this.java.lang.String
toString()
-
Methods inherited from class net.zxmushroom63.plugins.BaseData
execFuncBaseData, execFuncObject, execFuncString, getBaseData, getBaseDataArr, getBoolean, getBooleanArr, getByte, getByteArr, getChar, getCharArr, getDouble, getDoubleArr, getFloat, getFloatArr, getInt, getIntArr, getObject, getObjectArr, getShort, getShortArr, getString, getStringArr, has, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setCallbackBoolean, setCallbackBooleanArr, setCallbackBooleanArrWithDataArg, setCallbackBooleanWithDataArg, setCallbackDouble, setCallbackDoubleArr, setCallbackDoubleArrWithDataArg, setCallbackDoubleWithDataArg, setCallbackFloat, setCallbackFloatArr, setCallbackFloatArrWithDataArg, setCallbackFloatWithDataArg, setCallbackInt, setCallbackIntArr, setCallbackIntArrWithDataArg, setCallbackIntWithDataArg, setCallbackObject, setCallbackObjectArr, setCallbackObjectArrWithDataArg, setCallbackObjectWithDataArg, setCallbackString, setCallbackStringArr, setCallbackStringArrWithDataArg, setCallbackStringWithDataArg, setCallbackVoid, setCallbackVoidWithDataArg, setNull
-
-
-
-
Constructor Detail
-
Vec3
public Vec3(double x, double y, double z)
-
Vec3
public Vec3(Vec3i parVec3i)
-
-
Method Detail
-
subtractReverse
public Vec3 subtractReverse(Vec3 vec)
+ Returns a new vector with the result of the specified vector minus this.
-
normalize
public Vec3 normalize()
+ Normalizes the vector to a length of 1 (except if it is the zero vector)
-
dotProduct
public double dotProduct(Vec3 vec)
-
crossProduct
public Vec3 crossProduct(Vec3 vec)
+ Returns a new vector with the result of this vector x the specified vector.
-
subtract
public Vec3 subtract(double x, double y, double z)
-
addVector
public Vec3 addVector(double x, double y, double z)
+ Adds the specified x,y,z vector components to this vector and returns the resulting vector. Does not change this vector.
-
distanceTo
public double distanceTo(Vec3 vec)
+ Euclidean distance between this and the specified vector, returned as double.
-
squareDistanceTo
public double squareDistanceTo(Vec3 vec)
+ The square of the Euclidean distance between this and the specified vector.
-
lengthVector
public double lengthVector()
+ Returns the length of the vector.
-
getIntermediateWithXValue
public Vec3 getIntermediateWithXValue(Vec3 vec, double x)
+ Returns a new vector with x value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.
-
getIntermediateWithYValue
public Vec3 getIntermediateWithYValue(Vec3 vec, double y)
+ Returns a new vector with y value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.
-
getIntermediateWithZValue
public Vec3 getIntermediateWithZValue(Vec3 vec, double z)
+ Returns a new vector with z value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
rotatePitch
public Vec3 rotatePitch(float pitch)
-
rotateYaw
public Vec3 rotateYaw(float yaw)
-
loadPluginData
public void loadPluginData(BaseData data)
-
makePluginData
public PluginData makePluginData()
-
-