diff --git a/src/main/java/team/lodestar/lodestone/registry/common/particle/LodestoneParticleRegistry.java b/src/main/java/team/lodestar/lodestone/registry/common/particle/LodestoneParticleRegistry.java index 3eb1de02..b6bad237 100644 --- a/src/main/java/team/lodestar/lodestone/registry/common/particle/LodestoneParticleRegistry.java +++ b/src/main/java/team/lodestar/lodestone/registry/common/particle/LodestoneParticleRegistry.java @@ -26,15 +26,15 @@ public class LodestoneParticleRegistry { public static RegistryObject TERRAIN_PARTICLE = PARTICLES.register("terrain", LodestoneTerrainParticleType::new); public static RegistryObject ITEM_PARTICLE = PARTICLES.register("item", LodestoneItemCrumbsParticleType::new); - public static void registerParticleFactory(RegisterParticleProvidersEvent event) { - event.registerSpriteSet(WISP_PARTICLE.get(), LodestoneWorldParticleType.Factory::new); - event.registerSpriteSet(SMOKE_PARTICLE.get(), LodestoneWorldParticleType.Factory::new); - event.registerSpriteSet(SPARKLE_PARTICLE.get(), LodestoneWorldParticleType.Factory::new); - event.registerSpriteSet(TWINKLE_PARTICLE.get(), LodestoneWorldParticleType.Factory::new); - event.registerSpriteSet(STAR_PARTICLE.get(), LodestoneWorldParticleType.Factory::new); + public static void registerParticleFactory() { + ParticleFactoryRegistry.getInstance().register(WISP_PARTICLE.get(), LodestoneWorldParticleType.Factory::new); + ParticleFactoryRegistry.getInstance().register(SMOKE_PARTICLE.get(), LodestoneWorldParticleType.Factory::new); + ParticleFactoryRegistry.getInstance().register(SPARKLE_PARTICLE.get(), LodestoneWorldParticleType.Factory::new); + ParticleFactoryRegistry.getInstance().register(TWINKLE_PARTICLE.get(), LodestoneWorldParticleType.Factory::new); + ParticleFactoryRegistry.getInstance().register(STAR_PARTICLE.get(), LodestoneWorldParticleType.Factory::new); - event.registerSpriteSet(SPARK_PARTICLE.get(), LodestoneWorldParticleType.Factory::new); - event.registerSpriteSet(TERRAIN_PARTICLE.get(), s -> new LodestoneTerrainParticleType.Factory()); - event.registerSpriteSet(ITEM_PARTICLE.get(), s -> new LodestoneItemCrumbsParticleType.Factory()); + ParticleFactoryRegistry.getInstance().register(SPARK_PARTICLE.get(), LodestoneWorldParticleType.Factory::new); + ParticleFactoryRegistry.getInstance().register(TERRAIN_PARTICLE.get(), s -> new LodestoneTerrainParticleType.Factory()); + ParticleFactoryRegistry.getInstance().register(ITEM_PARTICLE.get(), s -> new LodestoneItemCrumbsParticleType.Factory()); } } \ No newline at end of file diff --git a/src/main/java/team/lodestar/lodestone/registry/common/particle/LodestoneScreenParticleRegistry.java b/src/main/java/team/lodestar/lodestone/registry/common/particle/LodestoneScreenParticleRegistry.java index 2fd28775..18e78095 100644 --- a/src/main/java/team/lodestar/lodestone/registry/common/particle/LodestoneScreenParticleRegistry.java +++ b/src/main/java/team/lodestar/lodestone/registry/common/particle/LodestoneScreenParticleRegistry.java @@ -5,7 +5,6 @@ import net.minecraft.resources.ResourceLocation; import team.lodestar.lodestone.LodestoneLib; import team.lodestar.lodestone.mixin.FabricSpriteProviderImplAccessor; -import team.lodestar.lodestone.systems.particle.options.ScreenParticleOptions; import team.lodestar.lodestone.systems.particle.screen.ScreenParticleOptions; import team.lodestar.lodestone.systems.particle.screen.ScreenParticleType; import team.lodestar.lodestone.systems.particle.screen.LodestoneScreenParticleType; diff --git a/src/main/java/team/lodestar/lodestone/systems/particle/screen/FrameSetScreenParticle.java b/src/main/java/team/lodestar/lodestone/systems/particle/screen/FrameSetScreenParticle.java index 3da5961f..867cae2b 100644 --- a/src/main/java/team/lodestar/lodestone/systems/particle/screen/FrameSetScreenParticle.java +++ b/src/main/java/team/lodestar/lodestone/systems/particle/screen/FrameSetScreenParticle.java @@ -2,8 +2,6 @@ import net.fabricmc.fabric.impl.client.particle.FabricSpriteProviderImpl; import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.client.particle.ParticleEngine; -import team.lodestar.lodestone.systems.particle.options.ScreenParticleOptions; import java.util.ArrayList; diff --git a/src/main/java/team/lodestar/lodestone/systems/particle/world/FrameSetParticle.java b/src/main/java/team/lodestar/lodestone/systems/particle/world/FrameSetParticle.java index 40cfdc35..3959f2e4 100644 --- a/src/main/java/team/lodestar/lodestone/systems/particle/world/FrameSetParticle.java +++ b/src/main/java/team/lodestar/lodestone/systems/particle/world/FrameSetParticle.java @@ -13,7 +13,7 @@ public class FrameSetParticle extends LodestoneWorldParticle { public ArrayList frameSet = new ArrayList<>(); - public FrameSetParticle(ClientLevel world, WorldParticleOptions data, ParticleEngine.MutableSpriteSet spriteSet, double x, double y, double z, double xd, double yd, double zd) { + public FrameSetParticle(ClientLevel world, WorldParticleOptions data, FabricSpriteProviderImpl spriteSet, double x, double y, double z, double xd, double yd, double zd) { super(world, data, spriteSet, x, y, z, xd, yd, zd); } diff --git a/src/main/java/team/lodestar/lodestone/systems/particle/world/LodestoneItemCrumbParticle.java b/src/main/java/team/lodestar/lodestone/systems/particle/world/LodestoneItemCrumbParticle.java index 72bf14eb..ae3fcb53 100644 --- a/src/main/java/team/lodestar/lodestone/systems/particle/world/LodestoneItemCrumbParticle.java +++ b/src/main/java/team/lodestar/lodestone/systems/particle/world/LodestoneItemCrumbParticle.java @@ -4,10 +4,7 @@ import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.renderer.LevelRenderer; import net.minecraft.core.BlockPos; -import net.minecraftforge.client.model.data.ModelData; import team.lodestar.lodestone.systems.particle.world.options.LodestoneItemCrumbsParticleOptions; -import team.lodestar.lodestone.systems.particle.world.behaviors.*; -import team.lodestar.lodestone.systems.particle.options.LodestoneItemCrumbsParticleOptions; public class LodestoneItemCrumbParticle extends LodestoneWorldParticle { diff --git a/src/main/java/team/lodestar/lodestone/systems/particle/world/LodestoneWorldParticle.java b/src/main/java/team/lodestar/lodestone/systems/particle/world/LodestoneWorldParticle.java index dbd48785..fd687d04 100644 --- a/src/main/java/team/lodestar/lodestone/systems/particle/world/LodestoneWorldParticle.java +++ b/src/main/java/team/lodestar/lodestone/systems/particle/world/LodestoneWorldParticle.java @@ -50,9 +50,7 @@ public class LodestoneWorldParticle extends TextureSheetParticle { float[] hsv1 = new float[3], hsv2 = new float[3]; - public LodestoneWorldParticle(ClientLevel world, WorldParticleOptions options, ParticleEngine.MutableSpriteSet spriteSet, double x, double y, double z, double xd, double yd, double zd) { - public GenericParticle(ClientLevel world, T options, FabricSpriteProviderImpl spriteSet, double x, double y, double z, double xd, double yd, double zd) { - public LodestoneWorldParticle(ClientLevel world, WorldParticleOptions options, ParticleEngine.MutableSpriteSet spriteSet, double x, double y, double z, double xd, double yd, double zd) { + public LodestoneWorldParticle(ClientLevel world, WorldParticleOptions options, FabricSpriteProviderImpl spriteSet, double x, double y, double z, double xd, double yd, double zd) { super(world, x, y, z); this.renderType = options.renderType; this.behavior = options.behavior; diff --git a/src/main/java/team/lodestar/lodestone/systems/particle/world/SparkParticle.java b/src/main/java/team/lodestar/lodestone/systems/particle/world/SparkParticle.java deleted file mode 100644 index e69de29b..00000000 diff --git a/src/main/java/team/lodestar/lodestone/systems/particle/world/type/AbstractLodestoneParticleType.java b/src/main/java/team/lodestar/lodestone/systems/particle/world/type/AbstractLodestoneParticleType.java index 9af38106..ae1c5016 100644 --- a/src/main/java/team/lodestar/lodestone/systems/particle/world/type/AbstractLodestoneParticleType.java +++ b/src/main/java/team/lodestar/lodestone/systems/particle/world/type/AbstractLodestoneParticleType.java @@ -10,8 +10,6 @@ import team.lodestar.lodestone.systems.particle.world.behaviors.*; import team.lodestar.lodestone.systems.particle.world.options.*; -import javax.annotation.*; - public class AbstractLodestoneParticleType extends ParticleType { public AbstractLodestoneParticleType() { diff --git a/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneDirectionalParticleType.java b/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneDirectionalParticleType.java deleted file mode 100644 index e69de29b..00000000 diff --git a/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneItemCrumbsParticleType.java b/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneItemCrumbsParticleType.java index e0405e37..97fc6b22 100644 --- a/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneItemCrumbsParticleType.java +++ b/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneItemCrumbsParticleType.java @@ -3,10 +3,10 @@ import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.particle.Particle; import net.minecraft.client.particle.ParticleProvider; +import org.jetbrains.annotations.Nullable; import team.lodestar.lodestone.systems.particle.world.options.*; import team.lodestar.lodestone.systems.particle.world.LodestoneItemCrumbParticle; -import javax.annotation.Nullable; public class LodestoneItemCrumbsParticleType extends AbstractLodestoneParticleType { public LodestoneItemCrumbsParticleType() { diff --git a/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneSparkParticleType.java b/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneSparkParticleType.java deleted file mode 100644 index e69de29b..00000000 diff --git a/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneTerrainParticleType.java b/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneTerrainParticleType.java index a6753d61..35f53876 100644 --- a/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneTerrainParticleType.java +++ b/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneTerrainParticleType.java @@ -6,11 +6,11 @@ import net.minecraft.client.particle.ParticleProvider; import net.minecraft.client.particle.SpriteSet; import net.minecraft.core.particles.ParticleType; +import org.jetbrains.annotations.Nullable; import team.lodestar.lodestone.systems.particle.world.options.*; import team.lodestar.lodestone.systems.particle.world.LodestoneTerrainParticle; import team.lodestar.lodestone.systems.particle.world.behaviors.*; -import javax.annotation.Nullable; public class LodestoneTerrainParticleType extends AbstractLodestoneParticleType { public LodestoneTerrainParticleType() { diff --git a/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneWorldParticleType.java b/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneWorldParticleType.java index 1c6c101e..fda58446 100644 --- a/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneWorldParticleType.java +++ b/src/main/java/team/lodestar/lodestone/systems/particle/world/type/LodestoneWorldParticleType.java @@ -27,9 +27,7 @@ public Factory(SpriteSet sprite) { @Nullable @Override public Particle createParticle(WorldParticleOptions data, ClientLevel world, double x, double y, double z, double mx, double my, double mz) { - return new LodestoneWorldParticle(world, data, (ParticleEngine.MutableSpriteSet) sprite, x, y, z, mx, my, mz); - return new LodestoneWorldParticle<>(world, data, (ParticleEngine.MutableSpriteSet) sprite, x, y, z, mx, my, mz); - return new GenericParticle(world, data, (FabricSpriteProviderImpl) sprite, x, y, z, mx, my, mz); + return new LodestoneWorldParticle(world, data, (FabricSpriteProviderImpl) sprite, x, y, z, mx, my, mz); } } } \ No newline at end of file