Skip to content

Commit

Permalink
Added datagen stuff and rose loot table
Browse files Browse the repository at this point in the history
-Rose now drops itself when broken
-Potted Rose now drops a pot and a rose when broken
-Datagen Stuff added (most of them commented out on the DataGenerator class due to them not being used)
*Contents of the "generated" folder have not been added (at least yet) bc idk if im supposed to. I have plans to make a Github Actions script that runs datagen for me on the repo. Until then, if you download this repo you will have to run datagen manually before building.
  • Loading branch information
flatkat committed Jul 20, 2024
1 parent 2e65f63 commit 3bb6e32
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@

import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
import net.flatkat.ancient_forgotten.datagen.*;

public class AncientAndForgottenDataGenerator implements DataGeneratorEntrypoint {
@Override
public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) {
FabricDataGenerator.Pack pack = fabricDataGenerator.createPack();


//pack.addProvider(ModBlockTagProvider::new);
//pack.addProvider(ModItemTagProvider::new);
pack.addProvider(ModLootTableProvider::new);
//pack.addProvider(ModModelProvider::new);
//pack.addProvider(ModRecipeProvider::new);


}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package net.flatkat.ancient_forgotten.datagen;

import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.minecraft.registry.RegistryWrapper;

import java.util.concurrent.CompletableFuture;

public class ModBlockTagProvider extends FabricTagProvider.BlockTagProvider {

public ModBlockTagProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
super(output, registriesFuture);
}

@Override
protected void configure(RegistryWrapper.WrapperLookup arg) {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package net.flatkat.ancient_forgotten.datagen;

public class ModItemTagProvider {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package net.flatkat.ancient_forgotten.datagen;

import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockLootTableProvider;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricLootTableProvider;
import net.flatkat.ancient_forgotten.block.ModBlocks;

public class ModLootTableProvider extends FabricBlockLootTableProvider {

public ModLootTableProvider(FabricDataOutput dataOutput) {
super(dataOutput);
}

@Override
public void generate() {
addDrop(ModBlocks.ROSE);
addPottedPlantDrops(ModBlocks.POTTED_ROSE);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package net.flatkat.ancient_forgotten.datagen;

public class ModModelProvider {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package net.flatkat.ancient_forgotten.datagen;

public class ModRecipeProvider {
}

0 comments on commit 3bb6e32

Please sign in to comment.