Skip to content

Commit

Permalink
feat: Particle datagen
Browse files Browse the repository at this point in the history
  • Loading branch information
Zepalesque committed Jun 2, 2024
1 parent cf02b77 commit cd01384
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/net/zepalesque/redux/Redux.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import net.zepalesque.redux.data.gen.ReduxItemModelGen;
import net.zepalesque.redux.data.gen.ReduxLanguageGen;
import net.zepalesque.redux.data.gen.ReduxLootGen;
import net.zepalesque.redux.data.gen.ReduxParticleGen;
import net.zepalesque.redux.data.gen.ReduxRecipeGen;
import net.zepalesque.redux.data.gen.ReduxRegistrySets;
import net.zepalesque.redux.data.gen.tags.ReduxBiomeTagsGen;
Expand Down Expand Up @@ -127,6 +128,7 @@ private void dataSetup(GatherDataEvent event) {
generator.addProvider(event.includeClient(), new ReduxBlockStateGen(packOutput, fileHelper));
generator.addProvider(event.includeClient(), new ReduxItemModelGen(packOutput, fileHelper));
generator.addProvider(event.includeClient(), new ReduxLanguageGen(packOutput));
generator.addProvider(event.includeClient(), new ReduxParticleGen(packOutput, fileHelper));

// Server Data
generator.addProvider(event.includeServer(), new ReduxRecipeGen(packOutput, lookupProvider));
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/net/zepalesque/redux/data/gen/ReduxParticleGen.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package net.zepalesque.redux.data.gen;

import net.minecraft.data.PackOutput;
import net.neoforged.neoforge.common.data.ExistingFileHelper;
import net.zepalesque.redux.Redux;
import net.zepalesque.redux.client.particle.ReduxParticles;
import net.zepalesque.redux.data.prov.ReduxParticleProvider;

public class ReduxParticleGen extends ReduxParticleProvider {
public ReduxParticleGen(PackOutput output, ExistingFileHelper fileHelper) {
super(output, fileHelper);
}

@Override
protected void addDescriptions() {
this.spriteSet(ReduxParticles.CLOUDROOT_LEAF.get(), Redux.loc("leaves/cloudroot"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package net.zepalesque.redux.data.prov;

import net.minecraft.data.PackOutput;
import net.neoforged.neoforge.common.data.ExistingFileHelper;
import net.neoforged.neoforge.common.data.ParticleDescriptionProvider;

public abstract class ReduxParticleProvider extends ParticleDescriptionProvider {
protected ReduxParticleProvider(PackOutput output, ExistingFileHelper fileHelper) {
super(output, fileHelper);
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cd01384

Please sign in to comment.