Reformated

This commit is contained in:
Frank 2022-06-08 20:57:21 +02:00
parent 079b51e3f6
commit 852e5a6abc
385 changed files with 6924 additions and 5656 deletions

View file

@ -1,5 +1,6 @@
package org.betterx.bclib.particles;
import com.mojang.serialization.Codec;
import net.minecraft.core.Registry;
import net.minecraft.core.particles.ParticleOptions;
import net.minecraft.core.particles.ParticleType;
@ -8,18 +9,20 @@ import net.minecraft.resources.ResourceLocation;
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
import com.mojang.serialization.Codec;
public class BCLParticleType {
public static <T extends ParticleOptions> ParticleType<T> deserializer(ParticleOptions.Deserializer<T> factory,
Codec<T> codec) {
public static <T extends ParticleOptions> ParticleType<T> deserializer(
ParticleOptions.Deserializer<T> factory,
Codec<T> codec
) {
return deserializer(false, factory, codec);
}
public static <T extends ParticleOptions> ParticleType<T> deserializer(boolean overrideLimiter,
ParticleOptions.Deserializer<T> factory,
Codec<T> codec) {
public static <T extends ParticleOptions> ParticleType<T> deserializer(
boolean overrideLimiter,
ParticleOptions.Deserializer<T> factory,
Codec<T> codec
) {
return new ParticleType<T>(overrideLimiter, factory) {
@Override
public Codec<T> codec() {
@ -28,16 +31,20 @@ public class BCLParticleType {
};
}
public static <T extends ParticleOptions> ParticleType<T> register(ResourceLocation location,
ParticleOptions.Deserializer<T> factory,
Codec<T> codec) {
public static <T extends ParticleOptions> ParticleType<T> register(
ResourceLocation location,
ParticleOptions.Deserializer<T> factory,
Codec<T> codec
) {
return register(location, false, factory, codec);
}
public static <T extends ParticleOptions> ParticleType<T> register(ResourceLocation location,
boolean overrideLimiter,
ParticleOptions.Deserializer<T> factory,
Codec<T> codec) {
public static <T extends ParticleOptions> ParticleType<T> register(
ResourceLocation location,
boolean overrideLimiter,
ParticleOptions.Deserializer<T> factory,
Codec<T> codec
) {
return Registry.register(Registry.PARTICLE_TYPE, location, deserializer(overrideLimiter, factory, codec));
}
@ -58,14 +65,18 @@ public class BCLParticleType {
return Registry.register(Registry.PARTICLE_TYPE, location, simple(overrideLimiter));
}
public static SimpleParticleType register(ResourceLocation location,
ParticleFactoryRegistry.PendingParticleFactory<SimpleParticleType> provider) {
public static SimpleParticleType register(
ResourceLocation location,
ParticleFactoryRegistry.PendingParticleFactory<SimpleParticleType> provider
) {
return register(location, false, provider);
}
public static SimpleParticleType register(ResourceLocation location,
boolean overrideLimiter,
ParticleFactoryRegistry.PendingParticleFactory<SimpleParticleType> provider) {
public static SimpleParticleType register(
ResourceLocation location,
boolean overrideLimiter,
ParticleFactoryRegistry.PendingParticleFactory<SimpleParticleType> provider
) {
SimpleParticleType type = Registry.register(Registry.PARTICLE_TYPE, location, simple(overrideLimiter));
ParticleFactoryRegistry.getInstance().register(type, provider);
return type;