added wistful wanderings, nightmare reowork, lucid bolt, etc
This commit is contained in:
1 parent
68a823d5ff
commit
b81dcc3bef
76 files changed
+1917
-331
No files matched your search
+23
@@ -0,0 +1,23 @@
|
||||
package com.craisinlord.antarchy.content.client.model;
|
||||
|
||||
import com.craisinlord.antarchy.Antarchy;
|
||||
import com.craisinlord.antarchy.content.entity.lucid.LucidBoltEntity;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
||||
public class LucidBoltModel extends GeoModel<LucidBoltEntity> {
|
||||
@Override
|
||||
public ResourceLocation getModelResource(LucidBoltEntity animatable) {
|
||||
return new ResourceLocation(Antarchy.MODID, "geo/lucid_bolt.geo.json");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getTextureResource(LucidBoltEntity animatable) {
|
||||
return new ResourceLocation(Antarchy.MODID, "textures/vfx/lucid_bolt.png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getAnimationResource(LucidBoltEntity animatable) {
|
||||
return new ResourceLocation(Antarchy.MODID, "animations/lucid_bolt.animation.json");
|
||||
}
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
package com.craisinlord.antarchy.content.client.particle;
|
||||
|
||||
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.particle.SpriteSet;
|
||||
import net.minecraft.client.particle.TextureSheetParticle;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
import net.minecraft.core.particles.SimpleParticleType;
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
public final class LucidBoltImpactParticle extends TextureSheetParticle {
|
||||
private final SpriteSet sprites;
|
||||
|
||||
private LucidBoltImpactParticle(ClientLevel level, double x, double y, double z, double xd, double yd, double zd, SpriteSet sprites, float baseScale, int minLifetime, int randomLifetime) {
|
||||
super(level, x, y, z, xd, yd, zd);
|
||||
this.sprites = sprites;
|
||||
this.friction = 0.88F;
|
||||
this.gravity = 0.0F;
|
||||
this.hasPhysics = false;
|
||||
this.xd = xd;
|
||||
this.yd = yd;
|
||||
this.zd = zd;
|
||||
this.quadSize = baseScale * (0.85F + this.random.nextFloat() * 0.3F);
|
||||
this.lifetime = minLifetime + this.random.nextInt(randomLifetime);
|
||||
this.setColor(0.94F, 0.95F, 1.0F);
|
||||
this.setAlpha(0.95F);
|
||||
this.pickSprite(sprites);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
this.pickSprite(this.sprites);
|
||||
float life = (float) this.age / (float) this.lifetime;
|
||||
this.setAlpha(Mth.clamp(1.0F - life, 0.0F, 1.0F) * 0.95F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightColor(float partialTick) {
|
||||
return LightTexture.FULL_BRIGHT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParticleRenderType getRenderType() {
|
||||
return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT;
|
||||
}
|
||||
|
||||
public static final class SmallProvider implements ParticleProvider<SimpleParticleType> {
|
||||
private final SpriteSet sprites;
|
||||
|
||||
public SmallProvider(SpriteSet sprites) {
|
||||
this.sprites = sprites;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xd, double yd, double zd) {
|
||||
return new LucidBoltImpactParticle(level, x, y, z, xd, yd, zd, this.sprites, 0.1F, 8, 4);
|
||||
}
|
||||
}
|
||||
|
||||
public static final class LargeProvider implements ParticleProvider<SimpleParticleType> {
|
||||
private final SpriteSet sprites;
|
||||
|
||||
public LargeProvider(SpriteSet sprites) {
|
||||
this.sprites = sprites;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xd, double yd, double zd) {
|
||||
return new LucidBoltImpactParticle(level, x, y, z, xd, yd, zd, this.sprites, 0.22F, 10, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.craisinlord.antarchy.content.client.renderer;
|
||||
|
||||
import com.craisinlord.antarchy.content.client.model.LucidBoltModel;
|
||||
import com.craisinlord.antarchy.content.entity.lucid.LucidBoltEntity;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.math.Axis;
|
||||
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
||||
import net.minecraft.util.Mth;
|
||||
import software.bernie.geckolib.renderer.GeoEntityRenderer;
|
||||
|
||||
public class LucidBoltRenderer extends GeoEntityRenderer<LucidBoltEntity> {
|
||||
public LucidBoltRenderer(EntityRendererProvider.Context context) {
|
||||
super(context, new LucidBoltModel());
|
||||
this.shadowRadius = 0.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void applyRotations(LucidBoltEntity animatable, PoseStack poseStack, float ageInTicks, float rotationYaw, float partialTick) {
|
||||
float appliedYaw = Mth.rotLerp(partialTick, animatable.yRotO, animatable.getYRot());
|
||||
float appliedPitch = Mth.lerp(partialTick, animatable.xRotO, animatable.getXRot());
|
||||
super.applyRotations(animatable, poseStack, ageInTicks, appliedYaw, partialTick);
|
||||
poseStack.mulPose(Axis.XP.rotationDegrees(-appliedPitch));
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"textures": [
|
||||
"antarchy:lucid_bolt_impact_large"
|
||||
]
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"textures": [
|
||||
"antarchy:lucid_bolt_impact_small"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user