Datagen the DamageType

This commit is contained in:
Mrbysco 2024-03-03 17:49:29 +01:00
parent 4384c932f9
commit 80fb2273b5
3 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,2 @@
// 1.20.1 2024-03-03T17:49:23.1730309 Registries
020d2b1f1c21d6c6663ef8126a52e2b9deb0e52e data/actuallyadditions/damage_type/atomicreconstructor.json

View file

@ -0,0 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "actuallyadditions.atomic_reconstructor",
"scaling": "when_caused_by_living_non_player"
}

View file

@ -13,11 +13,13 @@ import net.minecraft.data.PackOutput;
import net.minecraft.data.registries.VanillaRegistries; import net.minecraft.data.registries.VanillaRegistries;
import net.minecraft.world.damagesource.DamageType; import net.minecraft.world.damagesource.DamageType;
import net.minecraftforge.common.crafting.CraftingHelper; import net.minecraftforge.common.crafting.CraftingHelper;
import net.minecraftforge.common.data.DatapackBuiltinEntriesProvider;
import net.minecraftforge.common.data.ExistingFileHelper; import net.minecraftforge.common.data.ExistingFileHelper;
import net.minecraftforge.data.event.GatherDataEvent; import net.minecraftforge.data.event.GatherDataEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod;
import java.util.Set;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
@Mod.EventBusSubscriber(modid = ActuallyAdditions.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) @Mod.EventBusSubscriber(modid = ActuallyAdditions.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
@ -56,6 +58,9 @@ public class ActuallyAdditionsData {
generator.addProvider(true, new MiningLensGenerator(packOutput)); generator.addProvider(true, new MiningLensGenerator(packOutput));
generator.addProvider(true, new SoundsGenerator(packOutput, helper)); generator.addProvider(true, new SoundsGenerator(packOutput, helper));
generator.addProvider(event.includeServer(), new DatapackBuiltinEntriesProvider(
packOutput, lookupProvider, Set.of(ActuallyAdditions.MODID)));
} }
private static HolderLookup.Provider getProvider() { private static HolderLookup.Provider getProvider() {