mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
Update TileEntityLaunchPadBase.java
Added another OC (OpenComputers) function, getPos(). It returns the position of the launch pad. (x,y,z)
This commit is contained in:
parent
9ff55acccf
commit
087be46083
@ -528,6 +528,12 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
|
|||||||
return new Object[] {false};
|
return new Object[] {false};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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 String[] methods() {
|
public String[] methods() {
|
||||||
@ -536,7 +542,8 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
|
|||||||
"getFluid",
|
"getFluid",
|
||||||
"canLaunch",
|
"canLaunch",
|
||||||
"getTier",
|
"getTier",
|
||||||
"launch"
|
"launch",
|
||||||
|
"getPos"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -554,6 +561,8 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
|
|||||||
return getTier(context, args);
|
return getTier(context, args);
|
||||||
case ("launch"):
|
case ("launch"):
|
||||||
return launch(context, args);
|
return launch(context, args);
|
||||||
|
case ("getPos"):
|
||||||
|
return getPos(context, args);
|
||||||
}
|
}
|
||||||
throw new NoSuchMethodException();
|
throw new NoSuchMethodException();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user