mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-28 21:56:33 +01:00
Override BlockWorldVector
This commit is contained in:
parent
8ac81b51e5
commit
7f1390803f
@ -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)
|
||||
|
56
core/src/main/java/com/sk89q/worldedit/BlockWorldVector.java
Normal file
56
core/src/main/java/com/sk89q/worldedit/BlockWorldVector.java
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user