From 9fcc77fdc81f74b4fb5082991b41bd38d9260693 Mon Sep 17 00:00:00 2001 From: LZX <1820455493@qq.com> Date: Mon, 3 Aug 2026 01:00:12 +0800 Subject: [PATCH] v1.6.1 --- .../java/com/lzxnone/terraria/ModSounds.java | 4 + .../terraria/attachment/ModAttachments.java | 6 + .../terraria/attachment/PlayerSummon.java | 171 +++++ .../terraria/attachment/TargetMarks.java | 112 ++++ .../com/lzxnone/terraria/block/ModBlocks.java | 14 + .../terraria/client/config/RenderConfigs.java | 62 ++ .../ClientStaticSummonRenderBehaviors.java | 2 + .../terraria/client/event/InputHandler.java | 7 +- .../client/event/ManaHudRenderer.java | 10 +- .../summon/ClientStardustDragonStaff.java | 72 +++ .../client/item/summon/ClientTerraprisma.java | 2 +- .../ModCreativeModeTabs.java | 13 +- .../entity/summon/StaticSummonBehaviors.java | 5 +- ...ntHandler.java => EntityEventHandler.java} | 12 +- .../com/lzxnone/terraria/item/ModItems.java | 8 +- .../terraria/item/accessory/ManaFlower.java | 45 +- .../terraria/item/accessory/NaturesGift.java | 45 +- .../terraria/item/weapon/MagicWeapon.java | 8 - .../terraria/item/weapon/RangedWeapon.java | 8 - .../terraria/item/weapon/SummonWeapon.java | 250 +------- .../lzxnone/terraria/item/weapon/Weapon.java | 12 + .../weapon/summon/minion/MinionWeapon.java | 234 +++++++ .../summon/minion/StardustDragonStaff.java | 599 ++++++++++++++++++ .../summon/{ => minion}/Terraprisma.java | 41 +- .../weapon/summon/sentry/SentryWeapon.java | 10 + .../item/weapon/summon/whip/Possession.java | 202 ++++-- .../terraria/mixin/HumanoidModelMixin.java | 2 + .../terraria/mixin/ItemInHandRenderMixin.java | 4 + .../network/handler/ClearSummonHandler.java | 34 +- .../ToggleSummonAttackModeHandler.java | 7 +- .../terraria/ui/config/ConfigList.java | 18 +- .../terraria/ui/config/ConfigScreen.java | 4 +- .../blockstates/stardust_dragon_body_a.json | 7 + .../blockstates/stardust_dragon_body_b.json | 7 + .../blockstates/stardust_dragon_head.json | 7 + .../blockstates/stardust_dragon_tail.json | 7 + .../assets/lzxnoneterraria/lang/en_us.json | 63 +- .../assets/lzxnoneterraria/lang/zh_cn.json | 63 +- .../assets/lzxnoneterraria/lss/config.lss | 10 +- .../models/block/stardust_dragon_body_a.json | 192 ++++++ .../models/block/stardust_dragon_body_b.json | 187 ++++++ .../models/block/stardust_dragon_head.json | 599 ++++++++++++++++++ .../models/block/stardust_dragon_tail.json | 235 +++++++ .../models/item/stardust_dragon.json | 450 +++++++++++++ .../models/item/stardust_dragon_body_a.json | 3 + .../models/item/stardust_dragon_body_b.json | 3 + .../models/item/stardust_dragon_head.json | 3 + .../models/item/stardust_dragon_staff.json | 6 + .../models/item/stardust_dragon_tail.json | 3 + .../assets/lzxnoneterraria/sounds.json | 3 + .../assets/lzxnoneterraria/sounds/summon.ogg | Bin 0 -> 18000 bytes .../textures/block/stardust_dragon.png | Bin 0 -> 219 bytes .../textures/block/stardust_dragon_body_a.png | Bin 0 -> 1319 bytes .../textures/block/stardust_dragon_body_b.png | Bin 0 -> 1319 bytes .../textures/block/stardust_dragon_head.png | Bin 0 -> 1799 bytes .../textures/block/stardust_dragon_tail.png | Bin 0 -> 1319 bytes .../textures/item/stardust_dragon_staff.png | Bin 0 -> 278 bytes .../textures/ui/nav_accessory_icon.png | Bin 0 -> 386 bytes .../textures/ui/nav_ammo_icon.png | Bin 0 -> 141 bytes .../textures/ui/nav_render_icon.png | Bin 0 -> 368 bytes .../assets/lzxnoneterraria/ui/config.xml | 14 + 61 files changed, 3500 insertions(+), 385 deletions(-) create mode 100644 src/main/java/com/lzxnone/terraria/attachment/PlayerSummon.java create mode 100644 src/main/java/com/lzxnone/terraria/attachment/TargetMarks.java create mode 100644 src/main/java/com/lzxnone/terraria/client/config/RenderConfigs.java create mode 100644 src/main/java/com/lzxnone/terraria/client/item/summon/ClientStardustDragonStaff.java rename src/main/java/com/lzxnone/terraria/event/{EntityDeathEventHandler.java => EntityEventHandler.java} (84%) create mode 100644 src/main/java/com/lzxnone/terraria/item/weapon/summon/minion/MinionWeapon.java create mode 100644 src/main/java/com/lzxnone/terraria/item/weapon/summon/minion/StardustDragonStaff.java rename src/main/java/com/lzxnone/terraria/item/weapon/summon/{ => minion}/Terraprisma.java (94%) create mode 100644 src/main/java/com/lzxnone/terraria/item/weapon/summon/sentry/SentryWeapon.java create mode 100644 src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_body_a.json create mode 100644 src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_body_b.json create mode 100644 src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_head.json create mode 100644 src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_tail.json create mode 100644 src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_body_a.json create mode 100644 src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_body_b.json create mode 100644 src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_head.json create mode 100644 src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_tail.json create mode 100644 src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon.json create mode 100644 src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_body_a.json create mode 100644 src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_body_b.json create mode 100644 src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_head.json create mode 100644 src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_staff.json create mode 100644 src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_tail.json create mode 100644 src/main/resources/assets/lzxnoneterraria/sounds/summon.ogg create mode 100644 src/main/resources/assets/lzxnoneterraria/textures/block/stardust_dragon.png create mode 100644 src/main/resources/assets/lzxnoneterraria/textures/block/stardust_dragon_body_a.png create mode 100644 src/main/resources/assets/lzxnoneterraria/textures/block/stardust_dragon_body_b.png create mode 100644 src/main/resources/assets/lzxnoneterraria/textures/block/stardust_dragon_head.png create mode 100644 src/main/resources/assets/lzxnoneterraria/textures/block/stardust_dragon_tail.png create mode 100644 src/main/resources/assets/lzxnoneterraria/textures/item/stardust_dragon_staff.png create mode 100644 src/main/resources/assets/lzxnoneterraria/textures/ui/nav_accessory_icon.png create mode 100644 src/main/resources/assets/lzxnoneterraria/textures/ui/nav_ammo_icon.png create mode 100644 src/main/resources/assets/lzxnoneterraria/textures/ui/nav_render_icon.png diff --git a/src/main/java/com/lzxnone/terraria/ModSounds.java b/src/main/java/com/lzxnone/terraria/ModSounds.java index 2b1349e..ff55247 100644 --- a/src/main/java/com/lzxnone/terraria/ModSounds.java +++ b/src/main/java/com/lzxnone/terraria/ModSounds.java @@ -51,6 +51,10 @@ public class ModSounds { SOUND_EVENTS.register("summon_terraprisma", () -> SoundEvent.createVariableRangeEvent( ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "summon_terraprisma"))); + public static final Supplier SUMMON = + SOUND_EVENTS.register("summon", + () -> SoundEvent.createVariableRangeEvent( + ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "summon"))); public static final Supplier WHIP_USE = SOUND_EVENTS.register("whip_use", () -> SoundEvent.createVariableRangeEvent( diff --git a/src/main/java/com/lzxnone/terraria/attachment/ModAttachments.java b/src/main/java/com/lzxnone/terraria/attachment/ModAttachments.java index 351607e..12e6c4c 100644 --- a/src/main/java/com/lzxnone/terraria/attachment/ModAttachments.java +++ b/src/main/java/com/lzxnone/terraria/attachment/ModAttachments.java @@ -30,7 +30,13 @@ public class ModAttachments { public static final Supplier> SUMMON_ATTACK_MODE = ATTACHMENT_TYPES.register("summon_attack_mode", () -> AttachmentType.builder(() -> 2).serialize(Codec.INT).build()); + public static final Supplier> PLAYER_SUMMON = + ATTACHMENT_TYPES.register("player_summon", () -> AttachmentType.builder(PlayerSummon::new).serialize(PlayerSummon.CODEC).copyOnDeath().build()); + public static final Supplier> PLAYER_MANA = ATTACHMENT_TYPES.register("player_mana", () -> AttachmentType.builder(PlayerMana::new).serialize(PlayerMana.CODEC).copyOnDeath().build()); + public static final Supplier> TARGET_MARKS = + ATTACHMENT_TYPES.register("target_marks", () -> AttachmentType.builder((Supplier) TargetMarks::new).serialize(TargetMarks.CODEC).build()); + } diff --git a/src/main/java/com/lzxnone/terraria/attachment/PlayerSummon.java b/src/main/java/com/lzxnone/terraria/attachment/PlayerSummon.java new file mode 100644 index 0000000..4db968f --- /dev/null +++ b/src/main/java/com/lzxnone/terraria/attachment/PlayerSummon.java @@ -0,0 +1,171 @@ +package com.lzxnone.terraria.attachment; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; + +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.UUID; + +public class PlayerSummon { + private static final Codec UUID_CODEC = Codec.STRING.xmap(UUID::fromString, UUID::toString); + private static final Codec> SUMMON_SLOTS_CODEC = Codec.list(SummonSlot.CODEC); + private static final Codec STATE_CODEC = Codec.STRING.xmap(State::byName, State::getSerializedName); + + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + SUMMON_SLOTS_CODEC.optionalFieldOf("minions", List.of()).forGetter(PlayerSummon::getMinionSlots), + STATE_CODEC.optionalFieldOf("minion_state", State.AGGRESSIVE).forGetter(PlayerSummon::getMinionState), + SUMMON_SLOTS_CODEC.optionalFieldOf("sentries", List.of()).forGetter(PlayerSummon::getSentrySlots), + STATE_CODEC.optionalFieldOf("sentry_state", State.AGGRESSIVE).forGetter(PlayerSummon::getSentryState) + ).apply(instance, PlayerSummon::new)); + + private List minionSlots; + private State minionState; + private List sentrySlots; + private State sentryState; + + public PlayerSummon() { + this(List.of(), State.AGGRESSIVE, List.of(), State.AGGRESSIVE); + } + + public PlayerSummon(List minionSlots, State minionState, List sentrySlots, State sentryState) { + this.minionSlots = copySlots(minionSlots); + this.minionState = minionState == null ? State.AGGRESSIVE : minionState; + this.sentrySlots = copySlots(sentrySlots); + this.sentryState = sentryState == null ? State.AGGRESSIVE : sentryState; + } + + public List getMinionSlots() { + return minionSlots; + } + + public void setMinionSlots(List minionSlots) { + this.minionSlots = copySlots(minionSlots); + } + + public State getMinionState() { + return minionState; + } + + public void setMinionState(State minionState) { + this.minionState = minionState == null ? State.AGGRESSIVE : minionState; + } + + public State cycleMinionState() { + State[] states = State.values(); + minionState = states[(minionState.ordinal() + 1) % states.length]; + return minionState; + } + + public List getSentrySlots() { + return sentrySlots; + } + + public void setSentrySlots(List sentrySlots) { + this.sentrySlots = copySlots(sentrySlots); + } + + public State getSentryState() { + return sentryState; + } + + public void setSentryState(State sentryState) { + this.sentryState = sentryState == null ? State.AGGRESSIVE : sentryState; + } + + public State cycleSentryState() { + State[] states = State.values(); + sentryState = states[(sentryState.ordinal() + 1) % states.length]; + return sentryState; + } + + private static List copySlots(List slots) { + List copied = new ArrayList<>(); + for(SummonSlot slot : slots) { + if(slot == null || slot.getSummons().isEmpty()) continue; + copied.add(slot.copy()); + } + return copied; + } + + public static class SummonSlot { + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + Codec.STRING.optionalFieldOf("id", "").forGetter(SummonSlot::getId), + Codec.list(UUID_CODEC).optionalFieldOf("summons", List.of()).forGetter(SummonSlot::getSummons) + ).apply(instance, SummonSlot::new)); + + private String id; + private final List summons; + + public SummonSlot(String id, List summons) { + this.id = id == null ? "" : id; + this.summons = summons == null ? new ArrayList<>() : new ArrayList<>(summons); + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id == null ? "" : id; + } + + public List getSummons() { + return summons; + } + + public void addSummon(UUID uuid) { + if(uuid != null) summons.add(uuid); + } + + public void removeSummon(UUID uuid) { + summons.remove(uuid); + } + + public void setSummons(List summons) { + this.summons.clear(); + if(summons != null) this.summons.addAll(summons); + } + + public SummonSlot copy() { + return new SummonSlot(id, summons); + } + } + + public enum State { + PASSIVE("message.lzxnoneterraria.summon_attack_mode.passive", ChatFormatting.GREEN), + NEUTRAL("message.lzxnoneterraria.summon_attack_mode.neutral", ChatFormatting.YELLOW), + AGGRESSIVE("message.lzxnoneterraria.summon_attack_mode.aggressive", ChatFormatting.RED), + ATTACK_TARGET("message.lzxnoneterraria.summon_attack_mode.attack_target", ChatFormatting.BLUE); + + private final String translationKey; + private final ChatFormatting color; + + State(String translationKey, ChatFormatting color) { + this.translationKey = translationKey; + this.color = color; + } + + public String getSerializedName() { + return name().toLowerCase(Locale.ROOT); + } + + public Component getDisplayName() { + return Component.translatable(translationKey); + } + + public ChatFormatting getColor() { + return color; + } + + private static State byName(String name) { + for(State state : values()) { + if(state.getSerializedName().equals(name)) return state; + } + return AGGRESSIVE; + } + } +} diff --git a/src/main/java/com/lzxnone/terraria/attachment/TargetMarks.java b/src/main/java/com/lzxnone/terraria/attachment/TargetMarks.java new file mode 100644 index 0000000..289b513 --- /dev/null +++ b/src/main/java/com/lzxnone/terraria/attachment/TargetMarks.java @@ -0,0 +1,112 @@ +package com.lzxnone.terraria.attachment; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.world.item.ItemStack; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +public class TargetMarks { + public static final String PROPHETIC = "prophetic"; + private static final Codec UUID_CODEC = Codec.STRING.xmap(UUID::fromString, UUID::toString); + private static final UUID EMPTY_OWNER = new UUID(0L, 0L); + + public static final Codec CODEC = Codec.unboundedMap(Codec.STRING, Mark.CODEC).xmap(TargetMarks::new, TargetMarks::getMarks); + + private final Map marks; + + public TargetMarks() { + this(Map.of()); + } + + public TargetMarks(Map marks) { + this.marks = new HashMap<>(); + if(marks != null) this.marks.putAll(marks); + } + + public Map getMarks() { + return marks; + } + + public TargetMarks copy() { + return new TargetMarks(marks); + } + + public static class Mark { + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + Codec.LONG.optionalFieldOf("start_time", 0L).forGetter(Mark::getStartTime), + Codec.INT.optionalFieldOf("duration", 0).forGetter(Mark::getDuration), + Codec.INT.optionalFieldOf("stacks", 0).forGetter(Mark::getStacks), + UUID_CODEC.optionalFieldOf("owner", EMPTY_OWNER).forGetter(Mark::getOwner), + ItemStack.OPTIONAL_CODEC.optionalFieldOf("stack", ItemStack.EMPTY).forGetter(Mark::getStack) + ).apply(instance, Mark::new)); + + private long startTime; + private int duration; + private int stacks; + private UUID owner; + private ItemStack stack; + + public Mark() { + this(0L, 0, 0, EMPTY_OWNER, ItemStack.EMPTY); + } + + public Mark(long startTime, int duration, int stacks) { + this(startTime, duration, stacks, EMPTY_OWNER, ItemStack.EMPTY); + } + + public Mark(long startTime, int duration, int stacks, UUID owner, ItemStack stack) { + this.startTime = startTime; + this.duration = duration; + this.stacks = stacks; + this.owner = owner == null ? EMPTY_OWNER : owner; + this.stack = stack == null ? ItemStack.EMPTY : stack.copy(); + } + + public long getStartTime() { + return startTime; + } + + public void setStartTime(long startTime) { + this.startTime = startTime; + } + + public int getDuration() { + return duration; + } + + public void setDuration(int duration) { + this.duration = duration; + } + + public int getStacks() { + return stacks; + } + + public void setStacks(int stacks) { + this.stacks = stacks; + } + + public UUID getOwner() { + return owner; + } + + public void setOwner(UUID owner) { + this.owner = owner == null ? EMPTY_OWNER : owner; + } + + public ItemStack getStack() { + return stack; + } + + public void setStack(ItemStack stack) { + this.stack = stack == null ? ItemStack.EMPTY : stack.copy(); + } + + public Mark copy() { + return new Mark(startTime, duration, stacks, owner, stack); + } + } +} diff --git a/src/main/java/com/lzxnone/terraria/block/ModBlocks.java b/src/main/java/com/lzxnone/terraria/block/ModBlocks.java index 42a5304..b6b834a 100644 --- a/src/main/java/com/lzxnone/terraria/block/ModBlocks.java +++ b/src/main/java/com/lzxnone/terraria/block/ModBlocks.java @@ -16,4 +16,18 @@ public class ModBlocks { .noOcclusion() .sound(SoundType.GLASS) )); + + public static final DeferredBlock STARDUST_DRAGON_HEAD = registerModelBlock("stardust_dragon_head"); + public static final DeferredBlock STARDUST_DRAGON_BODY_A = registerModelBlock("stardust_dragon_body_a"); + public static final DeferredBlock STARDUST_DRAGON_BODY_B = registerModelBlock("stardust_dragon_body_b"); + public static final DeferredBlock STARDUST_DRAGON_TAIL = registerModelBlock("stardust_dragon_tail"); + + private static DeferredBlock registerModelBlock(String name) { + return BLOCKS.register(name, () -> new Block( + BlockBehaviour.Properties.of() + .strength(1.0F) + .noOcclusion() + .sound(SoundType.GLASS) + )); + } } diff --git a/src/main/java/com/lzxnone/terraria/client/config/RenderConfigs.java b/src/main/java/com/lzxnone/terraria/client/config/RenderConfigs.java new file mode 100644 index 0000000..5a7936b --- /dev/null +++ b/src/main/java/com/lzxnone/terraria/client/config/RenderConfigs.java @@ -0,0 +1,62 @@ +package com.lzxnone.terraria.client.config; + +import com.lzxnone.terraria.LzxnoneTerraria; +import com.lzxnone.terraria.ui.config.ConfigListItem; +import com.lzxnone.terraria.ui.config.IConfigData; +import com.lzxnone.terraria.ui.config.struct.ConfigBoolean; +import com.lzxnone.terraria.ui.config.struct.ConfigInt; +import com.lzxnone.terraria.ui.config.struct.ConfigStruct; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; + +public class RenderConfigs { + public static final ConfigBoolean ENABLE_RENDER_HAND = new ConfigBoolean( + "render.mixin.render_hand", + "render_mixin_render_hand", + true + ); + public static final ConfigBoolean ENABLE_RENDER_ITEM = new ConfigBoolean( + "render.mixin.render_item", + "render_mixin_render_item", + true + ); + public static final ConfigBoolean ENABLE_SETUP_ANIM = new ConfigBoolean( + "render.mixin.setup_anim", + "render_mixin_setup_anim", + true + ); + public static final ConfigInt MANA_BAR_X = new ConfigInt( + "render.mana_bar.x", + "render_mana_bar_x", + 10, + -4096, + 4096 + ); + public static final ConfigInt MANA_BAR_Y = new ConfigInt( + "render.mana_bar.y", + "render_mana_bar_y", + 28, + -4096, + 4096 + ); + + public static final IConfigData CONFIG_DATA = new IConfigData() { + @Override + public void onConfigLoad() { + ConfigStruct.loadAll( + ENABLE_RENDER_HAND, + ENABLE_RENDER_ITEM, + ENABLE_SETUP_ANIM, + MANA_BAR_X, + MANA_BAR_Y + ); + } + }; + + public static final ConfigListItem CONFIG_LIST_ITEM = new ConfigListItem( + "render", + ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "textures/ui/nav_render_icon.png"), + Component.translatable("lzxnoneterraria.configuration.render_settings"), + CONFIG_DATA + ); +} diff --git a/src/main/java/com/lzxnone/terraria/client/entity/summon/ClientStaticSummonRenderBehaviors.java b/src/main/java/com/lzxnone/terraria/client/entity/summon/ClientStaticSummonRenderBehaviors.java index 1392cc0..ed89576 100644 --- a/src/main/java/com/lzxnone/terraria/client/entity/summon/ClientStaticSummonRenderBehaviors.java +++ b/src/main/java/com/lzxnone/terraria/client/entity/summon/ClientStaticSummonRenderBehaviors.java @@ -14,6 +14,7 @@ import com.lzxnone.terraria.client.item.melee.ClientTrueNightsEdge; import com.lzxnone.terraria.client.item.ranged.ClientFlamethrower; import com.lzxnone.terraria.client.item.ranged.ClientStarCannon; import com.lzxnone.terraria.client.item.ranged.ClientSuperStarShooter; +import com.lzxnone.terraria.client.item.summon.ClientStardustDragonStaff; import com.lzxnone.terraria.client.item.summon.ClientTerraprisma; import com.lzxnone.terraria.client.item.summon.ClientWhip; import com.lzxnone.terraria.entity.summon.StaticSummonBehaviors; @@ -49,6 +50,7 @@ public class ClientStaticSummonRenderBehaviors { BEHAVIORS.put(StaticSummonBehaviors.TERRAPRISMA, ClientTerraprisma.SUMMON_BEHAVIOR); BEHAVIORS.put(StaticSummonBehaviors.POSSESSION, ClientWhip.SUMMON_BEHAVIOR); BEHAVIORS.put(StaticSummonBehaviors.POSSESSION_VISION, DEFAULT_BEHAVIOR); + BEHAVIORS.put(StaticSummonBehaviors.STARDUST_DRAGON, ClientStardustDragonStaff.SUMMON_BEHAVIOR); BEHAVIORS.put(StaticSummonBehaviors.MUSKET_BALL, ClientBulletAmmo.SUMMON_BEHAVIOR); BEHAVIORS.put(StaticSummonBehaviors.METEOR_SHOT, ClientBulletAmmo.SUMMON_BEHAVIOR); diff --git a/src/main/java/com/lzxnone/terraria/client/event/InputHandler.java b/src/main/java/com/lzxnone/terraria/client/event/InputHandler.java index 8c79531..bd2f758 100644 --- a/src/main/java/com/lzxnone/terraria/client/event/InputHandler.java +++ b/src/main/java/com/lzxnone/terraria/client/event/InputHandler.java @@ -4,12 +4,12 @@ import com.lzxnone.terraria.LzxnoneTerraria; import com.lzxnone.terraria.ModKeyBindings; import com.lzxnone.terraria.effect.ModEffects; import com.lzxnone.terraria.item.ModItems; -import com.lzxnone.terraria.item.weapon.SummonWeapon; import com.lzxnone.terraria.item.weapon.melee.DevilsDevastation; import com.lzxnone.terraria.item.weapon.melee.FirstFractal; import com.lzxnone.terraria.item.weapon.melee.TrueCopperShortsword; import com.lzxnone.terraria.item.weapon.melee.Zenith; import com.lzxnone.terraria.item.weapon.ranged.gun.SniperRifle; +import com.lzxnone.terraria.item.weapon.summon.minion.MinionWeapon; import com.lzxnone.terraria.network.payload.ClearSummonPayload; import com.lzxnone.terraria.network.payload.DevilsDevastationKillModePayload; import com.lzxnone.terraria.network.payload.FirstFractalScrollPayload; @@ -19,6 +19,7 @@ import com.lzxnone.terraria.utils.SoundUtil; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; import net.minecraft.client.player.LocalPlayer; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.component.DataComponents; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; @@ -141,8 +142,8 @@ public class InputHandler { if(mc.player != null) { Player player = mc.player; ItemStack stack = player.getMainHandItem(); - if(stack.getItem() instanceof SummonWeapon weapon) { - PacketDistributor.sendToServer(new ClearSummonPayload(weapon.getSummonId())); + if(stack.getItem() instanceof MinionWeapon) { + PacketDistributor.sendToServer(new ClearSummonPayload(BuiltInRegistries.ITEM.getKey(stack.getItem()).getPath())); } } } diff --git a/src/main/java/com/lzxnone/terraria/client/event/ManaHudRenderer.java b/src/main/java/com/lzxnone/terraria/client/event/ManaHudRenderer.java index 2860bee..dde8b67 100644 --- a/src/main/java/com/lzxnone/terraria/client/event/ManaHudRenderer.java +++ b/src/main/java/com/lzxnone/terraria/client/event/ManaHudRenderer.java @@ -3,6 +3,7 @@ package com.lzxnone.terraria.client.event; import com.lzxnone.terraria.LzxnoneTerraria; import com.lzxnone.terraria.attachment.ModAttachments; import com.lzxnone.terraria.attachment.PlayerMana; +import com.lzxnone.terraria.client.config.RenderConfigs; import com.mojang.blaze3d.systems.RenderSystem; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; @@ -22,11 +23,8 @@ public class ManaHudRenderer { private static final int SLOT_WIDTH = 8; private static final int SLOT_HEIGHT = 9; private static final int SLOT_GAP = 1; - private static final int LEFT_MARGIN = 10; - private static final int TOP_MARGIN = 28; - public static int manaBarX; - public static int manaBarY = TOP_MARGIN; + public static int manaBarY = RenderConfigs.MANA_BAR_Y.get(); public static void render(GuiGraphics guiGraphics, LocalPlayer player) { PlayerMana mana = player.getData(ModAttachments.PLAYER_MANA); @@ -38,8 +36,8 @@ public class ManaHudRenderer { int currentMana = Mth.clamp(mana.getMana(), 0, maxMana); if(currentMana >= maxMana) return; - manaBarX = LEFT_MARGIN; - manaBarY = TOP_MARGIN; + manaBarX = RenderConfigs.MANA_BAR_X.get(); + manaBarY = RenderConfigs.MANA_BAR_Y.get(); RenderSystem.enableBlend(); RenderSystem.defaultBlendFunc(); diff --git a/src/main/java/com/lzxnone/terraria/client/item/summon/ClientStardustDragonStaff.java b/src/main/java/com/lzxnone/terraria/client/item/summon/ClientStardustDragonStaff.java new file mode 100644 index 0000000..17b285d --- /dev/null +++ b/src/main/java/com/lzxnone/terraria/client/item/summon/ClientStardustDragonStaff.java @@ -0,0 +1,72 @@ +package com.lzxnone.terraria.client.item.summon; + +import com.lzxnone.terraria.block.ModBlocks; +import com.lzxnone.terraria.client.entity.summon.IStaticSummonRenderBehavior; +import com.lzxnone.terraria.entity.TintedVertexConsumer; +import com.lzxnone.terraria.entity.summon.StaticSummon; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.LightTexture; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.texture.OverlayTexture; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.neoforge.client.model.data.ModelData; + +public class ClientStardustDragonStaff { + public static final IStaticSummonRenderBehavior SUMMON_BEHAVIOR = new IStaticSummonRenderBehavior() { + @Override + public void render(Entity entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { + if(!(entity instanceof StaticSummon summon)) return; + + CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA); + BlockState blockState = getSegmentBlockState(customData); + if(blockState == null) return; + + poseStack.pushPose(); + + poseStack.mulPose(Axis.YP.rotationDegrees(-Mth.lerp(partialTick, summon.yRotO, summon.getYRot()))); + poseStack.mulPose(Axis.XP.rotationDegrees(Mth.lerp(partialTick, summon.xRotO, summon.getXRot()))); + + poseStack.scale( + summon.getEntityData().get(StaticSummon.SCALE_X), + summon.getEntityData().get(StaticSummon.SCALE_Y), + summon.getEntityData().get(StaticSummon.SCALE_Z) + ); + + if(customData.contains("head")) poseStack.translate(0, 0.1, 0); + + poseStack.translate(-0.5D, -0.5D, -0.5D); + + Minecraft.getInstance().getBlockRenderer().renderSingleBlock( + blockState, + poseStack, + renderType -> { + VertexConsumer vertexConsumer = bufferSource.getBuffer(renderType); + return new TintedVertexConsumer(vertexConsumer, + summon.getEntityData().get(StaticSummon.COLOR_R), + summon.getEntityData().get(StaticSummon.COLOR_G), + summon.getEntityData().get(StaticSummon.COLOR_B), + summon.getEntityData().get(StaticSummon.COLOR_A)); + }, + summon.getEntityData().get(StaticSummon.GLOW) ? LightTexture.FULL_BRIGHT : packedLight, + OverlayTexture.NO_OVERLAY, + ModelData.EMPTY, + null + ); + poseStack.popPose(); + } + }; + + private static BlockState getSegmentBlockState(CompoundTag customData) { + if(customData.contains("head")) return ModBlocks.STARDUST_DRAGON_HEAD.get().defaultBlockState(); + if(customData.contains("bodyA")) return ModBlocks.STARDUST_DRAGON_BODY_A.get().defaultBlockState(); + if(customData.contains("bodyB")) return ModBlocks.STARDUST_DRAGON_BODY_B.get().defaultBlockState(); + if(customData.contains("tail")) return ModBlocks.STARDUST_DRAGON_TAIL.get().defaultBlockState(); + return null; + } +} diff --git a/src/main/java/com/lzxnone/terraria/client/item/summon/ClientTerraprisma.java b/src/main/java/com/lzxnone/terraria/client/item/summon/ClientTerraprisma.java index 3d2a46a..1b66720 100644 --- a/src/main/java/com/lzxnone/terraria/client/item/summon/ClientTerraprisma.java +++ b/src/main/java/com/lzxnone/terraria/client/item/summon/ClientTerraprisma.java @@ -19,7 +19,7 @@ import net.minecraft.world.inventory.InventoryMenu; import net.minecraft.world.item.*; import net.minecraft.world.phys.Vec3; import com.lzxnone.terraria.client.entity.summon.IStaticSummonRenderBehavior; -import static com.lzxnone.terraria.item.weapon.summon.Terraprisma.*; +import static com.lzxnone.terraria.item.weapon.summon.minion.Terraprisma.*; public class ClientTerraprisma { public static final IStaticSummonRenderBehavior SUMMON_BEHAVIOR = new IStaticSummonRenderBehavior() { diff --git a/src/main/java/com/lzxnone/terraria/creative_mode_tab/ModCreativeModeTabs.java b/src/main/java/com/lzxnone/terraria/creative_mode_tab/ModCreativeModeTabs.java index 1c59ed8..1776b21 100644 --- a/src/main/java/com/lzxnone/terraria/creative_mode_tab/ModCreativeModeTabs.java +++ b/src/main/java/com/lzxnone/terraria/creative_mode_tab/ModCreativeModeTabs.java @@ -64,6 +64,17 @@ public class ModCreativeModeTabs { output.accept(ModItems.MANA_FLOWER.get()); }).build()); + public static final DeferredHolder BLOCK_TAB = CREATIVE_MODE_TABS.register("lzxnoneterraria_block_0", () -> CreativeModeTab.builder() + .title(Component.translatable("itemGroup.lzxnoneterraria.block")) + .icon(() -> ModItems.VISION.get().getDefaultInstance()) + .displayItems((parameters, output) -> { + output.accept(ModItems.VISION.get()); + output.accept(ModItems.STARDUST_DRAGON_HEAD.get()); + output.accept(ModItems.STARDUST_DRAGON_BODY_A.get()); + output.accept(ModItems.STARDUST_DRAGON_BODY_B.get()); + output.accept(ModItems.STARDUST_DRAGON_TAIL.get()); + }).build()); + public static final DeferredHolder RANGED_TAB = CREATIVE_MODE_TABS.register("lzxnoneterraria_ranged_0", () -> CreativeModeTab.builder() .title(Component.translatable("itemGroup.lzxnoneterraria.ranged")) .icon(() -> ModItems.SDMG.get().getDefaultInstance()) @@ -117,7 +128,7 @@ public class ModCreativeModeTabs { .icon(() -> ModItems.TERRAPRISMA.get().getDefaultInstance()) .displayItems((parameters, output) -> { output.accept(ModItems.TERRAPRISMA.get()); + output.accept(ModItems.STARDUST_DRAGON_STAFF.get()); output.accept(ModItems.POSSESSION.get()); - output.accept(ModItems.VISION.get()); }).build()); } diff --git a/src/main/java/com/lzxnone/terraria/entity/summon/StaticSummonBehaviors.java b/src/main/java/com/lzxnone/terraria/entity/summon/StaticSummonBehaviors.java index b4a7332..0c5971d 100644 --- a/src/main/java/com/lzxnone/terraria/entity/summon/StaticSummonBehaviors.java +++ b/src/main/java/com/lzxnone/terraria/entity/summon/StaticSummonBehaviors.java @@ -8,7 +8,8 @@ import com.lzxnone.terraria.item.weapon.ranged.Flamethrower; import com.lzxnone.terraria.item.weapon.ranged.SnowballCannon; import com.lzxnone.terraria.item.weapon.ranged.StarCannon; import com.lzxnone.terraria.item.weapon.ranged.SuperStarShooter; -import com.lzxnone.terraria.item.weapon.summon.Terraprisma; +import com.lzxnone.terraria.item.weapon.summon.minion.StardustDragonStaff; +import com.lzxnone.terraria.item.weapon.summon.minion.Terraprisma; import com.lzxnone.terraria.item.weapon.summon.whip.Possession; import com.lzxnone.terraria.item.weapon.summon.whip.Whip; @@ -40,6 +41,7 @@ public class StaticSummonBehaviors { public static final String LAST_PRISM_TRI = "last_prism_tri"; public static final String LAST_PRISM_BEAM = "last_prism_beam"; public static final String TERRAPRISMA = "terraprisma"; + public static final String STARDUST_DRAGON = "stardust_dragon_staff"; public static final String POSSESSION = "possession"; public static final String POSSESSION_VISION = "possession_vision"; @@ -89,6 +91,7 @@ public class StaticSummonBehaviors { BEHAVIORS.put(LAST_PRISM_TRI, LastPrism.SUMMON_BEHAVIOR); BEHAVIORS.put(LAST_PRISM_BEAM, LastPrism.SUMMON_BEHAVIOR2); BEHAVIORS.put(TERRAPRISMA, Terraprisma.SUMMON_BEHAVIOR); + BEHAVIORS.put(STARDUST_DRAGON, StardustDragonStaff.SUMMON_BEHAVIOR); BEHAVIORS.put(POSSESSION, Whip.SUMMON_BEHAVIOR); BEHAVIORS.put(POSSESSION_VISION, Possession.SUMMON_BEHAVIOR); diff --git a/src/main/java/com/lzxnone/terraria/event/EntityDeathEventHandler.java b/src/main/java/com/lzxnone/terraria/event/EntityEventHandler.java similarity index 84% rename from src/main/java/com/lzxnone/terraria/event/EntityDeathEventHandler.java rename to src/main/java/com/lzxnone/terraria/event/EntityEventHandler.java index 53cdcc0..870cba4 100644 --- a/src/main/java/com/lzxnone/terraria/event/EntityDeathEventHandler.java +++ b/src/main/java/com/lzxnone/terraria/event/EntityEventHandler.java @@ -6,6 +6,7 @@ import com.lzxnone.terraria.effect.MidasEffect; import com.lzxnone.terraria.effect.ModEffects; import com.lzxnone.terraria.entity.summon.StaticSummon; import com.lzxnone.terraria.item.weapon.melee.DevilsDevastation; +import com.lzxnone.terraria.item.weapon.summon.whip.Possession; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; @@ -13,18 +14,23 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.common.EventBusSubscriber; +import net.neoforged.neoforge.event.entity.living.LivingDamageEvent; import net.neoforged.neoforge.event.entity.living.LivingDeathEvent; import java.util.List; import java.util.UUID; @EventBusSubscriber(modid = LzxnoneTerraria.MODID) -public class EntityDeathEventHandler { +public class EntityEventHandler { + @SubscribeEvent + public static void onLivingDamage(LivingDamageEvent.Post event) { + //支配之鞭 预兆标记 + Possession.markEvent(event); + } + @SubscribeEvent public static void onEntityDeath(LivingDeathEvent event) { LivingEntity livingEntity = event.getEntity(); - - if(livingEntity.level() instanceof ServerLevel serverLevel) { //迈达斯生成绿宝石 if(livingEntity.hasEffect(ModEffects.MIDAS) && livingEntity.getRandom().nextFloat() < MidasEffect.getDropChance()) { diff --git a/src/main/java/com/lzxnone/terraria/item/ModItems.java b/src/main/java/com/lzxnone/terraria/item/ModItems.java index 2a701ca..8c13240 100644 --- a/src/main/java/com/lzxnone/terraria/item/ModItems.java +++ b/src/main/java/com/lzxnone/terraria/item/ModItems.java @@ -14,7 +14,8 @@ import com.lzxnone.terraria.item.weapon.ranged.SnowballCannon; import com.lzxnone.terraria.item.weapon.ranged.StarCannon; import com.lzxnone.terraria.item.weapon.ranged.SuperStarShooter; import com.lzxnone.terraria.item.weapon.ranged.gun.*; -import com.lzxnone.terraria.item.weapon.summon.*; +import com.lzxnone.terraria.item.weapon.summon.minion.StardustDragonStaff; +import com.lzxnone.terraria.item.weapon.summon.minion.Terraprisma; import com.lzxnone.terraria.item.weapon.summon.whip.Possession; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; @@ -82,6 +83,7 @@ public class ModItems { //召唤武器 public static final DeferredItem TERRAPRISMA = ITEMS.register("terraprisma", Terraprisma::new); + public static final DeferredItem STARDUST_DRAGON_STAFF = ITEMS.register("stardust_dragon_staff", StardustDragonStaff::new); public static final DeferredItem POSSESSION = ITEMS.register("possession", Possession::new); //近战武器 灾厄 @@ -115,6 +117,10 @@ public class ModItems { //方块 public static final DeferredItem VISION = ITEMS.register("vision", () -> new BlockItem(ModBlocks.VISION.get(), new Item.Properties())); + public static final DeferredItem STARDUST_DRAGON_HEAD = ITEMS.register("stardust_dragon_head", () -> new BlockItem(ModBlocks.STARDUST_DRAGON_HEAD.get(), new Item.Properties())); + public static final DeferredItem STARDUST_DRAGON_BODY_A = ITEMS.register("stardust_dragon_body_a", () -> new BlockItem(ModBlocks.STARDUST_DRAGON_BODY_A.get(), new Item.Properties())); + public static final DeferredItem STARDUST_DRAGON_BODY_B = ITEMS.register("stardust_dragon_body_b", () -> new BlockItem(ModBlocks.STARDUST_DRAGON_BODY_B.get(), new Item.Properties())); + public static final DeferredItem STARDUST_DRAGON_TAIL = ITEMS.register("stardust_dragon_tail", () -> new BlockItem(ModBlocks.STARDUST_DRAGON_TAIL.get(), new Item.Properties())); //弹射物 public static final DeferredItem BULLET_PROJECTILE = ITEMS.register("bullet_projectile", () -> new Item(new Item.Properties())); diff --git a/src/main/java/com/lzxnone/terraria/item/accessory/ManaFlower.java b/src/main/java/com/lzxnone/terraria/item/accessory/ManaFlower.java index 30e0fa4..88d5b90 100644 --- a/src/main/java/com/lzxnone/terraria/item/accessory/ManaFlower.java +++ b/src/main/java/com/lzxnone/terraria/item/accessory/ManaFlower.java @@ -1,9 +1,15 @@ package com.lzxnone.terraria.item.accessory; +import com.lzxnone.terraria.LzxnoneTerraria; import com.lzxnone.terraria.item.accessory.effect.AutoManaPotionUser; import com.lzxnone.terraria.item.accessory.effect.ManaCostModifier; +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.ConfigStruct; import net.minecraft.ChatFormatting; import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; @@ -11,9 +17,16 @@ import net.minecraft.world.item.Rarity; import net.minecraft.world.item.TooltipFlag; import java.util.List; +import java.util.Locale; public class ManaFlower extends AccessoryItem implements ManaCostModifier, AutoManaPotionUser { - private static final double MANA_COST_MULTIPLIER = 0.92D; + public static final ConfigDouble MANA_COST_MULTIPLIER = new ConfigDouble( + "accessory.mana_flower.mana_cost_multiplier", + "mana_flower_mana_cost_multiplier", + 0.92D, + 0.0D, + 1.0D + ); public ManaFlower() { super(new Item.Properties().stacksTo(1).rarity(Rarity.RARE)); @@ -21,9 +34,23 @@ public class ManaFlower extends AccessoryItem implements ManaCostModifier, AutoM @Override public double getManaCostMultiplier(ItemStack stack, LivingEntity entity) { - return MANA_COST_MULTIPLIER; + return MANA_COST_MULTIPLIER.get(); } + public static final IConfigData CONFIG_DATA = new IConfigData() { + @Override + public void onConfigLoad() { + ConfigStruct.loadAll(MANA_COST_MULTIPLIER); + } + }; + + public static final ConfigListItem CONFIG_LIST_ITEM = new ConfigListItem( + "mana_flower", + ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "textures/item/mana_flower.png"), + Component.translatable("item.lzxnoneterraria.mana_flower"), + CONFIG_DATA + ); + @Override public boolean canAutoUseManaPotion(ItemStack stack, LivingEntity entity) { return true; @@ -32,7 +59,19 @@ public class ManaFlower extends AccessoryItem implements ManaCostModifier, AutoM @Override public void appendHoverText(ItemStack stack, Item.TooltipContext context, List tooltipComponents, TooltipFlag tooltipFlag) { super.appendHoverText(stack, context, tooltipComponents, tooltipFlag); - tooltipComponents.add(Component.translatable("tooltip.lzxnoneterraria.mana_flower.0").withStyle(ChatFormatting.GRAY)); + tooltipComponents.add(Component.translatable( + "tooltip.lzxnoneterraria.mana_flower.0", + formatManaCostReductionPercent(MANA_COST_MULTIPLIER.get()) + ).withStyle(ChatFormatting.GRAY)); tooltipComponents.add(Component.translatable("tooltip.lzxnoneterraria.mana_flower.1").withStyle(ChatFormatting.GRAY)); } + + private static String formatManaCostReductionPercent(double multiplier) { + double reduction = Math.max(0.0D, (1.0D - multiplier) * 100.0D); + if(Math.abs(reduction - Math.rint(reduction)) < 1.0E-6D) return Integer.toString((int)Math.rint(reduction)); + String formatted = String.format(Locale.ROOT, "%.2f", reduction); + while(formatted.endsWith("0")) formatted = formatted.substring(0, formatted.length() - 1); + if(formatted.endsWith(".")) formatted = formatted.substring(0, formatted.length() - 1); + return formatted; + } } diff --git a/src/main/java/com/lzxnone/terraria/item/accessory/NaturesGift.java b/src/main/java/com/lzxnone/terraria/item/accessory/NaturesGift.java index 39b76ef..f5eb1c1 100644 --- a/src/main/java/com/lzxnone/terraria/item/accessory/NaturesGift.java +++ b/src/main/java/com/lzxnone/terraria/item/accessory/NaturesGift.java @@ -1,8 +1,14 @@ package com.lzxnone.terraria.item.accessory; +import com.lzxnone.terraria.LzxnoneTerraria; import com.lzxnone.terraria.item.accessory.effect.ManaCostModifier; +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.ConfigStruct; import net.minecraft.ChatFormatting; import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; @@ -10,9 +16,16 @@ import net.minecraft.world.item.Rarity; import net.minecraft.world.item.TooltipFlag; import java.util.List; +import java.util.Locale; public class NaturesGift extends AccessoryItem implements ManaCostModifier { - private static final double MANA_COST_MULTIPLIER = 0.94D; + public static final ConfigDouble MANA_COST_MULTIPLIER = new ConfigDouble( + "accessory.natures_gift.mana_cost_multiplier", + "natures_gift_mana_cost_multiplier", + 0.94D, + 0.0D, + 1.0D + ); public NaturesGift() { super(new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON)); @@ -20,12 +33,38 @@ public class NaturesGift extends AccessoryItem implements ManaCostModifier { @Override public double getManaCostMultiplier(ItemStack stack, LivingEntity entity) { - return MANA_COST_MULTIPLIER; + return MANA_COST_MULTIPLIER.get(); } + public static final IConfigData CONFIG_DATA = new IConfigData() { + @Override + public void onConfigLoad() { + ConfigStruct.loadAll(MANA_COST_MULTIPLIER); + } + }; + + public static final ConfigListItem CONFIG_LIST_ITEM = new ConfigListItem( + "natures_gift", + ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "textures/item/natures_gift.png"), + Component.translatable("item.lzxnoneterraria.natures_gift"), + CONFIG_DATA + ); + @Override public void appendHoverText(ItemStack stack, Item.TooltipContext context, List tooltipComponents, TooltipFlag tooltipFlag) { super.appendHoverText(stack, context, tooltipComponents, tooltipFlag); - tooltipComponents.add(Component.translatable("tooltip.lzxnoneterraria.natures_gift.0").withStyle(ChatFormatting.GRAY)); + tooltipComponents.add(Component.translatable( + "tooltip.lzxnoneterraria.natures_gift.0", + formatManaCostReductionPercent(MANA_COST_MULTIPLIER.get()) + ).withStyle(ChatFormatting.GRAY)); + } + + private static String formatManaCostReductionPercent(double multiplier) { + double reduction = Math.max(0.0D, (1.0D - multiplier) * 100.0D); + if(Math.abs(reduction - Math.rint(reduction)) < 1.0E-6D) return Integer.toString((int)Math.rint(reduction)); + String formatted = String.format(Locale.ROOT, "%.2f", reduction); + while(formatted.endsWith("0")) formatted = formatted.substring(0, formatted.length() - 1); + if(formatted.endsWith(".")) formatted = formatted.substring(0, formatted.length() - 1); + return formatted; } } diff --git a/src/main/java/com/lzxnone/terraria/item/weapon/MagicWeapon.java b/src/main/java/com/lzxnone/terraria/item/weapon/MagicWeapon.java index 0d7b0b5..4968655 100644 --- a/src/main/java/com/lzxnone/terraria/item/weapon/MagicWeapon.java +++ b/src/main/java/com/lzxnone/terraria/item/weapon/MagicWeapon.java @@ -124,12 +124,4 @@ public class MagicWeapon extends Weapon { return ManaPotionUtil.tryUseManaPotion(player); } - private static int getEnchantmentLevel(LivingEntity entity, ItemStack stack, ResourceKey enchantment) { - return entity.registryAccess() - .lookupOrThrow(Registries.ENCHANTMENT) - .get(enchantment) - .map(stack::getEnchantmentLevel) - .orElse(0); - } - } diff --git a/src/main/java/com/lzxnone/terraria/item/weapon/RangedWeapon.java b/src/main/java/com/lzxnone/terraria/item/weapon/RangedWeapon.java index 93459f5..c01afa4 100644 --- a/src/main/java/com/lzxnone/terraria/item/weapon/RangedWeapon.java +++ b/src/main/java/com/lzxnone/terraria/item/weapon/RangedWeapon.java @@ -209,12 +209,4 @@ public class RangedWeapon extends Weapon { ammoStack.getHoverName() ).withStyle(style -> style.withColor(0x55FF55))); } - - protected static int getEnchantmentLevel(LivingEntity entity, ItemStack stack, ResourceKey enchantment) { - return entity.registryAccess() - .lookupOrThrow(Registries.ENCHANTMENT) - .get(enchantment) - .map(stack::getEnchantmentLevel) - .orElse(0); - } } diff --git a/src/main/java/com/lzxnone/terraria/item/weapon/SummonWeapon.java b/src/main/java/com/lzxnone/terraria/item/weapon/SummonWeapon.java index 5881581..9e9cb2e 100644 --- a/src/main/java/com/lzxnone/terraria/item/weapon/SummonWeapon.java +++ b/src/main/java/com/lzxnone/terraria/item/weapon/SummonWeapon.java @@ -1,73 +1,19 @@ package com.lzxnone.terraria.item.weapon; -import com.lzxnone.terraria.attachment.ModAttachments; -import com.lzxnone.terraria.effect.ModEffects; -import com.lzxnone.terraria.effect.SummonEffect; -import com.lzxnone.terraria.enchantment.ModEnchantments; import com.lzxnone.terraria.enchantment.ModEnchantmentConfigs; -import com.lzxnone.terraria.entity.summon.StaticSummon; -import com.lzxnone.terraria.utils.CollisionUtil; -import com.lzxnone.terraria.utils.FilterUtil; -import net.minecraft.ChatFormatting; +import com.lzxnone.terraria.enchantment.ModEnchantments; import net.minecraft.core.registries.Registries; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceKey; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.effect.MobEffectInstance; -import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.boss.EnderDragonPart; -import net.minecraft.world.entity.boss.enderdragon.EnderDragon; -import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Tier; import net.minecraft.world.item.enchantment.Enchantment; -import net.minecraft.world.level.ClipContext; -import net.minecraft.world.phys.AABB; -import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.HitResult; - -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; -import java.util.UUID; public class SummonWeapon extends Weapon { - private static final double MAX_RANGE = 256; - - public enum SummonAttackMode { - PASSIVE("message.lzxnoneterraria.summon_attack_mode.passive", ChatFormatting.GREEN), - NEUTRAL("message.lzxnoneterraria.summon_attack_mode.neutral", ChatFormatting.YELLOW), - AGGRESSIVE("message.lzxnoneterraria.summon_attack_mode.aggressive", ChatFormatting.RED), - ATTACK_TARGET("message.lzxnoneterraria.summon_attack_mode.attack_target", ChatFormatting.BLUE); - - private final String translationKey; - private final ChatFormatting color; - - SummonAttackMode(String translationKey, ChatFormatting color) { - this.translationKey = translationKey; - this.color = color; - } - - public Component getDisplayName() { - return Component.translatable(translationKey); - } - - public ChatFormatting getColor() { - return color; - } - } - public SummonWeapon(Tier tier, Properties properties) { super(tier, properties); } - public static int getMaxSummonCount(Player player) { - MobEffectInstance instance = player.getEffect(ModEffects.SUMMON); - return 1 + (instance == null ? 0 : (instance.getAmplifier() + 1) * SummonEffect.getSummonCountPerLevel()); - } - public static float applySummonDamageBonus(ItemStack stack, LivingEntity entity, float damage) { double finalDamage = damage; int amplificationLevel = getEnchantmentLevel(entity, stack, ModEnchantments.SUMMON_AMPLIFICATION); @@ -75,198 +21,4 @@ public class SummonWeapon extends Weapon { finalDamage *= Math.pow(ModEnchantmentConfigs.getSummonAmplificationDamageMultiplier(), amplificationLevel); return (float)Math.max(0.0D, finalDamage); } - - public static List getSummons(Player player) { - return new ArrayList<>(player.getData(ModAttachments.SUMMON_WEAPON_SUMMONS)); - } - - public static SummonAttackMode getAttackMode(Player player) { - int mode = player.getData(ModAttachments.SUMMON_ATTACK_MODE); - SummonAttackMode[] modes = SummonAttackMode.values(); - if(mode < 0 || mode >= modes.length) return SummonAttackMode.AGGRESSIVE; - return modes[mode]; - } - - public static SummonAttackMode cycleAttackMode(Player player) { - SummonAttackMode[] modes = SummonAttackMode.values(); - int next = (getAttackMode(player).ordinal() + 1) % modes.length; - player.setData(ModAttachments.SUMMON_ATTACK_MODE, next); - return modes[next]; - } - - public static Entity findSummonTarget(StaticSummon summon, Player player, double range) { - SummonAttackMode mode = getAttackMode(player); - if(mode == SummonAttackMode.PASSIVE) return null; - - if(mode == SummonAttackMode.NEUTRAL) { - LivingEntity target = player.getLastHurtByMob(); - return isValidSummonTarget(summon, player, target, range) ? target : null; - } - - if(mode == SummonAttackMode.ATTACK_TARGET) { - return findPlayerRelatedTarget(summon, player, range); - } - - boolean ignoreBlockOcclusion = hasBarrenLand(summon, player); - Entity playerRelatedTarget = findPlayerRelatedTarget(summon, player, range); - if(playerRelatedTarget != null) return playerRelatedTarget; - - AABB searchBox = AABB.ofSize(summon.position(), range * 2.0D, range * 2.0D, range * 2.0D); - List targets = ignoreBlockOcclusion ? CollisionUtil.searchEntities( - summon.level(), - searchBox, - summon, - player - ) : CollisionUtil.searchEnemies( - summon.level(), - searchBox, - summon, - player - ); - targets.removeIf(target -> !isValidSummonTarget(summon, player, target, range) - || (!ignoreBlockOcclusion && !isValidEnemySummonTarget(summon, player, target, range)) - || (!ignoreBlockOcclusion && !canPlayerSeeTarget(player, target))); - targets.sort(Comparator.comparingDouble(target -> target.distanceToSqr(summon.position()))); - return targets.isEmpty() ? null : targets.getFirst(); - } - - public static void storeSummonTarget(StaticSummon summon, Entity target) { - CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA).copy(); - customData.remove("target"); - customData.remove("targetId"); - customData.remove("targetPart"); - - if(target instanceof EnderDragonPart dragonPart) { - customData.putUUID("target", dragonPart.parentMob.getUUID()); - customData.putString("targetPart", dragonPart.name); - }else if(target != null) { - customData.putUUID("target", target.getUUID()); - } - - summon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData); - } - - public static Entity getStoredSummonTarget(StaticSummon summon) { - CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA); - if(!customData.contains("target") || !(summon.level() instanceof ServerLevel serverLevel)) return null; - - Entity target = serverLevel.getEntity(customData.getUUID("target")); - if(target instanceof EnderDragon dragon) { - if(!dragon.isAlive()) return null; - - if(customData.contains("targetPart")) { - String targetPart = customData.getString("targetPart"); - for(EnderDragonPart part : dragon.getSubEntities()) { - if(part.name.equals(targetPart) && CollisionUtil.isEnemySearchTarget(part, summon, summon.getOwner())) { - return part; - } - } - } - - Entity owner = summon.getOwner(); - EnderDragonPart nearestPart = List.of(dragon.getSubEntities()).stream() - .filter(part -> CollisionUtil.isEnemySearchTarget(part, summon, owner)) - .min(Comparator.comparingDouble(part -> part.distanceToSqr(summon.position()))) - .orElse(null); - return nearestPart != null ? nearestPart : dragon; - } - return target != null && target.isAlive() ? target : null; - } - - public static void registerSummon(Player player, Entity summon) { - if(!(player.level() instanceof ServerLevel serverLevel)) return; - - List summons = getSummons(player); - summons.removeIf(uuid -> { - Entity entity = serverLevel.getEntity(uuid); - if(entity instanceof StaticSummon summon1) { - Entity owner = summon1.getOwner(); - if(owner != null) { - double dist = owner.position().subtract(summon.position()).length(); - if(dist > MAX_RANGE) return true; - }else return true; - } - return entity == null || !entity.isAlive(); - }); - - int maxSummonCount = Math.max(1, getMaxSummonCount(player)); - while(summons.size() >= maxSummonCount) { - UUID uuid = summons.remove(0); - Entity entity = serverLevel.getEntity(uuid); - if(entity != null) entity.discard(); - } - - summons.add(summon.getUUID()); - player.setData(ModAttachments.SUMMON_WEAPON_SUMMONS, summons); - player.displayClientMessage( - Component.translatable("message.lzxnoneterraria.current_summons", summons.size(), maxSummonCount) - .withStyle(summons.size() < maxSummonCount ? ChatFormatting.GREEN : ChatFormatting.RED), - true - ); - } - - public static void addFreshSummon(Player player, Entity summon) { - registerSummon(player, summon); - player.level().addFreshEntity(summon); - } - - public String getSummonId() { - return ""; - } - - private static int getEnchantmentLevel(LivingEntity entity, ItemStack stack, ResourceKey enchantment) { - return entity.registryAccess() - .lookupOrThrow(Registries.ENCHANTMENT) - .get(enchantment) - .map(stack::getEnchantmentLevel) - .orElse(0); - } - - private static Entity findPlayerRelatedTarget(StaticSummon summon, Player player, double range) { - LivingEntity playerTarget = player.getLastHurtMob(); - if(isValidSummonTarget(summon, player, playerTarget, range)) return playerTarget; - - LivingEntity attacker = player.getLastHurtByMob(); - if(isValidSummonTarget(summon, player, attacker, range)) return attacker; - - return null; - } - - private static boolean isValidSummonTarget(StaticSummon summon, Player player, Entity target, double range) { - return target != null - && target.level() == summon.level() - && target.distanceToSqr(summon) <= range * range - && FilterUtil.createTargetFilter(summon, player).test(target); - } - - private static boolean isValidEnemySummonTarget(StaticSummon summon, Player player, Entity target, double range) { - return target != null - && target.level() == summon.level() - && target.distanceToSqr(summon) <= range * range - && CollisionUtil.isEnemySearchTarget(target, summon, player); - } - - private static boolean canPlayerSeeTarget(Player player, Entity target) { - BlockHitResult hitResult = player.level().clip(new ClipContext( - player.getEyePosition(), - target.getEyePosition(), - ClipContext.Block.COLLIDER, - ClipContext.Fluid.NONE, - player - )); - return hitResult.getType() == HitResult.Type.MISS; - } - - private static boolean hasBarrenLand(StaticSummon summon, Player player) { - ItemStack sourceStack = summon.getEntityData().get(StaticSummon.STACK_SOURCE); - if(sourceStack.isEmpty()) sourceStack = player.getWeaponItem(); - if(sourceStack.isEmpty()) return false; - - return player.registryAccess() - .lookupOrThrow(Registries.ENCHANTMENT) - .get(ModEnchantments.BARREN_LAND) - .map(sourceStack::getEnchantmentLevel) - .orElse(0) > 0; - } - } diff --git a/src/main/java/com/lzxnone/terraria/item/weapon/Weapon.java b/src/main/java/com/lzxnone/terraria/item/weapon/Weapon.java index 82968fd..4add9d9 100644 --- a/src/main/java/com/lzxnone/terraria/item/weapon/Weapon.java +++ b/src/main/java/com/lzxnone/terraria/item/weapon/Weapon.java @@ -1,10 +1,14 @@ package com.lzxnone.terraria.item.weapon; import net.minecraft.core.BlockPos; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; +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.Tier; +import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; @@ -35,4 +39,12 @@ public class Weapon extends Item { public int getEnchantmentValue(ItemStack stack) { return enchantmentValue; } + + public static int getEnchantmentLevel(LivingEntity entity, ItemStack stack, ResourceKey enchantment) { + return entity.registryAccess() + .lookupOrThrow(Registries.ENCHANTMENT) + .get(enchantment) + .map(stack::getEnchantmentLevel) + .orElse(0); + } } diff --git a/src/main/java/com/lzxnone/terraria/item/weapon/summon/minion/MinionWeapon.java b/src/main/java/com/lzxnone/terraria/item/weapon/summon/minion/MinionWeapon.java new file mode 100644 index 0000000..34a5ba4 --- /dev/null +++ b/src/main/java/com/lzxnone/terraria/item/weapon/summon/minion/MinionWeapon.java @@ -0,0 +1,234 @@ +package com.lzxnone.terraria.item.weapon.summon.minion; + +import com.lzxnone.terraria.attachment.ModAttachments; +import com.lzxnone.terraria.attachment.PlayerSummon; +import com.lzxnone.terraria.effect.ModEffects; +import com.lzxnone.terraria.effect.SummonEffect; +import com.lzxnone.terraria.enchantment.ModEnchantments; +import com.lzxnone.terraria.entity.summon.StaticSummon; +import com.lzxnone.terraria.item.weapon.SummonWeapon; +import com.lzxnone.terraria.utils.CollisionUtil; +import com.lzxnone.terraria.utils.FilterUtil; +import net.minecraft.core.registries.Registries; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.boss.EnderDragonPart; +import net.minecraft.world.entity.boss.enderdragon.EnderDragon; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Tier; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.phys.AABB; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import net.minecraft.world.phys.Vec3; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import java.util.UUID; + +public class MinionWeapon extends SummonWeapon { + public static final double MAX_RANGE = 256.0D; + + public MinionWeapon(Tier tier, Properties properties) { + super(tier, properties); + } + + public static int getMaxSummonCount(Player player) { + MobEffectInstance instance = player.getEffect(ModEffects.SUMMON); + return 1 + (instance == null ? 0 : (instance.getAmplifier() + 1) * SummonEffect.getSummonCountPerLevel()); + } + + public static void addFreshSummon(Player player, String id, List slotSummons) { + if(!(player.level() instanceof ServerLevel serverLevel)) return; + if(slotSummons.isEmpty()) return; + + PlayerSummon summonData = player.getData(ModAttachments.PLAYER_SUMMON); + List slots = cleanSummonSlots(serverLevel, summonData.getMinionSlots(), slotSummons.getFirst().position()); + + int maxSummonCount = Math.max(1, getMaxSummonCount(player)); + while(slots.size() >= maxSummonCount) { + PlayerSummon.SummonSlot removedSlot = slots.removeFirst(); + for(UUID uuid : removedSlot.getSummons()) { + Entity entity = serverLevel.getEntity(uuid); + if(entity != null) entity.discard(); + } + } + + slots.add(new PlayerSummon.SummonSlot(id, slotSummons.stream().map(Entity::getUUID).toList())); + summonData.setMinionSlots(slots); + player.setData(ModAttachments.PLAYER_SUMMON, summonData); + player.displayClientMessage( + Component.translatable("message.lzxnoneterraria.current_summons", slots.size(), maxSummonCount) + .withStyle(slots.size() < maxSummonCount ? net.minecraft.ChatFormatting.GREEN : net.minecraft.ChatFormatting.RED), + true + ); + + for(Entity summon : slotSummons) { + player.level().addFreshEntity(summon); + } + } + + protected static List cleanSummonSlots(ServerLevel serverLevel, List slots, Vec3 referencePos) { + List cleaned = new ArrayList<>(); + for(PlayerSummon.SummonSlot slot : slots) { + List cleanedSlot = new ArrayList<>(); + boolean removeSlot = false; + + for(UUID uuid : slot.getSummons()) { + Entity entity = serverLevel.getEntity(uuid); + if(entity == null || !entity.isAlive()) continue; + + if(entity instanceof StaticSummon staticSummon) { + Entity owner = staticSummon.getOwner(); + if(owner == null || owner.position().subtract(referencePos).length() > MAX_RANGE) { + removeSlot = true; + break; + } + } + cleanedSlot.add(uuid); + } + + if(removeSlot) { + for(UUID uuid : slot.getSummons()) { + Entity entity = serverLevel.getEntity(uuid); + if(entity != null) entity.discard(); + } + }else if(!cleanedSlot.isEmpty()) { + cleaned.add(new PlayerSummon.SummonSlot(slot.getId(), cleanedSlot)); + } + } + return cleaned; + } + + public static Entity findSummonTarget(StaticSummon summon, Player player, double range) { + PlayerSummon.State mode = player.getData(ModAttachments.PLAYER_SUMMON).getMinionState(); + if(mode == PlayerSummon.State.PASSIVE) return null; + + if(mode == PlayerSummon.State.NEUTRAL) { + LivingEntity target = player.getLastHurtByMob(); + return isValidSummonTarget(summon, player, target, range) ? target : null; + } + + if(mode == PlayerSummon.State.ATTACK_TARGET) { + return findPlayerRelatedTarget(summon, player, range); + } + + boolean ignoreBlockOcclusion = hasBarrenLand(summon, player); + Entity playerRelatedTarget = findPlayerRelatedTarget(summon, player, range); + if(playerRelatedTarget != null) return playerRelatedTarget; + + AABB searchBox = AABB.ofSize(summon.position(), range * 2.0D, range * 2.0D, range * 2.0D); + List targets = ignoreBlockOcclusion ? CollisionUtil.searchEntities( + summon.level(), + searchBox, + summon, + player + ) : CollisionUtil.searchEnemies( + summon.level(), + searchBox, + summon, + player + ); + targets.removeIf(target -> !isValidSummonTarget(summon, player, target, range) + || (!ignoreBlockOcclusion && !isValidEnemySummonTarget(summon, player, target, range)) + || (!ignoreBlockOcclusion && !canPlayerSeeTarget(player, target))); + targets.sort(Comparator.comparingDouble(target -> target.distanceToSqr(summon.position()))); + return targets.isEmpty() ? null : targets.getFirst(); + } + + public static void storeSummonTarget(StaticSummon summon, Entity target) { + CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA).copy(); + customData.remove("target"); + customData.remove("targetId"); + customData.remove("targetPart"); + + if(target instanceof EnderDragonPart dragonPart) { + customData.putUUID("target", dragonPart.parentMob.getUUID()); + customData.putString("targetPart", dragonPart.name); + }else if(target != null) { + customData.putUUID("target", target.getUUID()); + } + + summon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData); + } + + public static Entity getStoredSummonTarget(StaticSummon summon) { + CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA); + if(!customData.contains("target") || !(summon.level() instanceof ServerLevel serverLevel)) return null; + + Entity target = serverLevel.getEntity(customData.getUUID("target")); + if(target instanceof EnderDragon dragon) { + if(!dragon.isAlive()) return null; + + if(customData.contains("targetPart")) { + String targetPart = customData.getString("targetPart"); + for(EnderDragonPart part : dragon.getSubEntities()) { + if(part.name.equals(targetPart) && CollisionUtil.isEnemySearchTarget(part, summon, summon.getOwner())) { + return part; + } + } + } + + Entity owner = summon.getOwner(); + EnderDragonPart nearestPart = List.of(dragon.getSubEntities()).stream() + .filter(part -> CollisionUtil.isEnemySearchTarget(part, summon, owner)) + .min(Comparator.comparingDouble(part -> part.distanceToSqr(summon.position()))) + .orElse(null); + return nearestPart != null ? nearestPart : dragon; + } + return target != null && target.isAlive() ? target : null; + } + + private static Entity findPlayerRelatedTarget(StaticSummon summon, Player player, double range) { + LivingEntity playerTarget = player.getLastHurtMob(); + if(isValidSummonTarget(summon, player, playerTarget, range)) return playerTarget; + + LivingEntity attacker = player.getLastHurtByMob(); + if(isValidSummonTarget(summon, player, attacker, range)) return attacker; + + return null; + } + + private static boolean isValidSummonTarget(StaticSummon summon, Player player, Entity target, double range) { + return target != null + && target.level() == summon.level() + && target.distanceToSqr(summon) <= range * range + && FilterUtil.createTargetFilter(summon, player).test(target); + } + + private static boolean isValidEnemySummonTarget(StaticSummon summon, Player player, Entity target, double range) { + return target != null + && target.level() == summon.level() + && target.distanceToSqr(summon) <= range * range + && CollisionUtil.isEnemySearchTarget(target, summon, player); + } + + private static boolean canPlayerSeeTarget(Player player, Entity target) { + BlockHitResult hitResult = player.level().clip(new ClipContext( + player.getEyePosition(), + target.getEyePosition(), + ClipContext.Block.COLLIDER, + ClipContext.Fluid.NONE, + player + )); + return hitResult.getType() == HitResult.Type.MISS; + } + + private static boolean hasBarrenLand(StaticSummon summon, Player player) { + ItemStack sourceStack = summon.getEntityData().get(StaticSummon.STACK_SOURCE); + if(sourceStack.isEmpty()) sourceStack = player.getWeaponItem(); + if(sourceStack.isEmpty()) return false; + + return player.registryAccess() + .lookupOrThrow(Registries.ENCHANTMENT) + .get(ModEnchantments.BARREN_LAND) + .map(sourceStack::getEnchantmentLevel) + .orElse(0) > 0; + } +} diff --git a/src/main/java/com/lzxnone/terraria/item/weapon/summon/minion/StardustDragonStaff.java b/src/main/java/com/lzxnone/terraria/item/weapon/summon/minion/StardustDragonStaff.java new file mode 100644 index 0000000..ecab28d --- /dev/null +++ b/src/main/java/com/lzxnone/terraria/item/weapon/summon/minion/StardustDragonStaff.java @@ -0,0 +1,599 @@ +package com.lzxnone.terraria.item.weapon.summon.minion; + +import com.lzxnone.terraria.LzxnoneTerraria; +import com.lzxnone.terraria.ModSounds; +import com.lzxnone.terraria.attachment.ModAttachments; +import com.lzxnone.terraria.attachment.PlayerSummon; +import com.lzxnone.terraria.entity.ModEntities; +import com.lzxnone.terraria.entity.summon.IStaticSummonBehavior; +import com.lzxnone.terraria.entity.summon.StaticSummon; +import com.lzxnone.terraria.entity.summon.StaticSummonBehaviors; +import com.lzxnone.terraria.item.ModItems; +import com.lzxnone.terraria.particle.DustParticleOptions; +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.ConfigStruct; +import com.lzxnone.terraria.utils.*; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.Mth; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; +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.AABB; +import net.minecraft.world.phys.Vec3; +import org.joml.Vector3f; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +public class StardustDragonStaff extends MinionWeapon { + public static final ConfigFloat DAMAGE = new ConfigFloat("weapon.stardust_dragon_staff.damage", "stardust_dragon_staff_damage", 10.0F, 0.0F, 8388600.0F); + public static final ConfigFloat ADD_DAMAGE = new ConfigFloat("weapon.stardust_dragon_staff.add_damage", "stardust_dragon_staff_add_damage", 5.0F, 0.0F, 8388600.0F); + public static final ConfigDouble RANGE = new ConfigDouble("weapon.stardust_dragon_staff.range", "stardust_dragon_staff_range", 64.0D, 1.0D, 256.0D); + + public static final double SEGMENT_SPACING = 0.65D; + public static final float ROTATION_LERP = 0.25f; + + public static final ConfigDouble WANDER_SPEED = new ConfigDouble("weapon.stardust_dragon_staff.wander_speed", "stardust_dragon_staff_wander_speed", 0.85D, 0.01D, 32.0D); + public static final ConfigDouble CHASE_SPEED = new ConfigDouble("weapon.stardust_dragon_staff.chase_speed", "stardust_dragon_staff_chase_speed", 2.0D, 0.01D, 32.0D); + public static final ConfigDouble DASH_SPEED = new ConfigDouble("weapon.stardust_dragon_staff.dash_speed", "stardust_dragon_staff_dash_speed", 1.0D, 0.01D, 32.0D); + public static final ConfigFloat WANDER_FRI = new ConfigFloat("weapon.stardust_dragon_staff.wander_fri", "stardust_dragon_staff_wander_fri", 0.88F, 0.0F, 1.0F); + public static final ConfigFloat DASH_FRI = new ConfigFloat("weapon.stardust_dragon_staff.dash_fri", "stardust_dragon_staff_dash_fri", 0.78F, 0.0F, 1.0F); + + public enum State { + IDLE, + WANDER, + FIGHT, + CHASE, + DASH, + DASH_DONE + }; + + public StardustDragonStaff() { + super(Tiers.NETHERITE, new Properties().stacksTo(1).fireResistant().rarity(Rarity.EPIC)); + } + + public static final IConfigData CONFIG_DATA = new IConfigData() { + @Override + public void onConfigLoad() { + ConfigStruct.loadAll( + DAMAGE, + ADD_DAMAGE, + RANGE, + WANDER_SPEED, + CHASE_SPEED, + DASH_SPEED, + WANDER_FRI, + DASH_FRI + ); + } + }; + + public static final ConfigListItem CONFIG_LIST_ITEM = new ConfigListItem( + "stardust_dragon_staff", + ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "textures/item/stardust_dragon_staff.png"), + Component.translatable("item.lzxnoneterraria.stardust_dragon_staff"), + CONFIG_DATA + ); + + public static final DustParticleOptions PARTICLE = new DustParticleOptions( + 0.1f, 0.5f, 40, true, new Vector3f[]{ + new Vector3f(0.0F, 1.0F, 1.0F), + new Vector3f(0.1F, 0.4F, 1.0F) + } + ); + + public static final IStaticSummonBehavior SUMMON_BEHAVIOR = new IStaticSummonBehavior() { + @Override + public void tick(StaticSummon summon) { + this.checkBeforeTick(summon); + if(summon.getOwner() != null) { + double dist = summon.getOwner().position().subtract(summon.position()).length(); + if(dist > MinionWeapon.MAX_RANGE) { + summon.setPos(summon.getOwner().position()); + } + } + CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA); + if(customData.contains("head")) { + ParticleUtil.addParticle( + summon.level(), PARTICLE, + summon.position(), 0.0, + new Vec3(0, 0, 0), 0.1 + ); + } + if(!summon.isAlive() || !(summon.level() instanceof ServerLevel serverLevel)) return; + + + if(customData.contains("head")) { + if(summon.getOwner() instanceof Player player) { + onState(summon, player); + tickDragonSegments(summon, player, serverLevel); + } + }else if(customData.contains("bodyA")) { + if(!wasChainUpdatedThisTick(summon, serverLevel)) tickSegment(summon, customData); + }else if(customData.contains("bodyB")) { + if(!wasChainUpdatedThisTick(summon, serverLevel)) tickSegment(summon, customData); + }else if(customData.contains("tail")) { + if(!wasChainUpdatedThisTick(summon, serverLevel)) { + if(summon.getOwner() instanceof Player player) customData = repairTailPrevious(summon, player, serverLevel, customData); + tickSegment(summon, customData); + } + }else { + onDied(summon); + } + if(!customData.contains("head")) { + if(customData.contains("uuid")) { + Entity entity = serverLevel.getEntity(customData.getUUID("uuid")); + if(!(entity instanceof StaticSummon summon1) || !summon1.isAlive() || !summon1.getEntityData().get(StaticSummon.BEHAVIOR).equals(StaticSummonBehaviors.STARDUST_DRAGON)) onDied(summon); + }else { + onDied(summon); + } + } + int state = customData.contains("state") ? customData.getInt("state") : 0; + if(state == State.FIGHT.ordinal() || state == State.CHASE.ordinal() || state == State.DASH.ordinal() || state == State.DASH_DONE.ordinal()) { + AABB hitBox = new AABB(summon.position(), summon.position().add(summon.getDeltaMovement())).inflate(1.0); + List targets = summon.level().getEntitiesOfClass( + Entity.class, + hitBox, + FilterUtil.createTargetFilter(summon, summon.getOwner()) + ); + ItemStack sourceStack = summon.getEntityData().get(StaticSummon.STACK_SOURCE); + int stardustDragonSlotCount = 0; + if(summon.getOwner() instanceof Player player) { + for(PlayerSummon.SummonSlot slot : player.getData(ModAttachments.PLAYER_SUMMON).getMinionSlots()) { + if(slot.getId().equals(StaticSummonBehaviors.STARDUST_DRAGON)) stardustDragonSlotCount++; + } + } + float damage = DAMAGE.get() + ADD_DAMAGE.get() * Math.max(0, stardustDragonSlotCount - 1); + + for(Entity target : targets) { + if(DamageUtil.summonAttack(summon, target, sourceStack, damage, 1.0f)) target.invulnerableTime = 15; + } + } + } + }; + + public static void tickDragonSegments(StaticSummon head, Player player, ServerLevel serverLevel) { + List stardustDragonSlots = new ArrayList<>(); + for(PlayerSummon.SummonSlot slot : player.getData(ModAttachments.PLAYER_SUMMON).getMinionSlots()) { + if(slot.getId().equals(StaticSummonBehaviors.STARDUST_DRAGON)) stardustDragonSlots.add(slot); + } + if(stardustDragonSlots.isEmpty()) return; + + PlayerSummon.SummonSlot tailSlot = stardustDragonSlots.getLast(); + List tailSlotSummons = tailSlot.getSummons(); + if(tailSlotSummons.size() < 2 || !tailSlotSummons.getFirst().equals(head.getUUID())) return; + + Vec3 previousPos = head.position().add(head.getDeltaMovement()); + Vec3 previousDir = head.getDeltaMovement().lengthSqr() > 1.0E-6D ? head.getDeltaMovement().normalize() : head.getLookAngle().normalize(); + if(previousDir.lengthSqr() < 1.0E-6D) previousDir = new Vec3(0.0D, 0.0D, 1.0D); + + for(int i = 1; i < tailSlotSummons.size() - 1; i++) { + StaticSummon segment = tickDragonSegmentTowards(serverLevel, tailSlotSummons.get(i), previousPos, previousDir); + if(segment != null) { + previousDir = previousPos.subtract(segment.position()).normalize(); + previousPos = segment.position(); + } + } + for(int i = stardustDragonSlots.size() - 2; i >= 0; i--) { + for(UUID uuid : stardustDragonSlots.get(i).getSummons()) { + StaticSummon segment = tickDragonSegmentTowards(serverLevel, uuid, previousPos, previousDir); + if(segment != null) { + previousDir = previousPos.subtract(segment.position()).normalize(); + previousPos = segment.position(); + } + } + } + + Entity tailEntity = serverLevel.getEntity(tailSlotSummons.getLast()); + if(tailEntity instanceof StaticSummon tailSummon && tailSummon.isAlive()) { + repairTailPrevious(tailSummon, player, serverLevel, tailSummon.getEntityData().get(StaticSummon.CUSTOM_DATA)); + tickSegmentTowards(tailSummon, previousPos, previousDir); + markChainUpdated(tailSummon, serverLevel); + } + } + + private static StaticSummon tickDragonSegmentTowards(ServerLevel serverLevel, UUID uuid, Vec3 previousPos, Vec3 fallbackDir) { + Entity entity = serverLevel.getEntity(uuid); + if(entity instanceof StaticSummon segment && segment.isAlive()) { + tickSegmentTowards(segment, previousPos, fallbackDir); + markChainUpdated(segment, serverLevel); + return segment; + } + return null; + } + + private static CompoundTag repairTailPrevious(StaticSummon tailSummon, Player player, ServerLevel serverLevel, CompoundTag customData) { + Entity previous = customData.contains("uuid") ? serverLevel.getEntity(customData.getUUID("uuid")) : null; + if(previous instanceof StaticSummon previousSummon && previousSummon.isAlive() && previousSummon.getEntityData().get(StaticSummon.BEHAVIOR).equals(StaticSummonBehaviors.STARDUST_DRAGON)) { + return customData; + } + + UUID fallbackUUID = null; + PlayerSummon.SummonSlot tailSlot = null; + for(PlayerSummon.SummonSlot slot : player.getData(ModAttachments.PLAYER_SUMMON).getMinionSlots()) { + if(!slot.getId().equals(StaticSummonBehaviors.STARDUST_DRAGON)) continue; + if(slot.getSummons().contains(tailSummon.getUUID())) { + tailSlot = slot; + continue; + } + if(!slot.getSummons().isEmpty()) { + UUID candidateUUID = slot.getSummons().getLast(); + Entity candidate = serverLevel.getEntity(candidateUUID); + if(candidate instanceof StaticSummon candidateSummon && candidateSummon.isAlive()) { + fallbackUUID = candidateUUID; + break; + } + } + } + if(fallbackUUID == null && tailSlot != null && tailSlot.getSummons().size() >= 2) { + UUID candidateUUID = tailSlot.getSummons().get(tailSlot.getSummons().size() - 2); + Entity candidate = serverLevel.getEntity(candidateUUID); + if(candidate instanceof StaticSummon candidateSummon && candidateSummon.isAlive()) fallbackUUID = candidateUUID; + } + if(fallbackUUID == null) return customData; + + CompoundTag updatedCustomData = customData.copy(); + updatedCustomData.putUUID("uuid", fallbackUUID); + tailSummon.getEntityData().set(StaticSummon.CUSTOM_DATA, updatedCustomData); + return updatedCustomData; + } + + private static boolean wasChainUpdatedThisTick(StaticSummon summon, ServerLevel serverLevel) { + CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA); + return customData.contains("chainTick") && customData.getLong("chainTick") == serverLevel.getGameTime(); + } + + private static void markChainUpdated(StaticSummon summon, ServerLevel serverLevel) { + if(!summon.isAlive()) return; + CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA).copy(); + customData.putLong("chainTick", serverLevel.getGameTime()); + summon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData); + } + + public static void onState(StaticSummon summon, Player player) { + CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA); + int state = customData.contains("state") ? customData.getInt("state") : 0; + LzxnoneTerraria.LOGGER.info("{}", state); + if(state == State.IDLE.ordinal()) { + storeSummonTarget(summon, findSummonTarget(summon, player, RANGE.get())); + }else if(state == State.WANDER.ordinal()) { + storeSummonTarget(summon, findSummonTarget(summon, player, RANGE.get())); + + int wanderTime = customData.contains("wanderTime") ? customData.getInt("wanderTime") : 0; + if(wanderTime > 0) { + wanderTime--; + customData.putInt("wanderTime", wanderTime); + summon.setDeltaMovement(summon.getDeltaMovement().normalize().scale(WANDER_SPEED.get())); + }else { + summon.setDeltaMovement(summon.getDeltaMovement().scale(WANDER_FRI.get())); + } + float[] xyRot = MathUtil.computeXYRot(summon.getDeltaMovement().toVector3f()); + summon.setXRot(Mth.rotLerp(ROTATION_LERP, summon.getXRot(), xyRot[0])); + summon.setYRot(Mth.rotLerp(ROTATION_LERP, summon.getYRot(), xyRot[1])); + summon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData); + }else if(state == State.FIGHT.ordinal()) { + storeSummonTarget(summon, findSummonTarget(summon, player, RANGE.get())); + }else if(state == State.CHASE.ordinal()) { + Entity target = getStoredSummonTarget(summon); + if(target != null) { + summon.setDeltaMovement(target.getBoundingBox().getCenter().subtract(summon.position()).normalize().scale(CHASE_SPEED.get())); + } + float[] xyRot = MathUtil.computeXYRot(summon.getDeltaMovement().toVector3f()); + summon.setXRot(Mth.rotLerp(ROTATION_LERP, summon.getXRot(), xyRot[0])); + summon.setYRot(Mth.rotLerp(ROTATION_LERP, summon.getYRot(), xyRot[1])); + }else if(state == State.DASH.ordinal()) { + int dashTime = customData.contains("dashTime") ? customData.getInt("dashTime") : 0; + if(dashTime > 0) { + dashTime--; + customData.putInt("dashTime", dashTime); + summon.setDeltaMovement(summon.getDeltaMovement().normalize().scale(DASH_SPEED.get())); + }else { + summon.setDeltaMovement(summon.getDeltaMovement().scale(DASH_FRI.get())); + } + float[] xyRot = MathUtil.computeXYRot(summon.getDeltaMovement().toVector3f()); + summon.setXRot(Mth.rotLerp(ROTATION_LERP, summon.getXRot(), xyRot[0])); + summon.setYRot(Mth.rotLerp(ROTATION_LERP, summon.getYRot(), xyRot[1])); + summon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData); + }else if(state == State.DASH_DONE.ordinal()) { + int dashDoneTime = customData.contains("dashDoneTime") ? customData.getInt("dashDoneTime") : 0; + if(dashDoneTime > 0) { + dashDoneTime--; + customData.putInt("dashDoneTime", dashDoneTime); + summon.setDeltaMovement(summon.getDeltaMovement().normalize().scale(DASH_SPEED.get())); + }else { + summon.setDeltaMovement(summon.getDeltaMovement().scale(DASH_FRI.get())); + } + float[] xyRot = MathUtil.computeXYRot(summon.getDeltaMovement().toVector3f()); + summon.setXRot(Mth.rotLerp(ROTATION_LERP, summon.getXRot(), xyRot[0])); + summon.setYRot(Mth.rotLerp(ROTATION_LERP, summon.getYRot(), xyRot[1])); + summon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData); + } + + int nextState = getNextState(summon, state); + if(nextState != state) changeState(summon, state, nextState); + } + + public static int getNextState(StaticSummon summon, int state) { + if(state == State.IDLE.ordinal()) { + Entity target = getStoredSummonTarget(summon); + if(target == null) return State.WANDER.ordinal(); + else return State.FIGHT.ordinal(); + }else if(state == State.WANDER.ordinal()) { + Entity target = getStoredSummonTarget(summon); + if(target != null) return State.FIGHT.ordinal(); + if(summon.getDeltaMovement().length() < 0.05) return State.IDLE.ordinal(); + return State.WANDER.ordinal(); + }else if(state == State.FIGHT.ordinal()) { + Entity target = getStoredSummonTarget(summon); + if(target != null) return State.CHASE.ordinal(); + else return State.IDLE.ordinal(); + }else if(state == State.CHASE.ordinal()) { + Entity target = getStoredSummonTarget(summon); + if(target == null) return State.FIGHT.ordinal(); + if(target.getBoundingBox().getCenter().subtract(summon.position()).length() < CHASE_SPEED.get() * 1.5) return State.DASH.ordinal(); + else return State.CHASE.ordinal(); + }else if(state == State.DASH.ordinal()) { + if(summon.getDeltaMovement().length() < 0.5) return State.DASH_DONE.ordinal(); + return State.DASH.ordinal(); + }else if(state == State.DASH_DONE.ordinal()) { + if(summon.getDeltaMovement().length() < 0.5) return State.FIGHT.ordinal(); + return State.DASH_DONE.ordinal(); + } + return State.IDLE.ordinal(); + } + + public static void changeState(StaticSummon summon, int from, int to) { + CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA).copy(); + customData.putInt("state", to); + if(to == State.IDLE.ordinal()) { + summon.setDeltaMovement(Vec3.ZERO); + }else if(to == State.FIGHT.ordinal()) { + summon.setDeltaMovement(Vec3.ZERO); + }else if(to == State.WANDER.ordinal()) { + if(summon.getOwner() == null) return; + Vec3 targetPos = MathUtil.getRandomPosInRadius(summon.getOwner().position(), 12); + double dist = targetPos.subtract(summon.position()).length(); + int wanderTime = (int) (dist / WANDER_SPEED.get()); + customData.putInt("wanderTime", wanderTime); + Vec3 wanderDir = targetPos.subtract(summon.position()).normalize(); + summon.setDeltaMovement(wanderDir.scale(WANDER_SPEED.get())); + }else if(to == State.DASH.ordinal()) { + Entity target = getStoredSummonTarget(summon); + if(target != null) { + Vec3 targetPos = target.getBoundingBox().getCenter(); + int segmentCount = 1; + if(summon.getOwner() instanceof Player player) { + for(PlayerSummon.SummonSlot slot : player.getData(ModAttachments.PLAYER_SUMMON).getMinionSlots()) { + if(slot.getId().equals(StaticSummonBehaviors.STARDUST_DRAGON)) { + segmentCount = Math.max(segmentCount, slot.getSummons().size()); + break; + } + } + } + double passDistance = (segmentCount - 1) * SEGMENT_SPACING + target.getBbWidth() + 1.0D; + int dashTime = Math.max(1, (int)Math.ceil((passDistance) / DASH_SPEED.get())); + customData.putInt("dashTime", dashTime); + Vec3 dashDir = targetPos.subtract(summon.position()).normalize(); + summon.setDeltaMovement(dashDir.scale(DASH_SPEED.get())); + } + }else if(to ==State.DASH_DONE.ordinal()) { + Vec3 targetPos = MathUtil.getRandomPosInRadius(summon.position(), 4); + double dist = targetPos.subtract(summon.position()).length(); + int dashDoneTime = (int) (dist / DASH_SPEED.get()); + customData.putInt("dashDoneTime", dashDoneTime); + Vec3 dashDoneDir = targetPos.subtract(summon.position()).normalize(); + summon.setDeltaMovement(dashDoneDir.scale(DASH_SPEED.get())); + } + summon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData); + } + + public static void tickSegment(StaticSummon summon, CompoundTag customData) { + if(!customData.contains("uuid") || !(summon.level() instanceof ServerLevel serverLevel)) { + summon.discard(); + return; + } + + Entity previous = serverLevel.getEntity(customData.getUUID("uuid")); + if(previous == null || !previous.isAlive()) { + summon.discard(); + return; + } + + tickSegmentTowards(summon, previous.position(), previous.getLookAngle()); + } + + private static void tickSegmentTowards(StaticSummon summon, Vec3 previousPos, Vec3 fallbackDir) { + Vec3 toPrevious = previousPos.subtract(summon.position()); + Vec3 dir; + if(toPrevious.lengthSqr() > 1.0E-6D) { + dir = toPrevious.normalize(); + }else { + dir = fallbackDir.normalize(); + if(dir.lengthSqr() < 1.0E-6D) dir = new Vec3(0.0D, 0.0D, 1.0D); + } + + Vec3 targetPos = previousPos.subtract(dir.scale(SEGMENT_SPACING)); + summon.setDeltaMovement(Vec3.ZERO); + summon.setPos(targetPos); + + Vec3 lookDir = previousPos.subtract(summon.position()); + if(lookDir.lengthSqr() > 1.0E-6D) { + float[] xyRot = MathUtil.computeXYRot(lookDir.normalize().toVector3f()); + summon.setXRot(Mth.rotLerp(ROTATION_LERP, summon.getXRot(), xyRot[0])); + summon.setYRot(Mth.rotLerp(ROTATION_LERP, summon.getYRot(), xyRot[1])); + } + } + + @Override + public InteractionResultHolder use(Level level, Player player, InteractionHand hand) { + ItemStack stack = player.getItemInHand(hand); + if(stack.is(ModItems.STARDUST_DRAGON_STAFF.get()) && level instanceof ServerLevel serverLevel) { + PlayerSummon summonData = player.getData(ModAttachments.PLAYER_SUMMON); + List slots = cleanSummonSlots(serverLevel, summonData.getMinionSlots(), player.position()); + List stardustDragonSlots = new ArrayList<>(); + int maxSummonCount = Math.max(1, getMaxSummonCount(player)); + slots.removeIf(slot -> { + boolean stardustDragon = slot.getId().equals(StaticSummonBehaviors.STARDUST_DRAGON); + if(stardustDragon) stardustDragonSlots.add(slot); + return stardustDragon; + }); + if(stardustDragonSlots.isEmpty()) { + summonData.setMinionSlots(slots); + player.setData(ModAttachments.PLAYER_SUMMON, summonData); + } + if(stardustDragonSlots.isEmpty()) { + StaticSummon headSummon = createSummon(level, player, hand); + StaticSummon bodySummonA = createSummon(level, player, hand); + StaticSummon bodySummonB = createSummon(level, player, hand); + StaticSummon tailSummon = createSummon(level, player, hand); + + headSummon.getEntityData().set(StaticSummon.SCALE_X, 1.75f); + headSummon.getEntityData().set(StaticSummon.SCALE_Y, 1.75f); + headSummon.getEntityData().set(StaticSummon.SCALE_Z, 1.75f); + CompoundTag headCustomData = new CompoundTag(); + headCustomData.putBoolean("head", true); + headCustomData.putInt("state", State.IDLE.ordinal()); + headSummon.getEntityData().set(StaticSummon.CUSTOM_DATA, headCustomData); + + CompoundTag bodyACustomData = new CompoundTag(); + bodyACustomData.putBoolean("bodyA", true); + bodyACustomData.putUUID("uuid", headSummon.getUUID()); + bodySummonA.getEntityData().set(StaticSummon.CUSTOM_DATA, bodyACustomData); + + CompoundTag bodyBCustomData = new CompoundTag(); + bodyBCustomData.putBoolean("bodyB", true); + bodyBCustomData.putUUID("uuid", bodySummonA.getUUID()); + bodySummonB.getEntityData().set(StaticSummon.CUSTOM_DATA, bodyBCustomData); + + CompoundTag tailCustomData = new CompoundTag(); + tailCustomData.putBoolean("tail", true); + tailCustomData.putUUID("uuid", bodySummonB.getUUID()); + tailSummon.getEntityData().set(StaticSummon.CUSTOM_DATA, tailCustomData); + + MinionWeapon.addFreshSummon(player, StaticSummonBehaviors.STARDUST_DRAGON, List.of(headSummon, bodySummonA, bodySummonB, tailSummon)); + }else { + PlayerSummon.SummonSlot stardustDragonTailSlot = stardustDragonSlots.getLast(); + UUID tailUUID = stardustDragonTailSlot.getSummons().getLast(); + if(!(serverLevel.getEntity(tailUUID) instanceof StaticSummon tailSummon) || !tailSummon.isAlive()) { + slots.addAll(stardustDragonSlots); + summonData.setMinionSlots(slots); + player.setData(ModAttachments.PLAYER_SUMMON, summonData); + SoundUtil.playClientSound(player, ModSounds.SUMMON.get()); + return InteractionResultHolder.consume(stack); + } + + while(slots.size() + stardustDragonSlots.size() + 1 > maxSummonCount) { + PlayerSummon.SummonSlot removedSlot; + if(!slots.isEmpty()) { + removedSlot = slots.removeFirst(); + }else if(stardustDragonSlots.size() > 1) { + removedSlot = stardustDragonSlots.removeFirst(); + }else { + slots.addAll(stardustDragonSlots); + summonData.setMinionSlots(slots); + player.setData(ModAttachments.PLAYER_SUMMON, summonData); + player.displayClientMessage( + Component.translatable("message.lzxnoneterraria.current_summons", slots.size(), maxSummonCount) + .withStyle(net.minecraft.ChatFormatting.RED), + true + ); + SoundUtil.playClientSound(player, ModSounds.SUMMON.get()); + return InteractionResultHolder.consume(stack); + } + + for(UUID uuid : removedSlot.getSummons()) { + Entity entity = serverLevel.getEntity(uuid); + if(entity != null) entity.discard(); + } + } + + CompoundTag tailCustomData = tailSummon.getEntityData().get(StaticSummon.CUSTOM_DATA).copy(); + UUID previousUUID = null; + if(tailCustomData.contains("uuid")) { + UUID tailPreviousUUID = tailCustomData.getUUID("uuid"); + Entity tailPrevious = serverLevel.getEntity(tailPreviousUUID); + if(tailPrevious instanceof StaticSummon previousSummon && previousSummon.isAlive() && previousSummon.getEntityData().get(StaticSummon.BEHAVIOR).equals(StaticSummonBehaviors.STARDUST_DRAGON)) { + previousUUID = tailPreviousUUID; + } + } + if(previousUUID == null) { + for(PlayerSummon.SummonSlot slot : stardustDragonSlots) { + if(slot == stardustDragonTailSlot) continue; + if(!slot.getSummons().isEmpty()) { + previousUUID = slot.getSummons().getLast(); + break; + } + } + } + if(previousUUID == null && stardustDragonTailSlot.getSummons().size() >= 2) { + previousUUID = stardustDragonTailSlot.getSummons().get(stardustDragonTailSlot.getSummons().size() - 2); + } + if(previousUUID == null) { + slots.addAll(stardustDragonSlots); + summonData.setMinionSlots(slots); + player.setData(ModAttachments.PLAYER_SUMMON, summonData); + SoundUtil.playClientSound(player, ModSounds.SUMMON.get()); + return InteractionResultHolder.consume(stack); + } + + StaticSummon bodySummonA = createSummon(level, player, hand); + StaticSummon bodySummonB = createSummon(level, player, hand); + + CompoundTag bodyACustomData = new CompoundTag(); + bodyACustomData.putBoolean("bodyA", true); + bodyACustomData.putUUID("uuid", previousUUID); + bodySummonA.getEntityData().set(StaticSummon.CUSTOM_DATA, bodyACustomData); + + CompoundTag bodyBCustomData = new CompoundTag(); + bodyBCustomData.putBoolean("bodyB", true); + bodyBCustomData.putUUID("uuid", bodySummonA.getUUID()); + bodySummonB.getEntityData().set(StaticSummon.CUSTOM_DATA, bodyBCustomData); + + tailCustomData.putBoolean("tail", true); + tailCustomData.putUUID("uuid", bodySummonB.getUUID()); + tailSummon.getEntityData().set(StaticSummon.CUSTOM_DATA, tailCustomData); + + stardustDragonSlots.addFirst(new PlayerSummon.SummonSlot(StaticSummonBehaviors.STARDUST_DRAGON, List.of(bodySummonA.getUUID(), bodySummonB.getUUID()))); + slots.addAll(stardustDragonSlots); + summonData.setMinionSlots(slots); + player.setData(ModAttachments.PLAYER_SUMMON, summonData); + player.displayClientMessage( + Component.translatable("message.lzxnoneterraria.current_summons", slots.size(), maxSummonCount) + .withStyle(slots.size() < maxSummonCount ? net.minecraft.ChatFormatting.GREEN : net.minecraft.ChatFormatting.RED), + true + ); + level.addFreshEntity(bodySummonA); + level.addFreshEntity(bodySummonB); + } + } + SoundUtil.playClientSound(player, ModSounds.SUMMON.get()); + return InteractionResultHolder.consume(stack); + } + + public static StaticSummon createSummon(Level level, Player player, InteractionHand hand) { + ItemStack stack = player.getItemInHand(hand); + StaticSummon summon = new StaticSummon(ModEntities.STATIC_SUMMON.get(), level); + summon.setOwner(player); + summon.getEntityData().set(StaticSummon.STACK_SOURCE, stack.copy()); + summon.setPos(player.position()); + summon.getEntityData().set(StaticSummon.BEHAVIOR, StaticSummonBehaviors.STARDUST_DRAGON); + summon.getEntityData().set(StaticSummon.RENDER_MODE, "custom"); + summon.getEntityData().set(StaticSummon.LIFETIME, 72000); + summon.getEntityData().set(StaticSummon.GLOW, true); + summon.setNoGravity(true); + summon.noPhysics = true; + return summon; + } +} diff --git a/src/main/java/com/lzxnone/terraria/item/weapon/summon/Terraprisma.java b/src/main/java/com/lzxnone/terraria/item/weapon/summon/minion/Terraprisma.java similarity index 94% rename from src/main/java/com/lzxnone/terraria/item/weapon/summon/Terraprisma.java rename to src/main/java/com/lzxnone/terraria/item/weapon/summon/minion/Terraprisma.java index d078d41..f2fab39 100644 --- a/src/main/java/com/lzxnone/terraria/item/weapon/summon/Terraprisma.java +++ b/src/main/java/com/lzxnone/terraria/item/weapon/summon/minion/Terraprisma.java @@ -1,13 +1,13 @@ -package com.lzxnone.terraria.item.weapon.summon; +package com.lzxnone.terraria.item.weapon.summon.minion; import com.lzxnone.terraria.ModSounds; import com.lzxnone.terraria.attachment.ModAttachments; +import com.lzxnone.terraria.attachment.PlayerSummon; import com.lzxnone.terraria.entity.ModEntities; import com.lzxnone.terraria.entity.summon.IStaticSummonBehavior; import com.lzxnone.terraria.entity.summon.StaticSummon; import com.lzxnone.terraria.entity.summon.StaticSummonBehaviors; import com.lzxnone.terraria.item.ModItems; -import com.lzxnone.terraria.item.weapon.SummonWeapon; import com.lzxnone.terraria.ui.config.ConfigListItem; import com.lzxnone.terraria.ui.config.IConfigData; import com.lzxnone.terraria.ui.config.struct.ConfigDouble; @@ -36,7 +36,7 @@ import org.joml.Vector3f; import java.util.List; import java.util.UUID; -public class Terraprisma extends SummonWeapon { +public class Terraprisma extends MinionWeapon { public static final ConfigDouble TARGET_RANGE = new ConfigDouble( "weapon.terraprisma.target_range", "terraprisma_target_range", @@ -143,11 +143,15 @@ public class Terraprisma extends SummonWeapon { ); public static final IStaticSummonBehavior SUMMON_BEHAVIOR = new IStaticSummonBehavior() { - public static final ResourceLocation RES = ResourceLocation.parse("lzxnoneterraria:textures/vfx/sword_trail.png"); - @Override public void tick(StaticSummon summon) { this.checkBeforeTick(summon); + if(summon.getOwner() != null) { + double dist = summon.getOwner().position().subtract(summon.position()).length(); + if(dist > MinionWeapon.MAX_RANGE) { + summon.setPos(summon.getOwner().position()); + } + } if(summon.getOwner() instanceof Player player && !summon.level().isClientSide()) { onState(summon, player); } @@ -476,18 +480,20 @@ public class Terraprisma extends SummonWeapon { summon.setNoGravity(true); summon.noPhysics = true; - SummonWeapon.addFreshSummon(player, summon); + MinionWeapon.addFreshSummon(player, StaticSummonBehaviors.TERRAPRISMA, List.of(summon)); - List summons = player.getData(ModAttachments.SUMMON_WEAPON_SUMMONS); int idx = 0; - for(UUID uuid : summons) { - Entity entity = serverLevel.getEntity(uuid); - if(entity instanceof StaticSummon terraSummon && terraSummon.getEntityData().get(StaticSummon.BEHAVIOR).equals(StaticSummonBehaviors.TERRAPRISMA)) { - if(terraSummon.isAlive()) { - CompoundTag customData = terraSummon.getEntityData().get(StaticSummon.CUSTOM_DATA).copy(); - customData.putInt("idx", idx); - terraSummon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData); - idx++; + for(PlayerSummon.SummonSlot slot : player.getData(ModAttachments.PLAYER_SUMMON).getMinionSlots()) { + if(!slot.getId().equals(StaticSummonBehaviors.TERRAPRISMA)) continue; + for(UUID uuid : slot.getSummons()) { + Entity entity = serverLevel.getEntity(uuid); + if(entity instanceof StaticSummon terraSummon) { + if(terraSummon.isAlive()) { + CompoundTag customData = terraSummon.getEntityData().get(StaticSummon.CUSTOM_DATA).copy(); + customData.putInt("idx", idx); + terraSummon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData); + idx++; + } } } } @@ -495,9 +501,4 @@ public class Terraprisma extends SummonWeapon { SoundUtil.playClientSound(player, ModSounds.SUMMON_TERRAPRISMA.get()); return InteractionResultHolder.consume(stack); } - - @Override - public String getSummonId() { - return StaticSummonBehaviors.TERRAPRISMA; - } } diff --git a/src/main/java/com/lzxnone/terraria/item/weapon/summon/sentry/SentryWeapon.java b/src/main/java/com/lzxnone/terraria/item/weapon/summon/sentry/SentryWeapon.java new file mode 100644 index 0000000..e54be66 --- /dev/null +++ b/src/main/java/com/lzxnone/terraria/item/weapon/summon/sentry/SentryWeapon.java @@ -0,0 +1,10 @@ +package com.lzxnone.terraria.item.weapon.summon.sentry; + +import com.lzxnone.terraria.item.weapon.SummonWeapon; +import net.minecraft.world.item.Tier; + +public class SentryWeapon extends SummonWeapon { + public SentryWeapon(Tier tier, Properties properties) { + super(tier, properties); + } +} diff --git a/src/main/java/com/lzxnone/terraria/item/weapon/summon/whip/Possession.java b/src/main/java/com/lzxnone/terraria/item/weapon/summon/whip/Possession.java index b11ab18..0ec49ed 100644 --- a/src/main/java/com/lzxnone/terraria/item/weapon/summon/whip/Possession.java +++ b/src/main/java/com/lzxnone/terraria/item/weapon/summon/whip/Possession.java @@ -1,5 +1,8 @@ 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.block.ModBlocks; import com.lzxnone.terraria.entity.ModEntities; import com.lzxnone.terraria.entity.projectile.IStaticProjectileBehavior; @@ -8,29 +11,44 @@ import com.lzxnone.terraria.entity.projectile.StaticProjectileBehaviors; import com.lzxnone.terraria.entity.summon.IStaticSummonBehavior; 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.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.DamageUtil; import com.lzxnone.terraria.utils.MathUtil; import com.lzxnone.terraria.utils.ParticleUtil; import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; 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.phys.EntityHitResult; import net.minecraft.world.phys.Vec3; +import net.neoforged.neoforge.event.entity.living.LivingDamageEvent; import org.joml.Vector3f; import java.util.Locale; public class Possession extends Whip { - private static final double RANGE = 32.0D; - private static final float DAMAGE = 5.0F; - private static final int ROTATE = 60; - private static final double BEAM_SPEED = 1.5; + private static final ConfigDouble RANGE = new ConfigDouble("weapon.possession.range", "possession_range", 32.0D, 1.0D, 256.0D); + private static final ConfigFloat DAMAGE = new ConfigFloat("weapon.possession.damage", "possession_damage", 5.0F, 0.0F, 8388600.0F); + private static final ConfigInt ROTATE = new ConfigInt("weapon.possession.rotate", "possession_rotate", 60, 0, 360); + private static final ConfigDouble BEAM_SPEED = new ConfigDouble("weapon.possession.beam_speed", "possession_beam_speed", 1.5D, 0.01D, 32.0D); private static final double BEAM_HEIGHT = 4.0D; - private static final float BEAM_DAMAGE = 5.0f; + private static final ConfigFloat BEAM_DAMAGE = new ConfigFloat("weapon.possession.beam_damage", "possession_beam_damage", 5.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); + 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 Possession() { super(Tiers.NETHERITE, new Item.Properties().stacksTo(1).fireResistant().rarity(Rarity.RARE)); @@ -38,7 +56,7 @@ public class Possession extends Whip { @Override protected double getRange() { - return RANGE; + return RANGE.get(); } @Override @@ -48,7 +66,7 @@ public class Possession extends Whip { @Override protected float getDamage() { - return DAMAGE; + return DAMAGE.get(); } @Override @@ -58,7 +76,7 @@ public class Possession extends Whip { @Override protected int getRotateAngle() { - return ROTATE; + return ROTATE.get(); } @Override @@ -71,6 +89,28 @@ public class Possession extends Whip { return 12; } + public static final IConfigData CONFIG_DATA = new IConfigData() { + @Override + public void onConfigLoad() { + ConfigStruct.loadAll( + RANGE, + DAMAGE, + ROTATE, + BEAM_SPEED, + BEAM_DAMAGE, + PROPHETIC_MARK_DURATION, + MAX_PROPHETIC_MARK_STACKS + ); + } + }; + + public static final ConfigListItem CONFIG_LIST_ITEM = new ConfigListItem( + "possession", + ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "textures/item/possession.png"), + Component.translatable("item.lzxnoneterraria.possession"), + CONFIG_DATA + ); + public static final DustParticleOptions PARTICLE = new DustParticleOptions( 0.1f, 0.5f, 40, true, new Vector3f[]{ new Vector3f(0.0F, 1.0F, 1.0F), @@ -114,7 +154,7 @@ public class Possession extends Whip { public void onHitEntity(StaticProjectile projectile, EntityHitResult result) { if(!projectile.level().isClientSide()) { Entity target = result.getEntity(); - if(DamageUtil.meleeAttack(projectile, target, projectile.getEntityData().get(StaticProjectile.STACK_SOURCE), BEAM_DAMAGE, 0)) { + if(DamageUtil.meleeAttack(projectile, target, projectile.getEntityData().get(StaticProjectile.STACK_SOURCE), BEAM_DAMAGE.get(), 0)) { target.invulnerableTime = 5; } } @@ -124,54 +164,18 @@ public class Possession extends Whip { @Override protected void onHitTarget(StaticSummon summon, Entity target) { if(summon.level() instanceof ServerLevel serverLevel) { - Vec3 summonPos = MathUtil.getRandomPosOnRadius(summon.position(), 8); - Vector3f[] dirs = MathUtil.computeCoordinateSystem(target.position().subtract(summonPos).toVector3f(), 0); - float[] xyRot = MathUtil.computeXYRot(dirs[0], dirs[1]); - - StaticSummon visionSummon = new StaticSummon(ModEntities.STATIC_SUMMON.get(), serverLevel); - visionSummon.setOwner(summon.getOwner()); - visionSummon.setPos(summonPos); - visionSummon.getEntityData().set(StaticSummon.BEHAVIOR, StaticSummonBehaviors.POSSESSION_VISION); - visionSummon.getEntityData().set(StaticSummon.RENDER_MODE, "block"); - visionSummon.getEntityData().set(StaticSummon.BLOCK, ModBlocks.VISION.get().defaultBlockState()); - visionSummon.getEntityData().set(StaticSummon.LIFETIME, 40); - visionSummon.getEntityData().set(StaticSummon.GLOW, true); - visionSummon.setNoGravity(true); - visionSummon.noPhysics = true; - visionSummon.setXRot(xyRot[0]); - visionSummon.setYRot(xyRot[1]); - Vec3 randomPos = MathUtil.getRandomPosInRadius(visionSummon.position(), 1); - Vec3 randomDir = randomPos.subtract(visionSummon.position()).normalize(); - CompoundTag customData = new CompoundTag(); - customData.putDouble("moveX", randomDir.x); - customData.putDouble("moveY", randomDir.y); - customData.putDouble("moveZ", randomDir.z); - visionSummon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData); - summon.level().addFreshEntity(visionSummon); - - double dist = summonPos.subtract(target.getBoundingBox().getCenter()).length(); - int lifetime = Math.max(1, (int)Math.ceil(dist / BEAM_SPEED)); - double speed = dist / lifetime; - double height = Math.min(BEAM_HEIGHT, dist * 0.15D); - - StaticProjectile projectile = new StaticProjectile(ModEntities.STATIC_PROJECTILE.get(), serverLevel); - projectile.setOwner(summon.getOwner()); - projectile.setPos(summonPos); - projectile.getEntityData().set(StaticProjectile.STACK_SOURCE, summon.getEntityData().get(StaticSummon.STACK_SOURCE).copy()); - projectile.getEntityData().set(StaticProjectile.BEHAVIOR, StaticProjectileBehaviors.POSSESSION_PROJECTILE); - projectile.getEntityData().set(StaticProjectile.RENDER_MODE, "custom"); - projectile.getEntityData().set(StaticProjectile.ORIGIN, summonPos.toVector3f()); - 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.LIFETIME, lifetime); - projectile.getEntityData().set(StaticProjectile.EXPRESSION_Z, String.format(Locale.ROOT, "%.5f*t", speed)); - projectile.getEntityData().set( - StaticProjectile.EXPRESSION_Y, - String.format(Locale.ROOT, "%.5f*4*(t/%.5f)*(1-t/%.5f)", height, (double)lifetime, (double)lifetime) + TargetMarks marks = target.getData(ModAttachments.TARGET_MARKS).copy(); + marks.getMarks().put( + TargetMarks.PROPHETIC, + new TargetMarks.Mark( + serverLevel.getGameTime(), + PROPHETIC_MARK_DURATION.get(), + 0, + summon.getOwner() == null ? null : summon.getOwner().getUUID(), + summon.getEntityData().get(StaticSummon.STACK_SOURCE) + ) ); - projectile.getEntityData().set(StaticProjectile.GLOW, true); - summon.level().addFreshEntity(projectile); + target.setData(ModAttachments.TARGET_MARKS, marks); ParticleUtil.addParticles( serverLevel, PARTICLE, @@ -180,4 +184,90 @@ public class Possession extends Whip { ); } } + + 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.PROPHETIC); + if(mark == null) return; + + if(serverLevel.getGameTime() - mark.getStartTime() >= mark.getDuration()) { + TargetMarks copiedMarks = marks.copy(); + copiedMarks.getMarks().remove(TargetMarks.PROPHETIC); + target.setData(ModAttachments.TARGET_MARKS, copiedMarks); + return; + } + if(mark.getStacks() >= MAX_PROPHETIC_MARK_STACKS.get()) 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; + + Entity owner = serverLevel.getEntity(mark.getOwner()); + ItemStack markStack = mark.getStack(); + if(owner == null || markStack.isEmpty()) return; + + createVision(summon.position(), target, markStack, owner); + + TargetMarks copiedMarks = marks.copy(); + TargetMarks.Mark copiedMark = mark.copy(); + copiedMark.setStacks(copiedMark.getStacks() + 1); + copiedMarks.getMarks().put(TargetMarks.PROPHETIC, copiedMark); + target.setData(ModAttachments.TARGET_MARKS, copiedMarks); + } + + public static void createVision(Vec3 origin, Entity target, ItemStack stack, Entity owner) { + Vec3 summonPos = MathUtil.getRandomPosOnRadius(origin, 8); + Vector3f[] dirs = MathUtil.computeCoordinateSystem(target.position().subtract(summonPos).toVector3f(), 0); + float[] xyRot = MathUtil.computeXYRot(dirs[0], dirs[1]); + + StaticSummon visionSummon = new StaticSummon(ModEntities.STATIC_SUMMON.get(), target.level()); + visionSummon.setOwner(owner); + visionSummon.setPos(summonPos); + visionSummon.getEntityData().set(StaticSummon.BEHAVIOR, StaticSummonBehaviors.POSSESSION_VISION); + visionSummon.getEntityData().set(StaticSummon.RENDER_MODE, "block"); + visionSummon.getEntityData().set(StaticSummon.BLOCK, ModBlocks.VISION.get().defaultBlockState()); + visionSummon.getEntityData().set(StaticSummon.LIFETIME, 40); + visionSummon.getEntityData().set(StaticSummon.GLOW, true); + visionSummon.setNoGravity(true); + visionSummon.noPhysics = true; + visionSummon.setXRot(xyRot[0]); + visionSummon.setYRot(xyRot[1]); + Vec3 randomPos = MathUtil.getRandomPosInRadius(visionSummon.position(), 1); + Vec3 randomDir = randomPos.subtract(visionSummon.position()).normalize(); + CompoundTag customData = new CompoundTag(); + customData.putDouble("moveX", randomDir.x); + customData.putDouble("moveY", randomDir.y); + customData.putDouble("moveZ", randomDir.z); + visionSummon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData); + target.level().addFreshEntity(visionSummon); + + double dist = summonPos.subtract(target.getBoundingBox().getCenter()).length(); + int lifetime = Math.max(1, (int)Math.ceil(dist / BEAM_SPEED.get())); + double speed = dist / lifetime; + double height = Math.min(BEAM_HEIGHT, dist * 0.15D); + + StaticProjectile projectile = new StaticProjectile(ModEntities.STATIC_PROJECTILE.get(), target.level()); + projectile.setOwner(owner); + projectile.setPos(summonPos); + projectile.getEntityData().set(StaticProjectile.STACK_SOURCE, stack.copy()); + projectile.getEntityData().set(StaticProjectile.BEHAVIOR, StaticProjectileBehaviors.POSSESSION_PROJECTILE); + projectile.getEntityData().set(StaticProjectile.RENDER_MODE, "custom"); + projectile.getEntityData().set(StaticProjectile.ORIGIN, summonPos.toVector3f()); + 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.LIFETIME, lifetime); + projectile.getEntityData().set(StaticProjectile.EXPRESSION_Z, String.format(Locale.ROOT, "%.5f*t", speed)); + projectile.getEntityData().set( + StaticProjectile.EXPRESSION_Y, + String.format(Locale.ROOT, "%.5f*4*(t/%.5f)*(1-t/%.5f)", height, (double)lifetime, (double)lifetime) + ); + projectile.getEntityData().set(StaticProjectile.GLOW, true); + target.level().addFreshEntity(projectile); + } } diff --git a/src/main/java/com/lzxnone/terraria/mixin/HumanoidModelMixin.java b/src/main/java/com/lzxnone/terraria/mixin/HumanoidModelMixin.java index 8bfafba..2ae10b9 100644 --- a/src/main/java/com/lzxnone/terraria/mixin/HumanoidModelMixin.java +++ b/src/main/java/com/lzxnone/terraria/mixin/HumanoidModelMixin.java @@ -1,5 +1,6 @@ package com.lzxnone.terraria.mixin; +import com.lzxnone.terraria.client.config.RenderConfigs; import com.lzxnone.terraria.item.weapon.RangedWeapon; import net.minecraft.client.model.HumanoidModel; import net.minecraft.client.model.geom.ModelPart; @@ -22,6 +23,7 @@ public abstract class HumanoidModelMixin { @Inject(method = "setupAnim", at = @At("RETURN")) private void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, CallbackInfo ci) { + if(!RenderConfigs.ENABLE_SETUP_ANIM.get()) return; if(!(entity instanceof Player player)) return; if(!player.isUsingItem()) return; diff --git a/src/main/java/com/lzxnone/terraria/mixin/ItemInHandRenderMixin.java b/src/main/java/com/lzxnone/terraria/mixin/ItemInHandRenderMixin.java index d51bbca..fb9a39f 100644 --- a/src/main/java/com/lzxnone/terraria/mixin/ItemInHandRenderMixin.java +++ b/src/main/java/com/lzxnone/terraria/mixin/ItemInHandRenderMixin.java @@ -1,6 +1,7 @@ package com.lzxnone.terraria.mixin; import com.lzxnone.terraria.effect.ModEffects; +import com.lzxnone.terraria.client.config.RenderConfigs; import com.lzxnone.terraria.client.item.melee.ClientDevilsDevastation; import com.lzxnone.terraria.entity.ModRenderTypes; import com.lzxnone.terraria.item.ModItems; @@ -38,6 +39,7 @@ public class ItemInHandRenderMixin { InteractionHand hand, float swingProgress, ItemStack stack, float equippedProgress, PoseStack poseStack, MultiBufferSource buffer, int combinedLight, CallbackInfo ci) { + if(!RenderConfigs.ENABLE_RENDER_HAND.get()) return; if(!player.isScoping()) { if(stack.is(ModItems.ZENITH.get()) || stack.is(ModItems.TRUE_COPPER_SHORTSWORD.get()) @@ -102,6 +104,7 @@ public class ItemInHandRenderMixin { private void renderItem(LivingEntity entity, ItemStack itemStack, ItemDisplayContext displayContext, boolean leftHand, PoseStack poseStack, MultiBufferSource buffer, int seed, CallbackInfo ci) { + if(!RenderConfigs.ENABLE_RENDER_ITEM.get()) return; if((itemStack.is(ModItems.ZENITH.get()) || itemStack.is(ModItems.TRUE_COPPER_SHORTSWORD.get()) @@ -137,6 +140,7 @@ public class ItemInHandRenderMixin { private void renderItemPost(LivingEntity entity, ItemStack itemStack, ItemDisplayContext displayContext, boolean leftHand, PoseStack poseStack, MultiBufferSource buffer, int seed, CallbackInfo ci) { + if(!RenderConfigs.ENABLE_RENDER_ITEM.get()) return; if(itemStack.is(ModItems.DEVILS_DEVASTATION.get()) && entity instanceof Player player) { if(entity.getEffect(ModEffects.KILL_MODE) != null && !player.getCooldowns().isOnCooldown(itemStack.getItem())) { poseStack.pushPose(); diff --git a/src/main/java/com/lzxnone/terraria/network/handler/ClearSummonHandler.java b/src/main/java/com/lzxnone/terraria/network/handler/ClearSummonHandler.java index 0ce1691..11ab183 100644 --- a/src/main/java/com/lzxnone/terraria/network/handler/ClearSummonHandler.java +++ b/src/main/java/com/lzxnone/terraria/network/handler/ClearSummonHandler.java @@ -1,9 +1,8 @@ package com.lzxnone.terraria.network.handler; +import com.lzxnone.terraria.attachment.PlayerSummon; import com.lzxnone.terraria.attachment.ModAttachments; -import com.lzxnone.terraria.entity.summon.StaticSummon; import com.lzxnone.terraria.entity.summon.StaticSummonBehaviors; -import com.lzxnone.terraria.item.weapon.SummonWeapon; import com.lzxnone.terraria.network.payload.ClearSummonPayload; import net.minecraft.ChatFormatting; import net.minecraft.network.chat.Component; @@ -25,21 +24,31 @@ public class ClearSummonHandler { Player player = context.player(); String id = payload.id(); boolean clearAll = id.isEmpty(); - List summons = SummonWeapon.getSummons(player); - List remainingSummons = new ArrayList<>(); + List slots = player.getData(ModAttachments.PLAYER_SUMMON).getMinionSlots(); + List remainingSlots = new ArrayList<>(); - for(UUID uuid : summons) { - Entity entity = serverLevel.getEntity(uuid); - if(entity == null || !entity.isAlive()) continue; + for(PlayerSummon.SummonSlot slot : slots) { + boolean clearSlot = clearAll || slot.getId().equals(id); - if(clearAll || (entity instanceof StaticSummon summon && summon.getEntityData().get(StaticSummon.BEHAVIOR).equals(id))) { - entity.discard(); + if(clearSlot) { + for(UUID uuid : slot.getSummons()) { + Entity entity = serverLevel.getEntity(uuid); + if(entity != null) entity.discard(); + } }else { - remainingSummons.add(uuid); + List aliveSlot = slot.getSummons().stream() + .filter(uuid -> { + Entity entity = serverLevel.getEntity(uuid); + return entity != null && entity.isAlive(); + }) + .toList(); + if(!aliveSlot.isEmpty()) remainingSlots.add(new PlayerSummon.SummonSlot(slot.getId(), aliveSlot)); } } - player.setData(ModAttachments.SUMMON_WEAPON_SUMMONS, remainingSummons); + PlayerSummon summonData = player.getData(ModAttachments.PLAYER_SUMMON); + summonData.setMinionSlots(remainingSlots); + player.setData(ModAttachments.PLAYER_SUMMON, summonData); player.displayClientMessage( getClearMessage(clearAll, id), true @@ -60,6 +69,9 @@ public class ClearSummonHandler { if(StaticSummonBehaviors.TERRAPRISMA.equals(id)) { return Component.translatable("item.lzxnoneterraria.terraprisma"); } + if(StaticSummonBehaviors.STARDUST_DRAGON.equals(id)) { + return Component.translatable("item.lzxnoneterraria.stardust_dragon_staff"); + } return Component.literal(id); } } diff --git a/src/main/java/com/lzxnone/terraria/network/handler/ToggleSummonAttackModeHandler.java b/src/main/java/com/lzxnone/terraria/network/handler/ToggleSummonAttackModeHandler.java index f127c96..aee297f 100644 --- a/src/main/java/com/lzxnone/terraria/network/handler/ToggleSummonAttackModeHandler.java +++ b/src/main/java/com/lzxnone/terraria/network/handler/ToggleSummonAttackModeHandler.java @@ -1,6 +1,7 @@ package com.lzxnone.terraria.network.handler; -import com.lzxnone.terraria.item.weapon.SummonWeapon; +import com.lzxnone.terraria.attachment.ModAttachments; +import com.lzxnone.terraria.attachment.PlayerSummon; import com.lzxnone.terraria.network.payload.ToggleSummonAttackModePayload; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Player; @@ -12,7 +13,9 @@ public class ToggleSummonAttackModeHandler { Player player = context.player(); if(player.level().isClientSide()) return; - SummonWeapon.SummonAttackMode mode = SummonWeapon.cycleAttackMode(player); + PlayerSummon summonData = player.getData(ModAttachments.PLAYER_SUMMON); + PlayerSummon.State mode = summonData.cycleMinionState(); + player.setData(ModAttachments.PLAYER_SUMMON, summonData); player.displayClientMessage( Component.translatable("message.lzxnoneterraria.summon_attack_mode", mode.getDisplayName()).withStyle(mode.getColor()), true diff --git a/src/main/java/com/lzxnone/terraria/ui/config/ConfigList.java b/src/main/java/com/lzxnone/terraria/ui/config/ConfigList.java index f110f8a..f50df05 100644 --- a/src/main/java/com/lzxnone/terraria/ui/config/ConfigList.java +++ b/src/main/java/com/lzxnone/terraria/ui/config/ConfigList.java @@ -9,7 +9,10 @@ import com.lzxnone.terraria.effect.ManaSicknessEffect; import com.lzxnone.terraria.effect.MidasEffect; import com.lzxnone.terraria.effect.SummonEffect; import com.lzxnone.terraria.enchantment.ModEnchantmentConfigs; +import com.lzxnone.terraria.client.config.RenderConfigs; import com.lzxnone.terraria.item.ammo.*; +import com.lzxnone.terraria.item.accessory.ManaFlower; +import com.lzxnone.terraria.item.accessory.NaturesGift; import com.lzxnone.terraria.item.weapon.magic.LastPrism; import com.lzxnone.terraria.item.weapon.melee.BeeKeeper; import com.lzxnone.terraria.item.weapon.melee.BladeOfGrass; @@ -40,7 +43,9 @@ import com.lzxnone.terraria.item.weapon.ranged.SnowballCannon; import com.lzxnone.terraria.item.weapon.ranged.StarCannon; import com.lzxnone.terraria.item.weapon.ranged.SuperStarShooter; import com.lzxnone.terraria.item.weapon.ranged.gun.*; -import com.lzxnone.terraria.item.weapon.summon.Terraprisma; +import com.lzxnone.terraria.item.weapon.summon.minion.StardustDragonStaff; +import com.lzxnone.terraria.item.weapon.summon.minion.Terraprisma; +import com.lzxnone.terraria.item.weapon.summon.whip.Possession; import java.util.HashMap; import java.util.Map; @@ -48,8 +53,10 @@ import java.util.Map; public class ConfigList { public static final String WEAPON = "weapon"; public static final String AMMO = "ammo"; + public static final String ACCESSORY = "accessory"; public static final String EFFECT = "effect"; public static final String ENCHANTMENT = "enchantment"; + public static final String RENDER = "render"; private static final Map ITEMS = new HashMap<>(); @@ -79,6 +86,8 @@ public class ConfigList { Mace.CONFIG_LIST_ITEM, DevilsDevastation.CONFIG_LIST_ITEM, Terraprisma.CONFIG_LIST_ITEM, + StardustDragonStaff.CONFIG_LIST_ITEM, + Possession.CONFIG_LIST_ITEM, LastPrism.CONFIG_LIST_ITEM, Minishark.CONFIG_LIST_ITEM, FlintlockPistol.CONFIG_LIST_ITEM, @@ -133,6 +142,10 @@ public class ConfigList { LuminiteBullet.CONFIG_LIST_ITEM, TungstenBullet.CONFIG_LIST_ITEM }); + ITEMS.put(ACCESSORY, new ConfigListItem[]{ + NaturesGift.CONFIG_LIST_ITEM, + ManaFlower.CONFIG_LIST_ITEM + }); ITEMS.put(ENCHANTMENT, new ConfigListItem[]{ ModEnchantmentConfigs.MANA_LEAK_CONFIG_LIST_ITEM, ModEnchantmentConfigs.MANA_EFFICIENCY_CONFIG_LIST_ITEM, @@ -143,6 +156,9 @@ public class ConfigList { ModEnchantmentConfigs.GUNPOWDER_CONFIG_LIST_ITEM, ModEnchantmentConfigs.STEADY_BREATH_CONFIG_LIST_ITEM }); + ITEMS.put(RENDER, new ConfigListItem[]{ + RenderConfigs.CONFIG_LIST_ITEM + }); } public static ConfigListItem[] getItems(String id) { diff --git a/src/main/java/com/lzxnone/terraria/ui/config/ConfigScreen.java b/src/main/java/com/lzxnone/terraria/ui/config/ConfigScreen.java index 1dd9d38..9b89b03 100644 --- a/src/main/java/com/lzxnone/terraria/ui/config/ConfigScreen.java +++ b/src/main/java/com/lzxnone/terraria/ui/config/ConfigScreen.java @@ -20,7 +20,7 @@ import java.util.Map; public class ConfigScreen { private static final ResourceLocation UI_PATH = ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "ui/config.xml"); - private static final String[] NAV_KEYS = {ConfigList.WEAPON, ConfigList.AMMO, ConfigList.EFFECT, ConfigList.ENCHANTMENT}; + private static final String[] NAV_KEYS = {ConfigList.WEAPON, ConfigList.AMMO, ConfigList.ACCESSORY, ConfigList.EFFECT, ConfigList.ENCHANTMENT, ConfigList.RENDER}; private static String selectedNavKey = ConfigList.WEAPON; private static final Map NAV_SELECTED_INDEXES = new HashMap<>(); @@ -33,8 +33,10 @@ public class ConfigScreen { //为头部导航按钮设置回调 findElement(ui, "nav-button-weapon", Button.class).setOnClick(event -> onNavSelected(ui, ConfigList.WEAPON)); findElement(ui, "nav-button-ammo", Button.class).setOnClick(event -> onNavSelected(ui, ConfigList.AMMO)); + findElement(ui, "nav-button-accessory", Button.class).setOnClick(event -> onNavSelected(ui, ConfigList.ACCESSORY)); findElement(ui, "nav-button-effect", Button.class).setOnClick(event -> onNavSelected(ui, ConfigList.EFFECT)); findElement(ui, "nav-button-enchantment", Button.class).setOnClick(event -> onNavSelected(ui, ConfigList.ENCHANTMENT)); + findElement(ui, "nav-button-render", Button.class).setOnClick(event -> onNavSelected(ui, ConfigList.RENDER)); //底部回调 findElement(ui, "button-cancel", Button.class).setOnClick(event -> discardAndReturn(parent)); diff --git a/src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_body_a.json b/src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_body_a.json new file mode 100644 index 0000000..5e918bf --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_body_a.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "lzxnoneterraria:block/stardust_dragon_body_a" + } + } +} diff --git a/src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_body_b.json b/src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_body_b.json new file mode 100644 index 0000000..ba10c9a --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_body_b.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "lzxnoneterraria:block/stardust_dragon_body_b" + } + } +} diff --git a/src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_head.json b/src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_head.json new file mode 100644 index 0000000..128f9b8 --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_head.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "lzxnoneterraria:block/stardust_dragon_head" + } + } +} diff --git a/src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_tail.json b/src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_tail.json new file mode 100644 index 0000000..ddfdeaf --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/blockstates/stardust_dragon_tail.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "lzxnoneterraria:block/stardust_dragon_tail" + } + } +} diff --git a/src/main/resources/assets/lzxnoneterraria/lang/en_us.json b/src/main/resources/assets/lzxnoneterraria/lang/en_us.json index 046e7c9..ffdb3d7 100644 --- a/src/main/resources/assets/lzxnoneterraria/lang/en_us.json +++ b/src/main/resources/assets/lzxnoneterraria/lang/en_us.json @@ -7,6 +7,12 @@ "itemGroup.lzxnoneterraria.block": "Terraria Block", "itemGroup.lzxnoneterraria.calamity_melee": "Terraria Calamity Melee", + "block.lzxnoneterraria.vision": "Vision", + "block.lzxnoneterraria.stardust_dragon_head": "Stardust Dragon Head", + "block.lzxnoneterraria.stardust_dragon_body_a": "Stardust Dragon Body A", + "block.lzxnoneterraria.stardust_dragon_body_b": "Stardust Dragon Body B", + "block.lzxnoneterraria.stardust_dragon_tail": "Stardust Dragon Tail", + "item.lzxnoneterraria.copper_shortsword": "Copper Shortsword", "item.lzxnoneterraria.enchanted_sword": "Enchanted Sword", "item.lzxnoneterraria.bee_keeper": "Bee Keeper", @@ -34,8 +40,8 @@ "item.lzxnoneterraria.devils_devastation": "Devil's Devastation", "item.lzxnoneterraria.last_prism": "Last Prism", "item.lzxnoneterraria.terraprisma": "Terraprisma", + "item.lzxnoneterraria.stardust_dragon_staff": "Stardust Dragon Staff", "item.lzxnoneterraria.possession": "Possession", - "block.lzxnoneterraria.vision": "Vision", "item.lzxnoneterraria.musket": "Musket", "item.lzxnoneterraria.minishark": "Minishark", "item.lzxnoneterraria.flintlock_pistol": "Flintlock Pistol", @@ -105,8 +111,8 @@ "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.2": "Perhaps this is why the Brimstone Elemental had strength unrivaled by her sisters.", - "tooltip.lzxnoneterraria.natures_gift.0": "6% reduced mana cost", - "tooltip.lzxnoneterraria.mana_flower.0": "8% reduced mana cost", + "tooltip.lzxnoneterraria.natures_gift.0": "%s%% reduced mana cost", + "tooltip.lzxnoneterraria.mana_flower.0": "%s%% reduced mana cost", "tooltip.lzxnoneterraria.mana_flower.1": "Automatically uses mana potions when mana runs out", "tooltip.lzxnoneterraria.mana_crystal.0": "Permanently increases maximum mana by 20, up to 200", @@ -152,8 +158,10 @@ "lzxnoneterraria.configuration.title": "LzxnoneTerraria Config", "lzxnoneterraria.configuration.nav_weapon": "Weapon", "lzxnoneterraria.configuration.nav_ammo": "Ammo", + "lzxnoneterraria.configuration.nav_accessory": "Accessory", "lzxnoneterraria.configuration.nav_effect": "Effect", "lzxnoneterraria.configuration.nav_enchantment": "Enchantment", + "lzxnoneterraria.configuration.nav_render": "Render", "lzxnoneterraria.configuration.reset_button": "Reset", "lzxnoneterraria.configuration.cancel_button": "Cancel", "lzxnoneterraria.configuration.confirm_button": "Confirm", @@ -173,6 +181,23 @@ "lzxnoneterraria.configuration.gunpowder_damage_multiplier.tooltip": "Ranged weapon damage multiplier per Gunpowder level", "lzxnoneterraria.configuration.steady_breath_spread_multiplier": "Spread Multiplier", "lzxnoneterraria.configuration.steady_breath_spread_multiplier.tooltip": "Ranged weapon spread multiplier per Steady Breath level", + "lzxnoneterraria.configuration.natures_gift_settings": "Nature's Gift Settings", + "lzxnoneterraria.configuration.natures_gift_mana_cost_multiplier": "Mana Cost Multiplier", + "lzxnoneterraria.configuration.natures_gift_mana_cost_multiplier.tooltip": "Mana cost is multiplied by this value while equipped", + "lzxnoneterraria.configuration.mana_flower_settings": "Mana Flower Settings", + "lzxnoneterraria.configuration.mana_flower_mana_cost_multiplier": "Mana Cost Multiplier", + "lzxnoneterraria.configuration.mana_flower_mana_cost_multiplier.tooltip": "Mana cost is multiplied by this value while equipped", + "lzxnoneterraria.configuration.render_settings": "Render Settings", + "lzxnoneterraria.configuration.render_mixin_render_hand": "Enable renderHand", + "lzxnoneterraria.configuration.render_mixin_render_hand.tooltip": "Enables the first-person hand rendering mixin", + "lzxnoneterraria.configuration.render_mixin_render_item": "Enable renderItem", + "lzxnoneterraria.configuration.render_mixin_render_item.tooltip": "Enables item rendering mixins", + "lzxnoneterraria.configuration.render_mixin_setup_anim": "Enable setupAnim", + "lzxnoneterraria.configuration.render_mixin_setup_anim.tooltip": "Enables model animation adjustment mixin", + "lzxnoneterraria.configuration.render_mana_bar_x": "Mana Bar X", + "lzxnoneterraria.configuration.render_mana_bar_x.tooltip": "Screen X coordinate of the mana bar's top-left corner", + "lzxnoneterraria.configuration.render_mana_bar_y": "Mana Bar Y", + "lzxnoneterraria.configuration.render_mana_bar_y.tooltip": "Screen Y coordinate of the mana bar's top-left corner", "lzxnoneterraria.configuration.effect_settings": "Effect Settings", "lzxnoneterraria.configuration.blood_butcherer_damage_per_level": "Blood Butcherer Effect Damage Per Level", "lzxnoneterraria.configuration.blood_butcherer_damage_per_level.tooltip": "Damage dealt per effect level", @@ -466,6 +491,38 @@ "lzxnoneterraria.configuration.terraprisma_rotate_speed.tooltip": "Approximate linear speed along the ellipse during rotate attacks", "lzxnoneterraria.configuration.terraprisma_damage": "Damage", "lzxnoneterraria.configuration.terraprisma_damage.tooltip": "Base damage dealt per summon hit", + "lzxnoneterraria.configuration.stardust_dragon_staff_settings": "Stardust Dragon Staff Settings", + "lzxnoneterraria.configuration.stardust_dragon_staff_damage": "Base Damage", + "lzxnoneterraria.configuration.stardust_dragon_staff_damage.tooltip": "Default base damage dealt by the Stardust Dragon", + "lzxnoneterraria.configuration.stardust_dragon_staff_add_damage": "Slot Damage Bonus", + "lzxnoneterraria.configuration.stardust_dragon_staff_add_damage.tooltip": "Damage added for each extra Stardust Dragon slot", + "lzxnoneterraria.configuration.stardust_dragon_staff_range": "Target Range", + "lzxnoneterraria.configuration.stardust_dragon_staff_range.tooltip": "Maximum range for the Stardust Dragon to search for and keep targets", + "lzxnoneterraria.configuration.stardust_dragon_staff_wander_speed": "Wander Speed", + "lzxnoneterraria.configuration.stardust_dragon_staff_wander_speed.tooltip": "Movement speed while wandering", + "lzxnoneterraria.configuration.stardust_dragon_staff_chase_speed": "Chase Speed", + "lzxnoneterraria.configuration.stardust_dragon_staff_chase_speed.tooltip": "Movement speed while chasing a target", + "lzxnoneterraria.configuration.stardust_dragon_staff_dash_speed": "Dash Speed", + "lzxnoneterraria.configuration.stardust_dragon_staff_dash_speed.tooltip": "Movement speed during dash and dash-finish movement", + "lzxnoneterraria.configuration.stardust_dragon_staff_wander_fri": "Wander Friction", + "lzxnoneterraria.configuration.stardust_dragon_staff_wander_fri.tooltip": "Velocity retention per tick while slowing down from wander", + "lzxnoneterraria.configuration.stardust_dragon_staff_dash_fri": "Dash Friction", + "lzxnoneterraria.configuration.stardust_dragon_staff_dash_fri.tooltip": "Velocity retention per tick while slowing down from dash", + "lzxnoneterraria.configuration.possession_settings": "Possession Settings", + "lzxnoneterraria.configuration.possession_range": "Range", + "lzxnoneterraria.configuration.possession_range.tooltip": "Maximum whip strike distance", + "lzxnoneterraria.configuration.possession_damage": "Damage", + "lzxnoneterraria.configuration.possession_damage.tooltip": "Damage dealt by the whip hit", + "lzxnoneterraria.configuration.possession_rotate": "Rotate Angle", + "lzxnoneterraria.configuration.possession_rotate.tooltip": "Random rotation angle range when casting the whip", + "lzxnoneterraria.configuration.possession_beam_speed": "Vision Projectile Speed", + "lzxnoneterraria.configuration.possession_beam_speed.tooltip": "Projectile speed for visions spawned by prophetic marks", + "lzxnoneterraria.configuration.possession_beam_damage": "Vision Damage", + "lzxnoneterraria.configuration.possession_beam_damage.tooltip": "Damage dealt by the vision projectile", + "lzxnoneterraria.configuration.possession_prophetic_mark_duration": "Prophetic Duration", + "lzxnoneterraria.configuration.possession_prophetic_mark_duration.tooltip": "Duration of the prophetic mark applied by Possession, in ticks", + "lzxnoneterraria.configuration.possession_max_prophetic_mark_stacks": "Max Prophetic Stacks", + "lzxnoneterraria.configuration.possession_max_prophetic_mark_stacks.tooltip": "Maximum number of vision triggers from one prophetic mark", "lzxnoneterraria.configuration.last_prism_settings": "Last Prism Settings", "lzxnoneterraria.configuration.last_prism_damage": "Damage", "lzxnoneterraria.configuration.last_prism_damage.tooltip": "Damage per hit", diff --git a/src/main/resources/assets/lzxnoneterraria/lang/zh_cn.json b/src/main/resources/assets/lzxnoneterraria/lang/zh_cn.json index c88992a..cd18622 100644 --- a/src/main/resources/assets/lzxnoneterraria/lang/zh_cn.json +++ b/src/main/resources/assets/lzxnoneterraria/lang/zh_cn.json @@ -7,6 +7,12 @@ "itemGroup.lzxnoneterraria.block": "泰拉瑞亚 方块", "itemGroup.lzxnoneterraria.calamity_melee": "泰拉瑞亚灾厄 近战武器", + "block.lzxnoneterraria.vision": "幻象", + "block.lzxnoneterraria.stardust_dragon_head": "星尘龙头部", + "block.lzxnoneterraria.stardust_dragon_body_a": "星尘龙身体A", + "block.lzxnoneterraria.stardust_dragon_body_b": "星尘龙身体B", + "block.lzxnoneterraria.stardust_dragon_tail": "星尘龙尾部", + "item.lzxnoneterraria.copper_shortsword": "铜短剑", "item.lzxnoneterraria.enchanted_sword": "附魔剑", "item.lzxnoneterraria.bee_keeper": "养蜂人", @@ -34,8 +40,8 @@ "item.lzxnoneterraria.devils_devastation": "破灭魔王剑", "item.lzxnoneterraria.last_prism": "终极棱镜", "item.lzxnoneterraria.terraprisma": "泰拉棱镜", + "item.lzxnoneterraria.stardust_dragon_staff": "星尘之龙法杖", "item.lzxnoneterraria.possession": "支配之鞭", - "block.lzxnoneterraria.vision": "幻视", "item.lzxnoneterraria.musket": "火枪", "item.lzxnoneterraria.minishark": "迷你鲨", "item.lzxnoneterraria.flintlock_pistol": "燧发枪", @@ -105,8 +111,8 @@ "tooltip.lzxnoneterraria.devils_devastation.0": "完美的地狱之剑,直接掌握着硫磺火之力。", "tooltip.lzxnoneterraria.devils_devastation.1": "人类将这种力量理解为浩劫,即一切秩序在火焰之中的必然毁灭。", "tooltip.lzxnoneterraria.devils_devastation.2": "或许这就是硫磺火元素掌握着她的姐妹所不能匹敌之力量的原因。", - "tooltip.lzxnoneterraria.natures_gift.0": "魔力花费降低 6%", - "tooltip.lzxnoneterraria.mana_flower.0": "魔力花费降低 8%", + "tooltip.lzxnoneterraria.natures_gift.0": "魔力花费降低 %s%%", + "tooltip.lzxnoneterraria.mana_flower.0": "魔力花费降低 %s%%", "tooltip.lzxnoneterraria.mana_flower.1": "魔力枯竭时自动使用魔力药水", "tooltip.lzxnoneterraria.mana_crystal.0": "永久提升 20 点最大魔力,最高提升到 200", @@ -151,8 +157,10 @@ "lzxnoneterraria.configuration.title": "LzxnoneTerraria 配置", "lzxnoneterraria.configuration.nav_weapon": "武器", "lzxnoneterraria.configuration.nav_ammo": "弹药", + "lzxnoneterraria.configuration.nav_accessory": "饰品", "lzxnoneterraria.configuration.nav_effect": "药水效果", "lzxnoneterraria.configuration.nav_enchantment": "附魔", + "lzxnoneterraria.configuration.nav_render": "渲染", "lzxnoneterraria.configuration.reset_button": "重置", "lzxnoneterraria.configuration.cancel_button": "取消", "lzxnoneterraria.configuration.confirm_button": "确定", @@ -172,6 +180,23 @@ "lzxnoneterraria.configuration.gunpowder_damage_multiplier.tooltip": "每级火药对远程武器伤害的倍率", "lzxnoneterraria.configuration.steady_breath_spread_multiplier": "散射倍率", "lzxnoneterraria.configuration.steady_breath_spread_multiplier.tooltip": "每级屏息对远程武器散射幅度的倍率", + "lzxnoneterraria.configuration.natures_gift_settings": "大自然的恩赐 设置", + "lzxnoneterraria.configuration.natures_gift_mana_cost_multiplier": "魔力消耗倍率", + "lzxnoneterraria.configuration.natures_gift_mana_cost_multiplier.tooltip": "佩戴后魔力消耗乘以该倍率", + "lzxnoneterraria.configuration.mana_flower_settings": "魔力花 设置", + "lzxnoneterraria.configuration.mana_flower_mana_cost_multiplier": "魔力消耗倍率", + "lzxnoneterraria.configuration.mana_flower_mana_cost_multiplier.tooltip": "佩戴后魔力消耗乘以该倍率", + "lzxnoneterraria.configuration.render_settings": "渲染 设置", + "lzxnoneterraria.configuration.render_mixin_render_hand": "启用 renderHand", + "lzxnoneterraria.configuration.render_mixin_render_hand.tooltip": "启用第一人称手部渲染相关 mixin", + "lzxnoneterraria.configuration.render_mixin_render_item": "启用 renderItem", + "lzxnoneterraria.configuration.render_mixin_render_item.tooltip": "启用物品渲染相关 mixin", + "lzxnoneterraria.configuration.render_mixin_setup_anim": "启用 setupAnim", + "lzxnoneterraria.configuration.render_mixin_setup_anim.tooltip": "启用模型动作修正相关 mixin", + "lzxnoneterraria.configuration.render_mana_bar_x": "魔力条 X 坐标", + "lzxnoneterraria.configuration.render_mana_bar_x.tooltip": "魔力条左上角的屏幕 X 坐标", + "lzxnoneterraria.configuration.render_mana_bar_y": "魔力条 Y 坐标", + "lzxnoneterraria.configuration.render_mana_bar_y.tooltip": "魔力条左上角的屏幕 Y 坐标", "lzxnoneterraria.configuration.effect_settings": "药水效果 设置", "lzxnoneterraria.configuration.blood_butcherer_damage_per_level": "血腥屠宰效果每级伤害", "lzxnoneterraria.configuration.blood_butcherer_damage_per_level.tooltip": "每级造成的伤害", @@ -465,6 +490,38 @@ "lzxnoneterraria.configuration.terraprisma_rotate_speed.tooltip": "旋转攻击沿椭圆轨迹移动的近似线速度", "lzxnoneterraria.configuration.terraprisma_damage": "伤害", "lzxnoneterraria.configuration.terraprisma_damage.tooltip": "召唤物每次命中造成的基础伤害", + "lzxnoneterraria.configuration.stardust_dragon_staff_settings": "星尘之龙法杖 设置", + "lzxnoneterraria.configuration.stardust_dragon_staff_damage": "基础伤害", + "lzxnoneterraria.configuration.stardust_dragon_staff_damage.tooltip": "星尘龙默认基础伤害", + "lzxnoneterraria.configuration.stardust_dragon_staff_add_damage": "槽位增伤", + "lzxnoneterraria.configuration.stardust_dragon_staff_add_damage.tooltip": "每额外增加一个星尘龙槽位提升的伤害", + "lzxnoneterraria.configuration.stardust_dragon_staff_range": "寻敌范围", + "lzxnoneterraria.configuration.stardust_dragon_staff_range.tooltip": "星尘龙搜索和维持目标的最大距离", + "lzxnoneterraria.configuration.stardust_dragon_staff_wander_speed": "游荡速度", + "lzxnoneterraria.configuration.stardust_dragon_staff_wander_speed.tooltip": "游荡状态下的移动速度", + "lzxnoneterraria.configuration.stardust_dragon_staff_chase_speed": "追击速度", + "lzxnoneterraria.configuration.stardust_dragon_staff_chase_speed.tooltip": "追击目标时的移动速度", + "lzxnoneterraria.configuration.stardust_dragon_staff_dash_speed": "冲刺速度", + "lzxnoneterraria.configuration.stardust_dragon_staff_dash_speed.tooltip": "冲刺和冲刺结束阶段的移动速度", + "lzxnoneterraria.configuration.stardust_dragon_staff_wander_fri": "游荡阻力", + "lzxnoneterraria.configuration.stardust_dragon_staff_wander_fri.tooltip": "游荡减速时每刻速度保留比例", + "lzxnoneterraria.configuration.stardust_dragon_staff_dash_fri": "冲刺阻力", + "lzxnoneterraria.configuration.stardust_dragon_staff_dash_fri.tooltip": "冲刺减速时每刻速度保留比例", + "lzxnoneterraria.configuration.possession_settings": "支配之鞭 设置", + "lzxnoneterraria.configuration.possession_range": "射程", + "lzxnoneterraria.configuration.possession_range.tooltip": "鞭子最大抽打距离", + "lzxnoneterraria.configuration.possession_damage": "伤害", + "lzxnoneterraria.configuration.possession_damage.tooltip": "鞭子命中伤害", + "lzxnoneterraria.configuration.possession_rotate": "旋转角度", + "lzxnoneterraria.configuration.possession_rotate.tooltip": "鞭子甩出时的随机偏转角范围", + "lzxnoneterraria.configuration.possession_beam_speed": "幻象弹射速度", + "lzxnoneterraria.configuration.possession_beam_speed.tooltip": "预兆标记触发后生成的幻象弹射物速度", + "lzxnoneterraria.configuration.possession_beam_damage": "幻象伤害", + "lzxnoneterraria.configuration.possession_beam_damage.tooltip": "幻象弹射物命中伤害", + "lzxnoneterraria.configuration.possession_prophetic_mark_duration": "预兆持续时间", + "lzxnoneterraria.configuration.possession_prophetic_mark_duration.tooltip": "支配之鞭施加的预兆标记持续时间(刻)", + "lzxnoneterraria.configuration.possession_max_prophetic_mark_stacks": "最大预兆层数", + "lzxnoneterraria.configuration.possession_max_prophetic_mark_stacks.tooltip": "同一个预兆标记最多触发幻象的次数", "lzxnoneterraria.configuration.last_prism_settings": "终极棱镜 设置", "lzxnoneterraria.configuration.last_prism_damage": "伤害", "lzxnoneterraria.configuration.last_prism_damage.tooltip": "每次命中伤害", diff --git a/src/main/resources/assets/lzxnoneterraria/lss/config.lss b/src/main/resources/assets/lzxnoneterraria/lss/config.lss index 8a3c36f..41794d0 100644 --- a/src/main/resources/assets/lzxnoneterraria/lss/config.lss +++ b/src/main/resources/assets/lzxnoneterraria/lss/config.lss @@ -87,7 +87,11 @@ } .nav-img-ammo { - background: sprite(lzxnoneterraria:textures/item/musket_ball.png); + background: sprite(lzxnoneterraria:textures/ui/nav_ammo_icon.png); +} + +.nav-img-accessory { + background: sprite(lzxnoneterraria:textures/ui/nav_accessory_icon.png); } .nav-img-effect { @@ -98,6 +102,10 @@ background: sprite(lzxnoneterraria:textures/ui/nav_enchantment_icon.png); } +.nav-img-render { + background: sprite(lzxnoneterraria:textures/ui/nav_render_icon.png); +} + .main { flex: 1; flex-direction: row; diff --git a/src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_body_a.json b/src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_body_a.json new file mode 100644 index 0000000..c1ad861 --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_body_a.json @@ -0,0 +1,192 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Codex", + "ambientocclusion": false, + "texture_size": [64, 64], + "textures": { + "0": "lzxnoneterraria:block/stardust_dragon_body_a", + "particle": "lzxnoneterraria:block/stardust_dragon_body_a" + }, + "elements": [ + { + "name": "deep_blue_body", + "from": [5.25, 4.6, 2.4], + "to": [10.75, 9.55, 13.6], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [8, 8, 12, 12], "texture": "#0"}, + "south": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "west": {"uv": [8, 8, 12, 12], "texture": "#0"}, + "up": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "down": {"uv": [12, 0, 16, 4], "texture": "#0"} + } + }, + { + "name": "rear_upper_armor", + "from": [4.95, 7.15, 2.55], + "to": [11.05, 10.65, 7.55], + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "front_upper_armor", + "from": [4.9, 7.1, 8.15], + "to": [11, 10.6, 13.45], + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "rear_armor_rise", + "from": [4.6, 9.45, 4.3], + "to": [11.5, 11.6, 5.3], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 9.55, 5.05]}, + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "middle_armor_ring", + "from": [4.55, 4.25, 7.55], + "to": [11.45, 11.6, 8.15], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 0.7]}, + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "west": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "front_armor_rise", + "from": [4.5, 9.5, 10.4], + "to": [11.3, 11.65, 11.4], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 9.7, 10.7]}, + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "front_horn_base", + "from": [6.7, 10.7, 8.6], + "to": [9.3, 11.75, 11], + "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10.82, 10.8]}, + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "front_horn_tip", + "from": [7.2, 11.55, 5.4], + "to": [8.8, 12.4, 9.75], + "rotation": {"angle": 45, "axis": "x", "origin": [8, 11.65, 9.6]}, + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "rear_left_cyan_ornament", + "from": [4.6, 4.45, 2.75], + "to": [5.55, 6.15, 5.85], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0.8, -0.6]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "rear_right_cyan_ornament", + "from": [10.45, 4.45, 2.75], + "to": [11.4, 6.15, 5.25], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0.8, -0.6]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "front_left_cyan_ornament", + "from": [4.6, 4.35, 10.15], + "to": [5.55, 6.05, 13.25], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0.7, 0.6]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "front_right_cyan_ornament", + "from": [10.45, 4.35, 10.35], + "to": [11.4, 6.05, 13.05], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0.7, 0.4]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + } + ], + "display": { + "gui": { + "rotation": [20, 135, 0], + "scale": [1.1, 1.1, 1.1] + } + }, + "groups": [ + { + "name": "stardust_dragon_body_a", + "origin": [8, 8, 8], + "scope": 0, + "color": 3, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_body_b.json b/src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_body_b.json new file mode 100644 index 0000000..d82e976 --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_body_b.json @@ -0,0 +1,187 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Codex", + "ambientocclusion": false, + "texture_size": [64, 64], + "textures": { + "0": "lzxnoneterraria:block/stardust_dragon_body_b", + "particle": "lzxnoneterraria:block/stardust_dragon_body_b" + }, + "elements": [ + { + "name": "deep_blue_body", + "from": [5.25, 4.6, 2.4], + "to": [10.75, 9.55, 13.6], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [8, 8, 12, 12], "texture": "#0"}, + "south": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "west": {"uv": [8, 8, 12, 12], "texture": "#0"}, + "up": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "down": {"uv": [12, 0, 16, 4], "texture": "#0"} + } + }, + { + "name": "rear_upper_armor", + "from": [4.95, 7.1, 2.55], + "to": [11.05, 10.6, 7.95], + "rotation": {"angle": 0, "axis": "y", "origin": [0, -0.05, 0]}, + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "front_upper_armor", + "from": [4.9, 7.1, 7.95], + "to": [11, 10.6, 13.45], + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "rear_armor_rise", + "from": [4.6, 9.45, 4.4], + "to": [11.5, 11.6, 5.4], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 9.55, 5.25]}, + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "middle_armor_rise", + "from": [4.55, 9.525, 7.45], + "to": [11.4, 11.675, 8.4], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 9.625, 8.15]}, + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "front_armor_rise", + "from": [4.5, 9.5, 10.4], + "to": [11.3, 11.65, 11.4], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 9.6, 10.7]}, + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "rear_left_cyan_ornament", + "from": [4.6, 4.45, 2.75], + "to": [5.55, 6.15, 5.45], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "rear_right_cyan_ornament", + "from": [10.45, 4.45, 2.75], + "to": [11.4, 6.15, 5.45], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "middle_left_cyan_ornament", + "from": [4.6, 4.3, 6.65], + "to": [5.55, 6, 9.35], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "middle_right_cyan_ornament", + "from": [10.45, 4.3, 6.65], + "to": [11.4, 6, 9.35], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "front_left_cyan_ornament", + "from": [4.6, 4.35, 10.15], + "to": [5.55, 6.05, 13.25], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "front_right_cyan_ornament", + "from": [10.45, 4.35, 10.15], + "to": [11.4, 6.05, 13.25], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + } + ], + "display": { + "gui": { + "rotation": [20, 135, 0], + "scale": [1.1, 1.1, 1.1] + } + }, + "groups": [ + { + "name": "stardust_dragon_body_b", + "origin": [8, 8, 8], + "scope": 0, + "color": 1, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_head.json b/src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_head.json new file mode 100644 index 0000000..38dbb3f --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_head.json @@ -0,0 +1,599 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Codex; dinosaur jaw layering informed by Jurassic Reborn references", + "ambientocclusion": false, + "texture_size": [64, 64], + "textures": { + "0": "lzxnoneterraria:block/stardust_dragon_head", + "particle": "lzxnoneterraria:block/stardust_dragon_head" + }, + "elements": [ + { + "name": "neck_socket", + "from": [6, 4.15, 3.16], + "to": [10, 8.85, 6.03], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "south": {"uv": [0, 8, 4, 12], "texture": "#0"}, + "west": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "neck_lower_mass", + "from": [5.5, 4, 4.56], + "to": [10.5, 6.55, 7.15], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "south": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "west": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "down": {"uv": [12, 12, 16, 16], "texture": "#0"} + } + }, + { + "name": "neck_upper_mass", + "from": [5.2, 6.35, 4.42], + "to": [10.8, 9, 7.36], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 8, 4, 12], "texture": "#0"}, + "south": {"uv": [0, 8, 4, 12], "texture": "#0"}, + "west": {"uv": [0, 8, 4, 12], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "cranium_core", + "from": [4.5, 4.4, 6.28], + "to": [11.5, 8.9, 9.6], + "rotation": {"angle": 0, "axis": "y", "origin": [0, -2.1, 2.88]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 8, 4, 12], "texture": "#0"}, + "south": {"uv": [0, 8, 4, 12], "texture": "#0"}, + "west": {"uv": [0, 8, 4, 12], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "upper_jaw_root", + "from": [4.45, 6.75, 7.75], + "to": [11.55, 8.95, 11.45], + "faces": { + "north": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "east": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 8, 8, 12], "texture": "#0"} + } + }, + { + "name": "upper_jaw_mid", + "from": [4.75, 6.8, 10.55], + "to": [11.25, 8.65, 14.15], + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "south": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "west": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "upper_jaw_snout", + "from": [5.2, 7, 13.35], + "to": [10.8, 8.75, 15.5], + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "south": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "west": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 8, 8, 12], "texture": "#0"} + } + }, + { + "name": "nose_bridge", + "from": [6, 8.35, 12.35], + "to": [10, 9.25, 15.15], + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "south": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "west": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "left_upper_cheek", + "from": [4.05, 7, 8], + "to": [4.9, 9.75, 11.55], + "faces": { + "north": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "east": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 8, 8, 12], "texture": "#0"} + } + }, + { + "name": "right_upper_cheek", + "from": [11.1, 7, 8], + "to": [11.95, 9.75, 11.55], + "faces": { + "north": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "east": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 8, 8, 12], "texture": "#0"} + } + }, + { + "name": "lower_jaw_hinge", + "from": [4.45, 3.8, 7.75], + "to": [11.55, 6, 11.45], + "faces": { + "north": {"uv": [12, 12, 16, 16], "texture": "#0"}, + "east": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "south": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "west": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "down": {"uv": [12, 12, 16, 16], "texture": "#0"} + } + }, + { + "name": "lower_jaw_mid", + "from": [4.75, 3.65, 10.55], + "to": [11.25, 5.5, 14.15], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 8, 4, 12], "texture": "#0"}, + "south": {"uv": [0, 8, 4, 12], "texture": "#0"}, + "west": {"uv": [0, 8, 4, 12], "texture": "#0"}, + "up": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "lower_jaw_chin", + "from": [5.2, 3.45, 13.35], + "to": [10.8, 5.2, 15.5], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "left_eye_white", + "from": [3.6, 8.05, 9.3], + "to": [3.82, 8.7, 10.7], + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "west": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "left_eye_frame", + "from": [3.8, 7.85, 9.05], + "to": [4.08, 8.9, 10.95], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "south": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "west": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "right_eye_white", + "from": [12.18, 8.05, 9.3], + "to": [12.4, 8.7, 10.7], + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "west": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "right_eye_frame", + "from": [11.92, 7.85, 9.05], + "to": [12.2, 8.9, 10.95], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "south": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "west": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "upper_jaw_horn_base", + "from": [6.85, 8.45, 8.25], + "to": [9.15, 9.75, 11.75], + "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 8.7, 8.55]}, + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "south": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "west": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "upper_jaw_horn_tip", + "from": [7.3, 9, 9.4], + "to": [8.7, 9.9, 15.2], + "rotation": {"angle": -45, "axis": "x", "origin": [8, 9.15, 9.55]}, + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "south": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "west": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "upper_left_fang", + "from": [4.85, 5.55, 10.85], + "to": [5.65, 6.8, 12], + "rotation": {"angle": 22.5, "axis": "x", "origin": [5.25, 6.65, 11]}, + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "west": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "upper_right_fang", + "from": [10.35, 5.55, 10.85], + "to": [11.15, 6.8, 12], + "rotation": {"angle": 22.5, "axis": "x", "origin": [10.75, 6.65, 11]}, + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "west": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "upper_left_front_tooth", + "from": [6.05, 5.7, 13], + "to": [6.75, 6.85, 14], + "rotation": {"angle": 22.5, "axis": "x", "origin": [6.4, 6.7, 13.1]}, + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "west": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "upper_right_front_tooth", + "from": [9.25, 5.7, 13], + "to": [9.95, 6.85, 14], + "rotation": {"angle": 22.5, "axis": "x", "origin": [9.6, 6.7, 13.1]}, + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "west": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "lower_left_tooth", + "from": [5.35, 5.35, 10.3], + "to": [6.05, 6.35, 11.35], + "rotation": {"angle": -22.5, "axis": "x", "origin": [5.7, 5.45, 10.45]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "west": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "lower_right_tooth", + "from": [9.95, 5.35, 10.3], + "to": [10.65, 6.35, 11.35], + "rotation": {"angle": -22.5, "axis": "x", "origin": [10.3, 5.45, 10.45]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "west": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "left_blue_neck_whisker", + "from": [2, 4.15, 5.69], + "to": [6.2, 5.25, 7.72], + "rotation": {"angle": -45, "axis": "y", "origin": [5.9, 4.7, 7.4]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "right_blue_neck_whisker", + "from": [9.8, 4.75, 5.69], + "to": [14, 5.85, 7.72], + "rotation": {"angle": 45, "axis": "y", "origin": [10.1, 5.3, 7.4]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "left_gold_neck_whisker", + "from": [3.75, 7.15, 3.41], + "to": [7.5, 8.2, 5.09], + "rotation": {"angle": -45, "axis": "y", "origin": [7.25, 7.7, 4.88]}, + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "south": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "west": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "right_gold_neck_whisker", + "from": [8.6, 7.15, 3.41], + "to": [12.35, 8.2, 5.09], + "rotation": {"angle": 45, "axis": "y", "origin": [8.85, 7.7, 4.88]}, + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "south": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "west": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "top_left_blue_streamer", + "from": [7.25, 7.5, 5.27], + "to": [8.45, 8.7, 7.79], + "rotation": {"angle": 22.5, "axis": "x", "origin": [7.85, 7.7, 7.47]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "top_right_gold_streamer", + "from": [9.35, 7.65, 1.44], + "to": [10.55, 8.95, 4.1], + "rotation": {"angle": 22.5, "axis": "x", "origin": [9.95, 7.9, 3.71]}, + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "south": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "west": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "top_center_crest", + "from": [7.15, 7.65, 2.38], + "to": [8.85, 9, 4.48], + "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 7.85, 4.17]}, + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "south": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "west": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "lower_left_blue_streamer", + "from": [4.95, 8.7, 4.08], + "to": [6.25, 9.8, 6.43], + "rotation": {"angle": 22.5, "axis": "x", "origin": [5.6, 9.7, 6.25]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "lower_right_gold_streamer", + "from": [7.95, 3.7, 1.28], + "to": [9.25, 4.8, 3.52], + "rotation": {"angle": -22.5, "axis": "x", "origin": [8.6, 4.7, 1.35]}, + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "south": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "west": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "left_rear_gold_barb", + "from": [6.05, 4.85, 1.53], + "to": [7.1, 5.75, 4.01], + "rotation": {"angle": -22.5, "axis": "x", "origin": [6.6, 5.55, 3.77]}, + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "east": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "south": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "west": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "right_rear_blue_barb", + "from": [10, 8.15, 4.53], + "to": [11.05, 9.05, 7.01], + "rotation": {"angle": 45, "axis": "x", "origin": [10.5, 8.85, 6.77]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "upper_left_middle_tooth", + "from": [5.1, 5.6, 12], + "to": [5.75, 6.75, 12.9], + "rotation": {"angle": 22.5, "axis": "x", "origin": [5.43, 6.65, 12.1]}, + "faces": { + "north": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "east": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "west": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [12, 8, 16, 12], "texture": "#0"} + } + }, + { + "name": "upper_right_middle_tooth", + "from": [10.25, 5.6, 12], + "to": [10.9, 6.75, 12.9], + "rotation": {"angle": 22.5, "axis": "x", "origin": [10.58, 6.65, 12.1]}, + "faces": { + "north": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "east": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "west": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [12, 8, 16, 12], "texture": "#0"} + } + }, + { + "name": "lower_left_middle_tooth", + "from": [5.45, 5, 11.8], + "to": [6.1, 6, 12.75], + "rotation": {"angle": -22.5, "axis": "x", "origin": [5.78, 5.1, 11.95]}, + "faces": { + "north": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "east": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "west": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [12, 8, 16, 12], "texture": "#0"} + } + }, + { + "name": "lower_right_middle_tooth", + "from": [9.9, 5, 11.8], + "to": [10.55, 6, 12.75], + "rotation": {"angle": -22.5, "axis": "x", "origin": [10.23, 5.1, 11.95]}, + "faces": { + "north": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "east": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "west": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [12, 8, 16, 12], "texture": "#0"} + } + }, + { + "name": "lower_left_front_tooth", + "from": [5.75, 4.65, 13.25], + "to": [6.4, 5.7, 14.15], + "rotation": {"angle": -22.5, "axis": "x", "origin": [6.08, 4.75, 13.4]}, + "faces": { + "north": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "east": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "west": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [12, 8, 16, 12], "texture": "#0"} + } + }, + { + "name": "lower_right_front_tooth", + "from": [9.6, 4.65, 13.25], + "to": [10.25, 5.7, 14.15], + "rotation": {"angle": -22.5, "axis": "x", "origin": [9.93, 4.75, 13.4]}, + "faces": { + "north": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "east": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "west": {"uv": [12, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [12, 8, 16, 12], "texture": "#0"} + } + } + ], + "display": { + "gui": { + "rotation": [20, 135, 0], + "scale": [1.05, 1.05, 1.05] + } + }, + "groups": [ + { + "name": "stardust_dragon_head", + "origin": [8, 8, 8], + "scope": 0, + "color": 4, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_tail.json b/src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_tail.json new file mode 100644 index 0000000..94f919a --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/models/block/stardust_dragon_tail.json @@ -0,0 +1,235 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Codex", + "ambientocclusion": false, + "texture_size": [64, 64], + "textures": { + "0": "lzxnoneterraria:block/stardust_dragon_tail", + "particle": "lzxnoneterraria:block/stardust_dragon_body_a" + }, + "elements": [ + { + "name": "tail_root_core", + "from": [5.25, 4.6, 3], + "to": [10.75, 9.55, 14.6], + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [8, 8, 12, 12], "texture": "#0"}, + "south": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "west": {"uv": [8, 8, 12, 12], "texture": "#0"}, + "up": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "down": {"uv": [12, 0, 16, 4], "texture": "#0"} + } + }, + { + "name": "tail_middle_core", + "from": [5.8, 5.8, -0.4], + "to": [10.2, 10.2, 4.6], + "faces": { + "north": {"uv": [8, 8, 12, 12], "texture": "#0"}, + "east": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "south": {"uv": [8, 8, 12, 12], "texture": "#0"}, + "west": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "up": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "down": {"uv": [12, 0, 16, 4], "texture": "#0"} + } + }, + { + "name": "tail_tip_core", + "from": [6.65, 6.65, -2.5], + "to": [9.35, 9.35, 0.6], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 4]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "root_upper_gold_armor", + "from": [4.65, 7.75, 3.7], + "to": [11.35, 10.55, 14.3], + "rotation": {"angle": 0, "axis": "y", "origin": [0, -0.3, 0]}, + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 8, 8, 12], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "root_gold_armor_rise", + "from": [5.1, 9.75, 9.1], + "to": [10.9, 10.6, 12.6], + "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 9.85, 9.1]}, + "faces": { + "north": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "east": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "south": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "west": {"uv": [4, 12, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "middle_upper_small_fin", + "from": [7.2, 9.45, -0.9], + "to": [8.8, 11.5, 2.3], + "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 9.7, 2.05]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "middle_lower_small_fin", + "from": [7.2, 4.7, -1], + "to": [8.8, 6.75, 2.2], + "rotation": {"angle": -22.5, "axis": "x", "origin": [8, 6.5, 1.95]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "upper_tail_fin_base", + "from": [7.1, 8, -5.075], + "to": [8.9, 11, -1.225], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 5.4]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "upper_tail_fin_tip", + "from": [7.35, 9.75, -8.35], + "to": [8.65, 11.85, -5.05], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 5.1]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "lower_tail_fin_base", + "from": [7.1, 5, -5.075], + "to": [8.9, 8, -1.225], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 5.4]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "lower_tail_fin_tip", + "from": [7.35, 4.05, -8.35], + "to": [8.65, 6.25, -5.05], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 5.1]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "left_tail_fin_base", + "from": [5, 7.1, -6.475], + "to": [8, 8.9, -2.625], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 4]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "left_tail_fin_tip", + "from": [4.4, 7.35, -9.05], + "to": [6.7, 8.65, -5.75], + "rotation": {"angle": 0, "axis": "y", "origin": [2.1, 0, 4.4]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "right_tail_fin_base", + "from": [8, 7.1, -6.475], + "to": [11, 8.9, -2.625], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 4]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "right_tail_fin_tip", + "from": [9.4, 7.35, -9.05], + "to": [11.8, 8.65, -5.75], + "rotation": {"angle": 0, "axis": "y", "origin": [-2.2, 0, 4.4]}, + "faces": { + "north": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + } + ], + "display": { + "gui": { + "rotation": [20, 135, 0], + "scale": [1.1, 1.1, 1.1] + } + }, + "groups": [ + { + "name": "stardust_dragon_tail", + "origin": [8, 8, 8], + "scope": 0, + "color": 1, + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon.json b/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon.json new file mode 100644 index 0000000..752d29f --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon.json @@ -0,0 +1,450 @@ +{ + "credit": "Made with Codex", + "texture_size": [16, 16], + "ambientocclusion": false, + "textures": { + "0": "lzxnoneterraria:item/stardust_dragon_palette", + "particle": "lzxnoneterraria:item/stardust_dragon_palette" + }, + "elements": [ + { + "name": "head_core", + "from": [0.7, 6.1, 6.2], + "to": [3.1, 9.8, 9.8], + "rotation": {"angle": -22.5, "axis": "z", "origin": [2.0, 8.0, 8.0]}, + "faces": { + "north": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "south": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "west": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "upper_jaw", + "from": [0.0, 8.2, 6.6], + "to": [1.8, 10.1, 9.4], + "rotation": {"angle": -22.5, "axis": "z", "origin": [1.2, 8.7, 8.0]}, + "faces": { + "north": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "east": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "south": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "west": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "lower_jaw", + "from": [0.0, 5.8, 6.7], + "to": [1.9, 7.3, 9.3], + "rotation": {"angle": 22.5, "axis": "z", "origin": [1.1, 7.0, 8.0]}, + "faces": { + "north": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "east": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "south": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "west": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "up": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "down": {"uv": [12, 0, 16, 4], "texture": "#0"} + } + }, + { + "name": "eye_glow", + "from": [1.0, 8.2, 5.95], + "to": [1.6, 8.8, 6.25], + "faces": { + "north": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "east": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "south": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "west": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [8, 4, 12, 8], "texture": "#0"} + } + }, + { + "name": "top_horn", + "from": [0.5, 9.6, 7.0], + "to": [2.5, 10.3, 9.0], + "rotation": {"angle": 45, "axis": "z", "origin": [1.0, 9.8, 8.0]}, + "faces": { + "north": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "east": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "west": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "chin_horn", + "from": [0.7, 5.4, 7.0], + "to": [2.3, 6.0, 9.0], + "rotation": {"angle": -45, "axis": "z", "origin": [1.0, 6.0, 8.0]}, + "faces": { + "north": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "east": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "west": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "neck_segment", + "from": [2.6, 6.6, 6.5], + "to": [4.1, 9.4, 9.5], + "rotation": {"angle": 22.5, "axis": "z", "origin": [3.3, 8.0, 8.0]}, + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "east": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [0, 4, 4, 8], "texture": "#0"} + } + }, + { + "name": "body_segment_0", + "from": [3.8, 6.5, 6.6], + "to": [5.3, 9.5, 9.4], + "rotation": {"angle": -22.5, "axis": "z", "origin": [4.5, 8.0, 8.0]}, + "faces": { + "north": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "south": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "west": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [0, 4, 4, 8], "texture": "#0"} + } + }, + { + "name": "body_segment_1", + "from": [5.0, 6.2, 6.7], + "to": [6.6, 9.2, 9.3], + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "east": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [0, 4, 4, 8], "texture": "#0"} + } + }, + { + "name": "body_segment_2", + "from": [6.3, 6.4, 6.7], + "to": [7.9, 9.4, 9.3], + "rotation": {"angle": 22.5, "axis": "z", "origin": [7.1, 8.0, 8.0]}, + "faces": { + "north": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "south": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "west": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [0, 4, 4, 8], "texture": "#0"} + } + }, + { + "name": "body_segment_3", + "from": [7.6, 6.0, 6.8], + "to": [9.1, 9.0, 9.2], + "rotation": {"angle": -22.5, "axis": "z", "origin": [8.3, 7.5, 8.0]}, + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "east": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [0, 4, 4, 8], "texture": "#0"} + } + }, + { + "name": "body_segment_4", + "from": [8.8, 6.2, 6.9], + "to": [10.2, 8.8, 9.1], + "faces": { + "north": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "south": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "west": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [0, 4, 4, 8], "texture": "#0"} + } + }, + { + "name": "tail_base", + "from": [10.0, 6.6, 7.0], + "to": [11.7, 8.8, 9.0], + "rotation": {"angle": 22.5, "axis": "z", "origin": [10.8, 7.7, 8.0]}, + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "east": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [0, 4, 4, 8], "texture": "#0"} + } + }, + { + "name": "tail_mid", + "from": [11.4, 6.8, 7.1], + "to": [13.0, 8.3, 8.9], + "rotation": {"angle": -22.5, "axis": "z", "origin": [12.0, 7.5, 8.0]}, + "faces": { + "north": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "south": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "west": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [0, 4, 4, 8], "texture": "#0"} + } + }, + { + "name": "tail_tip", + "from": [12.8, 7.1, 7.3], + "to": [14.3, 8.1, 8.7], + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "east": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [12, 4, 16, 8], "texture": "#0"} + } + }, + { + "name": "tail_fin_upper", + "from": [13.4, 8.0, 7.1], + "to": [15.8, 9.2, 8.9], + "rotation": {"angle": 22.5, "axis": "z", "origin": [14.0, 8.0, 8.0]}, + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "east": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "tail_fin_lower", + "from": [13.4, 5.9, 7.1], + "to": [15.8, 7.1, 8.9], + "rotation": {"angle": -22.5, "axis": "z", "origin": [14.0, 7.0, 8.0]}, + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "east": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "west": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "up": {"uv": [8, 0, 12, 4], "texture": "#0"}, + "down": {"uv": [12, 4, 16, 8], "texture": "#0"} + } + }, + { + "name": "tail_fork_center", + "from": [14.1, 7.2, 7.2], + "to": [16.0, 8.0, 8.8], + "faces": { + "north": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "east": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [12, 4, 16, 8], "texture": "#0"} + } + }, + { + "name": "belly_light_0", + "from": [3.0, 5.7, 6.4], + "to": [4.6, 6.3, 9.6], + "faces": { + "north": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "east": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "west": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [12, 4, 16, 8], "texture": "#0"} + } + }, + { + "name": "belly_light_1", + "from": [5.2, 5.4, 6.5], + "to": [6.7, 6.0, 9.5], + "faces": { + "north": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "east": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "west": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [12, 4, 16, 8], "texture": "#0"} + } + }, + { + "name": "belly_light_2", + "from": [7.5, 5.4, 6.6], + "to": [8.9, 6.0, 9.4], + "faces": { + "north": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "east": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "west": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [12, 4, 16, 8], "texture": "#0"} + } + }, + { + "name": "belly_light_3", + "from": [9.6, 5.8, 6.8], + "to": [11.0, 6.3, 9.2], + "faces": { + "north": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "east": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "west": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [12, 4, 16, 8], "texture": "#0"} + } + }, + { + "name": "spine_0", + "from": [3.6, 9.0, 7.1], + "to": [4.3, 11.2, 8.9], + "rotation": {"angle": 22.5, "axis": "z", "origin": [3.8, 9.3, 8.0]}, + "faces": { + "north": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "east": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "west": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "spine_1", + "from": [5.1, 8.8, 7.1], + "to": [5.8, 10.8, 8.9], + "rotation": {"angle": -22.5, "axis": "z", "origin": [5.4, 9.1, 8.0]}, + "faces": { + "north": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "east": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "west": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "spine_2", + "from": [6.7, 9.0, 7.1], + "to": [7.4, 11.0, 8.9], + "rotation": {"angle": 22.5, "axis": "z", "origin": [6.9, 9.3, 8.0]}, + "faces": { + "north": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "east": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "west": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "spine_3", + "from": [8.5, 8.5, 7.2], + "to": [9.1, 10.2, 8.8], + "rotation": {"angle": -22.5, "axis": "z", "origin": [8.7, 8.8, 8.0]}, + "faces": { + "north": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "east": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "south": {"uv": [0, 4, 4, 8], "texture": "#0"}, + "west": {"uv": [4, 4, 8, 8], "texture": "#0"}, + "up": {"uv": [8, 4, 12, 8], "texture": "#0"}, + "down": {"uv": [4, 4, 8, 8], "texture": "#0"} + } + }, + { + "name": "side_fin_front", + "from": [2.7, 6.0, 9.0], + "to": [4.2, 7.0, 10.6], + "rotation": {"angle": -22.5, "axis": "x", "origin": [3.2, 6.4, 9.2]}, + "faces": { + "north": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "south": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "west": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + }, + { + "name": "side_fin_mid", + "from": [6.0, 5.7, 9.0], + "to": [7.5, 6.7, 10.5], + "rotation": {"angle": -22.5, "axis": "x", "origin": [6.6, 6.0, 9.2]}, + "faces": { + "north": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "south": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "west": {"uv": [4, 0, 8, 4], "texture": "#0"}, + "up": {"uv": [12, 4, 16, 8], "texture": "#0"}, + "down": {"uv": [8, 0, 12, 4], "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 0, 0], + "translation": [0, 2.5, 1], + "scale": [0.95, 0.95, 0.95] + }, + "thirdperson_lefthand": { + "rotation": [75, 0, 0], + "translation": [0, 2.5, 1], + "scale": [0.95, 0.95, 0.95] + }, + "firstperson_righthand": { + "rotation": [0, -90, 25], + "translation": [0, 2.5, 0], + "scale": [1.0, 1.0, 1.0] + }, + "firstperson_lefthand": { + "rotation": [0, 90, -25], + "translation": [0, 2.5, 0], + "scale": [1.0, 1.0, 1.0] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.65, 0.65, 0.65] + }, + "gui": { + "rotation": [20, 225, 0], + "translation": [0, 0, 0], + "scale": [1.0, 1.0, 1.0] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, 0, 0], + "scale": [0.85, 0.85, 0.85] + } + }, + "groups": [ + { + "name": "head", + "origin": [2, 8, 8], + "color": 4, + "children": [0, 1, 2, 3, 4, 5] + }, + { + "name": "body", + "origin": [7, 8, 8], + "color": 3, + "children": [6, 7, 8, 9, 10, 11, 18, 19, 20, 21, 22, 23, 24, 25] + }, + { + "name": "tail", + "origin": [13, 8, 8], + "color": 1, + "children": [12, 13, 14, 15, 16, 17] + } + ] +} diff --git a/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_body_a.json b/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_body_a.json new file mode 100644 index 0000000..93350e5 --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_body_a.json @@ -0,0 +1,3 @@ +{ + "parent": "lzxnoneterraria:block/stardust_dragon_body_a" +} diff --git a/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_body_b.json b/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_body_b.json new file mode 100644 index 0000000..7227f91 --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_body_b.json @@ -0,0 +1,3 @@ +{ + "parent": "lzxnoneterraria:block/stardust_dragon_body_b" +} diff --git a/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_head.json b/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_head.json new file mode 100644 index 0000000..d44ca20 --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_head.json @@ -0,0 +1,3 @@ +{ + "parent": "lzxnoneterraria:block/stardust_dragon_head" +} diff --git a/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_staff.json b/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_staff.json new file mode 100644 index 0000000..d2c4d83 --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_staff.json @@ -0,0 +1,6 @@ +{ + "parent": "lzxnoneterraria:item/sword3", + "textures": { + "layer0": "lzxnoneterraria:item/stardust_dragon_staff" + } +} diff --git a/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_tail.json b/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_tail.json new file mode 100644 index 0000000..900c670 --- /dev/null +++ b/src/main/resources/assets/lzxnoneterraria/models/item/stardust_dragon_tail.json @@ -0,0 +1,3 @@ +{ + "parent": "lzxnoneterraria:block/stardust_dragon_tail" +} diff --git a/src/main/resources/assets/lzxnoneterraria/sounds.json b/src/main/resources/assets/lzxnoneterraria/sounds.json index dc9630c..13ea0fc 100644 --- a/src/main/resources/assets/lzxnoneterraria/sounds.json +++ b/src/main/resources/assets/lzxnoneterraria/sounds.json @@ -29,6 +29,9 @@ "summon_terraprisma": { "sounds": ["lzxnoneterraria:summon_terraprisma"] }, + "summon": { + "sounds": ["lzxnoneterraria:summon"] + }, "whip_use": { "sounds": ["lzxnoneterraria:whip_use"] }, diff --git a/src/main/resources/assets/lzxnoneterraria/sounds/summon.ogg b/src/main/resources/assets/lzxnoneterraria/sounds/summon.ogg new file mode 100644 index 0000000000000000000000000000000000000000..69b56747029518052f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=NLm^yms2m`pSWAShL=o%P>7#doc7+aZ| zY8x0>85n##d{q@iLvDUbW?Cg~4Gr^hX96{7z-=hW%uOvWNz5%k*JEO3U zJmc?kiu*qs_9!vVn;p#9*xk8%y}-WmB$0U*VEGqTLl;7&Sp?uaL6nnmT_S&YeZSov2C0I z>ObUXFoZfxpWU!){}HhODfb^IAC_~(@7;QaLttxs4?~5}6|SerEWFQ`uK4T1d|~m1 zYu7j%xC(BDGYB($mJIqKYQhl4(9AvS`~;`X>l-$%VURlGxln=8%b00_@REZvVGU(B z*-Remv$G~J&EWmVuEvlnq2BWBv9Luw56$tLp^|7xA#a#ml)ybPp0f2QDq z75oiq4xc42tvBMmWyZLMA&2P-XW4Gf1lAT-H--2D^jDQB`hqUJ68$xvg@z*fAHLtrZv13SJIfhmPENZ0^Yc8j1sVGfoLnz{ zf$3a@zu>>qQ>8ij*Pou>@RK3*?Wa1%DA{AY;+0>x=e$14R`>F1^1nw1Hv0V7VA7XA z`}rmP1>HA|HmAyRE}o*na#JjE%A>z*K(#h3A6p7zANub*+q0ajAm=;xh2M-<*uUI- zC%)i0!z-7yV1X~Ia`pZ)sV(l}zP*#_Md5VRbt~3Q?mG1hYjsg;RnX0|noiZ@8x)(Erm|%p$u@`#{-#hOdlwIG;HhB5uXGsF&I2u{an^LB{Ts5sRj_X literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/lzxnoneterraria/textures/block/stardust_dragon_body_b.png b/src/main/resources/assets/lzxnoneterraria/textures/block/stardust_dragon_body_b.png new file mode 100644 index 0000000000000000000000000000000000000000..beef46a316159bb53a2b27a9ff228f8df5231ce2 GIT binary patch literal 1319 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=3dtTpz6=aiY77hwEes65fI=o%P>7#doc7+aZ| zY8x0>85n##d{q@iLvDUbW?Cg~4Gr^hX96{7z-=hW%uOvWNz5%k*JEO3U zJmc?kiu*qs_9!vVn;p#9*xk8%y}-WmB$0U*VEGqTLl;7&Sp?uaL6nnmT_S&YeZSov2C0I z>ObUXFoZfxpWU!){}HhODfb^IAC_~(@7;QaLttxs4?~5}6|SerEWFQ`uK4T1d|~m1 zYu7j%xC(BDGYB($mJIqKYQhl4(9AvS`~;`X>l-$%VURlGxln=8%b00_@REZvVGU(B z*-Remv$G~J&EWmVuEvlnq2BWBv9Luw56$tLp^|7xA#a#ml)ybPp0f2QDq z75oiq4xc42tvBMmWyZLMA&2P-XW4Gf1lAT-H--2D^jDQB`hqUJ68$xvg@z*fAHLtrZv13SJIfhmPENZ0^Yc8j1sVGfoLnz{ zf$3a@zu>>qQ>8ij*Pou>@RK3*?Wa1%DA{AY;+0>x=e$14R`>F1^1nw1Hv0V7VA7XA z`}rmP1>HA|HmAyRE}o*na#JjE%A>z*K(#h3A6p7zANub*+q0ajAm=;xh2M-<*uUI- zC%)i0!z-7yV1X~Ia`pZ)sV(l}zP*#_Md5VRbt~3Q?mG1hYjsg;RnX0|noiZ@8x)(Erm|%p$u@`#{-#hOdlwIG;HhB5uXGsF&I2u{an^LB{Ts5sRj_X literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/lzxnoneterraria/textures/block/stardust_dragon_head.png b/src/main/resources/assets/lzxnoneterraria/textures/block/stardust_dragon_head.png new file mode 100644 index 0000000000000000000000000000000000000000..552bf0fd6e5ce938a8d8cec7f0e4849d8b548559 GIT binary patch literal 1799 zcmZ{lc~H}58pq!x4bVU^A_xd76yz*xIHLjN2MLfMR{=TXFo00GYJh+kSotji;zcPU z^}t{$RhL$x94iq5L8wp&cNKyJ<&GRN7$p)wo9)i*%+5}qndkXD^E}V@dFK7=J@4=9 ziN)-~006L53OPVQ=-;lQq=+>MsgnvA#8Lu$0AQK`0OtcBSCn8802z1y7HI$wuK}P< zuXy~GlcJ#%bJ&xtpu*Nk&AAGEPN#&WD@gm(B}r}ribR<~^>J5TR6$}a_H|#l^hi60Itqc=e=jf+QsUAX(JA!**Vq#NbEIMad>{bmVJg`*C~JJ~rcaT+yH4TD8)BB= zHA{F)NR5br_=ZJ!Cvb*lBG+_(+;;XJZuU@MKdbX+?E;n6SFQyHZj#$(os}dNjm}Eg z@>+>^so>Ui@pbXyqWG=<#;9$5Ggs<6eExado#v&bTIT%y8g?t&GiQ4ewkk&w^7Puw z^z};f4by>EKf#NY{5nsOWlz*$s=$=U9YBzc;Y&+k+wB2FcPP3{9S(-P1$UQmP3?`9 zO8$?LRS3exdJ@b+*?kVl_2DcYRi^>jZOB7HnyG6SP?T*5T{>WB2CQ8z3xqJWTR&Ms z#>T)ES@auKtr|%Vu0z(b{E$rpS`ezF8rj1_g@PMLcw6dg~bTaY-6f@*zRBDp2sS_j%Oc7;Hp8*}MhLb-cXJ(Dt^THNABBs0^og}_&kp z@MEbKeg^<#O;SV(>D+e4=>AsSs&jy&HvBWMzw{1{Fls>LK6w$nI{n7{Ssr`j`+qvL z(Q8}DdcsDk9kTj5K?5oF7Jq z$Z@n-X2A?XdtiRW;gI0>omjX}T>MSp4L|2Aj^e1zXuoWSMtc-Ejc$=o3{9+Z-mq7& zG%_OU7g@_8rB|##o~X3(TQ?8K4+D?1=_LWJNRPK03;mx`Z|gl+g@?6x^J`;SJU&>S z5b3{a>6@34E`H|!7KdB@gpLZ_`xUl(f?&S!oOIVLTOOC-z#)#vP+kbA^%&g`WM%f; z<`>{R5RFD7LMW<@0K6T)dvpa0`rk4L{@n9#lv^f+!ddD3CB%e3uWPAu_cSQFSkPu- z)70@^hUR@d1}^kkiJ$#YIms<^Jak&#xr`Xxe|V-J0bp^qDFA(^{-#xvD?4jrFHrpyZ-9@h8;oN#h|si z@A69i?pPnLFMk)QjN5vNkYLPCscfpQyI(%Qc^*=(_z?ir-IrYJM$7vH_2?X- literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/lzxnoneterraria/textures/block/stardust_dragon_tail.png b/src/main/resources/assets/lzxnoneterraria/textures/block/stardust_dragon_tail.png new file mode 100644 index 0000000000000000000000000000000000000000..beef46a316159bb53a2b27a9ff228f8df5231ce2 GIT binary patch literal 1319 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=3dtTpz6=aiY77hwEes65fI=o%P>7#doc7+aZ| zY8x0>85n##d{q@iLvDUbW?Cg~4Gr^hX96{7z-=hW%uOvWNz5%k*JEO3U zJmc?kiu*qs_9!vVn;p#9*xk8%y}-WmB$0U*VEGqTLl;7&Sp?uaL6nnmT_S&YeZSov2C0I z>ObUXFoZfxpWU!){}HhODfb^IAC_~(@7;QaLttxs4?~5}6|SerEWFQ`uK4T1d|~m1 zYu7j%xC(BDGYB($mJIqKYQhl4(9AvS`~;`X>l-$%VURlGxln=8%b00_@REZvVGU(B z*-Remv$G~J&EWmVuEvlnq2BWBv9Luw56$tLp^|7xA#a#ml)ybPp0f2QDq z75oiq4xc42tvBMmWyZLMA&2P-XW4Gf1lAT-H--2D^jDQB`hqUJ68$xvg@z*fAHLtrZv13SJIfhmPENZ0^Yc8j1sVGfoLnz{ zf$3a@zu>>qQ>8ij*Pou>@RK3*?Wa1%DA{AY;+0>x=e$14R`>F1^1nw1Hv0V7VA7XA z`}rmP1>HA|HmAyRE}o*na#JjE%A>z*K(#h3A6p7zANub*+q0ajAm=;xh2M-<*uUI- zC%)i0!z-7yV1X~Ia`pZ)sV(l}zP*#_Md5VRbt~3Q?mG1hYjsg;RnX0|noiZ@8x)(Erm|%p$u@`#{-#hOdlwIG;HhB5uXGsF&I2u{an^LB{Ts5sRj_X literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/lzxnoneterraria/textures/item/stardust_dragon_staff.png b/src/main/resources/assets/lzxnoneterraria/textures/item/stardust_dragon_staff.png new file mode 100644 index 0000000000000000000000000000000000000000..f0ec478b088112c1650aa309cb808ba9723bd0a2 GIT binary patch literal 278 zcmeAS@N?(olHy`uVBq!ia0vp^S|H5A3?$9pUdaGbiUB?$u0YyRUhw~)6E=}=B>0{w zpZNEG3j^P*XaDci@2u53^8NqHmlE)gsheWKcDzJ(NA7XpoMi=kxKn-(N4Xj;w7t-nNTq7(zmy&mNLar-;Zp9*-&AZZQVb zG}o(wpt|NTDWw=M7w{^2Pd=j>k-T3=634<^8DB^5L--#L!Fvs3+dV;OXk;vd$@?2>=e2FVO%1 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/lzxnoneterraria/textures/ui/nav_render_icon.png b/src/main/resources/assets/lzxnoneterraria/textures/ui/nav_render_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..26f938cae26b7afc22e30a8e80cf94066f9a46f5 GIT binary patch literal 368 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8gx!3HG%?c?=kU|=-&ba4!+n3J5KAXM=2_MhjE zw*T~BQze!pI*E%zil=z#qI+&^K+yJk`k(*C1_lN-zbjfMDm9;Eb&=N5ICbs-5ERV6 z#WtC%K#GSuTKTyw4+u>9bcg4}pWM7k8Q-?ijPrLvGRgpNH3j&3pc>YJrqb?g6Im zt7|{!1QyMRo*>Y5T0h3U^ru~ivtbOEasRhOp3R(LVsDZfcI;Uk&vCTXV7h(fk%p^F zCD<;XIr?I$gicSQUTb4{zJiI)*9Tf(UxbGph~eUP{u0r?Qy}ct!7JzYxEx5xVifxl z^yW)qi1;Cfs#T3sPrr|Mu4$0FwuL`AM$d))#UlgpM + + + + + + + +