v1.9.2
This commit is contained in:
1 parent
f9f3597e81
commit
a0c864fe35
28 files changed
+691
-42
No files matched your search
@@ -9,12 +9,17 @@ import net.minecraft.nbt.NbtOps;
|
|||||||
import net.minecraft.nbt.Tag;
|
import net.minecraft.nbt.Tag;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public class TargetMarks {
|
public class TargetMarks {
|
||||||
public static final String PROPHETIC = "prophetic";
|
public static final String POSSESSION = "possession";
|
||||||
|
public static final String KALEIDOSCOPE = "kaleidoscope";
|
||||||
private static final Codec<UUID> UUID_CODEC = Codec.STRING.xmap(UUID::fromString, UUID::toString);
|
private static final Codec<UUID> UUID_CODEC = Codec.STRING.xmap(UUID::fromString, UUID::toString);
|
||||||
private static final UUID EMPTY_OWNER = new UUID(0L, 0L);
|
private static final UUID EMPTY_OWNER = new UUID(0L, 0L);
|
||||||
private static final Codec<CompoundTag> COMPOUND_TAG_CODEC = Codec.PASSTHROUGH.xmap(
|
private static final Codec<CompoundTag> COMPOUND_TAG_CODEC = Codec.PASSTHROUGH.xmap(
|
||||||
@@ -73,6 +78,47 @@ public class TargetMarks {
|
|||||||
return new TargetMarks(marks, customData);
|
return new TargetMarks(marks, customData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addMark(String id, Mark mark, int maxSlots, long gameTime) {
|
||||||
|
if(id == null || mark == null) return;
|
||||||
|
|
||||||
|
// 1. 同一标记直接刷新
|
||||||
|
if(marks.containsKey(id)) {
|
||||||
|
marks.put(id, mark);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 清理已过期的标记
|
||||||
|
if(gameTime > 0) {
|
||||||
|
marks.entrySet().removeIf(entry -> {
|
||||||
|
Mark m = entry.getValue();
|
||||||
|
return m != null && m.getDuration() > 0 && gameTime - m.getStartTime() >= m.getDuration();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 统计该施加者的有效标记
|
||||||
|
UUID owner = mark.getOwner();
|
||||||
|
List<Map.Entry<String, Mark>> ownerMarks = new ArrayList<>();
|
||||||
|
for(Map.Entry<String, Mark> entry : marks.entrySet()) {
|
||||||
|
Mark m = entry.getValue();
|
||||||
|
if(m != null && (owner == null || owner.equals(m.getOwner()))) {
|
||||||
|
ownerMarks.add(entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 若超出最大槽位上限,按 startTime 剔除最老的标记(FIFO)
|
||||||
|
while(ownerMarks.size() >= maxSlots && !ownerMarks.isEmpty()) {
|
||||||
|
Map.Entry<String, Mark> oldest = Collections.min(
|
||||||
|
ownerMarks,
|
||||||
|
Comparator.comparingLong(e -> e.getValue().getStartTime())
|
||||||
|
);
|
||||||
|
marks.remove(oldest.getKey());
|
||||||
|
ownerMarks.remove(oldest);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. 存入新标记
|
||||||
|
marks.put(id, mark);
|
||||||
|
}
|
||||||
|
|
||||||
public static class Mark {
|
public static class Mark {
|
||||||
public static final Codec<Mark> CODEC = RecordCodecBuilder.create(instance -> instance.group(
|
public static final Codec<Mark> CODEC = RecordCodecBuilder.create(instance -> instance.group(
|
||||||
Codec.LONG.optionalFieldOf("start_time", 0L).forGetter(Mark::getStartTime),
|
Codec.LONG.optionalFieldOf("start_time", 0L).forGetter(Mark::getStartTime),
|
||||||
|
|||||||
+3
-1
@@ -21,6 +21,7 @@ import com.lzxnone.terraria.client.item.ranged.ClientSuperStarShooter;
|
|||||||
import com.lzxnone.terraria.client.item.summon.ClientStardustDragonStaff;
|
import com.lzxnone.terraria.client.item.summon.ClientStardustDragonStaff;
|
||||||
import com.lzxnone.terraria.client.item.summon.ClientStardustCellStaff;
|
import com.lzxnone.terraria.client.item.summon.ClientStardustCellStaff;
|
||||||
import com.lzxnone.terraria.client.item.summon.ClientTerraprisma;
|
import com.lzxnone.terraria.client.item.summon.ClientTerraprisma;
|
||||||
|
import com.lzxnone.terraria.client.item.summon.ClientKaleidoscope;
|
||||||
import com.lzxnone.terraria.client.item.summon.ClientWhip;
|
import com.lzxnone.terraria.client.item.summon.ClientWhip;
|
||||||
import com.lzxnone.terraria.entity.summon.StaticSummonBehaviors;
|
import com.lzxnone.terraria.entity.summon.StaticSummonBehaviors;
|
||||||
|
|
||||||
@@ -61,7 +62,8 @@ public class ClientStaticSummonRenderBehaviors {
|
|||||||
BEHAVIORS.put(StaticSummonBehaviors.NEBULA_ARCANUM_PROJECTILE, ClientNebulaArcanum.SUMMON_BEHAVIOR);
|
BEHAVIORS.put(StaticSummonBehaviors.NEBULA_ARCANUM_PROJECTILE, ClientNebulaArcanum.SUMMON_BEHAVIOR);
|
||||||
BEHAVIORS.put(StaticSummonBehaviors.NEBULA_ARCANUM_SMALL_PROJECTILE, ClientNebulaArcanum.SUMMON_BEHAVIOR2);
|
BEHAVIORS.put(StaticSummonBehaviors.NEBULA_ARCANUM_SMALL_PROJECTILE, ClientNebulaArcanum.SUMMON_BEHAVIOR2);
|
||||||
BEHAVIORS.put(StaticSummonBehaviors.TERRAPRISMA, ClientTerraprisma.SUMMON_BEHAVIOR);
|
BEHAVIORS.put(StaticSummonBehaviors.TERRAPRISMA, ClientTerraprisma.SUMMON_BEHAVIOR);
|
||||||
BEHAVIORS.put(StaticSummonBehaviors.POSSESSION, ClientWhip.SUMMON_BEHAVIOR);
|
BEHAVIORS.put(StaticSummonBehaviors.WHIP, ClientWhip.SUMMON_BEHAVIOR);
|
||||||
|
BEHAVIORS.put(StaticSummonBehaviors.KALEIDOSCOPE, ClientKaleidoscope.SUMMON_BEHAVIOR);
|
||||||
BEHAVIORS.put(StaticSummonBehaviors.POSSESSION_VISION, DEFAULT_BEHAVIOR);
|
BEHAVIORS.put(StaticSummonBehaviors.POSSESSION_VISION, DEFAULT_BEHAVIOR);
|
||||||
BEHAVIORS.put(StaticSummonBehaviors.STARDUST_DRAGON_STAFF, ClientStardustDragonStaff.SUMMON_BEHAVIOR);
|
BEHAVIORS.put(StaticSummonBehaviors.STARDUST_DRAGON_STAFF, ClientStardustDragonStaff.SUMMON_BEHAVIOR);
|
||||||
BEHAVIORS.put(StaticSummonBehaviors.STARDUST_CELL_STAFF, ClientStardustCellStaff.SUMMON_BEHAVIOR);
|
BEHAVIORS.put(StaticSummonBehaviors.STARDUST_CELL_STAFF, ClientStardustCellStaff.SUMMON_BEHAVIOR);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.lzxnone.terraria.item.weapon.MeleeWeapon;
|
|||||||
import com.lzxnone.terraria.item.weapon.RangedWeapon;
|
import com.lzxnone.terraria.item.weapon.RangedWeapon;
|
||||||
import com.lzxnone.terraria.item.weapon.SummonWeapon;
|
import com.lzxnone.terraria.item.weapon.SummonWeapon;
|
||||||
import com.lzxnone.terraria.item.weapon.summon.minion.MinionWeapon;
|
import com.lzxnone.terraria.item.weapon.summon.minion.MinionWeapon;
|
||||||
|
import com.lzxnone.terraria.item.weapon.summon.whip.Whip;
|
||||||
import net.minecraft.ChatFormatting;
|
import net.minecraft.ChatFormatting;
|
||||||
import net.minecraft.core.Holder;
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.core.component.DataComponents;
|
import net.minecraft.core.component.DataComponents;
|
||||||
@@ -33,6 +34,7 @@ public class ItemTooltipHandler {
|
|||||||
addMeleeWeaponTooltip(event);
|
addMeleeWeaponTooltip(event);
|
||||||
addRangedWeaponTooltip(event);
|
addRangedWeaponTooltip(event);
|
||||||
addSummonWeaponTooltip(event);
|
addSummonWeaponTooltip(event);
|
||||||
|
addWhipTooltip(event);
|
||||||
addMagicWeaponTooltip(event);
|
addMagicWeaponTooltip(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,6 +122,14 @@ public class ItemTooltipHandler {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(stack.getItem() instanceof com.lzxnone.terraria.item.weapon.melee.DevilsDevastation) {
|
||||||
|
Component keyMsg = com.lzxnone.terraria.ModKeyBindings.KILL_MODE.getTranslatedKeyMessage();
|
||||||
|
event.getToolTip().add(
|
||||||
|
Component.translatable("tooltip.lzxnoneterraria.devils_devastation.kill_mode_key", keyMsg)
|
||||||
|
.withStyle(style -> style.withColor(0xFF5555))
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,4 +168,29 @@ public class ItemTooltipHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void addWhipTooltip(ItemTooltipEvent event) {
|
||||||
|
ItemStack stack = event.getItemStack();
|
||||||
|
if(stack.getItem() instanceof Whip whip) {
|
||||||
|
float tagDamage = whip.getTagDamage();
|
||||||
|
if(tagDamage > 0.0F) {
|
||||||
|
event.getToolTip().add(
|
||||||
|
Component.translatable(
|
||||||
|
"tooltip.lzxnoneterraria.whip_tag_damage",
|
||||||
|
tagDamage == Math.rint(tagDamage) ? String.valueOf((int) tagDamage) : String.format("%.2f", tagDamage)
|
||||||
|
).withStyle(ChatFormatting.RED)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
int tagCrit = whip.getTagCrit();
|
||||||
|
if(tagCrit > 0) {
|
||||||
|
event.getToolTip().add(
|
||||||
|
Component.translatable(
|
||||||
|
"tooltip.lzxnoneterraria.whip_tag_crit",
|
||||||
|
tagCrit
|
||||||
|
).withStyle(ChatFormatting.RED)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -24,12 +24,18 @@ import net.minecraft.client.renderer.texture.OverlayTexture;
|
|||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import com.lzxnone.terraria.effect.ModEffects;
|
||||||
|
import com.lzxnone.terraria.item.ModItems;
|
||||||
|
import com.lzxnone.terraria.particle.IronSparkParticleOptions;
|
||||||
|
import org.joml.Vector4f;
|
||||||
import net.minecraft.world.item.*;
|
import net.minecraft.world.item.*;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import org.joml.Matrix4f;
|
import org.joml.Matrix4f;
|
||||||
import org.joml.Quaternionf;
|
import org.joml.Quaternionf;
|
||||||
import org.joml.Vector3f;
|
import org.joml.Vector3f;
|
||||||
import net.minecraft.client.Camera;
|
import net.minecraft.client.Camera;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
import net.neoforged.neoforge.client.GlStateBackup;
|
import net.neoforged.neoforge.client.GlStateBackup;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -605,6 +611,118 @@ public class ClientDevilsDevastation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void renderEnergyParticles(PoseStack poseStack, ItemDisplayContext displayContext, Player player) {
|
||||||
|
if (player.getEffect(ModEffects.KILL_MODE) == null || player.getCooldowns().isOnCooldown(ModItems.DEVILS_DEVASTATION.get())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Minecraft mc = Minecraft.getInstance();
|
||||||
|
if (mc.level == null) return;
|
||||||
|
|
||||||
|
poseStack.pushPose();
|
||||||
|
poseStack.translate(0.0, 1.4, 0.2);
|
||||||
|
|
||||||
|
Matrix4f energyMatrix = poseStack.last().pose();
|
||||||
|
|
||||||
|
Camera camera = mc.gameRenderer.getMainCamera();
|
||||||
|
Vec3 cameraWorldPos = camera.getPosition();
|
||||||
|
Quaternionf cameraRotation = camera.rotation();
|
||||||
|
boolean isFirstPerson = displayContext.firstPerson();
|
||||||
|
|
||||||
|
net.minecraft.util.RandomSource random = player.getRandom();
|
||||||
|
|
||||||
|
int sampleCount = 2;
|
||||||
|
for (int i = 0; i < sampleCount; i++) {
|
||||||
|
// 1. 采样能量体剑身内的位置点
|
||||||
|
float localY = 0.5f + random.nextFloat() * 23.5f;
|
||||||
|
float halfWidth = (1.0f - localY / 32.0f) * 0.8f;
|
||||||
|
float localZ = (random.nextFloat() * 2.0f - 1.0f) * halfWidth;
|
||||||
|
float localX = (random.nextFloat() * 2.0f - 1.0f) * 0.04f;
|
||||||
|
|
||||||
|
// 局部坐标转为渲染空间坐标
|
||||||
|
Vector4f localPos = new Vector4f(localX, localY, localZ, 1.0f);
|
||||||
|
localPos.mul(energyMatrix);
|
||||||
|
|
||||||
|
// 2. 解算粒子的绝对世界发射位置
|
||||||
|
Vec3 actualWorldPos;
|
||||||
|
if (isFirstPerson) {
|
||||||
|
Vector3f viewOffset = new Vector3f(localPos.x(), localPos.y(), localPos.z());
|
||||||
|
cameraRotation.transform(viewOffset);
|
||||||
|
|
||||||
|
actualWorldPos = new Vec3(
|
||||||
|
cameraWorldPos.x + viewOffset.x(),
|
||||||
|
cameraWorldPos.y + viewOffset.y(),
|
||||||
|
cameraWorldPos.z + viewOffset.z()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
actualWorldPos = new Vec3(
|
||||||
|
cameraWorldPos.x + localPos.x(),
|
||||||
|
cameraWorldPos.y + localPos.y(),
|
||||||
|
cameraWorldPos.z + localPos.z()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 计算粒子朝向:
|
||||||
|
// 剑身中轴为局部 +Y 轴 (0, 1, 0)
|
||||||
|
// 沿剑身延申为主方向 (Y=1.0),在 X/Z 方向施加偏移倾角,使朝向与中轴呈约 12° ~ 24° 夹角
|
||||||
|
float tilt = 0.22f + random.nextFloat() * 0.20f;
|
||||||
|
float phi = random.nextFloat() * (float) (2 * Math.PI);
|
||||||
|
float localDirX = (float) Math.cos(phi) * tilt * 0.35f;
|
||||||
|
float localDirY = 1.0f;
|
||||||
|
float localDirZ = (float) Math.sin(phi) * tilt;
|
||||||
|
|
||||||
|
Vector3f localDir = new Vector3f(localDirX, localDirY, localDirZ).normalize();
|
||||||
|
|
||||||
|
// 计算局部的侧向正交基向量 (right),用于铁火花平面的广告牌计算
|
||||||
|
Vector3f localRight = new Vector3f(-localDirZ, 0.0f, localDirX);
|
||||||
|
if (localRight.lengthSquared() < 0.001f) localRight.set(1.0f, 0.0f, 0.0f);
|
||||||
|
localRight.normalize();
|
||||||
|
|
||||||
|
// 4. 将方向向量和基向量变换到视角空间
|
||||||
|
Vector3f viewDir = energyMatrix.transformDirection(localDir, new Vector3f()).normalize();
|
||||||
|
Vector3f viewRight = energyMatrix.transformDirection(localRight, new Vector3f()).normalize();
|
||||||
|
|
||||||
|
// 5. 视角空间向量转换为世界空间向量
|
||||||
|
Vector3f worldDir;
|
||||||
|
Vector3f worldRight;
|
||||||
|
if (isFirstPerson) {
|
||||||
|
worldDir = cameraRotation.transform(viewDir, new Vector3f());
|
||||||
|
worldRight = cameraRotation.transform(viewRight, new Vector3f());
|
||||||
|
} else {
|
||||||
|
worldDir = new Vector3f(viewDir);
|
||||||
|
worldRight = new Vector3f(viewRight);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 速度大小控制火花的移动速度与拉伸方向
|
||||||
|
float speed = 0.18f + random.nextFloat() * 0.12f;
|
||||||
|
worldDir.mul(speed);
|
||||||
|
|
||||||
|
Vector3f[] energyColors = new Vector3f[]{
|
||||||
|
new Vector3f(0.725f, 0.345f, 1.0f),
|
||||||
|
new Vector3f(0.847f, 0.247f, 0.745f),
|
||||||
|
new Vector3f(0.882f, 0.345f, 0.247f)
|
||||||
|
};
|
||||||
|
|
||||||
|
// 6. 生成铁火花粒子
|
||||||
|
Vector3f color = energyColors[random.nextInt(energyColors.length)];
|
||||||
|
IronSparkParticleOptions sparkOptions = new IronSparkParticleOptions(
|
||||||
|
0.2f, // initSize (火花粗细)
|
||||||
|
16 + random.nextInt(8), // initLifetime (生命周期)
|
||||||
|
3.5f, // sparkLength (拉伸长度倍率)
|
||||||
|
color, // 颜色
|
||||||
|
worldDir, // 飞行初速度及延伸朝向
|
||||||
|
worldRight // 侧向基向量
|
||||||
|
);
|
||||||
|
mc.level.addParticle(
|
||||||
|
sparkOptions,
|
||||||
|
actualWorldPos.x, actualWorldPos.y, actualWorldPos.z,
|
||||||
|
0.0, 0.0, 0.0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
poseStack.popPose();
|
||||||
|
}
|
||||||
|
|
||||||
private static void addEnergyVertex(
|
private static void addEnergyVertex(
|
||||||
BufferBuilder bb,
|
BufferBuilder bb,
|
||||||
float x, float y, float z
|
float x, float y, float z
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.lzxnone.terraria.client.item.summon;
|
||||||
|
|
||||||
|
import com.lzxnone.terraria.client.entity.summon.IStaticSummonRenderBehavior;
|
||||||
|
import com.lzxnone.terraria.entity.summon.StaticSummon;
|
||||||
|
import net.minecraft.util.Mth;
|
||||||
|
import org.joml.Vector4f;
|
||||||
|
|
||||||
|
public class ClientKaleidoscope extends ClientWhip {
|
||||||
|
public static final IStaticSummonRenderBehavior SUMMON_BEHAVIOR = new ClientKaleidoscope();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Vector4f getVertexColor(StaticSummon summon, float progressAlongWhip, float partialTick) {
|
||||||
|
float time = summon.tickCount + partialTick;
|
||||||
|
// 沿鞭身呈现完整彩虹色谱,并随时间平滑流动
|
||||||
|
float hue = (progressAlongWhip + time * 0.04F) % 1.0F;
|
||||||
|
int rgb = Mth.hsvToRgb(hue, 0.85F, 1.0F);
|
||||||
|
float r = ((rgb >> 16) & 255) / 255.0F;
|
||||||
|
float g = ((rgb >> 8) & 255) / 255.0F;
|
||||||
|
float b = (rgb & 255) / 255.0F;
|
||||||
|
float a = summon.getEntityData().get(StaticSummon.COLOR_A);
|
||||||
|
return new Vector4f(r, g, b, a);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,15 +13,26 @@ import net.minecraft.resources.ResourceLocation;
|
|||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
import org.joml.Vector4f;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ClientWhip {
|
public class ClientWhip implements IStaticSummonRenderBehavior {
|
||||||
private static final int SEGMENTS = 24;
|
private static final int SEGMENTS = 24;
|
||||||
private static final float WIDTH = 1.0F;
|
private static final float WIDTH = 1.0F;
|
||||||
|
|
||||||
public static final IStaticSummonRenderBehavior SUMMON_BEHAVIOR = new IStaticSummonRenderBehavior() {
|
public static final IStaticSummonRenderBehavior SUMMON_BEHAVIOR = new ClientWhip();
|
||||||
|
|
||||||
|
protected Vector4f getVertexColor(StaticSummon summon, float progressAlongWhip, float partialTick) {
|
||||||
|
return new Vector4f(
|
||||||
|
summon.getEntityData().get(StaticSummon.COLOR_R),
|
||||||
|
summon.getEntityData().get(StaticSummon.COLOR_G),
|
||||||
|
summon.getEntityData().get(StaticSummon.COLOR_B),
|
||||||
|
summon.getEntityData().get(StaticSummon.COLOR_A)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
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 StaticSummon summon) || summon.getOwner() == null) return;
|
if(!(entity instanceof StaticSummon summon) || summon.getOwner() == null) return;
|
||||||
@@ -86,7 +97,7 @@ public class ClientWhip {
|
|||||||
// 1. 渲染尾部 (Tail - 不拉伸,单张贴图完整映射)
|
// 1. 渲染尾部 (Tail - 不拉伸,单张贴图完整映射)
|
||||||
if(tailRatio > 1.0E-4F) {
|
if(tailRatio > 1.0E-4F) {
|
||||||
List<Vec3> tailPoints = extractSubPath(points, normalizedDist, 0.0F, tailRatio);
|
List<Vec3> tailPoints = extractSubPath(points, normalizedDist, 0.0F, tailRatio);
|
||||||
renderRibbonCross(tailPoints, origin, right, up, tailRes, 0.0F, 1.0F, poseStack, bufferSource);
|
renderRibbonCross(summon, tailPoints, 0.0F, tailRatio, origin, right, up, tailRes, 0.0F, 1.0F, poseStack, bufferSource, partialTick);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 渲染身体 (Body - Tiling 平铺渲染,按 bodyUnitRatio 单元循环平铺)
|
// 2. 渲染身体 (Body - Tiling 平铺渲染,按 bodyUnitRatio 单元循环平铺)
|
||||||
@@ -96,7 +107,7 @@ public class ClientWhip {
|
|||||||
float next = Math.min(bodyEnd, cur + bodyUnitRatio);
|
float next = Math.min(bodyEnd, cur + bodyUnitRatio);
|
||||||
float uMax = (next - cur) / bodyUnitRatio;
|
float uMax = (next - cur) / bodyUnitRatio;
|
||||||
List<Vec3> bodyTilePoints = extractSubPath(points, normalizedDist, cur, next);
|
List<Vec3> bodyTilePoints = extractSubPath(points, normalizedDist, cur, next);
|
||||||
renderRibbonCross(bodyTilePoints, origin, right, up, bodyRes, 0.0F, uMax, poseStack, bufferSource);
|
renderRibbonCross(summon, bodyTilePoints, cur, next, origin, right, up, bodyRes, 0.0F, uMax, poseStack, bufferSource, partialTick);
|
||||||
cur = next;
|
cur = next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -104,7 +115,7 @@ public class ClientWhip {
|
|||||||
// 3. 渲染头部 (Head - 不拉伸,单张贴图完整映射)
|
// 3. 渲染头部 (Head - 不拉伸,单张贴图完整映射)
|
||||||
if(headRatio > 1.0E-4F) {
|
if(headRatio > 1.0E-4F) {
|
||||||
List<Vec3> headPoints = extractSubPath(points, normalizedDist, bodyEnd, 1.0F);
|
List<Vec3> headPoints = extractSubPath(points, normalizedDist, bodyEnd, 1.0F);
|
||||||
renderRibbonCross(headPoints, origin, right, up, headRes, 0.0F, 1.0F, poseStack, bufferSource);
|
renderRibbonCross(summon, headPoints, bodyEnd, 1.0F, origin, right, up, headRes, 0.0F, 1.0F, poseStack, bufferSource, partialTick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,12 +187,12 @@ public class ClientWhip {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void renderRibbonCross(List<Vec3> points, Vec3 origin, Vec3 right, Vec3 up, ResourceLocation res, float uMin, float uMax, PoseStack poseStack, MultiBufferSource bufferSource) {
|
private void renderRibbonCross(StaticSummon summon, List<Vec3> points, float segStartProgress, float segEndProgress, Vec3 origin, Vec3 right, Vec3 up, ResourceLocation res, float uMin, float uMax, PoseStack poseStack, MultiBufferSource bufferSource, float partialTick) {
|
||||||
renderRibbon(points, origin, right, res, uMin, uMax, poseStack, bufferSource);
|
renderRibbon(summon, points, segStartProgress, segEndProgress, origin, right, res, uMin, uMax, poseStack, bufferSource, partialTick);
|
||||||
renderRibbon(points, origin, up, res, uMin, uMax, poseStack, bufferSource);
|
renderRibbon(summon, points, segStartProgress, segEndProgress, origin, up, res, uMin, uMax, poseStack, bufferSource, partialTick);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void renderRibbon(List<Vec3> points, Vec3 origin, Vec3 widthDir, ResourceLocation res, float uMin, float uMax, PoseStack poseStack, MultiBufferSource bufferSource) {
|
private void renderRibbon(StaticSummon summon, List<Vec3> points, float segStartProgress, float segEndProgress, Vec3 origin, Vec3 widthDir, ResourceLocation res, float uMin, float uMax, PoseStack poseStack, MultiBufferSource bufferSource, float partialTick) {
|
||||||
if(points.size() < 2) return;
|
if(points.size() < 2) return;
|
||||||
VertexConsumer consumer = bufferSource.getBuffer(ModRenderTypes.entityTranslucentEmissive(res));
|
VertexConsumer consumer = bufferSource.getBuffer(ModRenderTypes.entityTranslucentEmissive(res));
|
||||||
Vec3 halfWidth = widthDir.normalize().scale(WIDTH * 0.5F);
|
Vec3 halfWidth = widthDir.normalize().scale(WIDTH * 0.5F);
|
||||||
@@ -207,16 +218,24 @@ public class ClientWhip {
|
|||||||
float u0 = uMin + (float)(distances[i] / subLength) * (uMax - uMin);
|
float u0 = uMin + (float)(distances[i] / subLength) * (uMax - uMin);
|
||||||
float u1 = uMin + (float)(distances[i + 1] / subLength) * (uMax - uMin);
|
float u1 = uMin + (float)(distances[i + 1] / subLength) * (uMax - uMin);
|
||||||
|
|
||||||
addVertex(consumer, poseStack, a, u0, 0.0F);
|
float localProgress0 = (float)(distances[i] / subLength);
|
||||||
addVertex(consumer, poseStack, b, u0, 1.0F);
|
float localProgress1 = (float)(distances[i + 1] / subLength);
|
||||||
addVertex(consumer, poseStack, c, u1, 1.0F);
|
float globalProgress0 = Mth.lerp(localProgress0, segStartProgress, segEndProgress);
|
||||||
addVertex(consumer, poseStack, d, u1, 0.0F);
|
float globalProgress1 = Mth.lerp(localProgress1, segStartProgress, segEndProgress);
|
||||||
|
|
||||||
|
Vector4f color0 = getVertexColor(summon, globalProgress0, partialTick);
|
||||||
|
Vector4f color1 = getVertexColor(summon, globalProgress1, partialTick);
|
||||||
|
|
||||||
|
addVertex(consumer, poseStack, a, u0, 0.0F, color0);
|
||||||
|
addVertex(consumer, poseStack, b, u0, 1.0F, color0);
|
||||||
|
addVertex(consumer, poseStack, c, u1, 1.0F, color1);
|
||||||
|
addVertex(consumer, poseStack, d, u1, 0.0F, color1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void addVertex(VertexConsumer consumer, PoseStack poseStack, Vec3 pos, float u, float v) {
|
private static void addVertex(VertexConsumer consumer, PoseStack poseStack, Vec3 pos, float u, float v, Vector4f color) {
|
||||||
consumer.addVertex(poseStack.last().pose(), (float)pos.x, (float)pos.y, (float)pos.z)
|
consumer.addVertex(poseStack.last().pose(), (float)pos.x, (float)pos.y, (float)pos.z)
|
||||||
.setColor(1.0F, 1.0F, 1.0F, 1.0F)
|
.setColor(color.x(), color.y(), color.z(), color.w())
|
||||||
.setUv(u, v)
|
.setUv(u, v)
|
||||||
.setOverlay(OverlayTexture.NO_OVERLAY)
|
.setOverlay(OverlayTexture.NO_OVERLAY)
|
||||||
.setLight(LightTexture.FULL_BRIGHT)
|
.setLight(LightTexture.FULL_BRIGHT)
|
||||||
@@ -234,5 +253,4 @@ public class ClientWhip {
|
|||||||
private static float easeInOut(float value) {
|
private static float easeInOut(float value) {
|
||||||
return value < 0.5F ? 2.0F * value * value : 1.0F - (float)Math.pow(-2.0F * value + 2.0F, 2.0D) / 2.0F;
|
return value < 0.5F ? 2.0F * value * value : 1.0F - (float)Math.pow(-2.0F * value + 2.0F, 2.0D) / 2.0F;
|
||||||
}
|
}
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -246,6 +246,7 @@ public class ModCreativeModeTabs {
|
|||||||
output.accept(ModItems.STARDUST_DRAGON_STAFF.get());
|
output.accept(ModItems.STARDUST_DRAGON_STAFF.get());
|
||||||
output.accept(ModItems.STARDUST_CELL_STAFF.get());
|
output.accept(ModItems.STARDUST_CELL_STAFF.get());
|
||||||
output.accept(ModItems.POSSESSION.get());
|
output.accept(ModItems.POSSESSION.get());
|
||||||
|
output.accept(ModItems.KALEIDOSCOPE.get());
|
||||||
output.accept(ModItems.SUMMONING_POTION.get());
|
output.accept(ModItems.SUMMONING_POTION.get());
|
||||||
}).build());
|
}).build());
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ public class BetsysCurseEffect extends MobEffect {
|
|||||||
|
|
||||||
AttributeInstance armor = entity.getAttribute(Attributes.ARMOR);
|
AttributeInstance armor = entity.getAttribute(Attributes.ARMOR);
|
||||||
if(armor != null) {
|
if(armor != null) {
|
||||||
armor.addTransientModifier(new AttributeModifier(
|
armor.addOrUpdateTransientModifier(new AttributeModifier(
|
||||||
ARMOR_REDUCTION_ID,
|
ARMOR_REDUCTION_ID,
|
||||||
-reduction,
|
-reduction,
|
||||||
AttributeModifier.Operation.ADD_VALUE
|
AttributeModifier.Operation.ADD_VALUE
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class IchorEffect extends MobEffect {
|
|||||||
|
|
||||||
AttributeInstance armor = entity.getAttribute(Attributes.ARMOR);
|
AttributeInstance armor = entity.getAttribute(Attributes.ARMOR);
|
||||||
if(armor != null) {
|
if(armor != null) {
|
||||||
armor.addTransientModifier(new AttributeModifier(
|
armor.addOrUpdateTransientModifier(new AttributeModifier(
|
||||||
ARMOR_REDUCTION_ID,
|
ARMOR_REDUCTION_ID,
|
||||||
-reduction,
|
-reduction,
|
||||||
AttributeModifier.Operation.ADD_VALUE
|
AttributeModifier.Operation.ADD_VALUE
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ public class StaticSummonBehaviors {
|
|||||||
public static final String STARDUST_DRAGON_STAFF = "stardust_dragon_staff";
|
public static final String STARDUST_DRAGON_STAFF = "stardust_dragon_staff";
|
||||||
public static final String STARDUST_CELL_STAFF = "stardust_cell_staff";
|
public static final String STARDUST_CELL_STAFF = "stardust_cell_staff";
|
||||||
public static final String STARDUST_CELL_STUCK_PROJECTILE = "stardust_cell_stuck_projectile";
|
public static final String STARDUST_CELL_STUCK_PROJECTILE = "stardust_cell_stuck_projectile";
|
||||||
public static final String POSSESSION = "possession";
|
public static final String WHIP = "whip";
|
||||||
|
public static final String KALEIDOSCOPE = "kaleidoscope";
|
||||||
public static final String POSSESSION_VISION = "possession_vision";
|
public static final String POSSESSION_VISION = "possession_vision";
|
||||||
public static final String NIGHTGLOW_PROJECTILE = "nightglow_projectile";
|
public static final String NIGHTGLOW_PROJECTILE = "nightglow_projectile";
|
||||||
public static final String ARC_SURGE_LIGHTNING = "arc_surge_lightning";
|
public static final String ARC_SURGE_LIGHTNING = "arc_surge_lightning";
|
||||||
@@ -126,7 +127,8 @@ public class StaticSummonBehaviors {
|
|||||||
BEHAVIORS.put(STARDUST_DRAGON_STAFF, StardustDragonStaff.SUMMON_BEHAVIOR);
|
BEHAVIORS.put(STARDUST_DRAGON_STAFF, StardustDragonStaff.SUMMON_BEHAVIOR);
|
||||||
BEHAVIORS.put(STARDUST_CELL_STAFF, StardustCellStaff.SUMMON_BEHAVIOR);
|
BEHAVIORS.put(STARDUST_CELL_STAFF, StardustCellStaff.SUMMON_BEHAVIOR);
|
||||||
BEHAVIORS.put(STARDUST_CELL_STUCK_PROJECTILE, StardustCellStaff.SUMMON_BEHAVIOR2);
|
BEHAVIORS.put(STARDUST_CELL_STUCK_PROJECTILE, StardustCellStaff.SUMMON_BEHAVIOR2);
|
||||||
BEHAVIORS.put(POSSESSION, Whip.SUMMON_BEHAVIOR);
|
BEHAVIORS.put(WHIP, Whip.SUMMON_BEHAVIOR);
|
||||||
|
BEHAVIORS.put(KALEIDOSCOPE, Whip.SUMMON_BEHAVIOR);
|
||||||
BEHAVIORS.put(POSSESSION_VISION, Possession.SUMMON_BEHAVIOR);
|
BEHAVIORS.put(POSSESSION_VISION, Possession.SUMMON_BEHAVIOR);
|
||||||
BEHAVIORS.put(NIGHTGLOW_PROJECTILE, Nightglow.SUMMON_BEHAVIOR);
|
BEHAVIORS.put(NIGHTGLOW_PROJECTILE, Nightglow.SUMMON_BEHAVIOR);
|
||||||
BEHAVIORS.put(ARC_SURGE_LIGHTNING, ArcSurge.SUMMON_BEHAVIOR);
|
BEHAVIORS.put(ARC_SURGE_LIGHTNING, ArcSurge.SUMMON_BEHAVIOR);
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import com.lzxnone.terraria.item.weapon.RangedWeapon;
|
|||||||
import com.lzxnone.terraria.item.weapon.Weapon;
|
import com.lzxnone.terraria.item.weapon.Weapon;
|
||||||
import com.lzxnone.terraria.item.weapon.melee.DevilsDevastation;
|
import com.lzxnone.terraria.item.weapon.melee.DevilsDevastation;
|
||||||
import com.lzxnone.terraria.item.weapon.summon.minion.StardustCellStaff;
|
import com.lzxnone.terraria.item.weapon.summon.minion.StardustCellStaff;
|
||||||
|
import com.lzxnone.terraria.item.weapon.summon.whip.Kaleidoscope;
|
||||||
import com.lzxnone.terraria.item.weapon.summon.whip.Possession;
|
import com.lzxnone.terraria.item.weapon.summon.whip.Possession;
|
||||||
import com.lzxnone.terraria.utils.ParticleUtil;
|
import com.lzxnone.terraria.utils.ParticleUtil;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
@@ -215,6 +216,8 @@ public class EntityEventHandler {
|
|||||||
public static void onLivingDamagePost(LivingDamageEvent.Post event) {
|
public static void onLivingDamagePost(LivingDamageEvent.Post event) {
|
||||||
//支配之鞭 预兆标记
|
//支配之鞭 预兆标记
|
||||||
Possession.markEvent(event);
|
Possession.markEvent(event);
|
||||||
|
//万花筒 标记攻击粒子
|
||||||
|
Kaleidoscope.markEvent(event);
|
||||||
|
|
||||||
if(event.getEntity() instanceof Player player) {
|
if(event.getEntity() instanceof Player player) {
|
||||||
//无敌时间
|
//无敌时间
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import com.lzxnone.terraria.item.weapon.ranged.gun.*;
|
|||||||
import com.lzxnone.terraria.item.weapon.summon.minion.StardustDragonStaff;
|
import com.lzxnone.terraria.item.weapon.summon.minion.StardustDragonStaff;
|
||||||
import com.lzxnone.terraria.item.weapon.summon.minion.StardustCellStaff;
|
import com.lzxnone.terraria.item.weapon.summon.minion.StardustCellStaff;
|
||||||
import com.lzxnone.terraria.item.weapon.summon.minion.Terraprisma;
|
import com.lzxnone.terraria.item.weapon.summon.minion.Terraprisma;
|
||||||
|
import com.lzxnone.terraria.item.weapon.summon.whip.Kaleidoscope;
|
||||||
import com.lzxnone.terraria.item.weapon.summon.whip.Possession;
|
import com.lzxnone.terraria.item.weapon.summon.whip.Possession;
|
||||||
import net.minecraft.world.item.BlockItem;
|
import net.minecraft.world.item.BlockItem;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
@@ -107,6 +108,7 @@ public class ModItems {
|
|||||||
public static final DeferredItem<Item> STARDUST_DRAGON_STAFF = ITEMS.register("stardust_dragon_staff", StardustDragonStaff::new);
|
public static final DeferredItem<Item> STARDUST_DRAGON_STAFF = ITEMS.register("stardust_dragon_staff", StardustDragonStaff::new);
|
||||||
public static final DeferredItem<Item> STARDUST_CELL_STAFF = ITEMS.register("stardust_cell_staff", StardustCellStaff::new);
|
public static final DeferredItem<Item> STARDUST_CELL_STAFF = ITEMS.register("stardust_cell_staff", StardustCellStaff::new);
|
||||||
public static final DeferredItem<Item> POSSESSION = ITEMS.register("possession", Possession::new);
|
public static final DeferredItem<Item> POSSESSION = ITEMS.register("possession", Possession::new);
|
||||||
|
public static final DeferredItem<Item> KALEIDOSCOPE = ITEMS.register("kaleidoscope", Kaleidoscope::new);
|
||||||
|
|
||||||
//近战武器 灾厄
|
//近战武器 灾厄
|
||||||
public static final DeferredItem<Item> DEVILS_DEVASTATION = ITEMS.register("devils_devastation", DevilsDevastation::new);
|
public static final DeferredItem<Item> DEVILS_DEVASTATION = ITEMS.register("devils_devastation", DevilsDevastation::new);
|
||||||
|
|||||||
@@ -59,9 +59,7 @@ public class AccessoryUtil {
|
|||||||
if(instance == null) return;
|
if(instance == null) return;
|
||||||
AttributeModifier existing = instance.getModifier(attributeModifier.id());
|
AttributeModifier existing = instance.getModifier(attributeModifier.id());
|
||||||
if(current.containsEntry(attribute, attributeModifier)) {
|
if(current.containsEntry(attribute, attributeModifier)) {
|
||||||
if(existing == null) {
|
if(existing == null || existing.amount() != attributeModifier.amount() || existing.operation() != attributeModifier.operation()) {
|
||||||
instance.addTransientModifier(attributeModifier);
|
|
||||||
}else if(existing.amount() != attributeModifier.amount() || existing.operation() != attributeModifier.operation()) {
|
|
||||||
instance.addOrUpdateTransientModifier(attributeModifier);
|
instance.addOrUpdateTransientModifier(attributeModifier);
|
||||||
}
|
}
|
||||||
}else if(existing != null) {
|
}else if(existing != null) {
|
||||||
@@ -371,6 +369,8 @@ public class AccessoryUtil {
|
|||||||
|
|
||||||
//为目标挂载护甲/护甲韧性减小修饰符(返回是否实际挂载了)
|
//为目标挂载护甲/护甲韧性减小修饰符(返回是否实际挂载了)
|
||||||
public static boolean applyTargetArmorModifiers(LivingEntity attacker, LivingEntity target) {
|
public static boolean applyTargetArmorModifiers(LivingEntity attacker, LivingEntity target) {
|
||||||
|
removeTargetArmorModifiers(target);
|
||||||
|
|
||||||
double[] armorReduction = {0.0D};
|
double[] armorReduction = {0.0D};
|
||||||
double[] toughnessReduction = {0.0D};
|
double[] toughnessReduction = {0.0D};
|
||||||
AccessoryUtil.forEachAccessory(attacker, (accessory, stack) -> {
|
AccessoryUtil.forEachAccessory(attacker, (accessory, stack) -> {
|
||||||
@@ -384,14 +384,14 @@ public class AccessoryUtil {
|
|||||||
if(armorReduction[0] > 0.0D) {
|
if(armorReduction[0] > 0.0D) {
|
||||||
AttributeInstance armor = target.getAttribute(Attributes.ARMOR);
|
AttributeInstance armor = target.getAttribute(Attributes.ARMOR);
|
||||||
if(armor != null) {
|
if(armor != null) {
|
||||||
armor.addTransientModifier(new AttributeModifier(TARGET_ARMOR_PIERCE_ID, -armorReduction[0], AttributeModifier.Operation.ADD_VALUE));
|
armor.addOrUpdateTransientModifier(new AttributeModifier(TARGET_ARMOR_PIERCE_ID, -armorReduction[0], AttributeModifier.Operation.ADD_VALUE));
|
||||||
applied = true;
|
applied = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(toughnessReduction[0] > 0.0D) {
|
if(toughnessReduction[0] > 0.0D) {
|
||||||
AttributeInstance toughness = target.getAttribute(Attributes.ARMOR_TOUGHNESS);
|
AttributeInstance toughness = target.getAttribute(Attributes.ARMOR_TOUGHNESS);
|
||||||
if(toughness != null) {
|
if(toughness != null) {
|
||||||
toughness.addTransientModifier(new AttributeModifier(TARGET_ARMOR_TOUGHNESS_PIERCE_ID, -toughnessReduction[0], AttributeModifier.Operation.ADD_VALUE));
|
toughness.addOrUpdateTransientModifier(new AttributeModifier(TARGET_ARMOR_TOUGHNESS_PIERCE_ID, -toughnessReduction[0], AttributeModifier.Operation.ADD_VALUE));
|
||||||
applied = true;
|
applied = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -613,4 +613,26 @@ public class AccessoryUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//鞭子标记槽位加成:累加所有饰品的槽位加成
|
||||||
|
public static int getWhipSlotBonus(LivingEntity entity) {
|
||||||
|
if(entity == null) return 0;
|
||||||
|
int[] bonus = {0};
|
||||||
|
AccessoryUtil.forEachAccessory(entity, (accessory, stack) -> {
|
||||||
|
if(accessory instanceof WhipSlotModifier modifier) {
|
||||||
|
bonus[0] += modifier.getWhipSlotBonus(stack, entity);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return bonus[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
//施加者最大鞭子标记数:基础 1 个槽位 + 饰品槽位加成
|
||||||
|
public static int getMaxWhipMarks(LivingEntity entity) {
|
||||||
|
return Math.max(1, 1 + getWhipSlotBonus(entity));
|
||||||
|
}
|
||||||
|
|
||||||
|
//最大鞭子标记槽位(别名)
|
||||||
|
public static int getMaxWhipSlots(LivingEntity entity) {
|
||||||
|
return getMaxWhipMarks(entity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.lzxnone.terraria.item.effect;
|
||||||
|
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
|
||||||
|
public interface WhipSlotModifier {
|
||||||
|
// 鞭子标记槽位加成
|
||||||
|
int getWhipSlotBonus(ItemStack stack, LivingEntity entity);
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ import com.lzxnone.terraria.entity.summon.StaticSummonBehaviors;
|
|||||||
import com.lzxnone.terraria.item.IItemWaveBehavior;
|
import com.lzxnone.terraria.item.IItemWaveBehavior;
|
||||||
import com.lzxnone.terraria.particle.DustParticleOptions;
|
import com.lzxnone.terraria.particle.DustParticleOptions;
|
||||||
import com.lzxnone.terraria.particle.ModParticles;
|
import com.lzxnone.terraria.particle.ModParticles;
|
||||||
|
import net.minecraft.core.particles.ParticleTypes;
|
||||||
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;
|
||||||
@@ -215,7 +216,12 @@ public class Volcano extends MeleeWeapon {
|
|||||||
ParticleUtil.addParticles(
|
ParticleUtil.addParticles(
|
||||||
(ServerLevel) target.level(), ModParticles.EXPLODE_PARTICLE.get(),
|
(ServerLevel) target.level(), ModParticles.EXPLODE_PARTICLE.get(),
|
||||||
new Vec3(target.getX(), target.getY() + target.getBbHeight() / 2.0, target.getZ()), new Vec3(0, 0, 0),
|
new Vec3(target.getX(), target.getY() + target.getBbHeight() / 2.0, target.getZ()), new Vec3(0, 0, 0),
|
||||||
0.2, (int) (30 + Math.random() * 30)
|
0.2, (int) (2 + Math.random() * 2)
|
||||||
|
);
|
||||||
|
ParticleUtil.addParticles(
|
||||||
|
(ServerLevel) target.level(), ParticleTypes.LAVA,
|
||||||
|
new Vec3(target.getX(), target.getY() + target.getBbHeight() / 2.0, target.getZ()), new Vec3(0.4, 0.4, 0.4),
|
||||||
|
0.2, (int) (12 + Math.random() * 8)
|
||||||
);
|
);
|
||||||
ParticleUtil.addParticles(
|
ParticleUtil.addParticles(
|
||||||
(ServerLevel) target.level(), PARTICLE,
|
(ServerLevel) target.level(), PARTICLE,
|
||||||
|
|||||||
@@ -0,0 +1,242 @@
|
|||||||
|
package com.lzxnone.terraria.item.weapon.summon.whip;
|
||||||
|
|
||||||
|
import com.lzxnone.terraria.LzxnoneTerraria;
|
||||||
|
import com.lzxnone.terraria.attachment.ModAttachments;
|
||||||
|
import com.lzxnone.terraria.attachment.TargetMarks;
|
||||||
|
import com.lzxnone.terraria.entity.summon.StaticSummon;
|
||||||
|
import com.lzxnone.terraria.entity.summon.StaticSummonBehaviors;
|
||||||
|
import com.lzxnone.terraria.item.weapon.summon.minion.MinionWeapon;
|
||||||
|
import com.lzxnone.terraria.item.weapon.summon.sentry.SentryWeapon;
|
||||||
|
import com.lzxnone.terraria.particle.DustParticleOptions;
|
||||||
|
import com.lzxnone.terraria.particle.ModParticles;
|
||||||
|
import com.lzxnone.terraria.particle.StarlightParticleOptions;
|
||||||
|
import com.lzxnone.terraria.ui.config.ConfigListItem;
|
||||||
|
import com.lzxnone.terraria.ui.config.IConfigData;
|
||||||
|
import com.lzxnone.terraria.ui.config.struct.ConfigDouble;
|
||||||
|
import com.lzxnone.terraria.ui.config.struct.ConfigFloat;
|
||||||
|
import com.lzxnone.terraria.ui.config.struct.ConfigInt;
|
||||||
|
import com.lzxnone.terraria.ui.config.struct.ConfigStruct;
|
||||||
|
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.InteractionHand;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.Rarity;
|
||||||
|
import net.minecraft.world.item.Tiers;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
import net.neoforged.neoforge.event.entity.living.LivingDamageEvent;
|
||||||
|
import org.joml.Vector3f;
|
||||||
|
|
||||||
|
public class Kaleidoscope extends Whip {
|
||||||
|
public static final StarlightParticleOptions STARLIGHT_PARTICLE = new StarlightParticleOptions(
|
||||||
|
0.8f,
|
||||||
|
0.5f,
|
||||||
|
25,
|
||||||
|
ModParticles.COLORFUL_PARTICLE.colors
|
||||||
|
);
|
||||||
|
public static final DustParticleOptions TIP_PARTICLE = new DustParticleOptions(
|
||||||
|
0.5f,
|
||||||
|
0.5f,
|
||||||
|
40,
|
||||||
|
true,
|
||||||
|
ModParticles.COLORFUL_PARTICLE.colors
|
||||||
|
);
|
||||||
|
private static final ConfigDouble RANGE = new ConfigDouble("weapon.kaleidoscope.range", "kaleidoscope_range", 32.0D, 1.0D, 256.0D);
|
||||||
|
private static final ConfigFloat DAMAGE = new ConfigFloat("weapon.kaleidoscope.damage", "kaleidoscope_damage", 15.0F, 0.0F, 8388600.0F);
|
||||||
|
private static final ConfigInt ROTATE = new ConfigInt("weapon.kaleidoscope.rotate", "kaleidoscope_rotate", 60, 0, 360);
|
||||||
|
private static final ConfigInt MARK_DURATION = new ConfigInt("weapon.kaleidoscope.mark_duration", "kaleidoscope_mark_duration", 80, 1, 72000);
|
||||||
|
private static final ConfigFloat TAG_DAMAGE = new ConfigFloat("weapon.kaleidoscope.tag_damage", "kaleidoscope_tag_damage", 2.0F, 0.0F, 8388600.0F);
|
||||||
|
private static final ConfigInt TAG_CRIT = new ConfigInt("weapon.kaleidoscope.tag_crit", "kaleidoscope_tag_crit", 10, 0, 100);
|
||||||
|
private static final ConfigFloat DAMAGE_FALLOFF = new ConfigFloat("weapon.kaleidoscope.damage_falloff", "kaleidoscope_damage_falloff", 0.8F, 0.0F, 1.0F);
|
||||||
|
|
||||||
|
public Kaleidoscope() {
|
||||||
|
super(Tiers.DIAMOND, new Item.Properties().stacksTo(1).rarity(Rarity.RARE));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected double getRange() {
|
||||||
|
return RANGE.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getTailRes(StaticSummon summon) {
|
||||||
|
return "lzxnoneterraria:textures/vfx/kaleidoscope_projectile_tail.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getBodyRes(StaticSummon summon) {
|
||||||
|
return "lzxnoneterraria:textures/vfx/kaleidoscope_projectile_body.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getHeadRes(StaticSummon summon) {
|
||||||
|
return "lzxnoneterraria:textures/vfx/kaleidoscope_projectile_head.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected float getTailRatio() {
|
||||||
|
return 0.06F;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected float getHeadRatio() {
|
||||||
|
return 0.06F;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected float getBodyUnitRatio() {
|
||||||
|
return 0.18F;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected float getDamage() {
|
||||||
|
return DAMAGE.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected float getDamageFalloff() {
|
||||||
|
return DAMAGE_FALLOFF.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getTagDamage() {
|
||||||
|
return TAG_DAMAGE.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getTagCrit() {
|
||||||
|
return TAG_CRIT.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getLifetime() {
|
||||||
|
return 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getRotateAngle() {
|
||||||
|
return ROTATE.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getBehavior() {
|
||||||
|
return StaticSummonBehaviors.KALEIDOSCOPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getUseTime() {
|
||||||
|
return 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getInvulnerableTime() {
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onHitTarget(StaticSummon summon, Entity target) {
|
||||||
|
if(summon.level() instanceof ServerLevel serverLevel) {
|
||||||
|
LivingEntity owner = summon.getOwner() instanceof LivingEntity living ? living : null;
|
||||||
|
applyMark(
|
||||||
|
target,
|
||||||
|
owner,
|
||||||
|
TargetMarks.KALEIDOSCOPE,
|
||||||
|
new TargetMarks.Mark(
|
||||||
|
serverLevel.getGameTime(),
|
||||||
|
MARK_DURATION.get(),
|
||||||
|
0,
|
||||||
|
owner == null ? null : owner.getUUID(),
|
||||||
|
summon.getEntityData().get(StaticSummon.STACK_SOURCE),
|
||||||
|
getTagDamage(),
|
||||||
|
getTagCrit()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
ParticleUtil.addParticles(
|
||||||
|
serverLevel, ModParticles.COLORFUL_PARTICLE,
|
||||||
|
target.getBoundingBox().getCenter(), new Vec3(0, 0, 0),
|
||||||
|
0.15, 8
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onTick(StaticSummon summon) {
|
||||||
|
if(summon.level() instanceof ServerLevel serverLevel) {
|
||||||
|
Vec3 tip = getTipPosition(summon);
|
||||||
|
ParticleUtil.addParticles(
|
||||||
|
serverLevel, TIP_PARTICLE,
|
||||||
|
tip, Vec3.ZERO,
|
||||||
|
0.02, 1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void shoot(Level level, Player player, InteractionHand hand, ItemStack stack) {
|
||||||
|
super.shoot(level, player, hand, stack);
|
||||||
|
if(level instanceof ServerLevel serverLevel) {
|
||||||
|
ParticleUtil.addParticles(
|
||||||
|
serverLevel, ModParticles.COLORFUL_PARTICLE,
|
||||||
|
player.getBoundingBox().getCenter(), Vec3.ZERO,
|
||||||
|
0.2, 8
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void markEvent(LivingDamageEvent.Post event) {
|
||||||
|
LivingEntity target = event.getEntity();
|
||||||
|
if(!(target.level() instanceof ServerLevel serverLevel)) return;
|
||||||
|
|
||||||
|
TargetMarks marks = target.getData(ModAttachments.TARGET_MARKS);
|
||||||
|
TargetMarks.Mark mark = marks.getMarks().get(TargetMarks.KALEIDOSCOPE);
|
||||||
|
if(mark == null) return;
|
||||||
|
|
||||||
|
if(mark.getDuration() > 0 && serverLevel.getGameTime() - mark.getStartTime() >= mark.getDuration()) {
|
||||||
|
TargetMarks copiedMarks = marks.copy();
|
||||||
|
copiedMarks.getMarks().remove(TargetMarks.KALEIDOSCOPE);
|
||||||
|
target.setData(ModAttachments.TARGET_MARKS, copiedMarks);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Entity damageEntity = event.getSource().getDirectEntity();
|
||||||
|
if(!(damageEntity instanceof StaticSummon summon)) return;
|
||||||
|
|
||||||
|
ItemStack sourceStack = summon.getEntityData().get(StaticSummon.STACK_SOURCE);
|
||||||
|
if(sourceStack.isEmpty() || !(sourceStack.getItem() instanceof MinionWeapon || sourceStack.getItem() instanceof SentryWeapon)) return;
|
||||||
|
|
||||||
|
ParticleUtil.addParticles(
|
||||||
|
serverLevel, STARLIGHT_PARTICLE,
|
||||||
|
target.getBoundingBox().getCenter(), Vec3.ZERO,
|
||||||
|
0.2, 6
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final IConfigData CONFIG_DATA = new IConfigData() {
|
||||||
|
@Override
|
||||||
|
public void onConfigLoad() {
|
||||||
|
ConfigStruct.loadAll(
|
||||||
|
RANGE,
|
||||||
|
DAMAGE,
|
||||||
|
ROTATE,
|
||||||
|
MARK_DURATION,
|
||||||
|
TAG_DAMAGE,
|
||||||
|
TAG_CRIT,
|
||||||
|
DAMAGE_FALLOFF
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static final ConfigListItem CONFIG_LIST_ITEM = new ConfigListItem(
|
||||||
|
"kaleidoscope",
|
||||||
|
ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "textures/item/kaleidoscope.png"),
|
||||||
|
Component.translatable("item.lzxnoneterraria.kaleidoscope"),
|
||||||
|
CONFIG_DATA
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -49,7 +49,7 @@ public class Possession extends Whip {
|
|||||||
private static final ConfigFloat BEAM_DAMAGE = new ConfigFloat("weapon.possession.beam_damage", "possession_beam_damage", 10.0F, 0.0F, 8388600.0F);
|
private static final ConfigFloat BEAM_DAMAGE = new ConfigFloat("weapon.possession.beam_damage", "possession_beam_damage", 10.0F, 0.0F, 8388600.0F);
|
||||||
private static final ConfigInt PROPHETIC_MARK_DURATION = new ConfigInt("weapon.possession.prophetic_mark_duration", "possession_prophetic_mark_duration", 80, 1, 72000);
|
private static final ConfigInt PROPHETIC_MARK_DURATION = new ConfigInt("weapon.possession.prophetic_mark_duration", "possession_prophetic_mark_duration", 80, 1, 72000);
|
||||||
public static final ConfigInt MAX_PROPHETIC_MARK_STACKS = new ConfigInt("weapon.possession.max_prophetic_mark_stacks", "possession_max_prophetic_mark_stacks", 3, 0, 1024);
|
public static final ConfigInt MAX_PROPHETIC_MARK_STACKS = new ConfigInt("weapon.possession.max_prophetic_mark_stacks", "possession_max_prophetic_mark_stacks", 3, 0, 1024);
|
||||||
private static final ConfigFloat TAG_DAMAGE = new ConfigFloat("weapon.possession.tag_damage", "possession_tag_damage", 25.0F, 0.0F, 8388600.0F);
|
private static final ConfigFloat TAG_DAMAGE = new ConfigFloat("weapon.possession.tag_damage", "possession_tag_damage", 2.5F, 0.0F, 8388600.0F);
|
||||||
private static final ConfigInt TAG_CRIT = new ConfigInt("weapon.possession.tag_crit", "possession_tag_crit", 10, 0, 100);
|
private static final ConfigInt TAG_CRIT = new ConfigInt("weapon.possession.tag_crit", "possession_tag_crit", 10, 0, 100);
|
||||||
private static final ConfigFloat DAMAGE_FALLOFF = new ConfigFloat("weapon.possession.damage_falloff", "possession_damage_falloff", 0.95F, 0.0F, 1.0F);
|
private static final ConfigFloat DAMAGE_FALLOFF = new ConfigFloat("weapon.possession.damage_falloff", "possession_damage_falloff", 0.95F, 0.0F, 1.0F);
|
||||||
|
|
||||||
@@ -103,12 +103,12 @@ public class Possession extends Whip {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected float getTagDamage() {
|
public float getTagDamage() {
|
||||||
return TAG_DAMAGE.get();
|
return TAG_DAMAGE.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getTagCrit() {
|
public int getTagCrit() {
|
||||||
return TAG_CRIT.get();
|
return TAG_CRIT.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,20 +208,21 @@ public class Possession extends Whip {
|
|||||||
@Override
|
@Override
|
||||||
protected void onHitTarget(StaticSummon summon, Entity target) {
|
protected void onHitTarget(StaticSummon summon, Entity target) {
|
||||||
if(summon.level() instanceof ServerLevel serverLevel) {
|
if(summon.level() instanceof ServerLevel serverLevel) {
|
||||||
TargetMarks marks = target.getData(ModAttachments.TARGET_MARKS).copy();
|
LivingEntity owner = summon.getOwner() instanceof LivingEntity living ? living : null;
|
||||||
marks.getMarks().put(
|
applyMark(
|
||||||
TargetMarks.PROPHETIC,
|
target,
|
||||||
|
owner,
|
||||||
|
TargetMarks.POSSESSION,
|
||||||
new TargetMarks.Mark(
|
new TargetMarks.Mark(
|
||||||
serverLevel.getGameTime(),
|
serverLevel.getGameTime(),
|
||||||
PROPHETIC_MARK_DURATION.get(),
|
PROPHETIC_MARK_DURATION.get(),
|
||||||
0,
|
0,
|
||||||
summon.getOwner() == null ? null : summon.getOwner().getUUID(),
|
owner == null ? null : owner.getUUID(),
|
||||||
summon.getEntityData().get(StaticSummon.STACK_SOURCE),
|
summon.getEntityData().get(StaticSummon.STACK_SOURCE),
|
||||||
getTagDamage(),
|
getTagDamage(),
|
||||||
getTagCrit()
|
getTagCrit()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
target.setData(ModAttachments.TARGET_MARKS, marks);
|
|
||||||
|
|
||||||
ParticleUtil.addParticles(
|
ParticleUtil.addParticles(
|
||||||
serverLevel, PARTICLE,
|
serverLevel, PARTICLE,
|
||||||
@@ -257,12 +258,12 @@ public class Possession extends Whip {
|
|||||||
if(!(target.level() instanceof ServerLevel serverLevel)) return;
|
if(!(target.level() instanceof ServerLevel serverLevel)) return;
|
||||||
|
|
||||||
TargetMarks marks = target.getData(ModAttachments.TARGET_MARKS);
|
TargetMarks marks = target.getData(ModAttachments.TARGET_MARKS);
|
||||||
TargetMarks.Mark mark = marks.getMarks().get(TargetMarks.PROPHETIC);
|
TargetMarks.Mark mark = marks.getMarks().get(TargetMarks.POSSESSION);
|
||||||
if(mark == null) return;
|
if(mark == null) return;
|
||||||
|
|
||||||
if(serverLevel.getGameTime() - mark.getStartTime() >= mark.getDuration()) {
|
if(serverLevel.getGameTime() - mark.getStartTime() >= mark.getDuration()) {
|
||||||
TargetMarks copiedMarks = marks.copy();
|
TargetMarks copiedMarks = marks.copy();
|
||||||
copiedMarks.getMarks().remove(TargetMarks.PROPHETIC);
|
copiedMarks.getMarks().remove(TargetMarks.POSSESSION);
|
||||||
target.setData(ModAttachments.TARGET_MARKS, copiedMarks);
|
target.setData(ModAttachments.TARGET_MARKS, copiedMarks);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -283,7 +284,7 @@ public class Possession extends Whip {
|
|||||||
TargetMarks copiedMarks = marks.copy();
|
TargetMarks copiedMarks = marks.copy();
|
||||||
TargetMarks.Mark copiedMark = mark.copy();
|
TargetMarks.Mark copiedMark = mark.copy();
|
||||||
copiedMark.setStacks(copiedMark.getStacks() + 1);
|
copiedMark.setStacks(copiedMark.getStacks() + 1);
|
||||||
copiedMarks.getMarks().put(TargetMarks.PROPHETIC, copiedMark);
|
copiedMarks.getMarks().put(TargetMarks.POSSESSION, copiedMark);
|
||||||
target.setData(ModAttachments.TARGET_MARKS, copiedMarks);
|
target.setData(ModAttachments.TARGET_MARKS, copiedMarks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ 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.accessory.AccessoryUtil;
|
||||||
import com.lzxnone.terraria.item.weapon.SummonWeapon;
|
import com.lzxnone.terraria.item.weapon.SummonWeapon;
|
||||||
import com.lzxnone.terraria.utils.DamageUtil;
|
import com.lzxnone.terraria.utils.DamageUtil;
|
||||||
import com.lzxnone.terraria.utils.MathUtil;
|
import com.lzxnone.terraria.utils.MathUtil;
|
||||||
@@ -60,9 +61,9 @@ public abstract class Whip extends SummonWeapon {
|
|||||||
|
|
||||||
protected abstract float getDamageFalloff();
|
protected abstract float getDamageFalloff();
|
||||||
|
|
||||||
protected abstract float getTagDamage();
|
public abstract float getTagDamage();
|
||||||
|
|
||||||
protected abstract int getTagCrit();
|
public abstract int getTagCrit();
|
||||||
|
|
||||||
public static float applyMarkDamageBonus(Entity target, float damage) {
|
public static float applyMarkDamageBonus(Entity target, float damage) {
|
||||||
if(target == null) return damage;
|
if(target == null) return damage;
|
||||||
@@ -94,6 +95,14 @@ public abstract class Whip extends SummonWeapon {
|
|||||||
return baseCrit + bonus;
|
return baseCrit + bonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void applyMark(Entity target, LivingEntity applier, String markId, TargetMarks.Mark newMark) {
|
||||||
|
if(target == null || target.level().isClientSide() || newMark == null || markId == null) return;
|
||||||
|
int maxSlots = AccessoryUtil.getMaxWhipMarks(applier);
|
||||||
|
TargetMarks marks = target.getData(ModAttachments.TARGET_MARKS).copy();
|
||||||
|
marks.addMark(markId, newMark, maxSlots, target.level().getGameTime());
|
||||||
|
target.setData(ModAttachments.TARGET_MARKS, marks);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getTooltipDamage(ItemStack weaponStack, LivingEntity entity) {
|
public float getTooltipDamage(ItemStack weaponStack, LivingEntity entity) {
|
||||||
float damage = entity instanceof Player player ? DamageUtil.applyPlayerDamageEffects(player, getDamage()) : getDamage();
|
float damage = entity instanceof Player player ? DamageUtil.applyPlayerDamageEffects(player, getDamage()) : getDamage();
|
||||||
@@ -126,6 +135,10 @@ public abstract class Whip extends SummonWeapon {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected String getBehavior() {
|
||||||
|
return StaticSummonBehaviors.WHIP;
|
||||||
|
}
|
||||||
|
|
||||||
protected void onTick(StaticSummon summon) {}
|
protected void onTick(StaticSummon summon) {}
|
||||||
|
|
||||||
protected void onHitTarget(StaticSummon summon, Entity target) {}
|
protected void onHitTarget(StaticSummon summon, Entity target) {}
|
||||||
@@ -233,7 +246,7 @@ public abstract class Whip extends SummonWeapon {
|
|||||||
player.getY() + dirs[0].y * offset.z + dirs[1].y * offset.y + dirs[2].y * offset.x,
|
player.getY() + dirs[0].y * offset.z + dirs[1].y * offset.y + dirs[2].y * offset.x,
|
||||||
player.getZ() + dirs[0].z * offset.z + dirs[1].z * offset.y + dirs[2].z * offset.x
|
player.getZ() + dirs[0].z * offset.z + dirs[1].z * offset.y + dirs[2].z * offset.x
|
||||||
));
|
));
|
||||||
summon.getEntityData().set(StaticSummon.BEHAVIOR, StaticSummonBehaviors.POSSESSION);
|
summon.getEntityData().set(StaticSummon.BEHAVIOR, getBehavior());
|
||||||
summon.getEntityData().set(StaticSummon.RENDER_MODE, "custom");
|
summon.getEntityData().set(StaticSummon.RENDER_MODE, "custom");
|
||||||
summon.getEntityData().set(StaticSummon.LIFETIME, getLifetime());
|
summon.getEntityData().set(StaticSummon.LIFETIME, getLifetime());
|
||||||
|
|
||||||
@@ -323,6 +336,29 @@ public abstract class Whip extends SummonWeapon {
|
|||||||
return sourceStack.getItem() instanceof Whip whip ? whip : null;
|
return sourceStack.getItem() instanceof Whip whip ? whip : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Vec3 getTipPosition(StaticSummon summon) {
|
||||||
|
Whip whip = getWhip(summon);
|
||||||
|
if(whip == null) return summon.position();
|
||||||
|
|
||||||
|
CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA);
|
||||||
|
int lifetime = Math.max(1, summon.getEntityData().get(StaticSummon.LIFETIME));
|
||||||
|
float progress = Mth.clamp(summon.getEntityData().get(StaticSummon.AGE) / (float)lifetime, 0.0F, 1.0F);
|
||||||
|
|
||||||
|
Vec3 hand = summon.position();
|
||||||
|
Vec3 dir = readVec3(customData, "dir", new Vec3(0.0D, 0.0D, 1.0D)).normalize();
|
||||||
|
Vec3 up = readVec3(customData, "up", new Vec3(0.0D, 1.0D, 0.0D)).normalize();
|
||||||
|
if(dir.lengthSqr() < 1.0E-6D) dir = new Vec3(0.0D, 0.0D, 1.0D);
|
||||||
|
if(up.lengthSqr() < 1.0E-6D) up = new Vec3(0.0D, 1.0D, 0.0D);
|
||||||
|
|
||||||
|
double range = customData.contains("range") ? customData.getDouble("range") : whip.getRange();
|
||||||
|
double height = customData.contains("height") ? customData.getDouble("height") : whip.getHeight();
|
||||||
|
double bend = customData.contains("bend") ? customData.getDouble("bend") : whip.getBend();
|
||||||
|
boolean reverse = customData.contains("reverse") && customData.getBoolean("reverse");
|
||||||
|
|
||||||
|
List<Vec3> points = computePoints(hand, dir, up, progress, range, height, bend, reverse, SEGMENTS);
|
||||||
|
return points.isEmpty() ? hand : points.get(points.size() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
private static boolean intersectsWhip(List<Vec3> points, Entity target) {
|
private static boolean intersectsWhip(List<Vec3> points, Entity target) {
|
||||||
AABB targetBox = target.getBoundingBox().inflate(HITBOX_INFLATE);
|
AABB targetBox = target.getBoundingBox().inflate(HITBOX_INFLATE);
|
||||||
for(int i = 0; i < points.size() - 1; i++) {
|
for(int i = 0; i < points.size() - 1; i++) {
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.lzxnone.terraria.mixin;
|
||||||
|
|
||||||
|
import com.lzxnone.terraria.client.item.melee.ClientDevilsDevastation;
|
||||||
|
import com.lzxnone.terraria.item.ModItems;
|
||||||
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.MultiBufferSource;
|
||||||
|
import net.minecraft.client.renderer.entity.ItemRenderer;
|
||||||
|
import net.minecraft.client.resources.model.BakedModel;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(ItemRenderer.class)
|
||||||
|
public class ItemRendererMixin {
|
||||||
|
@Inject(method = "render", at = @At("HEAD"))
|
||||||
|
private void onRenderEffect(ItemStack itemStack, ItemDisplayContext displayContext, boolean leftHand,
|
||||||
|
PoseStack poseStack, MultiBufferSource bufferSource, int combinedLight,
|
||||||
|
int combinedOverlay, BakedModel model, CallbackInfo ci) {
|
||||||
|
// 仅在手持视角下处理(第一人称或第三人称手持),忽略 GUI、掉落物、展示框等
|
||||||
|
boolean isFirstPerson = displayContext.firstPerson();
|
||||||
|
boolean isThirdPerson = displayContext == ItemDisplayContext.THIRD_PERSON_RIGHT_HAND ||
|
||||||
|
displayContext == ItemDisplayContext.THIRD_PERSON_LEFT_HAND;
|
||||||
|
if(!isFirstPerson && !isThirdPerson) return;
|
||||||
|
|
||||||
|
Minecraft mc = Minecraft.getInstance();
|
||||||
|
Player player = mc.player;
|
||||||
|
if(player == null || mc.level == null) return;
|
||||||
|
|
||||||
|
if(itemStack.is(ModItems.DEVILS_DEVASTATION.get())) {
|
||||||
|
ClientDevilsDevastation.renderEnergyParticles(poseStack, displayContext, player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -136,6 +136,7 @@ import com.lzxnone.terraria.item.weapon.ranged.gun.*;
|
|||||||
import com.lzxnone.terraria.item.weapon.summon.minion.StardustDragonStaff;
|
import com.lzxnone.terraria.item.weapon.summon.minion.StardustDragonStaff;
|
||||||
import com.lzxnone.terraria.item.weapon.summon.minion.StardustCellStaff;
|
import com.lzxnone.terraria.item.weapon.summon.minion.StardustCellStaff;
|
||||||
import com.lzxnone.terraria.item.weapon.summon.minion.Terraprisma;
|
import com.lzxnone.terraria.item.weapon.summon.minion.Terraprisma;
|
||||||
|
import com.lzxnone.terraria.item.weapon.summon.whip.Kaleidoscope;
|
||||||
import com.lzxnone.terraria.item.weapon.summon.whip.Possession;
|
import com.lzxnone.terraria.item.weapon.summon.whip.Possession;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -182,6 +183,7 @@ public class ConfigList {
|
|||||||
StardustDragonStaff.CONFIG_LIST_ITEM,
|
StardustDragonStaff.CONFIG_LIST_ITEM,
|
||||||
StardustCellStaff.CONFIG_LIST_ITEM,
|
StardustCellStaff.CONFIG_LIST_ITEM,
|
||||||
Possession.CONFIG_LIST_ITEM,
|
Possession.CONFIG_LIST_ITEM,
|
||||||
|
Kaleidoscope.CONFIG_LIST_ITEM,
|
||||||
LastPrism.CONFIG_LIST_ITEM,
|
LastPrism.CONFIG_LIST_ITEM,
|
||||||
BetsyWrath.CONFIG_LIST_ITEM,
|
BetsyWrath.CONFIG_LIST_ITEM,
|
||||||
LunarFlare.CONFIG_LIST_ITEM,
|
LunarFlare.CONFIG_LIST_ITEM,
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
"item.lzxnoneterraria.stardust_dragon_staff": "Stardust Dragon Staff",
|
"item.lzxnoneterraria.stardust_dragon_staff": "Stardust Dragon Staff",
|
||||||
"item.lzxnoneterraria.stardust_cell_staff": "Stardust Cell Staff",
|
"item.lzxnoneterraria.stardust_cell_staff": "Stardust Cell Staff",
|
||||||
"item.lzxnoneterraria.possession": "Possession",
|
"item.lzxnoneterraria.possession": "Possession",
|
||||||
|
"item.lzxnoneterraria.kaleidoscope": "Kaleidoscope",
|
||||||
"item.lzxnoneterraria.musket": "Musket",
|
"item.lzxnoneterraria.musket": "Musket",
|
||||||
"item.lzxnoneterraria.minishark": "Minishark",
|
"item.lzxnoneterraria.minishark": "Minishark",
|
||||||
"item.lzxnoneterraria.flintlock_pistol": "Flintlock Pistol",
|
"item.lzxnoneterraria.flintlock_pistol": "Flintlock Pistol",
|
||||||
@@ -238,6 +239,7 @@
|
|||||||
"tooltip.lzxnoneterraria.devils_devastation.0": "The perfect blade of the Underworld, wielding the power of Brimstone directly.",
|
"tooltip.lzxnoneterraria.devils_devastation.0": "The perfect blade of the Underworld, wielding the power of Brimstone directly.",
|
||||||
"tooltip.lzxnoneterraria.devils_devastation.1": "Humans understand this force as Havoc, the inevitable sundering of all order in fire.",
|
"tooltip.lzxnoneterraria.devils_devastation.1": "Humans understand this force as Havoc, the inevitable sundering of all order in fire.",
|
||||||
"tooltip.lzxnoneterraria.devils_devastation.2": "Perhaps this is why the Brimstone Elemental had strength unrivaled by her sisters.",
|
"tooltip.lzxnoneterraria.devils_devastation.2": "Perhaps this is why the Brimstone Elemental had strength unrivaled by her sisters.",
|
||||||
|
"tooltip.lzxnoneterraria.devils_devastation.kill_mode_key": "Press [%s] to enter Kill Mode",
|
||||||
"tooltip.lzxnoneterraria.mana_crystal": "Permanently increases maximum mana by 20, up to 200",
|
"tooltip.lzxnoneterraria.mana_crystal": "Permanently increases maximum mana by 20, up to 200",
|
||||||
"tooltip.lzxnoneterraria.summoning_potion": "Increases minion capacity by %s for 8 minutes",
|
"tooltip.lzxnoneterraria.summoning_potion": "Increases minion capacity by %s for 8 minutes",
|
||||||
"tooltip.lzxnoneterraria.mana_regeneration_potion": "Greatly increases mana regeneration rate for 8 minutes",
|
"tooltip.lzxnoneterraria.mana_regeneration_potion": "Greatly increases mana regeneration rate for 8 minutes",
|
||||||
@@ -397,6 +399,8 @@
|
|||||||
"tooltip.lzxnoneterraria.summon_damage_increase": "+%s%% summon damage",
|
"tooltip.lzxnoneterraria.summon_damage_increase": "+%s%% summon damage",
|
||||||
"tooltip.lzxnoneterraria.summon_damage_decrease": "-%s%% summon damage",
|
"tooltip.lzxnoneterraria.summon_damage_decrease": "-%s%% summon damage",
|
||||||
"tooltip.lzxnoneterraria.summon_weapon_damage": "Summon Damage: %s",
|
"tooltip.lzxnoneterraria.summon_weapon_damage": "Summon Damage: %s",
|
||||||
|
"tooltip.lzxnoneterraria.whip_tag_damage": "Tag Damage: %s",
|
||||||
|
"tooltip.lzxnoneterraria.whip_tag_crit": "Tag Critical Strike Chance: %s%%",
|
||||||
"tooltip.lzxnoneterraria.minion_knockback_increase": "+%s%% minion knockback",
|
"tooltip.lzxnoneterraria.minion_knockback_increase": "+%s%% minion knockback",
|
||||||
"tooltip.lzxnoneterraria.minion_knockback_decrease": "-%s%% minion knockback",
|
"tooltip.lzxnoneterraria.minion_knockback_decrease": "-%s%% minion knockback",
|
||||||
"tooltip.lzxnoneterraria.minion_slot_add": "+%s minion capacity",
|
"tooltip.lzxnoneterraria.minion_slot_add": "+%s minion capacity",
|
||||||
@@ -849,6 +853,20 @@
|
|||||||
"lzxnoneterraria.configuration.possession_tag_crit.tooltip": "Bonus critical strike chance percentage granted to minions and sentries striking marked enemies",
|
"lzxnoneterraria.configuration.possession_tag_crit.tooltip": "Bonus critical strike chance percentage granted to minions and sentries striking marked enemies",
|
||||||
"lzxnoneterraria.configuration.possession_damage_falloff": "Damage Falloff",
|
"lzxnoneterraria.configuration.possession_damage_falloff": "Damage Falloff",
|
||||||
"lzxnoneterraria.configuration.possession_damage_falloff.tooltip": "Multiplicative damage reduction factor for each subsequent enemy struck in a single swing (e.g. 0.95)",
|
"lzxnoneterraria.configuration.possession_damage_falloff.tooltip": "Multiplicative damage reduction factor for each subsequent enemy struck in a single swing (e.g. 0.95)",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_range": "Range",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_range.tooltip": "Maximum whip strike distance",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_damage": "Damage",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_damage.tooltip": "Damage dealt by the whip hit",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_rotate": "Rotate Angle",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_rotate.tooltip": "Random rotation angle range when casting the whip",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_mark_duration": "Mark Duration",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_mark_duration.tooltip": "Duration of the mark applied by Kaleidoscope, in ticks",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_tag_damage": "Tag Damage",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_tag_damage.tooltip": "Bonus flat damage granted to minions and sentries striking marked enemies",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_tag_crit": "Tag Critical Strike Chance",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_tag_crit.tooltip": "Bonus critical strike chance percentage granted to minions and sentries striking marked enemies",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_damage_falloff": "Damage Falloff",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_damage_falloff.tooltip": "Multiplicative damage reduction factor for each subsequent enemy struck in a single swing (e.g. 0.9)",
|
||||||
"lzxnoneterraria.configuration.last_prism_damage": "Damage",
|
"lzxnoneterraria.configuration.last_prism_damage": "Damage",
|
||||||
"lzxnoneterraria.configuration.last_prism_damage.tooltip": "Damage per hit",
|
"lzxnoneterraria.configuration.last_prism_damage.tooltip": "Damage per hit",
|
||||||
"lzxnoneterraria.configuration.last_prism_charge_time": "Charge Time",
|
"lzxnoneterraria.configuration.last_prism_charge_time": "Charge Time",
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
"item.lzxnoneterraria.stardust_dragon_staff": "星尘之龙法杖",
|
"item.lzxnoneterraria.stardust_dragon_staff": "星尘之龙法杖",
|
||||||
"item.lzxnoneterraria.stardust_cell_staff": "星尘细胞法杖",
|
"item.lzxnoneterraria.stardust_cell_staff": "星尘细胞法杖",
|
||||||
"item.lzxnoneterraria.possession": "支配之鞭",
|
"item.lzxnoneterraria.possession": "支配之鞭",
|
||||||
|
"item.lzxnoneterraria.kaleidoscope": "万花筒",
|
||||||
"item.lzxnoneterraria.musket": "火枪",
|
"item.lzxnoneterraria.musket": "火枪",
|
||||||
"item.lzxnoneterraria.minishark": "迷你鲨",
|
"item.lzxnoneterraria.minishark": "迷你鲨",
|
||||||
"item.lzxnoneterraria.flintlock_pistol": "燧发枪",
|
"item.lzxnoneterraria.flintlock_pistol": "燧发枪",
|
||||||
@@ -238,6 +239,7 @@
|
|||||||
"tooltip.lzxnoneterraria.devils_devastation.0": "完美的地狱之剑,直接掌握着硫磺火之力。",
|
"tooltip.lzxnoneterraria.devils_devastation.0": "完美的地狱之剑,直接掌握着硫磺火之力。",
|
||||||
"tooltip.lzxnoneterraria.devils_devastation.1": "人类将这种力量理解为浩劫,即一切秩序在火焰之中的必然毁灭。",
|
"tooltip.lzxnoneterraria.devils_devastation.1": "人类将这种力量理解为浩劫,即一切秩序在火焰之中的必然毁灭。",
|
||||||
"tooltip.lzxnoneterraria.devils_devastation.2": "或许这就是硫磺火元素掌握着她的姐妹所不能匹敌之力量的原因。",
|
"tooltip.lzxnoneterraria.devils_devastation.2": "或许这就是硫磺火元素掌握着她的姐妹所不能匹敌之力量的原因。",
|
||||||
|
"tooltip.lzxnoneterraria.devils_devastation.kill_mode_key": "按 [%s] 键进入杀戮模式",
|
||||||
"tooltip.lzxnoneterraria.mana_crystal": "永久提升 20 点最大魔力,最高提升到 200",
|
"tooltip.lzxnoneterraria.mana_crystal": "永久提升 20 点最大魔力,最高提升到 200",
|
||||||
"tooltip.lzxnoneterraria.summoning_potion": "增加 %s 个仆从栏位,持续 8 分钟",
|
"tooltip.lzxnoneterraria.summoning_potion": "增加 %s 个仆从栏位,持续 8 分钟",
|
||||||
"tooltip.lzxnoneterraria.mana_regeneration_potion": "极大提升魔力再生速度,持续 8 分钟",
|
"tooltip.lzxnoneterraria.mana_regeneration_potion": "极大提升魔力再生速度,持续 8 分钟",
|
||||||
@@ -397,6 +399,8 @@
|
|||||||
"tooltip.lzxnoneterraria.summon_damage_increase": "召唤伤害 +%s%%",
|
"tooltip.lzxnoneterraria.summon_damage_increase": "召唤伤害 +%s%%",
|
||||||
"tooltip.lzxnoneterraria.summon_damage_decrease": "召唤伤害 -%s%%",
|
"tooltip.lzxnoneterraria.summon_damage_decrease": "召唤伤害 -%s%%",
|
||||||
"tooltip.lzxnoneterraria.summon_weapon_damage": "召唤伤害: %s",
|
"tooltip.lzxnoneterraria.summon_weapon_damage": "召唤伤害: %s",
|
||||||
|
"tooltip.lzxnoneterraria.whip_tag_damage": "标记伤害: %s",
|
||||||
|
"tooltip.lzxnoneterraria.whip_tag_crit": "标记暴击率: %s%%",
|
||||||
"tooltip.lzxnoneterraria.minion_knockback_increase": "仆从击退 +%s%%",
|
"tooltip.lzxnoneterraria.minion_knockback_increase": "仆从击退 +%s%%",
|
||||||
"tooltip.lzxnoneterraria.minion_knockback_decrease": "仆从击退 -%s%%",
|
"tooltip.lzxnoneterraria.minion_knockback_decrease": "仆从击退 -%s%%",
|
||||||
"tooltip.lzxnoneterraria.minion_slot_add": "仆从数量上限 +%s",
|
"tooltip.lzxnoneterraria.minion_slot_add": "仆从数量上限 +%s",
|
||||||
@@ -849,6 +853,20 @@
|
|||||||
"lzxnoneterraria.configuration.possession_tag_crit.tooltip": "支配之鞭标记赋予仆从和哨兵的额外暴击率(百分比)",
|
"lzxnoneterraria.configuration.possession_tag_crit.tooltip": "支配之鞭标记赋予仆从和哨兵的额外暴击率(百分比)",
|
||||||
"lzxnoneterraria.configuration.possession_damage_falloff": "伤害衰减系数",
|
"lzxnoneterraria.configuration.possession_damage_falloff": "伤害衰减系数",
|
||||||
"lzxnoneterraria.configuration.possession_damage_falloff.tooltip": "每次命中一个敌人后,后续击中敌人所承受伤害的衰减比例(如 0.95)",
|
"lzxnoneterraria.configuration.possession_damage_falloff.tooltip": "每次命中一个敌人后,后续击中敌人所承受伤害的衰减比例(如 0.95)",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_range": "射程",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_range.tooltip": "鞭子最大抽打距离",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_damage": "伤害",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_damage.tooltip": "鞭子命中伤害",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_rotate": "旋转角度",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_rotate.tooltip": "鞭子甩出时的随机偏转角范围",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_mark_duration": "标记持续时间",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_mark_duration.tooltip": "万花筒标记持续时间(刻)",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_tag_damage": "标记伤害",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_tag_damage.tooltip": "万花筒标记赋予仆从和哨兵的额外基础点伤",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_tag_crit": "标记暴击率",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_tag_crit.tooltip": "万花筒标记赋予仆从和哨兵的额外暴击率(百分比)",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_damage_falloff": "伤害衰减系数",
|
||||||
|
"lzxnoneterraria.configuration.kaleidoscope_damage_falloff.tooltip": "每次命中一个敌人后,后续击中敌人所承受伤害的衰减比例(如 0.9)",
|
||||||
"lzxnoneterraria.configuration.last_prism_damage": "伤害",
|
"lzxnoneterraria.configuration.last_prism_damage": "伤害",
|
||||||
"lzxnoneterraria.configuration.last_prism_damage.tooltip": "每次命中伤害",
|
"lzxnoneterraria.configuration.last_prism_damage.tooltip": "每次命中伤害",
|
||||||
"lzxnoneterraria.configuration.last_prism_charge_time": "蓄力时间",
|
"lzxnoneterraria.configuration.last_prism_charge_time": "蓄力时间",
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "lzxnoneterraria:item/whip",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "lzxnoneterraria:item/kaleidoscope"
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 507 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 285 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 217 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 260 B |
@@ -12,6 +12,7 @@
|
|||||||
"GuiMixin",
|
"GuiMixin",
|
||||||
"HumanoidModelMixin",
|
"HumanoidModelMixin",
|
||||||
"ItemInHandRenderMixin",
|
"ItemInHandRenderMixin",
|
||||||
|
"ItemRendererMixin",
|
||||||
"UseSpeedMixin"
|
"UseSpeedMixin"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
|
|||||||
Reference in new issue
Block a user