tutorial:fluids
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
tutorial:fluids [2019/09/24 11:43] – lake generation alexiy | tutorial:fluids [2019/09/24 14:52] – how to add fluids to tags alexiy | ||
---|---|---|---|
Line 100: | Line 100: | ||
public abstract boolean matchesType(Fluid fluid_1); | public abstract boolean matchesType(Fluid fluid_1); | ||
- | /** | ||
- | * Required for entities to behave in this fluid like in water | ||
- | */ | ||
- | @Override | ||
- | public boolean matches(Tag< | ||
- | { | ||
- | return tag_1 == FluidTags.WATER; | ||
- | } | ||
} | } | ||
</ | </ | ||
Line 215: | Line 207: | ||
Registry.register(Registry.ITEM, | Registry.register(Registry.ITEM, | ||
} | } | ||
+ | </ | ||
+ | |||
+ | To make the custom fluid behave like water or lava, you must add it to a corresponding fluid tag: make a file " | ||
+ | <code json> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ] | ||
+ | } | ||
</ | </ | ||
tutorial/fluids.txt · Last modified: 2023/05/04 11:31 by solidblock