mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-22 05:50: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};
|
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
|
@Override
|
||||||
@Optional.Method(modid = "OpenComputers")
|
@Optional.Method(modid = "OpenComputers")
|
||||||
public boolean canConnectNode(ForgeDirection side) {
|
public boolean canConnectNode(ForgeDirection side) {
|
||||||
@ -1016,6 +1022,7 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
|
|||||||
"hasTarget",
|
"hasTarget",
|
||||||
"getAngle",
|
"getAngle",
|
||||||
"isAligned"
|
"isAligned"
|
||||||
|
"getPos"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1045,6 +1052,8 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
|
|||||||
return getAngle(context, args);
|
return getAngle(context, args);
|
||||||
case "isAligned":
|
case "isAligned":
|
||||||
return isAligned(context, args);
|
return isAligned(context, args);
|
||||||
|
case "getPos":
|
||||||
|
return getPos(context, args);
|
||||||
}
|
}
|
||||||
throw new NoSuchMethodException();
|
throw new NoSuchMethodException();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user