This commit is contained in:
LZX committed 2026-07-13 17:24:10 +08:00
1 parent 1fe3058aac
commit 20158e11fa
77 files changed
+859 -50

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ mod_name=Lzxnone Terraria
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=All Rights Reserved mod_license=All Rights Reserved
# The mod version. See https://semver.org/ # The mod version. See https://semver.org/
mod_version=1.2.3 mod_version=1.3.1
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources. # This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html # See https://maven.apache.org/guides/mini/guide-naming-conventions.html
@@ -116,6 +116,15 @@ public class Config {
public static final ModConfigSpec.DoubleValue ZENITH_TRAIL_ALPHA; public static final ModConfigSpec.DoubleValue ZENITH_TRAIL_ALPHA;
public static final ModConfigSpec.IntValue ZENITH_TRAIL_MAX_LENGTH; public static final ModConfigSpec.IntValue ZENITH_TRAIL_MAX_LENGTH;
public static final ModConfigSpec.DoubleValue FIRST_FRACTAL_PROJECTILE_DAMAGE;
public static final ModConfigSpec.DoubleValue FIRST_FRACTAL_BOUNDING_BOX_SIZE;
public static final ModConfigSpec.DoubleValue FIRST_FRACTAL_PROJECTILE_SPEED;
public static final ModConfigSpec.IntValue FIRST_FRACTAL_PROJECTILE_LIFETIME;
public static final ModConfigSpec.BooleanValue FIRST_FRACTAL_DISTANCE_MODE;
public static final ModConfigSpec.IntValue FIRST_FRACTAL_SCROLL_SPEED;
public static final ModConfigSpec.DoubleValue FIRST_FRACTAL_MAX_RANGE;
public static final ModConfigSpec.DoubleValue FIRST_FRACTAL_SPAWN_RANGE;
public static final ModConfigSpec.IntValue TRUE_EXCALIBUR_ROTATE_RANGE; public static final ModConfigSpec.IntValue TRUE_EXCALIBUR_ROTATE_RANGE;
public static final ModConfigSpec.IntValue TRUE_EXCALIBUR_MAX_HIT_COUNT; public static final ModConfigSpec.IntValue TRUE_EXCALIBUR_MAX_HIT_COUNT;
public static final ModConfigSpec.DoubleValue TRUE_EXCALIBUR_DAMAGE; public static final ModConfigSpec.DoubleValue TRUE_EXCALIBUR_DAMAGE;
@@ -238,6 +247,15 @@ public class Config {
public static double zenithTrailAlpha; public static double zenithTrailAlpha;
public static int zenithTrailMaxLength; public static int zenithTrailMaxLength;
public static double firstFractalProjectileDamage;
public static double firstFractalBoundingBoxSize;
public static double firstFractalProjectileSpeed;
public static int firstFractalProjectileLifetime;
public static boolean firstFractalDistanceMode;
public static int firstFractalScrollSpeed;
public static double firstFractalMaxRange;
public static double firstFractalSpawnRange;
public static int trueExcaliburRotateRange; public static int trueExcaliburRotateRange;
public static int trueExcaliburMaxHitCount; public static int trueExcaliburMaxHitCount;
public static double trueExcaliburDamage; public static double trueExcaliburDamage;
@@ -694,6 +712,42 @@ public class Config {
builder.pop(); builder.pop();
builder.push("first_fractal_settings");
FIRST_FRACTAL_PROJECTILE_DAMAGE = builder
.comment("弹射伤害")
.defineInRange("first_fractal_projectile_damage", 10.0, 0, 2147483647.0);
FIRST_FRACTAL_BOUNDING_BOX_SIZE = builder
.comment("弹射碰撞箱大小")
.defineInRange("first_fractal_bounding_box_size", 1.5, 0.5, 10.0);
FIRST_FRACTAL_PROJECTILE_SPEED = builder
.comment("弹射速度")
.defineInRange("first_fractal_projectile_speed", 1.5, 0, 10.0);
FIRST_FRACTAL_PROJECTILE_LIFETIME = builder
.comment("弹射生命周期")
.defineInRange("first_fractal_projectile_lifetime", 30, 1, 1200);
FIRST_FRACTAL_DISTANCE_MODE = builder
.comment("使用相对距离模式")
.define("first_fractal_distance_mode", true);
FIRST_FRACTAL_SCROLL_SPEED = builder
.comment("滚轮调节距离速度")
.defineInRange("first_fractal_scroll_speed", 4, 0, 128);
FIRST_FRACTAL_MAX_RANGE = builder
.comment("最大范围")
.defineInRange("first_fractal_max_range", 64.0, 1.0, 1024.0);
FIRST_FRACTAL_SPAWN_RANGE = builder
.comment("弹射生成范围")
.defineInRange("first_fractal_spawn_range", 16.0, 1.0, 64.0);
builder.pop();
builder.push("true_excalibur_settings"); builder.push("true_excalibur_settings");
TRUE_EXCALIBUR_ROTATE_RANGE = builder TRUE_EXCALIBUR_ROTATE_RANGE = builder
@@ -852,6 +906,14 @@ public class Config {
zenithScale = ZENITH_SCALE.get(); zenithScale = ZENITH_SCALE.get();
zenithTrailAlpha = ZENITH_TRAIL_ALPHA.get(); zenithTrailAlpha = ZENITH_TRAIL_ALPHA.get();
zenithTrailMaxLength = ZENITH_TRAIL_MAX_LENGTH.get(); zenithTrailMaxLength = ZENITH_TRAIL_MAX_LENGTH.get();
firstFractalProjectileDamage = FIRST_FRACTAL_PROJECTILE_DAMAGE.get();
firstFractalBoundingBoxSize = FIRST_FRACTAL_BOUNDING_BOX_SIZE.get();
firstFractalProjectileSpeed = FIRST_FRACTAL_PROJECTILE_SPEED.get();
firstFractalProjectileLifetime = FIRST_FRACTAL_PROJECTILE_LIFETIME.get();
firstFractalDistanceMode = FIRST_FRACTAL_DISTANCE_MODE.get();
firstFractalScrollSpeed = FIRST_FRACTAL_SCROLL_SPEED.get();
firstFractalMaxRange = FIRST_FRACTAL_MAX_RANGE.get();
firstFractalSpawnRange = FIRST_FRACTAL_SPAWN_RANGE.get();
trueExcaliburRotateRange = TRUE_EXCALIBUR_ROTATE_RANGE.get(); trueExcaliburRotateRange = TRUE_EXCALIBUR_ROTATE_RANGE.get();
trueExcaliburMaxHitCount = TRUE_EXCALIBUR_MAX_HIT_COUNT.get(); trueExcaliburMaxHitCount = TRUE_EXCALIBUR_MAX_HIT_COUNT.get();
trueExcaliburDamage = TRUE_EXCALIBUR_DAMAGE.get(); trueExcaliburDamage = TRUE_EXCALIBUR_DAMAGE.get();
@@ -1,11 +1,8 @@
package com.lzxnone.terraria; package com.lzxnone.terraria;
import com.lzxnone.terraria.entity.ModEntities; import com.lzxnone.terraria.entity.ModEntities;
import com.lzxnone.terraria.entity.beam.SwordBeam;
import com.lzxnone.terraria.entity.beam.SwordBeamRenderer; import com.lzxnone.terraria.entity.beam.SwordBeamRenderer;
import com.lzxnone.terraria.entity.projectile.StaticProjectile;
import com.lzxnone.terraria.entity.projectile.StaticProjectileRenderer; import com.lzxnone.terraria.entity.projectile.StaticProjectileRenderer;
import com.lzxnone.terraria.entity.summon.StaticSummon;
import com.lzxnone.terraria.entity.summon.StaticSummonRenderer; import com.lzxnone.terraria.entity.summon.StaticSummonRenderer;
import com.lzxnone.terraria.particle.*; import com.lzxnone.terraria.particle.*;
import net.minecraft.client.renderer.entity.BeeRenderer; import net.minecraft.client.renderer.entity.BeeRenderer;
@@ -39,5 +39,6 @@ public class ModCreativeModeTabs {
output.accept(ModItems.BLADE_OF_GRASS.get()); output.accept(ModItems.BLADE_OF_GRASS.get());
output.accept(ModItems.VOLCANO.get()); output.accept(ModItems.VOLCANO.get());
output.accept(ModItems.TERRAGRIM.get()); output.accept(ModItems.TERRAGRIM.get());
output.accept(ModItems.FIRST_FRACTAL.get());
}).build()); }).build());
} }
@@ -27,7 +27,7 @@ public class MEntityLuminance implements EntityLuminance {
public @Range(from = 0, to = 15) int getLuminance(@NonNull ItemLightSourceManager itemLightSourceManager, @NonNull Entity entity) { public @Range(from = 0, to = 15) int getLuminance(@NonNull ItemLightSourceManager itemLightSourceManager, @NonNull Entity entity) {
if(entity instanceof StaticProjectile projectile) { if(entity instanceof StaticProjectile projectile) {
switch(projectile.getEntityData().get(StaticProjectile.BEHAVIOR)) { switch(projectile.getEntityData().get(StaticProjectile.BEHAVIOR)) {
case StaticProjectileBehaviors.ENCHANTED_SWORD_BEAM, StaticProjectileBehaviors.STARFURY_STAR, StaticProjectileBehaviors.STAR_WRATH_STAR, StaticProjectileBehaviors.ZENITH_PROJECTILE -> { case StaticProjectileBehaviors.ENCHANTED_SWORD_BEAM, StaticProjectileBehaviors.STARFURY_STAR, StaticProjectileBehaviors.STAR_WRATH_STAR, StaticProjectileBehaviors.ZENITH_PROJECTILE, StaticProjectileBehaviors.MURAMASA_PROJECTILE -> {
return 15; return 15;
} }
default -> { default -> {
@@ -36,7 +36,7 @@ public class MEntityLuminance implements EntityLuminance {
} }
}else if(entity instanceof StaticSummon summon) { }else if(entity instanceof StaticSummon summon) {
switch(summon.getEntityData().get(StaticProjectile.BEHAVIOR)) { switch(summon.getEntityData().get(StaticProjectile.BEHAVIOR)) {
case StaticSummonBehaviors.THE_HORSEMANS_BLADE_JACK, StaticSummonBehaviors.INFLUX_WAVER_BEAM, StaticSummonBehaviors.MEOWMERE_PROJECTILE, StaticSummonBehaviors.TERRA_BLADE_BEAM -> { case StaticSummonBehaviors.THE_HORSEMANS_BLADE_JACK, StaticSummonBehaviors.INFLUX_WAVER_BEAM, StaticSummonBehaviors.MEOWMERE_PROJECTILE, StaticSummonBehaviors.TERRA_BLADE_BEAM, StaticSummonBehaviors.TRUE_NIGHTS_EDGE_BEAM, StaticSummonBehaviors.NIGHTS_EDGE_BEAM, StaticSummonBehaviors.LIGHTS_BANE_SLASH, StaticSummonBehaviors.TERRAGRIM_BEAM, StaticSummonBehaviors.FIRST_FRACTAL_PROJECTILE -> {
return 15; return 15;
} }
default -> { default -> {
@@ -45,7 +45,7 @@ public class MEntityLuminance implements EntityLuminance {
} }
}else if(entity instanceof SwordBeam beam) { }else if(entity instanceof SwordBeam beam) {
switch(beam.getEntityData().get(SwordBeam.BEHAVIOR)) { switch(beam.getEntityData().get(SwordBeam.BEHAVIOR)) {
case SwordBeamBehaviors.THE_HORSEMANS_BLADE, SwordBeamBehaviors.TERRA_BLADE -> { case SwordBeamBehaviors.THE_HORSEMANS_BLADE, SwordBeamBehaviors.TERRA_BLADE, SwordBeamBehaviors.TRUE_EXCALIBUR, SwordBeamBehaviors.TRUE_NIGHTS_EDGE, SwordBeamBehaviors.EXCALIBUR, SwordBeamBehaviors.NIGHTS_EDGE -> {
return 15; return 15;
} }
default -> { default -> {
@@ -9,7 +9,6 @@ import com.lzxnone.terraria.entity.summon.StaticSummon;
import com.lzxnone.terraria.entity.summon.StaticSummonBehaviors; import com.lzxnone.terraria.entity.summon.StaticSummonBehaviors;
import com.mojang.blaze3d.vertex.ByteBufferBuilder; import com.mojang.blaze3d.vertex.ByteBufferBuilder;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.Tesselator;
import net.minecraft.client.Camera; import net.minecraft.client.Camera;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.MultiBufferSource;
@@ -5,7 +5,6 @@ import com.lzxnone.terraria.entity.beam.SwordBeam;
import com.lzxnone.terraria.entity.projectile.StaticProjectile; import com.lzxnone.terraria.entity.projectile.StaticProjectile;
import com.lzxnone.terraria.entity.summon.BeeSummon; import com.lzxnone.terraria.entity.summon.BeeSummon;
import com.lzxnone.terraria.entity.summon.StaticSummon; import com.lzxnone.terraria.entity.summon.StaticSummon;
import com.lzxnone.terraria.entity.summon.StaticSummonRenderer;
import net.minecraft.core.registries.Registries; import net.minecraft.core.registries.Registries;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.EntityType;
@@ -75,7 +75,9 @@ public class SwordBeam extends Entity {
if(this.entityData.get(OWNER).orElse(null) != null) { if(this.entityData.get(OWNER).orElse(null) != null) {
UUID uuid = this.entityData.get(OWNER).orElse(null); UUID uuid = this.entityData.get(OWNER).orElse(null);
if(!this.level().isClientSide()) { if(!this.level().isClientSide()) {
setOwner(((ServerLevel) this.level()).getEntity(uuid)); if(uuid != null) {
setOwner(((ServerLevel) this.level()).getEntity(uuid));
}
}else { }else {
for(Entity entity : this.level().getEntities(this, this.getBoundingBox().inflate(64.0))) { for(Entity entity : this.level().getEntities(this, this.getBoundingBox().inflate(64.0))) {
if(entity.getUUID().equals(uuid)) { if(entity.getUUID().equals(uuid)) {
@@ -85,7 +85,9 @@ public class StaticSummon extends Entity {
if(this.entityData.get(OWNER).orElse(null) != null) { if(this.entityData.get(OWNER).orElse(null) != null) {
UUID uuid = this.entityData.get(OWNER).orElse(null); UUID uuid = this.entityData.get(OWNER).orElse(null);
if(!this.level().isClientSide()) { if(!this.level().isClientSide()) {
setOwner(((ServerLevel) this.level()).getEntity(uuid)); if(uuid != null) {
setOwner(((ServerLevel) this.level()).getEntity(uuid));
}
}else { }else {
for(Entity entity : this.level().getEntities(this, this.getBoundingBox().inflate(64.0))) { for(Entity entity : this.level().getEntities(this, this.getBoundingBox().inflate(64.0))) {
if(entity.getUUID().equals(uuid)) { if(entity.getUUID().equals(uuid)) {
@@ -18,6 +18,7 @@ public class StaticSummonBehaviors {
public static final String NIGHTS_EDGE_BEAM = "nights_edge_beam"; public static final String NIGHTS_EDGE_BEAM = "nights_edge_beam";
public static final String LIGHTS_BANE_SLASH = "lights_bane_slash"; public static final String LIGHTS_BANE_SLASH = "lights_bane_slash";
public static final String TERRAGRIM_BEAM = "terragrim_beam"; public static final String TERRAGRIM_BEAM = "terragrim_beam";
public static final String FIRST_FRACTAL_PROJECTILE = "first_fractal_projectile";
static { static {
BEHAVIORS.put(DEFAULT, new IStaticSummonBehavior() {}); BEHAVIORS.put(DEFAULT, new IStaticSummonBehavior() {});
@@ -30,6 +31,7 @@ public class StaticSummonBehaviors {
BEHAVIORS.put(NIGHTS_EDGE_BEAM, NightsEdge.SUMMON_BEHAVIOR); BEHAVIORS.put(NIGHTS_EDGE_BEAM, NightsEdge.SUMMON_BEHAVIOR);
BEHAVIORS.put(LIGHTS_BANE_SLASH, LightsBane.SUMMON_BEHAVIOR); BEHAVIORS.put(LIGHTS_BANE_SLASH, LightsBane.SUMMON_BEHAVIOR);
BEHAVIORS.put(TERRAGRIM_BEAM, Terragrim.SUMMON_BEHAVIOR); BEHAVIORS.put(TERRAGRIM_BEAM, Terragrim.SUMMON_BEHAVIOR);
BEHAVIORS.put(FIRST_FRACTAL_PROJECTILE, FirstFractal.SUMMON_BEHAVIOR);
} }
public static IStaticSummonBehavior getBehavior(String id) { public static IStaticSummonBehavior getBehavior(String id) {
@@ -1,11 +1,15 @@
package com.lzxnone.terraria.entity.summon; package com.lzxnone.terraria.entity.summon;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.PlayerModel;
import net.minecraft.client.model.geom.ModelLayers;
import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.EntityRenderer; import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.PathfinderMob; import net.minecraft.world.entity.PathfinderMob;
import net.minecraft.world.inventory.InventoryMenu; import net.minecraft.world.inventory.InventoryMenu;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@@ -16,6 +20,25 @@ public class StaticSummonRenderer extends EntityRenderer<Entity> {
super(context); super(context);
} }
private static PlayerModel<LivingEntity> WIDE_MODEL = null;
private static PlayerModel<LivingEntity> SLIM_MODEL = null;
public static PlayerModel<LivingEntity> getWideModel() {
if(WIDE_MODEL == null) {
var modelSet = Minecraft.getInstance().getEntityModels();
WIDE_MODEL = new PlayerModel<>(modelSet.bakeLayer(ModelLayers.PLAYER), false);
}
return WIDE_MODEL;
}
public static PlayerModel<LivingEntity> getSlimModel() {
if(SLIM_MODEL == null) {
var modelSet = Minecraft.getInstance().getEntityModels();
SLIM_MODEL = new PlayerModel<>(modelSet.bakeLayer(ModelLayers.PLAYER_SLIM), true);
}
return SLIM_MODEL;
}
@Override @Override
public void render(Entity entity, float entityYaw, float partialTick, public void render(Entity entity, float entityYaw, float partialTick,
PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) {
@@ -3,8 +3,10 @@ package com.lzxnone.terraria.event_handler;
import com.lzxnone.terraria.Config; import com.lzxnone.terraria.Config;
import com.lzxnone.terraria.LzxnoneTerraria; import com.lzxnone.terraria.LzxnoneTerraria;
import com.lzxnone.terraria.item.ModItems; import com.lzxnone.terraria.item.ModItems;
import com.lzxnone.terraria.item.weapon.melee.FirstFractal;
import com.lzxnone.terraria.item.weapon.melee.TrueCopperShortsword; import com.lzxnone.terraria.item.weapon.melee.TrueCopperShortsword;
import com.lzxnone.terraria.item.weapon.melee.Zenith; import com.lzxnone.terraria.item.weapon.melee.Zenith;
import com.lzxnone.terraria.network.payload.FirstFractalScrollPayload;
import com.lzxnone.terraria.network.payload.ZenithScrollPayload; import com.lzxnone.terraria.network.payload.ZenithScrollPayload;
import net.minecraft.ChatFormatting; import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
@@ -58,6 +60,31 @@ public class InputHandler {
PacketDistributor.sendToServer(new ZenithScrollPayload(scrollDelta)); PacketDistributor.sendToServer(new ZenithScrollPayload(scrollDelta));
} }
}else if(mainHand.getItem() instanceof FirstFractal) {
int count = mainHand.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY)
.copyTag().getInt("attackCount");
double scrollDelta = event.getScrollDeltaY();
if(scrollDelta != 0 && count > 0) {
event.setCanceled(true);
double deltaDist = mainHand.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY)
.copyTag().getDouble("deltaDist");
double finalDelta = deltaDist + scrollDelta * Config.firstFractalScrollSpeed;
if(Config.firstFractalDistanceMode) {
if(finalDelta > Config.firstFractalMaxRange) finalDelta = Config.firstFractalMaxRange;
else if(finalDelta < -Config.firstFractalMaxRange) finalDelta = -Config.firstFractalMaxRange;
}else {
if(finalDelta > Config.firstFractalMaxRange) finalDelta = Config.firstFractalMaxRange;
else if(finalDelta < 0) finalDelta = 0;
}
MutableComponent displayText = Component.empty();
displayText.append(Component.literal(String.format("%s", Config.firstFractalDistanceMode ? "相对距离: " : "绝对距离: ")).withStyle(ChatFormatting.WHITE))
.append(Component.literal(String.format("%.1f", finalDelta)).withStyle(ChatFormatting.GREEN, ChatFormatting.BOLD));
player.displayClientMessage(displayText, true);
PacketDistributor.sendToServer(new FirstFractalScrollPayload(scrollDelta));
}
} }
} }
@@ -2,6 +2,7 @@ package com.lzxnone.terraria.item;
import com.lzxnone.terraria.LzxnoneTerraria; import com.lzxnone.terraria.LzxnoneTerraria;
import com.lzxnone.terraria.item.projectile.*; import com.lzxnone.terraria.item.projectile.*;
import com.lzxnone.terraria.item.projectile.first_fractal.*;
import com.lzxnone.terraria.item.weapon.melee.*; import com.lzxnone.terraria.item.weapon.melee.*;
import net.minecraft.world.item.Item; import net.minecraft.world.item.Item;
import net.neoforged.neoforge.registries.DeferredItem; import net.neoforged.neoforge.registries.DeferredItem;
@@ -32,6 +33,7 @@ public class ModItems {
public static final DeferredItem<Item> EXCALIBUR = ITEMS.register("excalibur", Excalibur::new); public static final DeferredItem<Item> EXCALIBUR = ITEMS.register("excalibur", Excalibur::new);
public static final DeferredItem<Item> TRUE_EXCALIBUR = ITEMS.register("true_excalibur", TrueExcalibur::new); public static final DeferredItem<Item> TRUE_EXCALIBUR = ITEMS.register("true_excalibur", TrueExcalibur::new);
public static final DeferredItem<Item> TRUE_COPPER_SHORTSWORD = ITEMS.register("true_copper_shortsword", TrueCopperShortsword::new); public static final DeferredItem<Item> TRUE_COPPER_SHORTSWORD = ITEMS.register("true_copper_shortsword", TrueCopperShortsword::new);
public static final DeferredItem<Item> FIRST_FRACTAL = ITEMS.register("first_fractal", FirstFractal::new);
//弹射物 //弹射物
public static final DeferredItem<Item> ENCHANTED_SWORD_BEAM = ITEMS.register("enchanted_sword_beam", EnchantedSwordBeam::new); public static final DeferredItem<Item> ENCHANTED_SWORD_BEAM = ITEMS.register("enchanted_sword_beam", EnchantedSwordBeam::new);
@@ -42,4 +44,19 @@ public class ModItems {
public static final DeferredItem<Item> STAR_WRATH_STAR = ITEMS.register("star_wrath_star", StarWrathStar::new); public static final DeferredItem<Item> STAR_WRATH_STAR = ITEMS.register("star_wrath_star", StarWrathStar::new);
public static final DeferredItem<Item> MEOWMERE_PROJECTILE = ITEMS.register("meowmere_projectile", MeowmereProjectile::new); public static final DeferredItem<Item> MEOWMERE_PROJECTILE = ITEMS.register("meowmere_projectile", MeowmereProjectile::new);
public static final DeferredItem<Item> LEAF_PROJECTILE = ITEMS.register("leaf_projectile", LeafProjectile::new); public static final DeferredItem<Item> LEAF_PROJECTILE = ITEMS.register("leaf_projectile", LeafProjectile::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE0 = ITEMS.register("first_fractal_projectile0", FirstFractalProjectile0::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE1 = ITEMS.register("first_fractal_projectile1", FirstFractalProjectile1::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE2 = ITEMS.register("first_fractal_projectile2", FirstFractalProjectile2::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE3 = ITEMS.register("first_fractal_projectile3", FirstFractalProjectile3::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE4 = ITEMS.register("first_fractal_projectile4", FirstFractalProjectile4::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE5 = ITEMS.register("first_fractal_projectile5", FirstFractalProjectile5::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE6 = ITEMS.register("first_fractal_projectile6", FirstFractalProjectile6::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE7 = ITEMS.register("first_fractal_projectile7", FirstFractalProjectile7::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE8 = ITEMS.register("first_fractal_projectile8", FirstFractalProjectile8::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE9 = ITEMS.register("first_fractal_projectile9", FirstFractalProjectile9::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE10 = ITEMS.register("first_fractal_projectile10", FirstFractalProjectile10::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE11 = ITEMS.register("first_fractal_projectile11", FirstFractalProjectile11::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE12 = ITEMS.register("first_fractal_projectile12", FirstFractalProjectile12::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE13 = ITEMS.register("first_fractal_projectile13", FirstFractalProjectile13::new);
public static final DeferredItem<Item> FIRST_FRACTAL_PROJECTILE14 = ITEMS.register("first_fractal_projectile14", FirstFractalProjectile14::new);
} }
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile0 extends Item {
public FirstFractalProjectile0() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile1 extends Item {
public FirstFractalProjectile1() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile10 extends Item {
public FirstFractalProjectile10() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile11 extends Item {
public FirstFractalProjectile11() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile12 extends Item {
public FirstFractalProjectile12() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile13 extends Item {
public FirstFractalProjectile13() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile14 extends Item {
public FirstFractalProjectile14() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile2 extends Item {
public FirstFractalProjectile2() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile3 extends Item {
public FirstFractalProjectile3() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile4 extends Item {
public FirstFractalProjectile4() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile5 extends Item {
public FirstFractalProjectile5() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile6 extends Item {
public FirstFractalProjectile6() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile7 extends Item {
public FirstFractalProjectile7() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile8 extends Item {
public FirstFractalProjectile8() {
super(new Item.Properties());
}
}
@@ -0,0 +1,9 @@
package com.lzxnone.terraria.item.projectile.first_fractal;
import net.minecraft.world.item.Item;
public class FirstFractalProjectile9 extends Item {
public FirstFractalProjectile9() {
super(new Item.Properties());
}
}
@@ -0,0 +1,396 @@
package com.lzxnone.terraria.item.weapon.melee;
import com.lzxnone.terraria.Config;
import com.lzxnone.terraria.LzxnoneTerraria;
import com.lzxnone.terraria.ModSounds;
import com.lzxnone.terraria.entity.ModEntities;
import com.lzxnone.terraria.entity.TintedVertexConsumer;
import com.lzxnone.terraria.entity.projectile.StaticProjectile;
import com.lzxnone.terraria.entity.summon.*;
import com.lzxnone.terraria.item.ModItems;
import com.lzxnone.terraria.particle.ZenithTrailParticleOptions;
import com.lzxnone.terraria.utils.*;
import com.mojang.authlib.GameProfile;
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.model.PlayerModel;
import net.minecraft.client.renderer.LightTexture;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.client.resources.PlayerSkin;
import net.minecraft.core.component.DataComponents;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.FastColor;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EquipmentSlotGroup;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.*;
import net.minecraft.world.item.component.CustomData;
import net.minecraft.world.item.component.ItemAttributeModifiers;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
import org.joml.Matrix4f;
import org.joml.Vector3f;
import java.util.List;
import java.util.UUID;
public class FirstFractal extends SwordItem {
public FirstFractal() {
super(Tiers.NETHERITE, new Item.Properties().attributes(ItemAttributeModifiers.builder()
.add(Attributes.ATTACK_DAMAGE,
new AttributeModifier(ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "base_attack_damage"), 20.0, AttributeModifier.Operation.ADD_VALUE),
EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED,
new AttributeModifier(ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "base_attack_speed"), -2.4, AttributeModifier.Operation.ADD_VALUE),
EquipmentSlotGroup.MAINHAND)
.build()
));
}
private static ItemStack[] weapons;
private static ItemStack[] getWeapons() {
if(weapons == null) {
weapons = new ItemStack[]{
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE0.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE1.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE2.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE3.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE4.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE5.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE6.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE7.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE8.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE9.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE10.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE11.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE12.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE13.get()),
new ItemStack(ModItems.FIRST_FRACTAL_PROJECTILE14.get()),
};
}
return weapons;
}
public static final Vector3f[] COLORS = new Vector3f[] {
new Vector3f(1.0f, 0.0f, 0.0f), // 红 (Red)
new Vector3f(1.0f, 0.5f, 0.0f), // 橙 (Orange)
new Vector3f(1.0f, 1.0f, 0.0f), // 黄 (Yellow)
new Vector3f(0.0f, 1.0f, 0.0f), // 绿 (Green)
new Vector3f(0.0f, 1.0f, 1.0f), // 青 (Cyan)
new Vector3f(0.0f, 0.0f, 1.0f), // 蓝 (Blue)
new Vector3f(0.5f, 0.0f, 1.0f) // 紫 (Violet)
};
public static final IStaticSummonBehavior SUMMON_BEHAVIOR = new IStaticSummonBehavior() {
public static final ResourceLocation RES = ResourceLocation.parse("lzxnoneterraria:textures/vfx/beam_sparkle.png");
public static final ResourceLocation RES2 = ResourceLocation.parse("lzxnoneterraria:textures/vfx/first_fractal_star.png");
@Override
public void render(Entity entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) {
if(!(entity instanceof StaticSummon summon)) return;
UUID uuid = summon.getEntityData().get(StaticSummon.OWNER).orElse(null);
if(uuid == null) return;
ItemStack item = summon.getEntityData().get(StaticSummon.ITEM);
if(item == ItemStack.EMPTY) return;
GameProfile profile = new GameProfile(uuid, "");
PlayerSkin playerSkin = Minecraft.getInstance().getSkinManager().getInsecureSkin(profile);
boolean isSlim = playerSkin.model() == PlayerSkin.Model.SLIM;
PlayerModel<LivingEntity> activeModel = isSlim ? StaticSummonRenderer.getSlimModel() : StaticSummonRenderer.getWideModel();
activeModel.head.resetPose();
activeModel.body.resetPose();
activeModel.rightArm.resetPose();
activeModel.leftArm.resetPose();
activeModel.rightLeg.resetPose();
activeModel.leftLeg.resetPose();
activeModel.young = false;
//确定模型方向
activeModel.rightArm.xRot = (float) Math.toRadians(-90);
activeModel.leftArm.xRot = (float) Math.toRadians(-90);
activeModel.rightArm.yRot = (float) Math.toRadians(-30);
activeModel.leftArm.yRot = (float) Math.toRadians(30);
activeModel.rightLeg.xRot = (float) Math.toRadians(-30);
activeModel.leftLeg.xRot = (float) Math.toRadians(30);
Vector3f[] dirs = MathUtil.computeCoordinateSystem(summon.getLookAngle().toVector3f(), 0);
float[] xyRot = MathUtil.computeXYRot(dirs[0], dirs[1]);
Vector3f color = new Vector3f(
summon.getEntityData().get(StaticSummon.COLOR_R),
summon.getEntityData().get(StaticSummon.COLOR_G),
summon.getEntityData().get(StaticSummon.COLOR_B)
);
float radio = (float) (summon.getEntityData().get(StaticSummon.AGE) + partialTick) / (float) summon.getEntityData().get(StaticSummon.LIFETIME);
float alpha;
if(radio < 0.25f) {
alpha = radio / 0.25f;
}else if(radio > 0.75f) {
alpha = 1.0f - (radio - 0.75f) / 0.25f;
}else {
alpha = 1.0f;
}
if(alpha < 0.001f) return;
//流星
poseStack.pushPose();
float starHalfWidth = 45 * 0.06f;
float starHalfHeight = 17 * 0.06f;
VertexConsumer starConsumer = bufferSource.getBuffer(RenderType.entityTranslucentEmissive(RES2));
poseStack.translate(
dirs[0].x * 0 + dirs[1].x * 1.3,
dirs[0].y * 0 + dirs[1].y * 1.3,
dirs[0].z * 0 + dirs[1].z * 1.3
);
poseStack.mulPose(Axis.YP.rotationDegrees(-xyRot[1]));
poseStack.mulPose(Axis.XP.rotationDegrees(xyRot[0]));
poseStack.mulPose(Axis.YP.rotationDegrees(270));
poseStack.scale(0.75f + alpha * 0.25f, 0.75f + alpha * 0.25f , 0.75f + alpha * 0.25f);
for(int i = 0; i < 3; i++) {
starConsumer.addVertex(poseStack.last().pose(), -starHalfWidth, -starHalfHeight, 0f)
.setColor(color.x, color.y, color.z, alpha * 0.5f).setUv(0.0f, 1.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
starConsumer.addVertex(poseStack.last().pose(), starHalfWidth, -starHalfHeight, 0f)
.setColor(color.x, color.y, color.z, alpha * 0.5f).setUv(1.0f, 1.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
starConsumer.addVertex(poseStack.last().pose(), starHalfWidth, starHalfHeight, 0f)
.setColor(color.x, color.y, color.z, alpha * 0.5f).setUv(1.0f, 0.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
starConsumer.addVertex(poseStack.last().pose(), -starHalfWidth, starHalfHeight, 0f)
.setColor(color.x, color.y, color.z, alpha * 0.5f).setUv(0.0f, 0.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
}
poseStack.popPose();
//闪烁
poseStack.pushPose();
float sparkleHalfWidth = 32 * 0.12f;
float sparkleHalfHeight = 32 * 0.03f;
VertexConsumer sparkleConsumer = bufferSource.getBuffer(RenderType.entityTranslucentEmissive(RES));
poseStack.translate(
dirs[0].x * 2 + dirs[1].x * 1.3,
dirs[0].y * 2 + dirs[1].y * 1.3,
dirs[0].z * 2 + dirs[1].z * 1.3
);
poseStack.mulPose(Axis.YP.rotationDegrees(-xyRot[1]));
poseStack.mulPose(Axis.YP.rotationDegrees(270));
poseStack.scale(alpha, alpha , alpha);
for(int i = 0; i < 3; i++) {
sparkleConsumer.addVertex(poseStack.last().pose(), -sparkleHalfWidth, -sparkleHalfHeight, 0.01f)
.setColor(color.x, color.y, color.z, alpha).setUv(0.0f, 1.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
sparkleConsumer.addVertex(poseStack.last().pose(), sparkleHalfWidth, -sparkleHalfHeight, 0.01f)
.setColor(color.x, color.y, color.z, alpha).setUv(1.0f, 1.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
sparkleConsumer.addVertex(poseStack.last().pose(), sparkleHalfWidth, sparkleHalfHeight, 0.01f)
.setColor(color.x, color.y, color.z, alpha).setUv(1.0f, 0.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
sparkleConsumer.addVertex(poseStack.last().pose(), -sparkleHalfWidth, sparkleHalfHeight, 0.01f)
.setColor(color.x, color.y, color.z, alpha).setUv(0.0f, 0.0f)
.setOverlay(OverlayTexture.NO_OVERLAY).setLight(LightTexture.FULL_BRIGHT).setNormal(0.0f, 1.0f, 0.0f);
}
poseStack.popPose();
//剑
poseStack.pushPose();
poseStack.translate(
dirs[0].x * 2.2 + dirs[1].x * 1.5,
dirs[0].y * 2.2 + dirs[1].y * 1.5,
dirs[0].z * 2.2 + dirs[1].z * 1.5
);
poseStack.mulPose(Axis.YP.rotationDegrees(-xyRot[1]));
poseStack.mulPose(Axis.XP.rotationDegrees(xyRot[0]));
poseStack.mulPose(Axis.YP.rotationDegrees(270));
poseStack.mulPose(Axis.ZP.rotationDegrees(-45));
poseStack.scale(4.0f, 4.0f , 4.0f);
Minecraft.getInstance().getItemRenderer().renderStatic(
item,
ItemDisplayContext.NONE,
LightTexture.FULL_BRIGHT,
OverlayTexture.NO_OVERLAY,
poseStack,
renderType -> {
VertexConsumer vertexConsumer = bufferSource.getBuffer(renderType);
return new TintedVertexConsumer(vertexConsumer, 1.0f, 1.0f, 1.0f, alpha);
},
summon.level(),
0
);
poseStack.popPose();
//模型
poseStack.pushPose();
poseStack.mulPose(Axis.YP.rotationDegrees(-xyRot[1]));
poseStack.mulPose(Axis.XP.rotationDegrees(xyRot[0]));
poseStack.mulPose(Axis.YP.rotationDegrees(180));
poseStack.scale(-1.0F, -1.0F, 1.0F);
poseStack.translate(0.0F, -1.501F, 0.0F);
VertexConsumer modelConsumer = bufferSource.getBuffer(RenderType.entityTranslucent(playerSkin.texture()));
int packedColor = FastColor.ARGB32.color(Math.min((int)(alpha * 255), 255), 255, 255, 255);
activeModel.renderToBuffer(poseStack, modelConsumer, LightTexture.FULL_BRIGHT, OverlayTexture.NO_OVERLAY, packedColor);
poseStack.popPose();
}
@Override
public void tick(StaticSummon summon) {
this.checkBeforeTick(summon);
summon.setDeltaMovement(summon.getLookAngle().normalize().scale(Config.firstFractalProjectileSpeed));
summon.setBoundingBox(new AABB(
summon.getX() - Config.firstFractalBoundingBoxSize, summon.getY() - Config.firstFractalBoundingBoxSize, summon.getZ() - Config.firstFractalBoundingBoxSize,
summon.getX() + Config.firstFractalBoundingBoxSize, summon.getY() + Config.firstFractalBoundingBoxSize, summon.getZ() + Config.firstFractalBoundingBoxSize
));
if(!summon.level().isClientSide()) {
if(summon.getOwner() instanceof Player player) {
List<Entity> targets = summon.level().getEntitiesOfClass(
Entity.class,
summon.getBoundingBox(),
FilterUtil.createTargetFilter(summon, summon.getOwner())
);
for(Entity target : targets) {
if(DamageUtil.attack(player, target, (float) Config.firstFractalProjectileDamage)) {
target.invulnerableTime = 10;
}
}
}
}else {
Vector3f color = new Vector3f(
summon.getEntityData().get(StaticSummon.COLOR_R),
summon.getEntityData().get(StaticSummon.COLOR_G),
summon.getEntityData().get(StaticSummon.COLOR_B)
);
Vector3f[] dirs = MathUtil.computeCoordinateSystem(summon.getLookAngle().toVector3f(), 0);
ZenithTrailParticleOptions options = new ZenithTrailParticleOptions(0.05f, 40, true, color, dirs[1], dirs[2], 90);
Vec3 pos = MathUtil.toVec3(dirs[1]).scale(Math.random() * 2).add(summon.position());
Vec3 speed = MathUtil.toVec3(dirs[0]).scale(Config.firstFractalProjectileSpeed);
ParticleUtil.addParticle(
summon.level(), options,
pos, 0,
speed, 0
);
}
}
};
public static void summon(Player player, double deltaDist) {
if(!player.level().isClientSide()) {
Vec3 targetPos;
if(Config.firstFractalDistanceMode) {
Vec3 origin = MathUtil.getCrosshairPos(player, player.level(), Config.firstFractalMaxRange);
double dist = origin.subtract(player.getEyePosition()).length();
double maxScale = Config.firstFractalMaxRange - dist;
double minScale = -dist;
double scale = Math.min(deltaDist, maxScale);
if(deltaDist < minScale) scale = -minScale;
targetPos = origin.add(player.getLookAngle().normalize().scale(scale));
}else {
targetPos = player.getEyePosition().add(player.getLookAngle().normalize().scale(Math.min(deltaDist, Config.firstFractalMaxRange)));
}
Vec3 summonPos = MathUtil.getRandomPosInRadius(targetPos, Config.firstFractalSpawnRange);
Vector3f color = COLORS[player.getRandom().nextInt(COLORS.length)];
StaticSummon summon = new StaticSummon(ModEntities.STATIC_SUMMON.get(), player.level());
summon.setOwner(player);
summon.setPos(summonPos);
summon.getEntityData().set(StaticSummon.BEHAVIOR, StaticSummonBehaviors.FIRST_FRACTAL_PROJECTILE);
summon.getEntityData().set(StaticSummon.RENDER_MODE, "custom");
summon.getEntityData().set(StaticSummon.ITEM, getWeapons()[player.getRandom().nextInt(getWeapons().length)]);
summon.getEntityData().set(StaticSummon.COLOR_R, color.x);
summon.getEntityData().set(StaticSummon.COLOR_G, color.y);
summon.getEntityData().set(StaticSummon.COLOR_B, color.z);
summon.getEntityData().set(StaticSummon.GLOW, true);
summon.getEntityData().set(StaticSummon.LIFETIME, Config.firstFractalProjectileLifetime);
Vector3f[] dirs = MathUtil.computeCoordinateSystem(targetPos.subtract(summonPos).toVector3f(), 0);
float[] xyRot = MathUtil.computeXYRot(dirs[0], dirs[1]);
summon.setXRot(xyRot[0]);
summon.xRotO = xyRot[0];
summon.setYRot(xyRot[1]);
summon.yRotO = xyRot[1];
summon.setNoGravity(true);
summon.noPhysics = true;
player.level().addFreshEntity(summon);
}
}
@Override
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) {
ItemStack stack = player.getItemInHand(hand);
if(!level.isClientSide()) {
CustomData.update(DataComponents.CUSTOM_DATA, stack,
tag -> tag.putInt("attackCount", 3));
}else {
SoundUtil.playClientSound(player, ModSounds.WAVE.get());
}
player.getCooldowns().addCooldown(stack.getItem(), 3);
return InteractionResultHolder.sidedSuccess(stack, level.isClientSide());
}
@Override
public void inventoryTick(ItemStack stack, Level level, net.minecraft.world.entity.Entity entity, int slotId, boolean isSelected) {
super.inventoryTick(stack, level, entity, slotId, isSelected);
if(entity instanceof Player player) {
if(isSelected) {
if(player.tickCount % 3 == 0) {
double deltaDist = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY)
.copyTag().getDouble("deltaDist");
int count = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY)
.copyTag().getInt("attackCount");
if(count > 0) {
summon(player, deltaDist);
CustomData.update(DataComponents.CUSTOM_DATA, stack,
tag -> tag.putInt("attackCount", count - 1));
}
}
}else {
int count = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY)
.copyTag().getInt("attackCount");
if(count > 0) {
CustomData.update(DataComponents.CUSTOM_DATA, stack,
tag -> tag.putInt("attackCount", 0));
}
}
}
}
}
@@ -110,26 +110,27 @@ public class InfluxWaver extends SwordItem {
if(customData.contains("target")) { if(customData.contains("target")) {
Entity target = summon.level().getEntity(customData.getInt("target")); Entity target = summon.level().getEntity(customData.getInt("target"));
if(target == null || !target.isAlive()) { if(target == null || !target.isAlive()) {
summon.setDeltaMovement(summon.getLookAngle().normalize().scale(Config.influxWaverSpeed)); //summon.setDeltaMovement(summon.getLookAngle().normalize().scale(Config.influxWaverSpeed));
checkEntity = false; checkEntity = false;
}else { }else {
Vec3 targetPos = new Vec3(target.getX(), target.getY() + target.getBbHeight() / 2, target.getZ()); //Vec3 targetPos = new Vec3(target.getX(), target.getY() + target.getBbHeight() / 2, target.getZ());
summon.setDeltaMovement(targetPos.subtract(summon.position()).normalize().scale(Config.influxWaverSpeed)); //summon.setDeltaMovement(targetPos.subtract(summon.position()).normalize().scale(Config.influxWaverSpeed));
} }
}else { }else {
summon.setDeltaMovement(summon.getLookAngle().normalize().scale(Config.influxWaverSpeed)); //summon.setDeltaMovement(summon.getLookAngle().normalize().scale(Config.influxWaverSpeed));
checkEntity = false; checkEntity = false;
} }
summon.setDeltaMovement(summon.getLookAngle().normalize().scale(Config.influxWaverSpeed));
} }
} }
if(idx > 0) { /*if(idx > 0) {
float[] xyRot = MathUtil.computeXYRot(MathUtil.toVector3f(summon.getDeltaMovement())); float[] xyRot = MathUtil.computeXYRot(MathUtil.toVector3f(summon.getDeltaMovement()));
summon.setXRot(xyRot[0]); summon.setXRot(xyRot[0]);
summon.xRotO = xyRot[0]; summon.xRotO = xyRot[0];
summon.setYRot(xyRot[1]); summon.setYRot(xyRot[1]);
summon.yRotO = xyRot[1]; summon.yRotO = xyRot[1];
} }*/
//碰撞逻辑 //碰撞逻辑
if(!summon.level().isClientSide()) { if(!summon.level().isClientSide()) {
@@ -186,7 +187,8 @@ public class InfluxWaver extends SwordItem {
summon.setOwner(player); summon.setOwner(player);
summon.setPos(pos); summon.setPos(pos);
Vector3f[] dirs = MathUtil.computeCoordinateSystem(player); //Vector3f[] dirs = MathUtil.computeCoordinateSystem(player);
Vector3f[] dirs = MathUtil.computeCoordinateSystem(dir.toVector3f(), player.getYRot());
float[] xyRot = MathUtil.computeXYRot(dirs[0], dirs[1]); float[] xyRot = MathUtil.computeXYRot(dirs[0], dirs[1]);
summon.setXRot(xyRot[0]); summon.setXRot(xyRot[0]);
summon.xRotO = xyRot[0]; summon.xRotO = xyRot[0];
@@ -143,8 +143,8 @@ public class LightsBane extends SwordItem {
)); ));
if(!summon.level().isClientSide() && summon.getOwner() instanceof Player player) { if(!summon.level().isClientSide() && summon.getOwner() instanceof Player player) {
List<LivingEntity> targets = summon.level().getEntitiesOfClass(LivingEntity.class, summon.getBoundingBox(), FilterUtil.createTargetFilter(summon, summon.getOwner())); List<Entity> targets = summon.level().getEntitiesOfClass(Entity.class, summon.getBoundingBox(), FilterUtil.createTargetFilter(summon, summon.getOwner()));
for(LivingEntity target : targets) { for(Entity target : targets) {
float damage = customData.contains("big") && customData.getBoolean("big") ? (float) Config.lightsBaneBigDamage : (float) Config.lightsBaneSmallDamage; float damage = customData.contains("big") && customData.getBoolean("big") ? (float) Config.lightsBaneBigDamage : (float) Config.lightsBaneSmallDamage;
if(DamageUtil.attack(player, target, damage)) { if(DamageUtil.attack(player, target, damage)) {
@@ -332,8 +332,8 @@ public class NightsEdge extends SwordItem {
if(!summon.level().isClientSide() && customData.contains("hitCount") && summon.getOwner() instanceof Player player) { if(!summon.level().isClientSide() && customData.contains("hitCount") && summon.getOwner() instanceof Player player) {
int count = customData.getInt("hitCount"); int count = customData.getInt("hitCount");
if(count < Config.nightsEdgeProjectileMaxHitCount) { if(count < Config.nightsEdgeProjectileMaxHitCount) {
List<LivingEntity> targets = summon.level().getEntitiesOfClass(LivingEntity.class, summon.getBoundingBox(), FilterUtil.createTargetFilter(summon, summon.getOwner())); List<Entity> targets = summon.level().getEntitiesOfClass(Entity.class, summon.getBoundingBox(), FilterUtil.createTargetFilter(summon, summon.getOwner()));
for(LivingEntity target : targets) { for(Entity target : targets) {
if(count >= Config.nightsEdgeProjectileMaxHitCount) break; if(count >= Config.nightsEdgeProjectileMaxHitCount) break;
if(DamageUtil.attack(player, target, (float) Config.nightsEdgeProjectileDamage)) { if(DamageUtil.attack(player, target, (float) Config.nightsEdgeProjectileDamage)) {
count++; count++;
@@ -469,7 +469,6 @@ public class NightsEdge extends SwordItem {
SwordBeamBehaviors.getBehavior("nights_edge").generate(player, BEAM_DATA); SwordBeamBehaviors.getBehavior("nights_edge").generate(player, BEAM_DATA);
}else { }else {
SoundUtil.playClientSound(player, ModSounds.WAVE.get()); SoundUtil.playClientSound(player, ModSounds.WAVE.get());
SoundUtil.playClientSound(player, ModSounds.WAVE3.get());
} }
return InteractionResultHolder.sidedSuccess(stack, level.isClientSide()); return InteractionResultHolder.sidedSuccess(stack, level.isClientSide());
} }
@@ -371,8 +371,8 @@ public class TerraBlade extends SwordItem {
//碰撞计算 //碰撞计算
if(!summon.level().isClientSide() && customData.contains("hitCount") && summon.getOwner() instanceof Player player) { if(!summon.level().isClientSide() && customData.contains("hitCount") && summon.getOwner() instanceof Player player) {
int count = customData.getInt("hitCount"); int count = customData.getInt("hitCount");
List<LivingEntity> targets = summon.level().getEntitiesOfClass(LivingEntity.class, summon.getBoundingBox(), FilterUtil.createTargetFilter(summon, summon.getOwner())); List<Entity> targets = summon.level().getEntitiesOfClass(Entity.class, summon.getBoundingBox(), FilterUtil.createTargetFilter(summon, summon.getOwner()));
for(LivingEntity target : targets) { for(Entity target : targets) {
if(DamageUtil.attack(player, target, (float) Config.terraProjectileDamage * (float) Math.pow(Config.terraProjectileDamageDecay, count))) { if(DamageUtil.attack(player, target, (float) Config.terraProjectileDamage * (float) Math.pow(Config.terraProjectileDamageDecay, count))) {
count++; count++;
ParticleUtil.addParticles( ParticleUtil.addParticles(
@@ -145,24 +145,32 @@ public class Terragrim extends SwordItem {
)); ));
if(!summon.level().isClientSide()) { if(!summon.level().isClientSide()) {
if(summon.getOwner() instanceof Player player) { if(summon.getOwner() instanceof Player player) {
List<LivingEntity> targets = summon.level().getEntitiesOfClass( List<Entity> targets = summon.level().getEntitiesOfClass(
LivingEntity.class, Entity.class,
summon.getBoundingBox(), summon.getBoundingBox(),
FilterUtil.createLivingTargetFilter(summon, player) FilterUtil.createTargetFilter(summon, player)
); );
for(LivingEntity target : targets) { for(Entity target : targets) {
AttributeInstance knockbackResist = null; if(target instanceof LivingEntity livingEntity) {
double originalResist = 0.0; AttributeInstance knockbackResist = null;
knockbackResist = target.getAttribute(Attributes.KNOCKBACK_RESISTANCE); double originalResist = 0.0;
if(knockbackResist != null) { knockbackResist = livingEntity.getAttribute(Attributes.KNOCKBACK_RESISTANCE);
originalResist = knockbackResist.getBaseValue(); if(knockbackResist != null) {
knockbackResist.setBaseValue(Math.max(0.9, originalResist)); originalResist = knockbackResist.getBaseValue();
} knockbackResist.setBaseValue(Math.max(0.9, originalResist));
if(DamageUtil.attack(player, target, (float) Config.terragrimDamage)) { }
target.invulnerableTime = 0;
} if(DamageUtil.attack(player, target, (float) Config.terragrimDamage)) {
if(knockbackResist != null) { target.invulnerableTime = 0;
knockbackResist.setBaseValue(originalResist); }
if(knockbackResist != null) {
knockbackResist.setBaseValue(originalResist);
}
}else {
if(DamageUtil.attack(player, target, (float) Config.terragrimDamage)) {
target.invulnerableTime = 0;
}
} }
} }
} }
@@ -435,8 +435,8 @@ public class TrueNightsEdge extends SwordItem {
if(!summon.level().isClientSide() && customData.contains("hitCount") && summon.getOwner() instanceof Player player) { if(!summon.level().isClientSide() && customData.contains("hitCount") && summon.getOwner() instanceof Player player) {
int count = customData.getInt("hitCount"); int count = customData.getInt("hitCount");
if(count < Config.trueNightsEdgeProjectileMaxHitCount) { if(count < Config.trueNightsEdgeProjectileMaxHitCount) {
List<LivingEntity> targets = summon.level().getEntitiesOfClass(LivingEntity.class, summon.getBoundingBox(), FilterUtil.createTargetFilter(summon, summon.getOwner())); List<Entity> targets = summon.level().getEntitiesOfClass(Entity.class, summon.getBoundingBox(), FilterUtil.createTargetFilter(summon, summon.getOwner()));
for(LivingEntity target : targets) { for(Entity target : targets) {
if(count >= Config.trueNightsEdgeProjectileMaxHitCount) break; if(count >= Config.trueNightsEdgeProjectileMaxHitCount) break;
if(DamageUtil.attack(player, target, (float) Config.trueNightsEdgeProjectileDamage)) { if(DamageUtil.attack(player, target, (float) Config.trueNightsEdgeProjectileDamage)) {
count++; count++;
@@ -572,7 +572,6 @@ public class TrueNightsEdge extends SwordItem {
SwordBeamBehaviors.getBehavior("true_nights_edge").generate(player, BEAM_DATA); SwordBeamBehaviors.getBehavior("true_nights_edge").generate(player, BEAM_DATA);
}else { }else {
SoundUtil.playClientSound(player, ModSounds.WAVE.get()); SoundUtil.playClientSound(player, ModSounds.WAVE.get());
SoundUtil.playClientSound(player, ModSounds.WAVE3.get());
} }
return InteractionResultHolder.sidedSuccess(stack, level.isClientSide()); return InteractionResultHolder.sidedSuccess(stack, level.isClientSide());
} }
@@ -327,12 +327,12 @@ public class Zenith extends SwordItem {
)); ));
if(!projectile.level().isClientSide()) { if(!projectile.level().isClientSide()) {
List<LivingEntity> targets = projectile.level().getEntitiesOfClass( List<Entity> targets = projectile.level().getEntitiesOfClass(
LivingEntity.class, Entity.class,
projectile.getBoundingBox(), projectile.getBoundingBox(),
FilterUtil.createLivingTargetFilter(projectile, projectile.getOwner()) FilterUtil.createTargetFilter(projectile, projectile.getOwner())
); );
for(LivingEntity target : targets) this.onHitEntity(projectile, new EntityHitResult(target, target.position())); for(Entity target : targets) this.onHitEntity(projectile, new EntityHitResult(target, target.position()));
}else { }else {
if(lifeRadio > 0.1f && lifeRadio < 0.9f && projectile.getRandom().nextInt(5) == 0) { if(lifeRadio > 0.1f && lifeRadio < 0.9f && projectile.getRandom().nextInt(5) == 0) {
Vector3f color = new Vector3f( Vector3f color = new Vector3f(
@@ -31,7 +31,7 @@ public class ZenithRenderMixin {
MultiBufferSource buffer, int combinedLight, CallbackInfo ci) { MultiBufferSource buffer, int combinedLight, CallbackInfo ci) {
if(!player.isScoping()) { if(!player.isScoping()) {
if(stack.is(ModItems.ZENITH.get()) || stack.is(ModItems.TRUE_COPPER_SHORTSWORD.get())) { if(stack.is(ModItems.ZENITH.get()) || stack.is(ModItems.TRUE_COPPER_SHORTSWORD.get()) || stack.is(ModItems.FIRST_FRACTAL.get())) {
int count = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY) int count = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY)
.copyTag().getInt("attackCount"); .copyTag().getInt("attackCount");
if(count > 0) { if(count > 0) {
@@ -56,7 +56,7 @@ public class ZenithRenderMixin {
boolean leftHand, PoseStack poseStack, MultiBufferSource buffer, boolean leftHand, PoseStack poseStack, MultiBufferSource buffer,
int seed, CallbackInfo ci) { int seed, CallbackInfo ci) {
if(itemStack.is(ModItems.ZENITH.get()) || itemStack.is(ModItems.TRUE_COPPER_SHORTSWORD.get())) { if(itemStack.is(ModItems.ZENITH.get()) || itemStack.is(ModItems.TRUE_COPPER_SHORTSWORD.get()) || itemStack.is(ModItems.FIRST_FRACTAL.get())) {
int count = itemStack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY) int count = itemStack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY)
.copyTag().getInt("attackCount"); .copyTag().getInt("attackCount");
if(count > 0) { if(count > 0) {
@@ -1,8 +1,10 @@
package com.lzxnone.terraria.network; package com.lzxnone.terraria.network;
import com.lzxnone.terraria.LzxnoneTerraria; import com.lzxnone.terraria.LzxnoneTerraria;
import com.lzxnone.terraria.network.handler.FirstFractalScrollHandler;
import com.lzxnone.terraria.network.handler.SwordBeamHandler; import com.lzxnone.terraria.network.handler.SwordBeamHandler;
import com.lzxnone.terraria.network.handler.ZenithScrollHandler; import com.lzxnone.terraria.network.handler.ZenithScrollHandler;
import com.lzxnone.terraria.network.payload.FirstFractalScrollPayload;
import com.lzxnone.terraria.network.payload.SwordBeamPayload; import com.lzxnone.terraria.network.payload.SwordBeamPayload;
import com.lzxnone.terraria.network.payload.ZenithScrollPayload; import com.lzxnone.terraria.network.payload.ZenithScrollPayload;
import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.bus.api.SubscribeEvent;
@@ -25,5 +27,10 @@ public class ModNetwork {
ZenithScrollPayload.CODEC, ZenithScrollPayload.CODEC,
ZenithScrollHandler::handle ZenithScrollHandler::handle
); );
registrar.playToServer(
FirstFractalScrollPayload.TYPE,
FirstFractalScrollPayload.CODEC,
FirstFractalScrollHandler::handle
);
} }
} }
@@ -0,0 +1,40 @@
package com.lzxnone.terraria.network.handler;
import com.lzxnone.terraria.Config;
import com.lzxnone.terraria.item.weapon.melee.FirstFractal;
import com.lzxnone.terraria.network.payload.FirstFractalScrollPayload;
import net.minecraft.core.component.DataComponents;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.component.CustomData;
import net.minecraft.world.level.Level;
import net.neoforged.neoforge.network.handling.IPayloadContext;
public class FirstFractalScrollHandler {
public static void handle(final FirstFractalScrollPayload payload, final IPayloadContext context) {
context.enqueueWork(() -> {
Level level = context.player().level();
if(level.isClientSide()) return;
Player player = context.player();
ItemStack weapon = player.getMainHandItem();
if(weapon.getItem() instanceof FirstFractal) {
double scrollDelta = payload.scrollDelta();
double deltaDist = weapon.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY)
.copyTag().getDouble("deltaDist");
double finalDelta = deltaDist + scrollDelta * Config.firstFractalScrollSpeed;
if(Config.firstFractalDistanceMode) {
if(finalDelta > Config.firstFractalMaxRange) finalDelta = Config.firstFractalMaxRange;
else if(finalDelta < -Config.firstFractalMaxRange) finalDelta = -Config.firstFractalMaxRange;
}else {
if(finalDelta > Config.firstFractalMaxRange) finalDelta = Config.firstFractalMaxRange;
else if(finalDelta < 0) finalDelta = 0;
}
double finalDelta1 = finalDelta;
CustomData.update(DataComponents.CUSTOM_DATA, weapon,
tag -> tag.putDouble("deltaDist", finalDelta1));
}
});
}
}
@@ -0,0 +1,23 @@
package com.lzxnone.terraria.network.payload;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.resources.ResourceLocation;
public record FirstFractalScrollPayload(double scrollDelta) implements CustomPacketPayload {
public static final CustomPacketPayload.Type<FirstFractalScrollPayload> TYPE = new CustomPacketPayload.Type<>(
ResourceLocation.fromNamespaceAndPath("lzxnoneterraria", "first_fractal_scroll_payload")
);
public static final StreamCodec<FriendlyByteBuf, FirstFractalScrollPayload> CODEC = StreamCodec.composite(
ByteBufCodecs.DOUBLE, FirstFractalScrollPayload::scrollDelta,
FirstFractalScrollPayload::new
);
@Override
public CustomPacketPayload.Type<? extends CustomPacketPayload> type() {
return TYPE;
}
}
@@ -1,5 +1,6 @@
package com.lzxnone.terraria.particle; package com.lzxnone.terraria.particle;
import com.lzxnone.terraria.LzxnoneTerraria;
import com.lzxnone.terraria.utils.MathUtil; import com.lzxnone.terraria.utils.MathUtil;
import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.Camera; import net.minecraft.client.Camera;
@@ -45,6 +46,7 @@ public class ZenithTrailParticle extends TextureSheetParticle {
this.dir = new Vec3(xSpeed, ySpeed, zSpeed).normalize(); this.dir = new Vec3(xSpeed, ySpeed, zSpeed).normalize();
this.up = new Vec3(options.up).normalize(); this.up = new Vec3(options.up).normalize();
this.right = new Vec3(options.right).normalize(); this.right = new Vec3(options.right).normalize();
this.angle = options.angle;
this.rCol = options.color.x; this.rCol = options.color.x;
this.gCol = options.color.y; this.gCol = options.color.y;
@@ -24,6 +24,7 @@
"item.lzxnoneterraria.excalibur": "Excalibur", "item.lzxnoneterraria.excalibur": "Excalibur",
"item.lzxnoneterraria.true_excalibur": "True Excalibur", "item.lzxnoneterraria.true_excalibur": "True Excalibur",
"item.lzxnoneterraria.true_copper_shortsword": "True Copper Shortsword", "item.lzxnoneterraria.true_copper_shortsword": "True Copper Shortsword",
"item.lzxnoneterraria.first_fractal": "First Fractal",
"entity.lzxnoneterraria.static_projectile": "Projectile", "entity.lzxnoneterraria.static_projectile": "Projectile",
"entity.lzxnoneterraria.static_summon": "Summon", "entity.lzxnoneterraria.static_summon": "Summon",
@@ -244,6 +245,24 @@
"lzxnoneterraria.configuration.zenith_trail_max_length": "Trail Length", "lzxnoneterraria.configuration.zenith_trail_max_length": "Trail Length",
"lzxnoneterraria.configuration.zenith_trail_max_length.tooltip": "Maximum number of trail segments", "lzxnoneterraria.configuration.zenith_trail_max_length.tooltip": "Maximum number of trail segments",
"lzxnoneterraria.configuration.first_fractal_settings": "First Fractal Settings",
"lzxnoneterraria.configuration.first_fractal_projectile_damage": "Projectile Damage",
"lzxnoneterraria.configuration.first_fractal_projectile_damage.tooltip": "Damage per hit",
"lzxnoneterraria.configuration.first_fractal_bounding_box_size": "Bounding Box Size",
"lzxnoneterraria.configuration.first_fractal_bounding_box_size.tooltip": "AABB collision box half-size",
"lzxnoneterraria.configuration.first_fractal_projectile_speed": "Projectile Speed",
"lzxnoneterraria.configuration.first_fractal_projectile_speed.tooltip": "Projectile movement speed",
"lzxnoneterraria.configuration.first_fractal_projectile_lifetime": "Projectile Lifetime",
"lzxnoneterraria.configuration.first_fractal_projectile_lifetime.tooltip": "Projectile duration in ticks",
"lzxnoneterraria.configuration.first_fractal_distance_mode": "Enable Relative Distance Mode",
"lzxnoneterraria.configuration.first_fractal_distance_mode.tooltip": "Whether projectile range follows crosshair distance",
"lzxnoneterraria.configuration.first_fractal_scroll_speed": "Scroll Speed",
"lzxnoneterraria.configuration.first_fractal_scroll_speed.tooltip": "Mouse scroll adjustment speed",
"lzxnoneterraria.configuration.first_fractal_max_range": "Max Range",
"lzxnoneterraria.configuration.first_fractal_max_range.tooltip": "Maximum projectile travel range",
"lzxnoneterraria.configuration.first_fractal_spawn_range": "Spawn Range",
"lzxnoneterraria.configuration.first_fractal_spawn_range.tooltip": "Projectile spawn radius around target",
"lzxnoneterraria.configuration.true_excalibur_settings": "True Excalibur Settings", "lzxnoneterraria.configuration.true_excalibur_settings": "True Excalibur Settings",
"lzxnoneterraria.configuration.true_excalibur_rotate_range": "Blade Rotate Range", "lzxnoneterraria.configuration.true_excalibur_rotate_range": "Blade Rotate Range",
"lzxnoneterraria.configuration.true_excalibur_rotate_range.tooltip": "Blade rotation angle range", "lzxnoneterraria.configuration.true_excalibur_rotate_range.tooltip": "Blade rotation angle range",
@@ -24,6 +24,7 @@
"item.lzxnoneterraria.excalibur": "断钢剑", "item.lzxnoneterraria.excalibur": "断钢剑",
"item.lzxnoneterraria.true_excalibur": "真断钢剑", "item.lzxnoneterraria.true_excalibur": "真断钢剑",
"item.lzxnoneterraria.true_copper_shortsword": "真铜短剑", "item.lzxnoneterraria.true_copper_shortsword": "真铜短剑",
"item.lzxnoneterraria.first_fractal": "第一分形",
"entity.lzxnoneterraria.static_projectile": "弹射物", "entity.lzxnoneterraria.static_projectile": "弹射物",
"entity.lzxnoneterraria.static_summon": "召唤物", "entity.lzxnoneterraria.static_summon": "召唤物",
@@ -244,6 +245,24 @@
"lzxnoneterraria.configuration.zenith_trail_max_length": "尾迹长度", "lzxnoneterraria.configuration.zenith_trail_max_length": "尾迹长度",
"lzxnoneterraria.configuration.zenith_trail_max_length.tooltip": "尾迹最大段数", "lzxnoneterraria.configuration.zenith_trail_max_length.tooltip": "尾迹最大段数",
"lzxnoneterraria.configuration.first_fractal_settings": "第一分形 设置",
"lzxnoneterraria.configuration.first_fractal_projectile_damage": "弹射伤害",
"lzxnoneterraria.configuration.first_fractal_projectile_damage.tooltip": "每次命中伤害",
"lzxnoneterraria.configuration.first_fractal_bounding_box_size": "碰撞箱大小",
"lzxnoneterraria.configuration.first_fractal_bounding_box_size.tooltip": "AABB 碰撞箱半边长",
"lzxnoneterraria.configuration.first_fractal_projectile_speed": "弹射速度",
"lzxnoneterraria.configuration.first_fractal_projectile_speed.tooltip": "弹射物移动速度",
"lzxnoneterraria.configuration.first_fractal_projectile_lifetime": "弹射生命周期",
"lzxnoneterraria.configuration.first_fractal_projectile_lifetime.tooltip": "弹射物持续时间(刻)",
"lzxnoneterraria.configuration.first_fractal_distance_mode": "启用相对距离模式",
"lzxnoneterraria.configuration.first_fractal_distance_mode.tooltip": "弹射范围是否跟随准星距离",
"lzxnoneterraria.configuration.first_fractal_scroll_speed": "鼠标滚轮调节距离的速度",
"lzxnoneterraria.configuration.first_fractal_scroll_speed.tooltip": "鼠标滚轮调节距离的速度",
"lzxnoneterraria.configuration.first_fractal_max_range": "最大范围",
"lzxnoneterraria.configuration.first_fractal_max_range.tooltip": "弹射物最大飞行距离",
"lzxnoneterraria.configuration.first_fractal_spawn_range": "生成范围",
"lzxnoneterraria.configuration.first_fractal_spawn_range.tooltip": "弹射物在目标周围生成半径",
"lzxnoneterraria.configuration.true_excalibur_settings": "真断钢剑 设置", "lzxnoneterraria.configuration.true_excalibur_settings": "真断钢剑 设置",
"lzxnoneterraria.configuration.true_excalibur_rotate_range": "刀光偏转角范围", "lzxnoneterraria.configuration.true_excalibur_rotate_range": "刀光偏转角范围",
"lzxnoneterraria.configuration.true_excalibur_rotate_range.tooltip": "刀光旋转角度范围", "lzxnoneterraria.configuration.true_excalibur_rotate_range.tooltip": "刀光旋转角度范围",
@@ -0,0 +1,6 @@
{
"parent": "lzxnoneterraria:item/weapon3",
"textures": {
"layer0": "lzxnoneterraria:item/first_fractal"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "lzxnoneterraria:item/first_fractal_projectile0"
}
}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile1"}}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile10"}}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile11"}}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile12"}}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile13"}}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile14"}}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile2"}}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile3"}}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile4"}}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile5"}}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile6"}}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile7"}}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile8"}}
@@ -0,0 +1 @@
{"parent":"item/generated","textures":{"layer0":"lzxnoneterraria:item/first_fractal_projectile9"}}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

@@ -0,0 +1,3 @@
{
"parent": "bettercombat:claymore"
}