Skip to content

Commit

Permalink
ethernal road to salvation
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsterner committed May 29, 2024
1 parent 6d868d7 commit a83ca72
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public class LodestoneParticleRegistry {
public static RegistryObject<LodestoneTerrainParticleType> TERRAIN_PARTICLE = PARTICLES.register("terrain", LodestoneTerrainParticleType::new);
public static RegistryObject<LodestoneItemCrumbsParticleType> 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());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class FrameSetParticle extends LodestoneWorldParticle {
public ArrayList<Integer> 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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ public class LodestoneWorldParticle extends TextureSheetParticle {

float[] hsv1 = new float[3], hsv2 = new float[3];

public LodestoneWorldParticle(ClientLevel world, WorldParticleOptions<T> 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;
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -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<T extends WorldParticleOptions> extends ParticleType<T> {

public AbstractLodestoneParticleType() {
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -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<LodestoneItemCrumbsParticleOptions> {
public LodestoneItemCrumbsParticleType() {
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -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<LodestoneTerrainParticleOptions> {
public LodestoneTerrainParticleType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit a83ca72

Please sign in to comment.