Skip to content

Commit 3bb6e32

Browse files
author
flatkat
committed
Added datagen stuff and rose loot table
-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.
1 parent 2e65f63 commit 3bb6e32

6 files changed

+60
-0
lines changed

src/main/java/net/flatkat/ancient_forgotten/AncientAndForgottenDataGenerator.java

+10
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@
22

33
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
44
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
5+
import net.flatkat.ancient_forgotten.datagen.*;
56

67
public class AncientAndForgottenDataGenerator implements DataGeneratorEntrypoint {
78
@Override
89
public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) {
10+
FabricDataGenerator.Pack pack = fabricDataGenerator.createPack();
11+
12+
13+
//pack.addProvider(ModBlockTagProvider::new);
14+
//pack.addProvider(ModItemTagProvider::new);
15+
pack.addProvider(ModLootTableProvider::new);
16+
//pack.addProvider(ModModelProvider::new);
17+
//pack.addProvider(ModRecipeProvider::new);
18+
919

1020
}
1121
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package net.flatkat.ancient_forgotten.datagen;
2+
3+
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
4+
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
5+
import net.minecraft.registry.RegistryWrapper;
6+
7+
import java.util.concurrent.CompletableFuture;
8+
9+
public class ModBlockTagProvider extends FabricTagProvider.BlockTagProvider {
10+
11+
public ModBlockTagProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
12+
super(output, registriesFuture);
13+
}
14+
15+
@Override
16+
protected void configure(RegistryWrapper.WrapperLookup arg) {
17+
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package net.flatkat.ancient_forgotten.datagen;
2+
3+
public class ModItemTagProvider {
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package net.flatkat.ancient_forgotten.datagen;
2+
3+
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
4+
import net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockLootTableProvider;
5+
import net.fabricmc.fabric.api.datagen.v1.provider.FabricLootTableProvider;
6+
import net.flatkat.ancient_forgotten.block.ModBlocks;
7+
8+
public class ModLootTableProvider extends FabricBlockLootTableProvider {
9+
10+
public ModLootTableProvider(FabricDataOutput dataOutput) {
11+
super(dataOutput);
12+
}
13+
14+
@Override
15+
public void generate() {
16+
addDrop(ModBlocks.ROSE);
17+
addPottedPlantDrops(ModBlocks.POTTED_ROSE);
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package net.flatkat.ancient_forgotten.datagen;
2+
3+
public class ModModelProvider {
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package net.flatkat.ancient_forgotten.datagen;
2+
3+
public class ModRecipeProvider {
4+
}

0 commit comments

Comments
 (0)