This commit is contained in:
craisinlord committed 2026-10-25 13:24:58 -05:00
1 parent 3700359dfb
commit 5a8cb58cb0
74 files changed
+2408 -530

No files matched your search

@@ -154,6 +154,7 @@ public final class AntarchyConfigModuleNeoforge {
AntarchySettings.setRoyalBossKnockbackResistance(AntarchyMobsConfig.royalBossKnockbackResistance());
AntarchySettings.setRoyalBossStepHeight(AntarchyMobsConfig.royalBossStepHeight());
AntarchySettings.setRoyalBossMaxSingleHitDamage(AntarchyMobsConfig.royalBossMaxSingleHitDamage());
AntarchySettings.setRoyalBossHitOverflowRate(AntarchyMobsConfig.royalBossHitOverflowRate());
AntarchySettings.setRoyalBossBiteReach(AntarchyMobsConfig.royalBossBiteReach());
AntarchySettings.setRoyalBossBiteDamageMultiplier(AntarchyMobsConfig.royalBossBiteDamageMultiplier());
AntarchySettings.setRoyalBossBiteCooldownTicks(AntarchyMobsConfig.royalBossBiteCooldownTicks());
@@ -128,6 +128,7 @@ public final class AntarchyMobsConfig {
private static final ModConfigSpec.DoubleValue ROYAL_BOSS_KNOCKBACK_RESISTANCE;
private static final ModConfigSpec.DoubleValue ROYAL_BOSS_STEP_HEIGHT;
private static final ModConfigSpec.DoubleValue ROYAL_BOSS_MAX_SINGLE_HIT_DAMAGE;
private static final ModConfigSpec.DoubleValue ROYAL_BOSS_HIT_OVERFLOW_RATE;
private static final ModConfigSpec.DoubleValue ROYAL_BOSS_BITE_REACH;
private static final ModConfigSpec.DoubleValue ROYAL_BOSS_BITE_DAMAGE_MULTIPLIER;
private static final ModConfigSpec.IntValue ROYAL_BOSS_BITE_COOLDOWN_TICKS;
@@ -642,6 +643,7 @@ public final class AntarchyMobsConfig {
ROYAL_BOSS_KNOCKBACK_RESISTANCE = b.comment("Base knockback resistance shared by King and Queen.").defineInRange("knockbackResistance", 1.0D, 0.0D, 1.0D);
ROYAL_BOSS_STEP_HEIGHT = b.comment("Base step height shared by King and Queen.").defineInRange("stepHeight", 3.0D, 0.0D, 32.0D);
ROYAL_BOSS_MAX_SINGLE_HIT_DAMAGE = b.comment("Maximum damage a single hit can deal to a Royal boss before later anti-burst systems are added.").defineInRange("maxSingleHitDamage", 250.0D, 1.0D, 32768.0D);
ROYAL_BOSS_HIT_OVERFLOW_RATE = b.comment("Share of damage above maxSingleHitDamage that still lands. 0 makes the cap a hard limit.").defineInRange("hitOverflowRate", 0.25D, 0.0D, 1.0D);
ROYAL_BOSS_BITE_REACH = b.comment("Radius around each head anchor that a King or Queen bite can hit.").defineInRange("biteReach", 12.0D, 1.0D, 64.0D);
ROYAL_BOSS_BITE_DAMAGE_MULTIPLIER = b.comment("Multiplier applied to base attack damage for King and Queen head bites.").defineInRange("biteDamageMultiplier", 1.6D, 0.0D, 32.0D);
ROYAL_BOSS_BITE_COOLDOWN_TICKS = b.comment("Base cooldown in ticks between bites for a single King or Queen head (scaled down at later phases).").defineInRange("biteCooldownTicks", 45, 1, 1200);
@@ -1195,6 +1197,7 @@ public final class AntarchyMobsConfig {
static double royalBossKnockbackResistance() { return ROYAL_BOSS_KNOCKBACK_RESISTANCE.get(); }
static double royalBossStepHeight() { return ROYAL_BOSS_STEP_HEIGHT.get(); }
static double royalBossMaxSingleHitDamage() { return ROYAL_BOSS_MAX_SINGLE_HIT_DAMAGE.get(); }
static double royalBossHitOverflowRate() { return ROYAL_BOSS_HIT_OVERFLOW_RATE.get(); }
static double royalBossBiteReach() { return ROYAL_BOSS_BITE_REACH.get(); }
static double royalBossBiteDamageMultiplier() { return ROYAL_BOSS_BITE_DAMAGE_MULTIPLIER.get(); }
static int royalBossBiteCooldownTicks() { return ROYAL_BOSS_BITE_COOLDOWN_TICKS.get(); }
@@ -0,0 +1,32 @@
package com.craisinlord.antarchy.neoforge.mixins.infinity;
import net.codexarchonic.infinity.registry.payload.s2c.ShaderS2CPayload;
import net.codexarchonic.infinity.util.loading.ShaderLoader;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.nbt.CompoundTag;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import java.lang.ref.WeakReference;
@Mixin(value = ShaderS2CPayload.class, remap = false)
public class ShaderPayloadRepeatSkipMixin {
@Unique
private static WeakReference<ClientLevel> antarchy$lastEmptyLevel = new WeakReference<>(null);
@Redirect(method = "lambda$receive$0", at = @At(value = "INVOKE",
target = "Lnet/codexarchonic/infinity/util/loading/ShaderLoader;reloadShaders(Lnet/minecraft/client/Minecraft;Lnet/minecraft/nbt/CompoundTag;Z)V"),
remap = false)
private void antarchy$skipRepeatedEmptyReload(Minecraft minecraft, CompoundTag shader, boolean iridescence) {
boolean empty = shader.isEmpty() && !iridescence;
ClientLevel level = minecraft.level;
if (empty && level != null && antarchy$lastEmptyLevel.get() == level) {
return;
}
antarchy$lastEmptyLevel = new WeakReference<>(empty ? level : null);
ShaderLoader.reloadShaders(minecraft, shader, iridescence);
}
}
@@ -15,6 +15,7 @@
"infinity.WarpLogicMixin"
],
"client": [
"infinity.ShaderPayloadRepeatSkipMixin"
],
"injectors": {
"defaultRequire": 1