mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
Merge pull request #2881 from JoelBenReneHecht/Crane_OC_Enhancements
RBMK Crane OpenComputers: getRodInfo()
This commit is contained in:
commit
be405b43d6
@ -435,6 +435,22 @@ public class TileEntityCraneConsole extends TileEntityLoadedBase implements Simp
|
|||||||
return new Object[] {"Crane not found"};
|
return new Object[] {"Crane not found"};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Callback(direct = true)
|
||||||
|
@Optional.Method(modid = "OpenComputers")
|
||||||
|
public Object[] getRodInfo(Context context, Arguments args) {
|
||||||
|
java.util.LinkedHashMap<String, Object> map = new java.util.LinkedHashMap<>();
|
||||||
|
if(loadedItem != null && loadedItem.getItem() instanceof ItemRBMKRod) {
|
||||||
|
map.put("coreSkinTemp", ItemRBMKRod.getHullHeat(loadedItem));
|
||||||
|
map.put("coreTemp", ItemRBMKRod.getCoreHeat(loadedItem));
|
||||||
|
map.put("enrichment", ItemRBMKRod.getEnrichment(loadedItem));
|
||||||
|
map.put("xenon", ItemRBMKRod.getPoisonLevel(loadedItem));
|
||||||
|
map.put("rodName", loadedItem.getItem().getUnlocalizedName());
|
||||||
|
} else {
|
||||||
|
return new Object[] {false, "No rod loaded"};
|
||||||
|
}
|
||||||
|
return new Object[] {map};
|
||||||
|
}
|
||||||
|
|
||||||
@Callback(direct = true)
|
@Callback(direct = true)
|
||||||
@Optional.Method(modid = "OpenComputers")
|
@Optional.Method(modid = "OpenComputers")
|
||||||
public Object[] getDepletion(Context context, Arguments args) {
|
public Object[] getDepletion(Context context, Arguments args) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user