Skip to content

Commit

Permalink
Waiting for lodestone
Browse files Browse the repository at this point in the history
  • Loading branch information
doctor4t committed Sep 20, 2024
1 parent f50ffd6 commit dfe9147
Show file tree
Hide file tree
Showing 63 changed files with 297 additions and 303 deletions.
34 changes: 13 additions & 21 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,34 @@ modrinth_id = effective

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.16.5
minecraft_version=1.21
yarn_mappings=1.21+build.2
loader_version=0.15.11

# Mod Properties
mod_version=2.2.2
maven_group=ladynake
archives_base_name=effective

# Dependencies
fabric_version=0.92.2+1.20.1
fabric_version=0.100.3+1.21
#veil_version = 1.0.0.225
mod_menu_version = 7.2.0
cca_version = 5.2.2
midnightlib_version = 1.4.1-fabric
lodestone_version = 1.20.1-1.6.2.3f-fabric
satin_version = 1.14.0
sodium_version = mc1.20.1-0.5.11
iris_version = 1.7.2+1.20.1
mod_menu_version = 11.0.1
cca_version = 6.1.1
midnightlib_version = 1.5.7-fabric
satin_version = 2.0.0
sodium_version = mc1.21-0.5.11
iris_version = 1.7.3+1.21
jcpp_version = 1.4.14
glslTransformer_version = 2.0.0-pre13
portinglib_version = 2.3.4+1.20.1
lodestone_version = 1.21.1-1.7.0
portinglib_version = 3.1.0-beta-beta.35+1.21
portinglib_modules = \
accessors,\
base,\
blocks,\
config,\
core,\
data,\
entity,\
extensions,\
items,\
lazy_registration,\
model_generators,\
models,\
networking,\
tags,\
transfer,\
tool_actions
models
28 changes: 14 additions & 14 deletions src/client/java/org/ladysnake/effective/core/Effective.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.ladysnake.effective.core;

