generated from neoforged/MDK
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add c:experience to the XP Fluid, and ensure Experience Holder can ac…
…cept other fluids with that tag - Solves #164
- Loading branch information
1 parent
1bd8863
commit c59a73a
Showing
6 changed files
with
52 additions
and
8 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
src/generated/resources/.cache/a2fd677372f1bb18b16a30f165ec0b70b89554af
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// 1.21.1 2024-09-18T12:55:01.3643366 JustDireThings FluidTags | ||
8ae2f887f0ec5e3342028a75a1076411a177ef9c data/c/tags/fluid/experience.json |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"values": [ | ||
"justdirethings:xp_fluid_source", | ||
"justdirethings:xp_fluid_flowing" | ||
] | ||
} |
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
40 changes: 40 additions & 0 deletions
40
src/main/java/com/direwolf20/justdirethings/datagen/JustDireFluidTags.java
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.direwolf20.justdirethings.datagen; | ||
|
||
import com.direwolf20.justdirethings.JustDireThings; | ||
import com.direwolf20.justdirethings.setup.Registration; | ||
import net.minecraft.core.HolderLookup; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraft.data.tags.FluidTagsProvider; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.tags.FluidTags; | ||
import net.minecraft.tags.TagKey; | ||
import net.minecraft.world.level.material.Fluid; | ||
import net.neoforged.neoforge.common.data.ExistingFileHelper; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
public class JustDireFluidTags extends FluidTagsProvider { | ||
|
||
public static final TagKey<Fluid> EXPERIENCE = forgeTag("experience"); | ||
|
||
public JustDireFluidTags(PackOutput output, CompletableFuture<HolderLookup.Provider> lookupProvider, @Nullable ExistingFileHelper existingFileHelper) { | ||
super(output, lookupProvider, JustDireThings.MODID, existingFileHelper); | ||
} | ||
|
||
private static TagKey<Fluid> forgeTag(String name) { | ||
return FluidTags.create(ResourceLocation.fromNamespaceAndPath("c", name)); | ||
} | ||
|
||
@Override | ||
protected void addTags(HolderLookup.Provider provider) { | ||
this.tag(EXPERIENCE) | ||
.add(Registration.XP_FLUID_SOURCE.get()) | ||
.add(Registration.XP_FLUID_FLOWING.get()); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "JustDireThings FluidTags"; | ||
} | ||
} |