mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-24 03:25:29 +01:00
Correct casing of Vec3D
This commit is contained in:
parent
f6e0bcf6f5
commit
0bc1b7ecaf
@ -507,7 +507,7 @@ public class PacketContainer implements Serializable {
|
||||
public StructureModifier<Vector> getVectors() {
|
||||
// Automatically marshal between Vec3d and the Bukkit wrapper
|
||||
return structureModifier.withType(
|
||||
MinecraftReflection.getVec3dClass(),
|
||||
MinecraftReflection.getVec3DClass(),
|
||||
BukkitConverters.getVectorConverter());
|
||||
}
|
||||
|
||||
|
@ -1241,9 +1241,9 @@ public class MinecraftReflection {
|
||||
* Retrieves the Vec3d class.
|
||||
* @return The Vec3d class.
|
||||
*/
|
||||
public static Class<?> getVec3dClass() {
|
||||
public static Class<?> getVec3DClass() {
|
||||
try {
|
||||
return getMinecraftClass("Vec3d");
|
||||
return getMinecraftClass("Vec3D");
|
||||
} catch (RuntimeException e) {
|
||||
// TODO: Figure out a fuzzy field contract
|
||||
return null;
|
||||
|
@ -821,7 +821,7 @@ public class BukkitConverters {
|
||||
protected Object getGenericValue(Class<?> genericType, Vector specific) {
|
||||
if (vec3dConstructor == null) {
|
||||
try {
|
||||
vec3dConstructor = MinecraftReflection.getVec3dClass().getConstructor(
|
||||
vec3dConstructor = MinecraftReflection.getVec3DClass().getConstructor(
|
||||
double.class, double.class, double.class);
|
||||
} catch (Throwable ex) {
|
||||
throw new RuntimeException("Could not find Vec3d constructor (double, double, double)");
|
||||
@ -838,7 +838,7 @@ public class BukkitConverters {
|
||||
@Override
|
||||
protected Vector getSpecificValue(Object generic) {
|
||||
if (vec3dModifier == null) {
|
||||
vec3dModifier = new StructureModifier<Object>(MinecraftReflection.getVec3dClass(), false);
|
||||
vec3dModifier = new StructureModifier<Object>(MinecraftReflection.getVec3DClass(), false);
|
||||
}
|
||||
|
||||
StructureModifier<Double> doubles = vec3dModifier.withTarget(generic).withType(double.class);
|
||||
|
Loading…
Reference in New Issue
Block a user