-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Some more component changes, re-added fluid stack and ingredient comp…
…onents, fixed item builder bug with DataComponents
- Loading branch information
1 parent
977fc41
commit 849393f
Showing
25 changed files
with
328 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,31 @@ | ||
package dev.latvian.mods.kubejs.core; | ||
|
||
import dev.latvian.mods.kubejs.fluid.FluidLike; | ||
import dev.latvian.mods.kubejs.registry.RegistryInfo; | ||
import dev.latvian.mods.rhino.util.RemapPrefixForJS; | ||
import net.minecraft.world.level.material.Fluid; | ||
import net.minecraft.world.level.material.Fluids; | ||
import net.neoforged.neoforge.fluids.FluidType; | ||
|
||
@RemapPrefixForJS("kjs$") | ||
public interface FluidKJS extends RegistryObjectKJS<Fluid> { | ||
default Fluid kjs$self() { | ||
public interface FluidKJS extends RegistryObjectKJS<Fluid>, FluidLike { | ||
@Override | ||
default Fluid kjs$getFluid() { | ||
return (Fluid) this; | ||
} | ||
|
||
@Override | ||
default RegistryInfo<Fluid> kjs$getKubeRegistry() { | ||
return RegistryInfo.FLUID; | ||
} | ||
|
||
@Override | ||
default int kjs$getAmount() { | ||
return FluidType.BUCKET_VOLUME; | ||
} | ||
|
||
@Override | ||
default boolean kjs$isEmpty() { | ||
return kjs$getFluid().isSame(Fluids.EMPTY); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.