Skip to content

Commit

Permalink
Add back getAmount to FluidStack (hidden from js)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxNeedsSnacks committed Jul 15, 2023
1 parent 67a00df commit d2da4cf
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import dev.latvian.mods.kubejs.util.UtilsJS;
import dev.latvian.mods.kubejs.util.WrappedJS;
import dev.latvian.mods.rhino.mod.util.NBTUtils;
import dev.latvian.mods.rhino.util.HideFromJS;
import net.minecraft.core.Registry;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
Expand Down Expand Up @@ -129,6 +130,11 @@ public Fluid getFluid() {
@Override
public abstract long kjs$getAmount();

@HideFromJS
public final long getAmount() {
return kjs$getAmount(); // legacy reasons (and also just looks better from java)
}

public abstract void setAmount(long amount);

public final FluidStackJS withAmount(long amount) {
Expand Down

0 comments on commit d2da4cf

Please sign in to comment.