update to 1.21, update to Gradle 8.8, update to Loom 1.7
This commit is contained in:
@@ -130,7 +130,7 @@ public class CaveDustConfig extends JsonFile {
|
||||
|
||||
public ParticleEffect getParticle(){
|
||||
try {
|
||||
return (ParticleEffect) Registries.PARTICLE_TYPE.get(new Identifier(Registries.PARTICLE_TYPE.getEntry(getParticleID()).get().getKey().get().getValue().toString().toLowerCase()));
|
||||
return (ParticleEffect) Registries.PARTICLE_TYPE.get(Identifier.of(Registries.PARTICLE_TYPE.getEntry(getParticleID()).get().getKey().get().getValue().toString().toLowerCase()));
|
||||
} catch (ClassCastException e) {
|
||||
MinecraftClient.getInstance().player.sendMessage(Text.translatable("debug.cavedust.particleerror"), true);
|
||||
LOGGER.error("Cannot spawn particle, check config.");
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.particle.*;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
import net.minecraft.particle.DefaultParticleType;
|
||||
import net.minecraft.particle.SimpleParticleType;
|
||||
|
||||
public class CaveDustParticleFactory extends SpriteBillboardParticle {
|
||||
private final SpriteProvider spriteProvider;
|
||||
@@ -39,7 +39,7 @@ public class CaveDustParticleFactory extends SpriteBillboardParticle {
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static class Factory implements ParticleFactory<DefaultParticleType> {
|
||||
public static class Factory implements ParticleFactory<SimpleParticleType> {
|
||||
private final SpriteProvider spriteProvider;
|
||||
|
||||
public Factory(SpriteProvider spriteProvider) {
|
||||
@@ -47,7 +47,7 @@ public class CaveDustParticleFactory extends SpriteBillboardParticle {
|
||||
}
|
||||
|
||||
|
||||
public Particle createParticle(DefaultParticleType type, ClientWorld world, double x, double y, double z, double velocityX, double velocityY, double velocityZ) {
|
||||
public Particle createParticle(SimpleParticleType type, ClientWorld world, double x, double y, double z, double velocityX, double velocityY, double velocityZ) {
|
||||
return new CaveDustParticleFactory(world, x, y, z, velocityX, velocityY, velocityZ, this.spriteProvider);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,18 @@ package net.lizistired.cavedust;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.particle.v1.FabricParticleTypes;
|
||||
import net.minecraft.particle.DefaultParticleType;
|
||||
import net.minecraft.particle.SimpleParticleType;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class CaveDustServer implements ModInitializer {
|
||||
public static final DefaultParticleType CAVE_DUST = FabricParticleTypes.simple();
|
||||
public static final SimpleParticleType CAVE_DUST = FabricParticleTypes.simple();
|
||||
/**
|
||||
* Runs the mod initializer.
|
||||
*/
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
Registry.register(Registries.PARTICLE_TYPE, new Identifier("cavedust", "cave_dust"), CAVE_DUST);
|
||||
Registry.register(Registries.PARTICLE_TYPE, Identifier.of("cavedust", "cave_dust"), CAVE_DUST);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14.5",
|
||||
"fabric": "*",
|
||||
"minecraft": "1.20.4",
|
||||
"minecraft": "1.21",
|
||||
"java": ">=17"
|
||||
},
|
||||
"suggests": {
|
||||
|
||||
Reference in New Issue
Block a user