Merge pull request #1 from BallOfEnergy1/BallOfEnergy1-OC-Test-1

ok yeah it works well enough to do the job
This commit is contained in:
BallOfEnergy 2023-04-03 08:56:52 -05:00 committed by GitHub
commit 8259c17e68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -411,6 +411,15 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
}
return new Object[] {"N/A"};
}
@Callback
@Optional.Method(modid = "OpenComputers")
public Object[] getFuelType(Context context, Arguments args) {
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
return new Object[] {rod.getName()};
}
return new Object[] {"N/A"};
}
@Callback
@Optional.Method(modid = "OpenComputers")
@ -444,14 +453,17 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
public Object[] getInfo(Context context, Arguments args) {
Object OC_enrich_buf;
Object OC_poison_buf;
Object OC_fuelType;
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
OC_enrich_buf = ItemRBMKRod.getEnrichment(slots[0]);
OC_poison_buf = ItemRBMKRod.getPoison(slots[0]);
OC_fuelType = rod.getName();
} else {
OC_enrich_buf = "N/A";
OC_poison_buf = "N/A";
OC_fuelType = "N/A";
}
return new Object[] {heat, fluxSlow, fluxFast, OC_enrich_buf, OC_poison_buf};
return new Object[] {heat, fluxSlow, fluxFast, OC_enrich_buf, OC_poison_buf, OC_fuelType};
}
@Override