mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-29 04:09:59 -05:00
Start on item transfer, work on forge reverse-abstraction
This commit is contained in:
@@ -183,6 +183,10 @@ public final class FluidStack {
|
||||
return getFluid() == other.getFluid() && getAmount() == other.getAmount() && isTagEqual(other);
|
||||
}
|
||||
|
||||
public boolean isFluidEqual(FluidStack other) {
|
||||
return getFluid() == other.getFluid();
|
||||
}
|
||||
|
||||
private boolean isTagEqual(FluidStack other) {
|
||||
return tag == null ? other.tag == null : other.tag != null && tag.equals(other.tag);
|
||||
}
|
||||
@@ -203,6 +207,11 @@ public final class FluidStack {
|
||||
return FluidStackHooks.write(this, tag);
|
||||
}
|
||||
|
||||
public FluidStack copyWithAmount(long amount) {
|
||||
if (isEmpty()) return this;
|
||||
return new FluidStack(fluid, amount, tag);
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
@Nullable
|
||||
public TextureAtlasSprite getStillTexture() {
|
||||
|
||||
Reference in New Issue
Block a user