This commit is contained in:
LZX committed 2026-09-01 19:41:19 +08:00
1 parent 6320f6df67
commit e4a7b23546
20 files changed
+589 -41

No files matched your search

@@ -55,6 +55,9 @@ public class LzxnoneTerrariaClient {
modEventBus.addListener(RegisterParticleProvidersEvent.class, event -> { modEventBus.addListener(RegisterParticleProvidersEvent.class, event -> {
event.registerSpriteSet(ModParticles.DUST_PARTICLE.get(), DustParticle.Provider::new); event.registerSpriteSet(ModParticles.DUST_PARTICLE.get(), DustParticle.Provider::new);
}); });
modEventBus.addListener(RegisterParticleProvidersEvent.class, event -> {
event.registerSpecial(ModParticles.ARC_PARTICLE.get(), new ArcParticle.Provider());
});
modEventBus.addListener(RegisterParticleProvidersEvent.class, event -> { modEventBus.addListener(RegisterParticleProvidersEvent.class, event -> {
event.registerSpriteSet(ModParticles.ZENITH_TRAIL_PARTICLE.get(), ZenithTrailParticle.Provider::new); event.registerSpriteSet(ModParticles.ZENITH_TRAIL_PARTICLE.get(), ZenithTrailParticle.Provider::new);
}); });
@@ -164,8 +164,9 @@ public class PlayerMana {
public void applyRecoverDelay() { public void applyRecoverDelay() {
if(getMaxMana() <= 0) return; if(getMaxMana() <= 0) return;
double emptyRatio = 1.0D - (double) mana / getMaxMana(); //double emptyRatio = 1.0D - (double) mana / getMaxMana();
recoverDelay = Math.max(recoverDelay, (int) Math.ceil(0.7D * (emptyRatio * 240.0D + 45.0D) / 3.0D)); //recoverDelay = Math.max(recoverDelay, (int) Math.ceil(0.7D * (emptyRatio * 240.0D + 45.0D) / 3.0D));
recoverDelay = 0;
recoverProgress = 0.0D; recoverProgress = 0.0D;
} }
@@ -36,6 +36,7 @@ public class ClientStaticProjectileRenderBehaviors {
BEHAVIORS.put(StaticProjectileBehaviors.DEVILS_DEVASTATION_PROJECTILE3, ClientDevilsDevastation.PROJECTILE_BEHAVIOR3); BEHAVIORS.put(StaticProjectileBehaviors.DEVILS_DEVASTATION_PROJECTILE3, ClientDevilsDevastation.PROJECTILE_BEHAVIOR3);
BEHAVIORS.put(StaticProjectileBehaviors.CRYSTAL_FRAGMENT, DEFAULT_BEHAVIOR); BEHAVIORS.put(StaticProjectileBehaviors.CRYSTAL_FRAGMENT, DEFAULT_BEHAVIOR);
BEHAVIORS.put(StaticProjectileBehaviors.SUPER_STAR_PRISMATIC_BOLT, ClientSuperStarShooter.PROJECTILE_BEHAVIOR); BEHAVIORS.put(StaticProjectileBehaviors.SUPER_STAR_PRISMATIC_BOLT, ClientSuperStarShooter.PROJECTILE_BEHAVIOR);
BEHAVIORS.put(StaticProjectileBehaviors.POSSESSION_PRISMATIC_BOLT, ClientPossession.BOLT_PROJECTILE_BEHAVIOR);
BEHAVIORS.put(StaticProjectileBehaviors.POSSESSION_PROJECTILE, ClientPossession.PROJECTILE_BEHAVIOR); BEHAVIORS.put(StaticProjectileBehaviors.POSSESSION_PROJECTILE, ClientPossession.PROJECTILE_BEHAVIOR);
BEHAVIORS.put(StaticProjectileBehaviors.ACCESSORY_FALLEN_STAR_PROJECTILE, ClientAccessoryFallenStar.PROJECTILE_BEHAVIOR); BEHAVIORS.put(StaticProjectileBehaviors.ACCESSORY_FALLEN_STAR_PROJECTILE, ClientAccessoryFallenStar.PROJECTILE_BEHAVIOR);
BEHAVIORS.put(StaticProjectileBehaviors.NEBULA_ARCANUM_ORBIT_PROJECTILE, ClientNebulaArcanum.PROJECTILE_BEHAVIOR); BEHAVIORS.put(StaticProjectileBehaviors.NEBULA_ARCANUM_ORBIT_PROJECTILE, ClientNebulaArcanum.PROJECTILE_BEHAVIOR);
@@ -108,41 +108,65 @@ public class ClientSuperStarShooter {
} }
}; };
private static void renderPrismaticBolt(StaticProjectile projectile, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, ResourceLocation res, float r, float g, float b, float a) {
Vec3 projPos = projectile.getPosition(partialTick);
Vec3 camPos = Minecraft.getInstance().gameRenderer.getMainCamera().getPosition();
Vec3 toCam = camPos.subtract(projPos);
Vec3 dir = projectile.getDeltaMovement();
if(dir.lengthSqr() < 1.0E-6D) {
dir = MathUtil.toVec3(projectile.getEntityData().get(StaticProjectile.DIRECTION));
}
if(dir.lengthSqr() < 1.0E-6D) {
dir = new Vec3(0, 0, 1);
}
dir = dir.normalize();
// 计算垂直于飞行方向且垂直于摄像机视线的侧向展开向量 right
Vec3 right = dir.cross(toCam);
if(right.lengthSqr() < 1.0E-6D) {
right = MathUtil.toVec3(projectile.getEntityData().get(StaticProjectile.RIGHT));
}
if(right.lengthSqr() < 1.0E-6D) {
right = new Vec3(1, 0, 0);
}
right = right.normalize();
float starHalfWidth = 72 * 0.02f;
float starHalfHeight = 72 * 0.02f * 2.0f;
Vec3 w = right.scale(starHalfWidth);
Vec3 l = dir.scale(starHalfHeight);
// 顶点生成:沿 dir 方向拉伸,沿 right 方向铺展,法线完全正对摄像机
Vec3 v0 = w.scale(-1).subtract(l);
Vec3 v1 = w.subtract(l);
Vec3 v2 = w.add(l);
Vec3 v3 = w.scale(-1).add(l);
VertexConsumer consumer = bufferSource.getBuffer(ModRenderTypes.entityAdditiveEmissive(res));
org.joml.Matrix4f matrix = poseStack.last().pose();
consumer.addVertex(matrix, (float)v0.x, (float)v0.y, (float)v0.z)
.setColor(r, g, b, a).setUv(0.0f, 1.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
consumer.addVertex(matrix, (float)v1.x, (float)v1.y, (float)v1.z)
.setColor(r, g, b, a).setUv(1.0f, 1.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
consumer.addVertex(matrix, (float)v2.x, (float)v2.y, (float)v2.z)
.setColor(r, g, b, a).setUv(1.0f, 0.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
consumer.addVertex(matrix, (float)v3.x, (float)v3.y, (float)v3.z)
.setColor(r, g, b, a).setUv(0.0f, 0.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
}
public static final IStaticProjectileRenderBehavior PROJECTILE_BEHAVIOR = new IStaticProjectileRenderBehavior() { public static final IStaticProjectileRenderBehavior PROJECTILE_BEHAVIOR = new IStaticProjectileRenderBehavior() {
public static final ResourceLocation RES = ResourceLocation.parse("lzxnoneterraria:textures/vfx/prismatic_bolt.png"); public static final ResourceLocation RES = ResourceLocation.parse("lzxnoneterraria:textures/vfx/prismatic_bolt.png");
public void render(Entity entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { public void render(Entity entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) {
if(!(entity instanceof StaticProjectile projectile)) return; if(!(entity instanceof StaticProjectile projectile)) return;
renderPrismaticBolt(projectile, partialTick, poseStack, bufferSource, RES, 1.0f, 1.0f, 1.0f, 1.0f);
poseStack.pushPose();
float starHalfWidth = 72 * 0.02f;
float starHalfHeight = 72 * 0.02f;
VertexConsumer starConsumer = bufferSource.getBuffer(ModRenderTypes.entityAdditiveEmissive(RES));
Vector3f[] dirs = MathUtil.computeCoordinateSystem(projectile.getDeltaMovement().toVector3f(), 0);
float[] xyRot = MathUtil.computeXYRot(dirs[0]);
poseStack.mulPose(Axis.YP.rotationDegrees(-xyRot[1]));
poseStack.mulPose(Axis.XP.rotationDegrees(xyRot[0]));
poseStack.mulPose(Axis.XP.rotationDegrees(90));
poseStack.scale(1.0f, 2.0f, 1.0f);
for(int i = 0; i < 3; i++) {
starConsumer.addVertex(poseStack.last().pose(), -starHalfWidth, -starHalfHeight, 0f)
.setColor(1.0f, 1.0f, 1.0f, 1.0f).setUv(0.0f, 1.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
starConsumer.addVertex(poseStack.last().pose(), starHalfWidth, -starHalfHeight, 0f)
.setColor(1.0f, 1.0f, 1.0f, 1.0f).setUv(1.0f, 1.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
starConsumer.addVertex(poseStack.last().pose(), starHalfWidth, starHalfHeight, 0f)
.setColor(1.0f, 1.0f, 1.0f, 1.0f).setUv(1.0f, 0.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
starConsumer.addVertex(poseStack.last().pose(), -starHalfWidth, starHalfHeight, 0f)
.setColor(1.0f, 1.0f, 1.0f, 1.0f).setUv(0.0f, 0.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
}
poseStack.popPose();
} }
}; };
} }
@@ -3,8 +3,10 @@ package com.lzxnone.terraria.client.item.summon;
import com.lzxnone.terraria.client.entity.projectile.IStaticProjectileRenderBehavior; import com.lzxnone.terraria.client.entity.projectile.IStaticProjectileRenderBehavior;
import com.lzxnone.terraria.entity.ModRenderTypes; import com.lzxnone.terraria.entity.ModRenderTypes;
import com.lzxnone.terraria.entity.projectile.StaticProjectile; import com.lzxnone.terraria.entity.projectile.StaticProjectile;
import com.lzxnone.terraria.utils.MathUtil;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.LightTexture;
import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.renderer.texture.OverlayTexture;
@@ -42,7 +44,7 @@ public class ClientPossession {
float headU = 1.0F - i / (float)quadCount; float headU = 1.0F - i / (float)quadCount;
float tailU = 1.0F - (i + 1) / (float)quadCount; float tailU = 1.0F - (i + 1) / (float)quadCount;
for(int k = 0;k < 3;k++) { for(int k = 0; k < 3; k++) {
addVertex(consumer, matrix, headRight.subtract(origin), headU, 0.0F, 1.0f); addVertex(consumer, matrix, headRight.subtract(origin), headU, 0.0F, 1.0f);
addVertex(consumer, matrix, headLeft.subtract(origin), headU, 1.0F, 1.0f); addVertex(consumer, matrix, headLeft.subtract(origin), headU, 1.0F, 1.0f);
addVertex(consumer, matrix, tailLeft.subtract(origin), tailU, 1.0F, 1.0f); addVertex(consumer, matrix, tailLeft.subtract(origin), tailU, 1.0F, 1.0f);
@@ -60,4 +62,69 @@ public class ClientPossession {
.setNormal(0.0F, 1.0F, 0.0F); .setNormal(0.0F, 1.0F, 0.0F);
} }
}; };
public static final IStaticProjectileRenderBehavior BOLT_PROJECTILE_BEHAVIOR = new IStaticProjectileRenderBehavior() {
private static final ResourceLocation RES = ResourceLocation.parse("lzxnoneterraria:textures/vfx/prismatic_bolt.png");
@Override
public void render(Entity entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) {
if(!(entity instanceof StaticProjectile projectile)) return;
Vec3 projPos = projectile.getPosition(partialTick);
Vec3 camPos = Minecraft.getInstance().gameRenderer.getMainCamera().getPosition();
Vec3 toCam = camPos.subtract(projPos);
Vec3 dir = projectile.getDeltaMovement();
if(dir.lengthSqr() < 1.0E-6D) {
dir = MathUtil.toVec3(projectile.getEntityData().get(StaticProjectile.DIRECTION));
}
if(dir.lengthSqr() < 1.0E-6D) {
dir = new Vec3(0, 0, 1);
}
dir = dir.normalize();
// 计算垂直于飞行方向且垂直于摄像机视线的侧向展开向量 right
Vec3 right = dir.cross(toCam);
if(right.lengthSqr() < 1.0E-6D) {
right = MathUtil.toVec3(projectile.getEntityData().get(StaticProjectile.RIGHT));
}
if(right.lengthSqr() < 1.0E-6D) {
right = new Vec3(1, 0, 0);
}
right = right.normalize();
float starHalfWidth = 72 * 0.0075f;
float starHalfHeight = 72 * 0.0075f * 2.0f;
Vec3 w = right.scale(starHalfWidth);
Vec3 l = dir.scale(starHalfHeight);
// 顶点生成:沿 dir 方向拉伸,沿 right 方向铺展,法线完全正对摄像机
Vec3 v0 = w.scale(-1).subtract(l);
Vec3 v1 = w.subtract(l);
Vec3 v2 = w.add(l);
Vec3 v3 = w.scale(-1).add(l);
VertexConsumer consumer = bufferSource.getBuffer(ModRenderTypes.entityAdditiveEmissive(RES));
Matrix4f matrix = poseStack.last().pose();
float r = 0.15f;
float g = 0.85f;
float b = 1.0f;
float a = 1.0f;
consumer.addVertex(matrix, (float)v0.x, (float)v0.y, (float)v0.z)
.setColor(r, g, b, a).setUv(0.0f, 1.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
consumer.addVertex(matrix, (float)v1.x, (float)v1.y, (float)v1.z)
.setColor(r, g, b, a).setUv(1.0f, 1.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
consumer.addVertex(matrix, (float)v2.x, (float)v2.y, (float)v2.z)
.setColor(r, g, b, a).setUv(1.0f, 0.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
consumer.addVertex(matrix, (float)v3.x, (float)v3.y, (float)v3.z)
.setColor(r, g, b, a).setUv(0.0f, 0.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
}
};
} }
@@ -42,4 +42,6 @@ public class ModEffects {
MOB_EFFECTS.register("ice_barrier", IceBarrierEffect::new); MOB_EFFECTS.register("ice_barrier", IceBarrierEffect::new);
public static final DeferredHolder<MobEffect, PanicEffect> PANIC = public static final DeferredHolder<MobEffect, PanicEffect> PANIC =
MOB_EFFECTS.register("panic", PanicEffect::new); MOB_EFFECTS.register("panic", PanicEffect::new);
public static final DeferredHolder<MobEffect, ZappedRedEffect> ZAPPED_RED =
MOB_EFFECTS.register("zapped_red", ZappedRedEffect::new);
} }
@@ -0,0 +1,73 @@
package com.lzxnone.terraria.effect;
import com.lzxnone.terraria.LzxnoneTerraria;
import com.lzxnone.terraria.particle.ArcParticleOptions;
import com.lzxnone.terraria.ui.config.ConfigListItem;
import com.lzxnone.terraria.ui.config.IConfigData;
import com.lzxnone.terraria.utils.ParticleUtil;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectCategory;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
import org.joml.Vector3f;
public class ZappedRedEffect extends MobEffect {
public static final IConfigData CONFIG_DATA = new IConfigData() {
@Override
public void onConfigLoad() {}
};
public static final ConfigListItem CONFIG_LIST_ITEM = new ConfigListItem(
"zapped_red",
ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "textures/mob_effect/zapped_red.png"),
Component.translatable("effect.lzxnoneterraria.zapped_red"),
CONFIG_DATA
);
public ZappedRedEffect() {
super(MobEffectCategory.HARMFUL, 0xFF2222);
}
@Override
public boolean shouldApplyEffectTickThisTick(int duration, int amplifier) {
return true;
}
@Override
public boolean applyEffectTick(LivingEntity entity, int amplifier) {
if(entity.level() instanceof ServerLevel serverLevel) {
float width = entity.getBbWidth();
float height = entity.getBbHeight();
float avgSize = (width + height) * 0.5F;
float arcSize = net.minecraft.util.Mth.clamp(avgSize * 0.035F, 0.02F, 0.15F);
float arcLength = net.minecraft.util.Mth.clamp(avgSize * 0.5F, 0.25F, 3.5F);
ArcParticleOptions options = new ArcParticleOptions(
arcSize,
8,
new Vector3f(1.0F, 0.15F, 0.15F),
arcLength
);
AABB box = entity.getBoundingBox();
double px = box.minX + entity.getRandom().nextDouble() * (box.maxX - box.minX);
double py = box.minY + entity.getRandom().nextDouble() * (box.maxY - box.minY);
double pz = box.minZ + entity.getRandom().nextDouble() * (box.maxZ - box.minZ);
Vec3 pos = new Vec3(px, py, pz);
ParticleUtil.addParticles(
serverLevel,
options,
pos,
new Vec3(0, 0, 0),
0.0D,
1
);
}
return true;
}
}
@@ -33,6 +33,7 @@ public class StaticProjectileBehaviors {
public static final String DEVILS_DEVASTATION_PROJECTILE3 = "devils_devastation_projectile3"; public static final String DEVILS_DEVASTATION_PROJECTILE3 = "devils_devastation_projectile3";
public static final String CRYSTAL_FRAGMENT = "crystal_fragment"; public static final String CRYSTAL_FRAGMENT = "crystal_fragment";
public static final String SUPER_STAR_PRISMATIC_BOLT = "super_star_prismatic_blot"; public static final String SUPER_STAR_PRISMATIC_BOLT = "super_star_prismatic_blot";
public static final String POSSESSION_PRISMATIC_BOLT = "possession_prismatic_bolt";
public static final String POSSESSION_PROJECTILE = "possession_projectile"; public static final String POSSESSION_PROJECTILE = "possession_projectile";
public static final String ACCESSORY_FALLEN_STAR_PROJECTILE = "accessory_fallen_star_projectile"; public static final String ACCESSORY_FALLEN_STAR_PROJECTILE = "accessory_fallen_star_projectile";
public static final String NEBULA_ARCANUM_ORBIT_PROJECTILE = "nebula_arcanum_orbit_projectile"; public static final String NEBULA_ARCANUM_ORBIT_PROJECTILE = "nebula_arcanum_orbit_projectile";
@@ -67,6 +68,7 @@ public class StaticProjectileBehaviors {
BEHAVIORS.put(DEVILS_DEVASTATION_PROJECTILE3, DevilsDevastation.PROJECTILE_BEHAVIOR3); BEHAVIORS.put(DEVILS_DEVASTATION_PROJECTILE3, DevilsDevastation.PROJECTILE_BEHAVIOR3);
BEHAVIORS.put(CRYSTAL_FRAGMENT, CrystalBullet.PROJECTILE_BEHAVIOR); BEHAVIORS.put(CRYSTAL_FRAGMENT, CrystalBullet.PROJECTILE_BEHAVIOR);
BEHAVIORS.put(SUPER_STAR_PRISMATIC_BOLT, SuperStarShooter.PROJECTILE_BEHAVIOR); BEHAVIORS.put(SUPER_STAR_PRISMATIC_BOLT, SuperStarShooter.PROJECTILE_BEHAVIOR);
BEHAVIORS.put(POSSESSION_PRISMATIC_BOLT, new IStaticProjectileBehavior() {});
BEHAVIORS.put(POSSESSION_PROJECTILE, Possession.PROJECTILE_BEHAVIOR); BEHAVIORS.put(POSSESSION_PROJECTILE, Possession.PROJECTILE_BEHAVIOR);
BEHAVIORS.put(ACCESSORY_FALLEN_STAR_PROJECTILE, FallenStarSummoner.PROJECTILE_BEHAVIOR); BEHAVIORS.put(ACCESSORY_FALLEN_STAR_PROJECTILE, FallenStarSummoner.PROJECTILE_BEHAVIOR);
BEHAVIORS.put(NEBULA_ARCANUM_ORBIT_PROJECTILE, NebulaArcanum.PROJECTILE_BEHAVIOR); BEHAVIORS.put(NEBULA_ARCANUM_ORBIT_PROJECTILE, NebulaArcanum.PROJECTILE_BEHAVIOR);
@@ -2,12 +2,14 @@ package com.lzxnone.terraria.item.weapon.magic;
import com.lzxnone.terraria.LzxnoneTerraria; import com.lzxnone.terraria.LzxnoneTerraria;
import com.lzxnone.terraria.ModSounds; import com.lzxnone.terraria.ModSounds;
import com.lzxnone.terraria.effect.ModEffects;
import com.lzxnone.terraria.entity.ModEntities; import com.lzxnone.terraria.entity.ModEntities;
import com.lzxnone.terraria.entity.summon.IStaticSummonBehavior; import com.lzxnone.terraria.entity.summon.IStaticSummonBehavior;
import com.lzxnone.terraria.entity.summon.StaticSummon; import com.lzxnone.terraria.entity.summon.StaticSummon;
import com.lzxnone.terraria.entity.summon.StaticSummonBehaviors; import com.lzxnone.terraria.entity.summon.StaticSummonBehaviors;
import com.lzxnone.terraria.item.weapon.MagicWeapon; import com.lzxnone.terraria.item.weapon.MagicWeapon;
import com.lzxnone.terraria.particle.DustParticleOptions; import com.lzxnone.terraria.particle.DustParticleOptions;
import net.minecraft.world.effect.MobEffectInstance;
import com.lzxnone.terraria.ui.config.ConfigListItem; import com.lzxnone.terraria.ui.config.ConfigListItem;
import com.lzxnone.terraria.ui.config.IConfigData; import com.lzxnone.terraria.ui.config.IConfigData;
import com.lzxnone.terraria.ui.config.struct.ConfigDouble; import com.lzxnone.terraria.ui.config.struct.ConfigDouble;
@@ -55,6 +57,7 @@ public class ArcSurge extends MagicWeapon {
public static final ConfigInt MAX_EXTRA_ARCS = new ConfigInt("weapon.arc_surge.max_extra_arcs", "arc_surge_max_extra_arcs", 2, 0, 100); public static final ConfigInt MAX_EXTRA_ARCS = new ConfigInt("weapon.arc_surge.max_extra_arcs", "arc_surge_max_extra_arcs", 2, 0, 100);
public static final ConfigDouble SEARCH_RANGE = new ConfigDouble("weapon.arc_surge.search_range", "arc_surge_search_range", 32.0D, 0.0D, 256.0D); public static final ConfigDouble SEARCH_RANGE = new ConfigDouble("weapon.arc_surge.search_range", "arc_surge_search_range", 32.0D, 0.0D, 256.0D);
public static final ConfigDouble MAX_ANGLE = new ConfigDouble("weapon.arc_surge.max_angle", "arc_surge_max_angle", 60.0D, 0.0D, 180.0D); public static final ConfigDouble MAX_ANGLE = new ConfigDouble("weapon.arc_surge.max_angle", "arc_surge_max_angle", 60.0D, 0.0D, 180.0D);
public static final ConfigInt ZAPPED_RED_DURATION = new ConfigInt("weapon.arc_surge.zapped_duration", "arc_surge_zapped_duration", 100, 0, 72000);
// 分形闪电形状与生命周期参数 // 分形闪电形状与生命周期参数
public static final int LIGHTNING_DEPTH = 5; // 分形细分递归深度 public static final int LIGHTNING_DEPTH = 5; // 分形细分递归深度
@@ -76,7 +79,7 @@ public class ArcSurge extends MagicWeapon {
public static final IConfigData CONFIG_DATA = new IConfigData() { public static final IConfigData CONFIG_DATA = new IConfigData() {
@Override @Override
public void onConfigLoad() { public void onConfigLoad() {
ConfigStruct.loadAll(DAMAGE, MANA_CONSUME, MAX_EXTRA_ARCS, SEARCH_RANGE, MAX_ANGLE); ConfigStruct.loadAll(DAMAGE, MANA_CONSUME, MAX_EXTRA_ARCS, SEARCH_RANGE, MAX_ANGLE, ZAPPED_RED_DURATION);
} }
}; };
@@ -136,6 +139,12 @@ public class ArcSurge extends MagicWeapon {
0.2F, 0.2F,
10 10
); );
if(target instanceof LivingEntity livingTarget) {
int duration = ZAPPED_RED_DURATION.get();
if(duration > 0) {
livingTarget.addEffect(new MobEffectInstance(ModEffects.ZAPPED_RED, duration, 0));
}
}
} }
} }
} }
@@ -157,7 +166,7 @@ public class ArcSurge extends MagicWeapon {
}; };
public ArcSurge() { public ArcSurge() {
super(Tiers.DIAMOND, new Item.Properties().stacksTo(1).rarity(Rarity.RARE)); super(Tiers.NETHERITE, new Item.Properties().stacksTo(1).fireResistant().rarity(Rarity.EPIC));
} }
@Override @Override
@@ -94,7 +94,7 @@ public class SuperStarShooter extends RangedWeapon {
StaticProjectile projectile = new StaticProjectile(ModEntities.STATIC_PROJECTILE.get(), summon.level()); StaticProjectile projectile = new StaticProjectile(ModEntities.STATIC_PROJECTILE.get(), summon.level());
projectile.setOwner(summon.getOwner()); projectile.setOwner(summon.getOwner());
Vec3 pos = MathUtil.getRandomPosOnRadius(summon.position(), 4); Vec3 pos = MathUtil.getRandomPosOnRadius(summon.position(), 4);
Vector3f dir = summon.position().subtract(pos).toVector3f(); Vector3f dir = target.getBoundingBox().getCenter().subtract(pos).toVector3f();
Vector3f[] dirs = MathUtil.computeCoordinateSystem(dir, 0); Vector3f[] dirs = MathUtil.computeCoordinateSystem(dir, 0);
projectile.setPos(pos); projectile.setPos(pos);
projectile.getEntityData().set(StaticProjectile.BEHAVIOR, StaticProjectileBehaviors.SUPER_STAR_PRISMATIC_BOLT); projectile.getEntityData().set(StaticProjectile.BEHAVIOR, StaticProjectileBehaviors.SUPER_STAR_PRISMATIC_BOLT);
@@ -126,11 +126,36 @@ public class SuperStarShooter extends RangedWeapon {
}; };
public static final IStaticProjectileBehavior PROJECTILE_BEHAVIOR = new IStaticProjectileBehavior() { public static final IStaticProjectileBehavior PROJECTILE_BEHAVIOR = new IStaticProjectileBehavior() {
@Override
public void onMoving(StaticProjectile projectile) {
if(projectile.level().isClientSide()) return;
Vec3 movement = projectile.getDeltaMovement();
Vec3 start = projectile.position().subtract(movement);
Vec3 end = projectile.position();
// 显式扫掠碰撞检测(加宽判定体积,适配高速棱彩弹)
AABB hitBox = new AABB(start, end).inflate(1.2D);
java.util.List<Entity> targets = projectile.level().getEntitiesOfClass(
Entity.class,
hitBox,
FilterUtil.createTargetFilter(projectile, projectile.getOwner())
);
for(Entity target : targets) {
AABB targetBox = target.getBoundingBox().inflate(0.5D);
if(targetBox.clip(start, end).isPresent() || targetBox.contains(start) || targetBox.contains(end)) {
ItemStack sourceStack = projectile.getEntityData().get(StaticProjectile.STACK_SOURCE);
DamageUtil.rangedAttack(projectile, target, sourceStack, BOLT_DAMAGE.get(), 0.3f, 10);
}
}
}
@Override
public void onHitEntity(StaticProjectile projectile, EntityHitResult result) { public void onHitEntity(StaticProjectile projectile, EntityHitResult result) {
if(!projectile.level().isClientSide()) { if(!projectile.level().isClientSide()) {
Entity target = result.getEntity(); Entity target = result.getEntity();
if(DamageUtil.rangedAttack(projectile, target, projectile.getEntityData().get(StaticProjectile.STACK_SOURCE), BOLT_DAMAGE.get(), 0.3f, 10)) { DamageUtil.rangedAttack(projectile, target, projectile.getEntityData().get(StaticProjectile.STACK_SOURCE), BOLT_DAMAGE.get(), 0.3f, 10);
}
} }
} }
}; };
@@ -205,6 +205,27 @@ public class Possession extends Whip {
target.getBoundingBox().getCenter(), new Vec3(0, 0, 0), target.getBoundingBox().getCenter(), new Vec3(0, 0, 0),
0.1, 5 0.1, 5
); );
// 生成 POSSESSION_PRISMATIC_BOLT 视觉特效
StaticProjectile projectile = new StaticProjectile(ModEntities.STATIC_PROJECTILE.get(), summon.level());
projectile.setOwner(summon.getOwner());
Vec3 pos = MathUtil.getRandomPosOnRadius(target.getBoundingBox().getCenter(), 1);
Vector3f dir = target.getBoundingBox().getCenter().subtract(pos).toVector3f();
Vector3f[] dirs = MathUtil.computeCoordinateSystem(dir, 0);
projectile.setPos(pos);
projectile.getEntityData().set(StaticProjectile.BEHAVIOR, StaticProjectileBehaviors.POSSESSION_PRISMATIC_BOLT);
projectile.getEntityData().set(StaticProjectile.RENDER_MODE, "custom");
projectile.getEntityData().set(StaticProjectile.STACK_SOURCE, summon.getEntityData().get(StaticSummon.STACK_SOURCE).copy());
projectile.getEntityData().set(StaticProjectile.ORIGIN, MathUtil.toVector3f(pos));
projectile.getEntityData().set(StaticProjectile.DIRECTION, dirs[0]);
projectile.getEntityData().set(StaticProjectile.UP, dirs[1]);
projectile.getEntityData().set(StaticProjectile.RIGHT, dirs[2]);
projectile.getEntityData().set(StaticProjectile.GLOW, true);
projectile.getEntityData().set(StaticProjectile.LIFETIME, 4);
projectile.getEntityData().set(StaticProjectile.EXPRESSION_Z, "0.25*t");
projectile.setDeltaMovement(MathUtil.toVec3(dirs[0]));
summon.level().addFreshEntity(projectile);
} }
} }
@@ -0,0 +1,210 @@
package com.lzxnone.terraria.particle;
import com.lzxnone.terraria.utils.MathUtil;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.Camera;
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.TextureSheetParticle;
import net.minecraft.client.renderer.LightTexture;
import net.minecraft.util.Mth;
import net.minecraft.world.phys.Vec3;
import org.joml.Quaternionf;
import org.joml.Vector3f;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class ArcParticle extends TextureSheetParticle {
private final float baseSize;
private final float length;
private final Vector3f baseColor;
private final int rebuildInterval;
private final List<List<Vec3>> cachedBranches = new ArrayList<>();
protected ArcParticle(ClientLevel level, double x, double y, double z,
double xSpeed, double ySpeed, double zSpeed,
ArcParticleOptions options) {
super(level, x, y, z, xSpeed, ySpeed, zSpeed);
this.hasPhysics = false;
this.friction = 0.92F;
this.gravity = 0.0F;
this.xd = xSpeed;
this.yd = ySpeed;
this.zd = zSpeed;
this.baseSize = options.size;
this.quadSize = this.baseSize;
this.lifetime = options.lifetime + this.random.nextInt(Math.max(1, options.lifetime / 3));
this.length = options.length;
this.baseColor = new Vector3f(options.color);
this.rebuildInterval = 2;
this.rCol = options.color.x;
this.gCol = options.color.y;
this.bCol = options.color.z;
rebuildBranches();
}
@Override
public void tick() {
super.tick();
if(this.age % this.rebuildInterval == 0 || this.cachedBranches.isEmpty()) {
rebuildBranches();
}
}
private void rebuildBranches() {
this.cachedBranches.clear();
Random rand = new Random(this.random.nextLong());
// 随机主电弧目标方向与长度
float l = this.length * (0.85F + rand.nextFloat() * 0.3F);
Vec3 end = new Vec3(
(rand.nextFloat() - 0.5F) * 2.0F,
(rand.nextFloat() - 0.5F) * 2.0F,
(rand.nextFloat() - 0.5F) * 2.0F
).normalize().scale(l);
// 主电弧(递归深度 3,微型扰动)
List<Vec3> mainBranch = generateBranch(Vec3.ZERO, end, rand, 3, 0.22F);
this.cachedBranches.add(mainBranch);
// 1~2 个次级分叉(深度 2)
int subCount = 1 + rand.nextInt(2);
for(int s = 0; s < subCount; s++) {
if(mainBranch.size() < 3) break;
int idx = 1 + rand.nextInt(mainBranch.size() - 2);
Vec3 subStart = mainBranch.get(idx);
Vec3 mainDir = end.normalize();
Vec3 subDir = spreadDir(mainDir, rand, 0.45F);
Vec3 subEnd = subStart.add(subDir.scale(l * 0.45F));
List<Vec3> subBranch = generateBranch(subStart, subEnd, rand, 2, 0.22F);
this.cachedBranches.add(subBranch);
}
}
@Override
public void render(VertexConsumer buffer, Camera camera, float partialTick) {
float lifeRatio = Mth.clamp((this.age + partialTick) / (float) this.lifetime, 0.0F, 1.0F);
if(lifeRatio > 0.999F) return;
float alpha = 1.0F - lifeRatio;
float radius = this.baseSize * (1.0F - lifeRatio * 0.4F);
float cx = (float) (Mth.lerp(partialTick, this.xo, this.x) - camera.getPosition().x);
float cy = (float) (Mth.lerp(partialTick, this.yo, this.y) - camera.getPosition().y);
float cz = (float) (Mth.lerp(partialTick, this.zo, this.z) - camera.getPosition().z);
for(List<Vec3> branch : this.cachedBranches) {
int n = branch.size();
for(int i = 0; i < n - 1; i++) {
Vec3 p0 = branch.get(i);
Vec3 p1 = branch.get(i + 1);
float t0 = (float) i / (float) (n - 1);
float t1 = (float) (i + 1) / (float) (n - 1);
float r0 = radius * (1.0F - t0 * 0.7F);
float r1 = radius * (1.0F - t1 * 0.7F);
Vec3 segStart = new Vec3(cx + p0.x, cy + p0.y, cz + p0.z);
Vec3 segEnd = new Vec3(cx + p1.x, cy + p1.y, cz + p1.z);
Vec3 segDir = segEnd.subtract(segStart);
if(segDir.lengthSqr() < 1.0E-6D) continue;
Vec3 segCenter = segStart.add(segEnd).scale(0.5D);
Vec3 normal = segDir.cross(segCenter).normalize();
if(normal.lengthSqr() < 1.0E-6D) normal = new Vec3(0, 1, 0);
// 外层彩色光晕 (Outer Color Glow)
renderSegment(buffer, segStart, segEnd, normal, r0 * 1.5F, r1 * 1.5F, this.baseColor.x, this.baseColor.y, this.baseColor.z, alpha * 0.65F);
// 内层高亮白芯 (Inner White Core)
renderSegment(buffer, segStart, segEnd, normal, r0 * 0.55F, r1 * 0.55F, 1.0F, 1.0F, 1.0F, alpha * 0.95F);
}
}
}
private static void renderSegment(VertexConsumer buffer, Vec3 start, Vec3 end, Vec3 normal, float r0, float r1, float r, float g, float b, float a) {
Vec3 w0 = normal.scale(r0);
Vec3 w1 = normal.scale(r1);
Vec3 v0 = start.subtract(w0);
Vec3 v1 = start.add(w0);
Vec3 v2 = end.add(w1);
Vec3 v3 = end.subtract(w1);
buffer.addVertex((float)v0.x, (float)v0.y, (float)v0.z).setColor(r, g, b, a);
buffer.addVertex((float)v1.x, (float)v1.y, (float)v1.z).setColor(r, g, b, a);
buffer.addVertex((float)v2.x, (float)v2.y, (float)v2.z).setColor(r, g, b, a);
buffer.addVertex((float)v3.x, (float)v3.y, (float)v3.z).setColor(r, g, b, a);
}
@Override
public int getLightColor(float partialTick) {
return LightTexture.FULL_BRIGHT;
}
@Override
public ParticleRenderType getRenderType() {
return ModParticleRenderTypes.ARC_PARTICLE;
}
// 分形分支算法
private static List<Vec3> generateBranch(Vec3 start, Vec3 end, Random rand, int depth, float jitter) {
List<Vec3> branch = new ArrayList<>();
branch.add(start);
subdivide(start, end, depth, jitter, rand, branch);
branch.add(end);
return branch;
}
private static void subdivide(Vec3 start, Vec3 end, int depth, float jitter, Random rand, List<Vec3> out) {
if(depth <= 0) return;
Vec3 mid = start.add(end).scale(0.5D);
Vec3 seg = end.subtract(start);
Vector3f[] dirs = MathUtil.computeCoordinateSystem(seg.toVector3f(), 0);
mid = getSurfaceRandomPosInRadius(mid, MathUtil.toVec3(dirs[2]), MathUtil.toVec3(dirs[1]), seg.length() * jitter, rand);
subdivide(start, mid, depth - 1, jitter, rand, out);
out.add(mid);
subdivide(mid, end, depth - 1, jitter, rand, out);
}
private static Vec3 getSurfaceRandomPosInRadius(Vec3 pos, Vec3 axisX, Vec3 axisY, double radius, Random random) {
double s = Math.sqrt(random.nextDouble());
axisX = axisX.normalize().scale(radius).scale(s);
axisY = axisY.normalize().scale(radius).scale(s);
double rad = Math.PI * 2 * random.nextDouble();
return new Vec3(
pos.x + Math.cos(rad) * axisX.x + Math.sin(rad) * axisY.x,
pos.y + Math.cos(rad) * axisX.y + Math.sin(rad) * axisY.y,
pos.z + Math.cos(rad) * axisX.z + Math.sin(rad) * axisY.z
);
}
private static Vec3 spreadDir(Vec3 dir, Random rand, float maxAngle) {
float angle = (rand.nextFloat() - 0.5F) * 2.0F * maxAngle;
Vec3 axisV = new Vec3(rand.nextDouble() - 0.5, rand.nextDouble() - 0.5, rand.nextDouble() - 0.5).normalize();
if(axisV.lengthSqr() < 0.01D) axisV = new Vec3(1, 0, 0);
axisV = axisV.cross(dir).normalize();
if(axisV.lengthSqr() < 0.01D) axisV = new Vec3(0, 0, 1);
Vector3f d = dir.toVector3f().normalize();
new Quaternionf().fromAxisAngleRad(axisV.toVector3f().normalize(), angle).transform(d);
return new Vec3(d.x(), d.y(), d.z());
}
public static class Provider implements ParticleProvider<ArcParticleOptions> {
@Override
public Particle createParticle(ArcParticleOptions type, ClientLevel level,
double x, double y, double z,
double xSpeed, double ySpeed, double zSpeed) {
return new ArcParticle(level, x, y, z, xSpeed, ySpeed, zSpeed, type);
}
}
}
@@ -0,0 +1,69 @@
package com.lzxnone.terraria.particle;
import com.mojang.serialization.Codec;
import com.mojang.serialization.MapCodec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import net.minecraft.core.particles.ParticleOptions;
import net.minecraft.core.particles.ParticleType;
import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.codec.StreamCodec;
import org.joml.Vector3f;
public class ArcParticleOptions implements ParticleOptions {
public final float size;
public final int lifetime;
public final Vector3f color;
public final float length;
public ArcParticleOptions(float size, int lifetime, Vector3f color, float length) {
this.size = size;
this.lifetime = lifetime;
this.color = color;
this.length = length;
}
public ArcParticleOptions() {
this(0.08f, 15, new Vector3f(1.0F, 0.2F, 0.2F), 1.0f);
}
@Override
public ParticleType<?> getType() {
return ModParticles.ARC_PARTICLE.get();
}
private static final Codec<Vector3f> COLOR_CODEC = Codec.FLOAT.listOf().xmap(
list -> new Vector3f(list.get(0), list.get(1), list.get(2)),
vec -> java.util.List.of(vec.x, vec.y, vec.z)
);
public static final MapCodec<ArcParticleOptions> CODEC = RecordCodecBuilder.mapCodec(instance ->
instance.group(
Codec.FLOAT.optionalFieldOf("size", 0.08f).forGetter(o -> o.size),
Codec.INT.optionalFieldOf("lifetime", 15).forGetter(o -> o.lifetime),
COLOR_CODEC.optionalFieldOf("color", new Vector3f(1.0f, 0.2f, 0.2f)).forGetter(o -> o.color),
Codec.FLOAT.optionalFieldOf("length", 1.0f).forGetter(o -> o.length)
).apply(instance, ArcParticleOptions::new)
);
public static final StreamCodec<RegistryFriendlyByteBuf, ArcParticleOptions> STREAM_CODEC =
new StreamCodec<>() {
@Override
public ArcParticleOptions decode(RegistryFriendlyByteBuf buf) {
float size = buf.readFloat();
int lifetime = buf.readInt();
Vector3f color = new Vector3f(buf.readFloat(), buf.readFloat(), buf.readFloat());
float length = buf.readFloat();
return new ArcParticleOptions(size, lifetime, color, length);
}
@Override
public void encode(RegistryFriendlyByteBuf buf, ArcParticleOptions opts) {
buf.writeFloat(opts.size);
buf.writeInt(opts.lifetime);
buf.writeFloat(opts.color.x);
buf.writeFloat(opts.color.y);
buf.writeFloat(opts.color.z);
buf.writeFloat(opts.length);
}
};
}
@@ -209,6 +209,28 @@ public final class ModParticleRenderTypes {
} }
}; };
public static final ParticleRenderType ARC_PARTICLE = new ParticleRenderType() {
@Override
public BufferBuilder begin(Tesselator tesselator, TextureManager textureManager) {
RenderSystem.disableCull();
RenderSystem.enableBlend();
RenderSystem.depthMask(true);
RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE);
RenderSystem.setShader(net.minecraft.client.renderer.GameRenderer::getPositionColorShader);
return tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR);
}
@Override
public String toString() {
return "lzxnoneterraria:arc_particle";
}
@Override
public boolean isTranslucent() {
return false;
}
};
public static final ParticleRenderType EMISSIVE_BLOOM_PARTICLE = new ParticleRenderType() { public static final ParticleRenderType EMISSIVE_BLOOM_PARTICLE = new ParticleRenderType() {
@Override @Override
public BufferBuilder begin(Tesselator tesselator, TextureManager textureManager) { public BufferBuilder begin(Tesselator tesselator, TextureManager textureManager) {
@@ -49,6 +49,17 @@ public class ModParticles {
return DustParticleOptions.STREAM_CODEC; return DustParticleOptions.STREAM_CODEC;
} }
}); });
public static final Supplier<ParticleType<ArcParticleOptions>> ARC_PARTICLE =
PARTICLE_TYPES.register("arc_particle", () -> new ParticleType<>(false) {
@Override
public MapCodec<ArcParticleOptions> codec() {
return ArcParticleOptions.CODEC;
}
@Override
public StreamCodec<? super RegistryFriendlyByteBuf, ArcParticleOptions> streamCodec() {
return ArcParticleOptions.STREAM_CODEC;
}
});
public static final Supplier<ParticleType<ZenithTrailParticleOptions>> ZENITH_TRAIL_PARTICLE = public static final Supplier<ParticleType<ZenithTrailParticleOptions>> ZENITH_TRAIL_PARTICLE =
PARTICLE_TYPES.register("zenith_trail_particle", () -> new ParticleType<>(false) { PARTICLE_TYPES.register("zenith_trail_particle", () -> new ParticleType<>(false) {
@Override @Override
@@ -12,6 +12,7 @@ import com.lzxnone.terraria.effect.MidasEffect;
import com.lzxnone.terraria.effect.PaladinsShieldEffect; import com.lzxnone.terraria.effect.PaladinsShieldEffect;
import com.lzxnone.terraria.effect.IceBarrierEffect; import com.lzxnone.terraria.effect.IceBarrierEffect;
import com.lzxnone.terraria.effect.PanicEffect; import com.lzxnone.terraria.effect.PanicEffect;
import com.lzxnone.terraria.effect.ZappedRedEffect;
import com.lzxnone.terraria.effect.SummonEffect; import com.lzxnone.terraria.effect.SummonEffect;
import com.lzxnone.terraria.enchantment.ModEnchantmentConfigs; import com.lzxnone.terraria.enchantment.ModEnchantmentConfigs;
import com.lzxnone.terraria.client.config.RenderConfigs; import com.lzxnone.terraria.client.config.RenderConfigs;
@@ -233,7 +234,8 @@ public class ConfigList {
SummonEffect.CONFIG_LIST_ITEM, SummonEffect.CONFIG_LIST_ITEM,
PaladinsShieldEffect.CONFIG_LIST_ITEM, PaladinsShieldEffect.CONFIG_LIST_ITEM,
IceBarrierEffect.CONFIG_LIST_ITEM, IceBarrierEffect.CONFIG_LIST_ITEM,
PanicEffect.CONFIG_LIST_ITEM PanicEffect.CONFIG_LIST_ITEM,
ZappedRedEffect.CONFIG_LIST_ITEM
}); });
ITEMS.put(AMMO, new ConfigListItem[]{ ITEMS.put(AMMO, new ConfigListItem[]{
MusketBall.CONFIG_LIST_ITEM, MusketBall.CONFIG_LIST_ITEM,
@@ -464,6 +464,7 @@
"effect.lzxnoneterraria.panic": "Panic", "effect.lzxnoneterraria.panic": "Panic",
"effect.lzxnoneterraria.summon": "Summon", "effect.lzxnoneterraria.summon": "Summon",
"effect.lzxnoneterraria.mana_sickness": "Mana Sickness", "effect.lzxnoneterraria.mana_sickness": "Mana Sickness",
"effect.lzxnoneterraria.zapped_red": "Zapped",
"key.categories.lzxnoneterraria": "lzxnoneterraria", "key.categories.lzxnoneterraria": "lzxnoneterraria",
"key.lzxnoneterraria.kill_mode": "Kill Mode", "key.lzxnoneterraria.kill_mode": "Kill Mode",
"key.lzxnoneterraria.clear_summon": "Clear Selected Summons", "key.lzxnoneterraria.clear_summon": "Clear Selected Summons",
@@ -1136,6 +1137,8 @@
"lzxnoneterraria.configuration.arc_surge_search_range.tooltip": "Search range for enemy targeting and crosshair raycast (blocks)", "lzxnoneterraria.configuration.arc_surge_search_range.tooltip": "Search range for enemy targeting and crosshair raycast (blocks)",
"lzxnoneterraria.configuration.arc_surge_max_angle": "Max Angle", "lzxnoneterraria.configuration.arc_surge_max_angle": "Max Angle",
"lzxnoneterraria.configuration.arc_surge_max_angle.tooltip": "Maximum angle between player's line of sight and enemy for targeting (degrees)", "lzxnoneterraria.configuration.arc_surge_max_angle.tooltip": "Maximum angle between player's line of sight and enemy for targeting (degrees)",
"lzxnoneterraria.configuration.arc_surge_zapped_duration": "Zapped Duration (ticks)",
"lzxnoneterraria.configuration.arc_surge_zapped_duration.tooltip": "Duration of Zapped effect applied to enemies on hit (20 ticks = 1 second)",
"lzxnoneterraria.configuration.devils_devastation_kill_mode_time": "Kill Mode Duration", "lzxnoneterraria.configuration.devils_devastation_kill_mode_time": "Kill Mode Duration",
"lzxnoneterraria.configuration.devils_devastation_kill_mode_time.tooltip": "Kill Mode duration in ticks", "lzxnoneterraria.configuration.devils_devastation_kill_mode_time.tooltip": "Kill Mode duration in ticks",
"lzxnoneterraria.configuration.devils_devastation_kill_mode_cooldown_time": "Kill Mode Cooldown", "lzxnoneterraria.configuration.devils_devastation_kill_mode_cooldown_time": "Kill Mode Cooldown",
@@ -464,6 +464,7 @@
"effect.lzxnoneterraria.panic": "恐慌", "effect.lzxnoneterraria.panic": "恐慌",
"effect.lzxnoneterraria.summon": "召唤", "effect.lzxnoneterraria.summon": "召唤",
"effect.lzxnoneterraria.mana_sickness": "耐魔性", "effect.lzxnoneterraria.mana_sickness": "耐魔性",
"effect.lzxnoneterraria.zapped_red": "电击",
"key.categories.lzxnoneterraria": "lzxnoneterraria", "key.categories.lzxnoneterraria": "lzxnoneterraria",
"key.lzxnoneterraria.kill_mode": "进入杀戮模式", "key.lzxnoneterraria.kill_mode": "进入杀戮模式",
"key.lzxnoneterraria.clear_summon": "清除指定召唤物", "key.lzxnoneterraria.clear_summon": "清除指定召唤物",
@@ -1136,6 +1137,8 @@
"lzxnoneterraria.configuration.arc_surge_search_range.tooltip": "搜索额外目标敌人及准星检测的有效距离(方块)", "lzxnoneterraria.configuration.arc_surge_search_range.tooltip": "搜索额外目标敌人及准星检测的有效距离(方块)",
"lzxnoneterraria.configuration.arc_surge_max_angle": "最大索敌夹角", "lzxnoneterraria.configuration.arc_surge_max_angle": "最大索敌夹角",
"lzxnoneterraria.configuration.arc_surge_max_angle.tooltip": "额外电弧锁定时目标与玩家视线方向的最大夹角(度)", "lzxnoneterraria.configuration.arc_surge_max_angle.tooltip": "额外电弧锁定时目标与玩家视线方向的最大夹角(度)",
"lzxnoneterraria.configuration.arc_surge_zapped_duration": "电击持续时间 (tick)",
"lzxnoneterraria.configuration.arc_surge_zapped_duration.tooltip": "击中生物时附加电击效果的持续时间(20 tick = 1 秒)",
"lzxnoneterraria.configuration.devils_devastation_kill_mode_time": "杀戮模式持续时间", "lzxnoneterraria.configuration.devils_devastation_kill_mode_time": "杀戮模式持续时间",
"lzxnoneterraria.configuration.devils_devastation_kill_mode_time.tooltip": "杀戮模式持续时间(刻)", "lzxnoneterraria.configuration.devils_devastation_kill_mode_time.tooltip": "杀戮模式持续时间(刻)",
"lzxnoneterraria.configuration.devils_devastation_kill_mode_cooldown_time": "杀戮模式冷却时间", "lzxnoneterraria.configuration.devils_devastation_kill_mode_cooldown_time": "杀戮模式冷却时间",
Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

@@ -8,8 +8,8 @@
], ],
"key": { "key": {
"A": { "item": "minecraft:flow_armor_trim_smithing_template" }, "A": { "item": "minecraft:flow_armor_trim_smithing_template" },
"B": { "item": "minecraft:waxed_oxidized_lightning_rod" }, "B": { "item": "minecraft:lightning_rod" },
"C": { "item": "minecraft:weathered_lightning_rod" }, "C": { "item": "minecraft:lightning_rod" },
"D": { "item": "minecraft:conduit" }, "D": { "item": "minecraft:conduit" },
"E": { "item": "minecraft:heavy_core" }, "E": { "item": "minecraft:heavy_core" },
"F": { "item": "minecraft:netherite_ingot" } "F": { "item": "minecraft:netherite_ingot" }