mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Added BlockInteractEvent to replace handleBlockLeftClick().
Needed quite a shim for tools/brushes for now.
This commit is contained in:
@ -59,7 +59,7 @@ public class ForgePlayer extends LocalPlayer {
|
||||
}
|
||||
|
||||
public WorldVector getPosition() {
|
||||
return new WorldVector(LocalWorldAdapter.wrap(ForgeWorldEdit.inst.getWorld(this.player.worldObj)), this.player.posX, this.player.posY, this.player.posZ);
|
||||
return new WorldVector(LocalWorldAdapter.adapt(ForgeWorldEdit.inst.getWorld(this.player.worldObj)), this.player.posX, this.player.posY, this.player.posZ);
|
||||
}
|
||||
|
||||
public com.sk89q.worldedit.world.World getWorld() {
|
||||
|
@ -137,7 +137,7 @@ public class ForgeWorldEdit {
|
||||
Action action = event.action;
|
||||
switch (action) {
|
||||
case LEFT_CLICK_BLOCK: {
|
||||
WorldVector pos = new WorldVector(LocalWorldAdapter.wrap(world), event.x, event.y, event.z);
|
||||
WorldVector pos = new WorldVector(LocalWorldAdapter.adapt(world), event.x, event.y, event.z);
|
||||
|
||||
if (we.handleBlockLeftClick(player, pos)) {
|
||||
event.setCanceled(true);
|
||||
@ -148,7 +148,7 @@ public class ForgeWorldEdit {
|
||||
}
|
||||
}
|
||||
case RIGHT_CLICK_BLOCK: {
|
||||
WorldVector pos = new WorldVector(LocalWorldAdapter.wrap(world), event.x, event.y, event.z);
|
||||
WorldVector pos = new WorldVector(LocalWorldAdapter.adapt(world), event.x, event.y, event.z);
|
||||
|
||||
if (we.handleBlockRightClick(player, pos)) {
|
||||
event.setCanceled(true);
|
||||
|
Reference in New Issue
Block a user