45 lines
1.7 KiB
Java
45 lines
1.7 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package net.minecraft.client.particle;
|
|
|
|
import net.minecraft.client.Minecraft;
|
|
import net.minecraft.client.model.GuardianParticleModel;
|
|
import net.minecraft.client.model.geom.ModelLayers;
|
|
import net.minecraft.client.multiplayer.ClientLevel;
|
|
import net.minecraft.client.particle.Particle;
|
|
import net.minecraft.client.particle.ParticleProvider;
|
|
import net.minecraft.client.particle.ParticleRenderType;
|
|
import net.minecraft.client.renderer.entity.ElderGuardianRenderer;
|
|
import net.minecraft.client.renderer.rendertype.RenderType;
|
|
import net.minecraft.client.renderer.rendertype.RenderTypes;
|
|
import net.minecraft.core.particles.SimpleParticleType;
|
|
import net.minecraft.util.RandomSource;
|
|
|
|
public class ElderGuardianParticle
|
|
extends Particle {
|
|
protected final GuardianParticleModel model;
|
|
protected final RenderType renderType = RenderTypes.entityTranslucent(ElderGuardianRenderer.GUARDIAN_ELDER_LOCATION);
|
|
|
|
private ElderGuardianParticle(ClientLevel level, double x, double y, double z) {
|
|
super(level, x, y, z);
|
|
this.model = new GuardianParticleModel(Minecraft.getInstance().getEntityModels().bakeLayer(ModelLayers.ELDER_GUARDIAN));
|
|
this.gravity = 0.0f;
|
|
this.lifetime = 30;
|
|
}
|
|
|
|
@Override
|
|
public ParticleRenderType getGroup() {
|
|
return ParticleRenderType.ELDER_GUARDIANS;
|
|
}
|
|
|
|
public static class Provider
|
|
implements ParticleProvider<SimpleParticleType> {
|
|
@Override
|
|
public Particle createParticle(SimpleParticleType options, ClientLevel level, double x, double y, double z, double xAux, double yAux, double zAux, RandomSource random) {
|
|
return new ElderGuardianParticle(level, x, y, z);
|
|
}
|
|
}
|
|
}
|
|
|