mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Update TileEntityTurretBaseNT.java
Added an OpenComputers function, getPos(). It returns the (x,y,z) coordinates of the turret in question
This commit is contained in:
parent
087be46083
commit
65f1866e8c
@ -995,6 +995,12 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
|
||||
return new Object[] {this.aligned};
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getPos(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public boolean canConnectNode(ForgeDirection side) {
|
||||
@ -1016,6 +1022,7 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
|
||||
"hasTarget",
|
||||
"getAngle",
|
||||
"isAligned"
|
||||
"getPos"
|
||||
};
|
||||
}
|
||||
|
||||
@ -1045,6 +1052,8 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
|
||||
return getAngle(context, args);
|
||||
case "isAligned":
|
||||
return isAligned(context, args);
|
||||
case "getPos":
|
||||
return getPos(context, args);
|
||||
}
|
||||
throw new NoSuchMethodException();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user