import ladysnake.satin.api.event.EntitiesPreRenderCallback;
import ladysnake.satin.api.event.ShaderEffectRenderCallback;
import ladysnake.satin.api.managed.ManagedCoreShader;
import ladysnake.satin.api.managed.ManagedShaderEffect;
import ladysnake.satin.api.managed.ShaderEffectManager;
import ladysnake.satin.api.managed.uniform.Uniform1f;
import org.ladysnake.satin.api.event.EntitiesPreRenderCallback;
import org.ladysnake.satin.api.event.ShaderEffectRenderCallback;
import org.ladysnake.satin.api.managed.ManagedCoreShader;
import org.ladysnake.satin.api.managed.ManagedShaderEffect;
import org.ladysnake.satin.api.managed.ShaderEffectManager;
import org.ladysnake.satin.api.managed.uniform.Uniform1f;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents;
Expand All @@ -16,7 +16,7 @@
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.entity.passive.GlowSquidEntity;
import net.minecraft.particle.DefaultParticleType;
import net.minecraft.particle.SimpleParticleType;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.sound.SoundEvent;
Expand Down Expand Up @@ -65,15 +65,15 @@ public class Effective implements ClientModInitializer {

// particle types
public static SplashParticleType SPLASH;
public static DefaultParticleType DROPLET;
public static DefaultParticleType RIPPLE;
public static SimpleParticleType DROPLET;
public static SimpleParticleType RIPPLE;
public static SplashParticleType GLOW_SPLASH;
public static DefaultParticleType GLOW_DROPLET;
public static DefaultParticleType GLOW_RIPPLE;
public static SimpleParticleType GLOW_DROPLET;
public static SimpleParticleType GLOW_RIPPLE;
public static AllayTwinkleParticleType ALLAY_TWINKLE;
public static DefaultParticleType CHORUS_PETAL;
public static DefaultParticleType EYES;
public static DefaultParticleType WILL_O_WISP;
public static SimpleParticleType CHORUS_PETAL;
public static SimpleParticleType EYES;
public static SimpleParticleType WILL_O_WISP;

// lodestone particles
public static LodestoneWorldParticleType PIXEL = new LodestoneWorldParticleType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.List;

@Mixin(AllayEntity.class)
public class AllayPositionTracker extends PathAwareEntity implements PositionTrackedEntity {
public abstract class AllayPositionTracker extends PathAwareEntity implements PositionTrackedEntity {
@Unique
public final TrailPointBuilder trailPointBuilder = TrailPointBuilder.create(16);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void render(T livingEntity, float entityYaw, float tickDelta, MatrixStack
.setScaleData(GenericParticleData.create(0.12f).build())
.setLifetime(15)
.setMotion(0, 0.05f, 0)
.spawn(allayEntity.getWorld(), allayEntity.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).x + allayEntity.getRandom().nextGaussian() / spreadDivider, allayEntity.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).y - 0.2f + allayEntity.getRandom().nextGaussian() / spreadDivider, allayEntity.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).z + allayEntity.getRandom().nextGaussian() / spreadDivider);
.spawn(allayEntity.getWorld(), allayEntity.getClientCameraPosVec(MinecraftClient.getInstance().getRenderTime()).x + allayEntity.getRandom().nextGaussian() / spreadDivider, allayEntity.getClientCameraPosVec(MinecraftClient.getInstance().getRenderTime()).y - 0.2f + allayEntity.getRandom().nextGaussian() / spreadDivider, allayEntity.getClientCameraPosVec(MinecraftClient.getInstance().getRenderTime()).z + allayEntity.getRandom().nextGaussian() / spreadDivider);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private static void clientTick(World world, BlockPos pos, BlockState state, Ches
if (world.random.nextInt(200) == 0
&& blockEntity.stateManager.getViewerCount() <= 0
&& !CHESTS_TIMERS.containsKey(pos)
&& blockEntity.lidAnimator.getProgress(MinecraftClient.getInstance().getTickDelta()) == 0f) {
&& blockEntity.lidAnimator.getProgress(MinecraftClient.getInstance().getRenderTime()) == 0f) {
// only trigger for single and left chests to avoid double openings and double sounds for double chests
ChestType chestType = state.contains(ChestBlock.CHEST_TYPE) ? state.get(ChestBlock.CHEST_TYPE) : ChestType.SINGLE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public abstract class FeedbackingParryFireballEffect {
@Inject(method = "attack", at = @At("HEAD"))
public void attack(Entity target, CallbackInfo ci) {
if (EffectiveConfig.ultrakill && this.isMainPlayer() && target instanceof ExplosiveProjectileEntity) {
MinecraftClient.getInstance().player.playSound(Effective.PARRY, SoundCategory.PLAYERS, 1.0f, 1.0f);
MinecraftClient.getInstance().player.playSound(Effective.PARRY);

Effective.freezeFrames = 5;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public GlowsquidParticleEffectSwapper(EntityType<? extends SquidEntity> entityTy
.setColorData(ColorParticleData.create(new Color(0x00FFAA), new Color(0x51FFFF)).build())
.setScaleData(GenericParticleData.create(0.01f, .2f + random.nextFloat() / 10f).setEasing(Easing.SINE_OUT).build())
.setLifetime(40)
.spawn(this.getWorld(), this.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).x + this.getRandom().nextGaussian() / spreadDivider, this.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).y - 0.2f + this.getRandom().nextGaussian() / spreadDivider, this.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).z + this.getRandom().nextGaussian() / spreadDivider);
.spawn(this.getWorld(), this.getClientCameraPosVec(MinecraftClient.getInstance().getRenderTime()).x + this.getRandom().nextGaussian() / spreadDivider, this.getClientCameraPosVec(MinecraftClient.getInstance().getRenderTime()).y - 0.2f + this.getRandom().nextGaussian() / spreadDivider, this.getClientCameraPosVec(MinecraftClient.getInstance().getRenderTime()).z + this.getRandom().nextGaussian() / spreadDivider);
}
} else {
voidOperation.call(world, particleEffect, x, y, z, velX, velY, velZ);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import team.lodestar.lodestone.systems.screenshake.ScreenshakeInstance;

@Mixin(RavagerEntity.class)
public class RavagerRoarScreenshakeAdder extends HostileEntity {
public abstract class RavagerRoarScreenshakeAdder extends HostileEntity {
protected RavagerRoarScreenshakeAdder(EntityType<? extends HostileEntity> entityType, World world) {
super(entityType, world);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import team.lodestar.lodestone.systems.screenshake.ScreenshakeInstance;

@Mixin(WardenEntity.class)
public class WardenRoarScreenshakeAdder extends HostileEntity {
public abstract class WardenRoarScreenshakeAdder extends HostileEntity {
public ScreenshakeInstance roarScreenShake;
public int ticksSinceAnimationStart = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected SpectralArrowPositionTrackerAndParticleRemover(EntityType<? extends Pe
@Inject(method = "tick", at = @At("HEAD"))
public void tick(CallbackInfo ci) {
if (EffectiveConfig.spectralArrowTrails != EffectiveConfig.TrailOptions.NONE) {
Vec3d position = this.getCameraPosVec(MinecraftClient.getInstance().getTickDelta()).add(0, -.1f, 0f);
Vec3d position = this.getCameraPosVec(MinecraftClient.getInstance().getRenderTime()).add(0, -.1f, 0f);
trailPointBuilder.addTrailPoint(position);
trailPointBuilder.tickTrailPoints();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void render(T entity, float entityYaw, float tickDelta, MatrixStack matri
.setScaleData(GenericParticleData.create(0.06f).build())
.setLifetime(15)
.setMotion(0, 0.05f, 0)
.spawn(spectralArrowEntity.getWorld(), spectralArrowEntity.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).x + spectralArrowEntity.getWorld().getRandom().nextGaussian() / spreadDivider, spectralArrowEntity.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).y - 0.2f + spectralArrowEntity.getWorld().getRandom().nextGaussian() / spreadDivider, spectralArrowEntity.getClientCameraPosVec(MinecraftClient.getInstance().getTickDelta()).z + spectralArrowEntity.getWorld().getRandom().nextGaussian() / spreadDivider);
.spawn(spectralArrowEntity.getWorld(), spectralArrowEntity.getClientCameraPosVec(MinecraftClient.getInstance().getRenderTime()).x + spectralArrowEntity.getWorld().getRandom().nextGaussian() / spreadDivider, spectralArrowEntity.getClientCameraPosVec(MinecraftClient.getInstance().getRenderTime()).y - 0.2f + spectralArrowEntity.getWorld().getRandom().nextGaussian() / spreadDivider, spectralArrowEntity.getClientCameraPosVec(MinecraftClient.getInstance().getRenderTime()).z + spectralArrowEntity.getWorld().getRandom().nextGaussian() / spreadDivider);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import net.minecraft.client.render.LightmapTextureManager;
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.particle.DefaultParticleType;
import net.minecraft.particle.SimpleParticleType;
import net.minecraft.registry.tag.FluidTags;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
Expand Down Expand Up @@ -92,10 +92,10 @@ public void buildGeometry(VertexConsumer vertexConsumer, Camera camera, float ti
float maxV = this.getMaxV();
int l = LightmapTextureManager.MAX_LIGHT_COORDINATE;

vertexConsumer.vertex(vector3fs[0].x(), vector3fs[0].y(), vector3fs[0].z()).texture(maxU, maxV).color(red, green, blue, alpha).light(l).next();
vertexConsumer.vertex(vector3fs[1].x(), vector3fs[1].y(), vector3fs[1].z()).texture(maxU, minV).color(red, green, blue, alpha).light(l).next();
vertexConsumer.vertex(vector3fs[2].x(), vector3fs[2].y(), vector3fs[2].z()).texture(minU, minV).color(red, green, blue, alpha).light(l).next();
vertexConsumer.vertex(vector3fs[3].x(), vector3fs[3].y(), vector3fs[3].z()).texture(minU, maxV).color(red, green, blue, alpha).light(l).next();
vertexConsumer.vertex(vector3fs[0].x(), vector3fs[0].y(), vector3fs[0].z()).texture(maxU, maxV).color(red, green, blue, alpha).light(l);
vertexConsumer.vertex(vector3fs[1].x(), vector3fs[1].y(), vector3fs[1].z()).texture(maxU, minV).color(red, green, blue, alpha).light(l);
vertexConsumer.vertex(vector3fs[2].x(), vector3fs[2].y(), vector3fs[2].z()).texture(minU, minV).color(red, green, blue, alpha).light(l);
vertexConsumer.vertex(vector3fs[3].x(), vector3fs[3].y(), vector3fs[3].z()).texture(minU, maxV).color(red, green, blue, alpha).light(l);
}

public ParticleTextureSheet getType() {
Expand Down Expand Up @@ -153,14 +153,14 @@ public void tick() {
}


public static class DefaultFactory implements ParticleFactory<DefaultParticleType> {
public static class DefaultFactory implements ParticleFactory<SimpleParticleType> {
private final SpriteProvider spriteProvider;

public DefaultFactory(SpriteProvider spriteProvider) {
this.spriteProvider = spriteProvider;
}

public Particle createParticle(DefaultParticleType DefaultParticleType, ClientWorld clientWorld, double d, double e, double f, double g, double h, double i) {
public Particle createParticle(SimpleParticleType SimpleParticleType, ClientWorld clientWorld, double d, double e, double f, double g, double h, double i) {
return new ChorusPetalParticle(clientWorld, d, e, f, g, h, i, this.spriteProvider);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import net.minecraft.client.render.Camera;
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.particle.DefaultParticleType;
import net.minecraft.particle.SimpleParticleType;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
Expand Down Expand Up @@ -101,22 +101,22 @@ public void buildGeometry(VertexConsumer vertexConsumer, Camera camera, float ti
float maxV = this.getMaxV();
int l = this.getBrightness(tickDelta);

vertexConsumer.vertex(Vec3fs[0].x(), Vec3fs[0].y(), Vec3fs[0].z()).texture(maxU, maxV).color(red, green, blue, alpha).light(l).next();
vertexConsumer.vertex(Vec3fs[1].x(), Vec3fs[1].y(), Vec3fs[1].z()).texture(maxU, minV).color(red, green, blue, alpha).light(l).next();
vertexConsumer.vertex(Vec3fs[2].x(), Vec3fs[2].y(), Vec3fs[2].z()).texture(minU, minV).color(red, green, blue, alpha).light(l).next();
vertexConsumer.vertex(Vec3fs[3].x(), Vec3fs[3].y(), Vec3fs[3].z()).texture(minU, maxV).color(red, green, blue, alpha).light(l).next();
vertexConsumer.vertex(Vec3fs[0].x(), Vec3fs[0].y(), Vec3fs[0].z()).texture(maxU, maxV).color(red, green, blue, alpha).light(l);
vertexConsumer.vertex(Vec3fs[1].x(), Vec3fs[1].y(), Vec3fs[1].z()).texture(maxU, minV).color(red, green, blue, alpha).light(l);
vertexConsumer.vertex(Vec3fs[2].x(), Vec3fs[2].y(), Vec3fs[2].z()).texture(minU, minV).color(red, green, blue, alpha).light(l);
vertexConsumer.vertex(Vec3fs[3].x(), Vec3fs[3].y(), Vec3fs[3].z()).texture(minU, maxV).color(red, green, blue, alpha).light(l);
}

@Environment(EnvType.CLIENT)
public static class DefaultFactory implements ParticleFactory<DefaultParticleType> {
public static class DefaultFactory implements ParticleFactory<SimpleParticleType> {
private final SpriteProvider spriteProvider;

public DefaultFactory(SpriteProvider spriteProvider) {
this.spriteProvider = spriteProvider;
}

@Override
public Particle createParticle(DefaultParticleType parameters, ClientWorld world, double x, double y, double z, double velocityX, double velocityY, double velocityZ) {
public Particle createParticle(SimpleParticleType parameters, ClientWorld world, double x, double y, double z, double velocityX, double velocityY, double velocityZ) {
return new DropletParticle(world, x, y, z, velocityX, velocityY, velocityZ, this.spriteProvider);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.particle.DefaultParticleType;
import net.minecraft.particle.SimpleParticleType;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
Expand Down Expand Up @@ -77,10 +77,10 @@ public void buildGeometry(VertexConsumer vertexConsumer, Camera camera, float ti
int l = LightmapTextureManager.MAX_LIGHT_COORDINATE;
float a = Math.min(1f, Math.max(0f, this.alpha));

vertexConsumer.vertex(Vec3fs[0].x(), Vec3fs[0].y(), Vec3fs[0].z()).texture(maxU, maxV).color(red, green, blue, alpha).light(l).next();
vertexConsumer.vertex(Vec3fs[1].x(), Vec3fs[1].y(), Vec3fs[1].z()).texture(maxU, minV).color(red, green, blue, alpha).light(l).next();
vertexConsumer.vertex(Vec3fs[2].x(), Vec3fs[2].y(), Vec3fs[2].z()).texture(minU, minV).color(red, green, blue, alpha).light(l).next();
vertexConsumer.vertex(Vec3fs[3].x(), Vec3fs[3].y(), Vec3fs[3].z()).texture(minU, maxV).color(red, green, blue, alpha).light(l).next();
vertexConsumer.vertex(Vec3fs[0].x(), Vec3fs[0].y(), Vec3fs[0].z()).texture(maxU, maxV).color(red, green, blue, alpha).light(l);
vertexConsumer.vertex(Vec3fs[1].x(), Vec3fs[1].y(), Vec3fs[1].z()).texture(maxU, minV).color(red, green, blue, alpha).light(l);
vertexConsumer.vertex(Vec3fs[2].x(), Vec3fs[2].y(), Vec3fs[2].z()).texture(minU, minV).color(red, green, blue, alpha).light(l);
vertexConsumer.vertex(Vec3fs[3].x(), Vec3fs[3].y(), Vec3fs[3].z()).texture(minU, maxV).color(red, green, blue, alpha).light(l);
}

public ParticleTextureSheet getType() {
Expand Down Expand Up @@ -121,14 +121,14 @@ public void tick() {
}


public static class DefaultFactory implements ParticleFactory<DefaultParticleType> {
public static class DefaultFactory implements ParticleFactory<SimpleParticleType> {
private final SpriteProvider spriteProvider;

public DefaultFactory(SpriteProvider spriteProvider) {
this.spriteProvider = spriteProvider;
}

public Particle createParticle(DefaultParticleType DefaultParticleType, ClientWorld clientWorld, double d, double e, double f, double g, double h, double i) {
public Particle createParticle(SimpleParticleType SimpleParticleType, ClientWorld clientWorld, double d, double e, double f, double g, double h, double i) {
return new EyesParticle(clientWorld, d, e, f, g, h, i, this.spriteProvider);
}
}
Expand Down
Loading

0 comments on commit dfe9147

Please sign in to comment.