-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Fluid Cells having hard coded(and wrong) fluid properties #2927
base: 1.20.1
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better than it being hardcoded
.setData(ProviderType.ITEM_MODEL, NonNullBiConsumer.noop()) | ||
.properties(p -> p.stacksTo(stackSize)) | ||
.onRegister(attach(cellName(), | ||
ThermalFluidStats.create(FluidType.BUCKET_VOLUME * capacity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make overload that takes in a mat instead of the individual values
@@ -476,6 +423,26 @@ public Component getItemName(ItemStack stack) { | |||
.onRegister(materialInfo(new ItemMaterialInfo(new MaterialStack(GTMaterials.Glass, GTValues.M / 4)))) | |||
.register(); | |||
|
|||
public static ItemEntry<ComponentItem> createFluidCell(Material mat, int capacity, int matSize, int stackSize) { | |||
String name = "%s " + mat.getLocalizedName() + " Cell"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this not just inlined in .lang()
var prop = mat.getProperty(PropertyKey.FLUID_PIPE); | ||
if (prop == null) prop = GTMaterials.Wood.getProperty(PropertyKey.FLUID_PIPE); | ||
return REGISTRATE | ||
.item("%s_fluid_cell".formatted(mat.getName()), ComponentItem::create) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please ensure that this doesn't result in missing IDs
What
Fix the various large fluid cells having hard coded values for the fluid properties, as some were wrong
Implementation Details
use the fluid pipe property instead for the ThermalFluidStats
Outcome
you can use stainless as an acid holder again :)