Archiviert
13
0

Correct casing of Vec3D

Dieser Commit ist enthalten in:
Dan Mulloy 2014-12-05 21:45:45 -05:00
Ursprung f6e0bcf6f5
Commit 0bc1b7ecaf
3 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -507,7 +507,7 @@ public class PacketContainer implements Serializable {
public StructureModifier<Vector> getVectors() { public StructureModifier<Vector> getVectors() {
// Automatically marshal between Vec3d and the Bukkit wrapper // Automatically marshal between Vec3d and the Bukkit wrapper
return structureModifier.withType( return structureModifier.withType(
MinecraftReflection.getVec3dClass(), MinecraftReflection.getVec3DClass(),
BukkitConverters.getVectorConverter()); BukkitConverters.getVectorConverter());
} }

Datei anzeigen

@ -1241,9 +1241,9 @@ public class MinecraftReflection {
* Retrieves the Vec3d class. * Retrieves the Vec3d class.
* @return The Vec3d class. * @return The Vec3d class.
*/ */
public static Class<?> getVec3dClass() { public static Class<?> getVec3DClass() {
try { try {
return getMinecraftClass("Vec3d"); return getMinecraftClass("Vec3D");
} catch (RuntimeException e) { } catch (RuntimeException e) {
// TODO: Figure out a fuzzy field contract // TODO: Figure out a fuzzy field contract
return null; return null;

Datei anzeigen

@ -821,7 +821,7 @@ public class BukkitConverters {
protected Object getGenericValue(Class<?> genericType, Vector specific) { protected Object getGenericValue(Class<?> genericType, Vector specific) {
if (vec3dConstructor == null) { if (vec3dConstructor == null) {
try { try {
vec3dConstructor = MinecraftReflection.getVec3dClass().getConstructor( vec3dConstructor = MinecraftReflection.getVec3DClass().getConstructor(
double.class, double.class, double.class); double.class, double.class, double.class);
} catch (Throwable ex) { } catch (Throwable ex) {
throw new RuntimeException("Could not find Vec3d constructor (double, double, double)"); throw new RuntimeException("Could not find Vec3d constructor (double, double, double)");
@ -838,7 +838,7 @@ public class BukkitConverters {
@Override @Override
protected Vector getSpecificValue(Object generic) { protected Vector getSpecificValue(Object generic) {
if (vec3dModifier == null) { 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); StructureModifier<Double> doubles = vec3dModifier.withTarget(generic).withType(double.class);