Override BlockWorldVector

This commit is contained in:
Jesse Boyd 2017-01-16 01:44:34 +11:00
parent 8ac81b51e5
commit 7f1390803f
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 60 additions and 0 deletions

View File

@ -19,6 +19,8 @@ import com.boydti.fawe.util.WEManager;
import com.boydti.fawe.util.WESubscriber;
import com.sk89q.jnbt.NBTInputStream;
import com.sk89q.jnbt.NBTOutputStream;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.BlockWorldVector;
import com.sk89q.worldedit.CuboidClipboard;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.LocalSession;
@ -412,6 +414,8 @@ public class Fawe {
AbstractDelegateExtent.inject(); // Optimizations
BlockBagExtent.inject(); // Fixes + Optimizations
// Vector
BlockWorldVector.inject(); // Optimizations
BlockVector.inject(); // Optimizations
Vector.inject(); // Optimizations
// Pattern
Patterns.inject(); // Optimizations (reduce object creation)

View File

@ -0,0 +1,56 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.sk89q.worldedit;
/** @deprecated */
@Deprecated
public class BlockWorldVector extends WorldVector {
public BlockWorldVector(WorldVector position) {
super(position.getWorld(), position);
}
public BlockWorldVector(LocalWorld world, Vector position) {
super(world, position);
}
public BlockWorldVector(WorldVector world, int x, int y, int z) {
super(world.getWorld(), x, y, z);
}
public BlockWorldVector(WorldVector world, Vector v) {
super(world.getWorld(), v.getX(), v.getY(), v.getZ());
}
public BlockWorldVector(LocalWorld world, int x, int y, int z) {
super(world, x, y, z);
}
public BlockWorldVector(LocalWorld world, float x, float y, float z) {
super(world, x, y, z);
}
public BlockWorldVector(LocalWorld world, double x, double y, double z) {
super(world, x, y, z);
}
public boolean equals(Object obj) {
if(!(obj instanceof Vector)) {
return false;
} else {
Vector other = (Vector)obj;
return (int)other.getX() == (int)this.getX() && (int)other.getY() == (int)this.getY() && (int)other.getZ() == (int)this.getZ();
}
}
@Override
public int hashCode() {
return ((int) getX() ^ ((int) getZ() << 16)) ^ ((int) getY() << 30);
}
public static Class<?> inject() {
return BlockWorldVector.class;
}
}