Always assume your code is going to compile.
This commit is contained in:
parent
ac2e1172fe
commit
fa3a2c9414
2 changed files with 71 additions and 9 deletions
|
@ -294,20 +294,19 @@ public class DigitalInterfacePeripheral implements IPeripheral {
|
|||
@LuaFunction(mainThread = true)
|
||||
public final ObjectLuaTable getTravelLocation() throws LuaException {
|
||||
TardimData data = getTardimData();
|
||||
if (data.getTravelLocation() != null) {
|
||||
Location loc = data.getTravelLocation();
|
||||
return new ObjectLuaTable(Map.of(
|
||||
if (data.getTravelLocation() == null) {
|
||||
data.setTravelLocation(data.getCurrentLocation());
|
||||
}
|
||||
Location loc = data.getTravelLocation();
|
||||
return new ObjectLuaTable(Map.of(
|
||||
"dimension", loc.getLevel().location().toString(),
|
||||
"pos", new ObjectLuaTable(Map.of(
|
||||
"x", loc.getPos().getX(),
|
||||
"y", loc.getPos().getY(),
|
||||
"z", loc.getPos().getZ()
|
||||
)),
|
||||
"facing", loc.getFacing().toString()
|
||||
));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
"facing", loc.getFacing().toString()
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue