mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Iris fixes
This commit is contained in:
parent
2b8d5541af
commit
8a4208ab18
@ -224,7 +224,7 @@ public enum IrisDirection
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
return EAST_POSITIVE_X;
|
||||
}
|
||||
|
||||
public int x()
|
||||
|
@ -6,7 +6,10 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.util.BlockVector;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@ -31,6 +34,14 @@ public class IrisPosition
|
||||
this(bv.getBlockX(), bv.getBlockY(), bv.getBlockZ());
|
||||
}
|
||||
|
||||
public IrisPosition(Location l) {
|
||||
this(l.getBlockX(), l.getBlockY(), l.getBlockZ());
|
||||
}
|
||||
|
||||
public IrisPosition(Vector v) {
|
||||
this(v.getBlockX(), v.getBlockY(), v.getBlockZ());
|
||||
}
|
||||
|
||||
public IrisPosition add(IrisPosition relativePosition) {
|
||||
return new IrisPosition(relativePosition.x+x, relativePosition.y+y, relativePosition.z + z);
|
||||
}
|
||||
@ -38,4 +49,8 @@ public class IrisPosition
|
||||
public IrisPosition sub(IrisPosition relativePosition) {
|
||||
return new IrisPosition(x-relativePosition.x, y-relativePosition.y, z-relativePosition.z);
|
||||
}
|
||||
|
||||
public Location toLocation(World world) {
|
||||
return new Location(world, x,y,z);
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ public class TileResult
|
||||
this.tile = tile;
|
||||
IrisObjectPlacement p = new IrisObjectPlacement();
|
||||
IrisObjectRotation rt = new IrisObjectRotation();
|
||||
rt.setYAxis(new IrisAxisRotationClamp(rot != 0, rot, rot, 0));
|
||||
rt.setYAxis(new IrisAxisRotationClamp(rot != 0, false, rot, rot, 0));
|
||||
p.setRotation(rt);
|
||||
p.setBottom(true);
|
||||
p.setBore(structure.isBore());
|
||||
|
Loading…
x
Reference in New Issue
Block a user