mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Update TileEntityMachineRadarNT.java
Added an OpenComputers function, getPos(). It retuns the position of this radar.
This commit is contained in:
parent
65f1866e8c
commit
3a8e0048a3
@ -694,6 +694,12 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
return new Object[]{false, e.posX, e.posY, e.posZ, type};
|
||||
}
|
||||
|
||||
@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 String[] methods() {
|
||||
@ -707,6 +713,7 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
"isIndexPlayer",
|
||||
"getIndexType",
|
||||
"getEntityAtIndex"
|
||||
"getPos"
|
||||
};
|
||||
}
|
||||
|
||||
@ -732,6 +739,8 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
return getIndexType(context, args);
|
||||
case ("getEntityAtIndex"):
|
||||
return getEntityAtIndex(context, args);
|
||||
case("getPos"):
|
||||
return getPos(context, args);
|
||||
}
|
||||
throw new NoSuchMethodException();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user