v1.6.0
This commit is contained in:
1 parent
7015a527fd
commit
0b3690217a
26 files changed
+574
-46
No files matched your search
@@ -42,6 +42,21 @@ public class ModEnchantmentConfigs {
|
||||
public static final double SUMMON_AMPLIFICATION_DAMAGE_MULTIPLIER_MIN = 0.0D;
|
||||
public static final double SUMMON_AMPLIFICATION_DAMAGE_MULTIPLIER_MAX = 10.0D;
|
||||
|
||||
public static final String AMMO_EXHAUSTION_CONSUME_BONUS_PATH = "enchantment.ammo_exhaustion.consume_bonus";
|
||||
public static final int AMMO_EXHAUSTION_CONSUME_BONUS_DEFAULT = 1;
|
||||
public static final int AMMO_EXHAUSTION_CONSUME_BONUS_MIN = 0;
|
||||
public static final int AMMO_EXHAUSTION_CONSUME_BONUS_MAX = 1024;
|
||||
|
||||
public static final String BULLET_HELL_NOT_CONSUME_CHANCE_PATH = "enchantment.bullet_hell.not_consume_chance";
|
||||
public static final double BULLET_HELL_NOT_CONSUME_CHANCE_DEFAULT = 0.5D;
|
||||
public static final double BULLET_HELL_NOT_CONSUME_CHANCE_MIN = 0.0D;
|
||||
public static final double BULLET_HELL_NOT_CONSUME_CHANCE_MAX = 1.0D;
|
||||
|
||||
public static final String GUNPOWDER_DAMAGE_MULTIPLIER_PATH = "enchantment.gunpowder.damage_multiplier";
|
||||
public static final double GUNPOWDER_DAMAGE_MULTIPLIER_DEFAULT = 1.15D;
|
||||
public static final double GUNPOWDER_DAMAGE_MULTIPLIER_MIN = 0.0D;
|
||||
public static final double GUNPOWDER_DAMAGE_MULTIPLIER_MAX = 10.0D;
|
||||
|
||||
public static final ConfigListItem MANA_LEAK_CONFIG_LIST_ITEM = createConfigListItem(
|
||||
"mana_leak",
|
||||
"enchantment.lzxnoneterraria.mana_leak",
|
||||
@@ -78,6 +93,24 @@ public class ModEnchantmentConfigs {
|
||||
() -> ConfigFactory.loadDoubleConfig(SUMMON_AMPLIFICATION_DAMAGE_MULTIPLIER_PATH, configText("summon_amplification_damage_multiplier"), configTooltip("summon_amplification_damage_multiplier"), SUMMON_AMPLIFICATION_DAMAGE_MULTIPLIER_DEFAULT, SUMMON_AMPLIFICATION_DAMAGE_MULTIPLIER_MIN, SUMMON_AMPLIFICATION_DAMAGE_MULTIPLIER_MAX)
|
||||
);
|
||||
|
||||
public static final ConfigListItem AMMO_EXHAUSTION_CONFIG_LIST_ITEM = createConfigListItem(
|
||||
"ammo_exhaustion",
|
||||
"enchantment.lzxnoneterraria.ammo_exhaustion",
|
||||
() -> ConfigFactory.loadIntConfig(AMMO_EXHAUSTION_CONSUME_BONUS_PATH, configText("ammo_exhaustion_consume_bonus"), configTooltip("ammo_exhaustion_consume_bonus"), AMMO_EXHAUSTION_CONSUME_BONUS_DEFAULT, AMMO_EXHAUSTION_CONSUME_BONUS_MIN, AMMO_EXHAUSTION_CONSUME_BONUS_MAX)
|
||||
);
|
||||
|
||||
public static final ConfigListItem BULLET_HELL_CONFIG_LIST_ITEM = createConfigListItem(
|
||||
"bullet_hell",
|
||||
"enchantment.lzxnoneterraria.bullet_hell",
|
||||
() -> ConfigFactory.loadDoubleConfig(BULLET_HELL_NOT_CONSUME_CHANCE_PATH, configText("bullet_hell_not_consume_chance"), configTooltip("bullet_hell_not_consume_chance"), BULLET_HELL_NOT_CONSUME_CHANCE_DEFAULT, BULLET_HELL_NOT_CONSUME_CHANCE_MIN, BULLET_HELL_NOT_CONSUME_CHANCE_MAX)
|
||||
);
|
||||
|
||||
public static final ConfigListItem GUNPOWDER_CONFIG_LIST_ITEM = createConfigListItem(
|
||||
"gunpowder",
|
||||
"enchantment.lzxnoneterraria.gunpowder",
|
||||
() -> ConfigFactory.loadDoubleConfig(GUNPOWDER_DAMAGE_MULTIPLIER_PATH, configText("gunpowder_damage_multiplier"), configTooltip("gunpowder_damage_multiplier"), GUNPOWDER_DAMAGE_MULTIPLIER_DEFAULT, GUNPOWDER_DAMAGE_MULTIPLIER_MIN, GUNPOWDER_DAMAGE_MULTIPLIER_MAX)
|
||||
);
|
||||
|
||||
public static double getManaLeakConsumeMultiplier() {
|
||||
return readDouble(MANA_LEAK_CONSUME_MULTIPLIER_PATH, MANA_LEAK_CONSUME_MULTIPLIER_DEFAULT, MANA_LEAK_CONSUME_MULTIPLIER_MIN, MANA_LEAK_CONSUME_MULTIPLIER_MAX);
|
||||
}
|
||||
@@ -102,6 +135,18 @@ public class ModEnchantmentConfigs {
|
||||
return readDouble(SUMMON_AMPLIFICATION_DAMAGE_MULTIPLIER_PATH, SUMMON_AMPLIFICATION_DAMAGE_MULTIPLIER_DEFAULT, SUMMON_AMPLIFICATION_DAMAGE_MULTIPLIER_MIN, SUMMON_AMPLIFICATION_DAMAGE_MULTIPLIER_MAX);
|
||||
}
|
||||
|
||||
public static int getAmmoExhaustionConsumeBonus() {
|
||||
return Math.clamp(ConfigUtil.readInt(AMMO_EXHAUSTION_CONSUME_BONUS_PATH, AMMO_EXHAUSTION_CONSUME_BONUS_DEFAULT), AMMO_EXHAUSTION_CONSUME_BONUS_MIN, AMMO_EXHAUSTION_CONSUME_BONUS_MAX);
|
||||
}
|
||||
|
||||
public static double getBulletHellNotConsumeChance() {
|
||||
return readDouble(BULLET_HELL_NOT_CONSUME_CHANCE_PATH, BULLET_HELL_NOT_CONSUME_CHANCE_DEFAULT, BULLET_HELL_NOT_CONSUME_CHANCE_MIN, BULLET_HELL_NOT_CONSUME_CHANCE_MAX);
|
||||
}
|
||||
|
||||
public static double getGunpowderDamageMultiplier() {
|
||||
return readDouble(GUNPOWDER_DAMAGE_MULTIPLIER_PATH, GUNPOWDER_DAMAGE_MULTIPLIER_DEFAULT, GUNPOWDER_DAMAGE_MULTIPLIER_MIN, GUNPOWDER_DAMAGE_MULTIPLIER_MAX);
|
||||
}
|
||||
|
||||
private static ConfigListItem createConfigListItem(String id, String nameKey, Runnable loader) {
|
||||
return new ConfigListItem(id, ICON, Component.translatable(nameKey), new IConfigData() {
|
||||
@Override
|
||||
|
||||
@@ -13,6 +13,9 @@ public class ModEnchantments {
|
||||
public static final ResourceKey<Enchantment> MANA_GATHERING_CURSE = create("mana_gathering_curse");
|
||||
public static final ResourceKey<Enchantment> ARCANE_AMPLIFICATION = create("arcane_amplification");
|
||||
public static final ResourceKey<Enchantment> SUMMON_AMPLIFICATION = create("summon_amplification");
|
||||
public static final ResourceKey<Enchantment> AMMO_EXHAUSTION = create("ammo_exhaustion");
|
||||
public static final ResourceKey<Enchantment> BULLET_HELL = create("bullet_hell");
|
||||
public static final ResourceKey<Enchantment> GUNPOWDER = create("gunpowder");
|
||||
public static final ResourceKey<Enchantment> BARREN_LAND = create("barren_land");
|
||||
|
||||
private static ResourceKey<Enchantment> create(String name) {
|
||||
|
||||
@@ -3,7 +3,9 @@ package com.lzxnone.terraria.item.ammo;
|
||||
import net.minecraft.world.item.Item;
|
||||
|
||||
public class BulletAmmo extends Item {
|
||||
public static final int MAX_STACK_SIZE = 99;
|
||||
|
||||
public BulletAmmo() {
|
||||
super(new Item.Properties());
|
||||
super(new Item.Properties().stacksTo(MAX_STACK_SIZE));
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,156 @@
|
||||
package com.lzxnone.terraria.item.ammo;
|
||||
|
||||
import com.lzxnone.terraria.LzxnoneTerraria;
|
||||
import com.lzxnone.terraria.entity.summon.IStaticSummonBehavior;
|
||||
import com.lzxnone.terraria.entity.summon.StaticSummon;
|
||||
import com.lzxnone.terraria.ui.config.ConfigFactory;
|
||||
import com.lzxnone.terraria.ui.config.ConfigListItem;
|
||||
import com.lzxnone.terraria.ui.config.ConfigUtil;
|
||||
import com.lzxnone.terraria.ui.config.IConfigData;
|
||||
import com.lzxnone.terraria.utils.CollisionUtil;
|
||||
import com.lzxnone.terraria.utils.DamageUtil;
|
||||
import com.lzxnone.terraria.utils.FilterUtil;
|
||||
import com.lzxnone.terraria.utils.MathUtil;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
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.List;
|
||||
|
||||
public class MeteorShot extends BulletAmmo {
|
||||
private static final String CONFIG_TRANSLATION_PREFIX = "lzxnoneterraria.configuration.";
|
||||
|
||||
public static final String BASE_DAMAGE_PATH = "ammo.meteor_shot.base_damage";
|
||||
public static final float BASE_DAMAGE_DEFAULT = 1.0f;
|
||||
public static final float BASE_DAMAGE_MIN = 0.0f;
|
||||
public static final float BASE_DAMAGE_MAX = 8388600.0f;
|
||||
|
||||
public static final String SPEED_PATH = "ammo.meteor_shot.speed";
|
||||
public static final double SPEED_DEFAULT = 3.0D;
|
||||
public static final double SPEED_MIN = 0.0D;
|
||||
public static final double SPEED_MAX = 24.0D;
|
||||
|
||||
public static final String MAX_HIT_PATH = "ammo.meteor_shot.max_hit";
|
||||
public static final int MAX_HIT_DEFAULT = 2;
|
||||
public static final int MAX_HIT_MIN = 1;
|
||||
public static final int MAX_HIT_MAX = 256;
|
||||
|
||||
public static final IConfigData CONFIG_DATA = new IConfigData() {
|
||||
@Override
|
||||
public void onConfigLoad() {
|
||||
ConfigFactory.loadFloatConfig(BASE_DAMAGE_PATH, configText("meteor_shot_base_damage"), configTooltip("meteor_shot_base_damage"), BASE_DAMAGE_DEFAULT, BASE_DAMAGE_MIN, BASE_DAMAGE_MAX);
|
||||
ConfigFactory.loadDoubleConfig(SPEED_PATH, configText("meteor_shot_speed"), configTooltip("meteor_shot_speed"), SPEED_DEFAULT, SPEED_MIN, SPEED_MAX);
|
||||
ConfigFactory.loadIntConfig(MAX_HIT_PATH, configText("meteor_shot_max_hit"), configTooltip("meteor_shot_max_hit"), MAX_HIT_DEFAULT, MAX_HIT_MIN, MAX_HIT_MAX);
|
||||
}
|
||||
};
|
||||
|
||||
private static Component configText(String key) {
|
||||
return Component.translatable(CONFIG_TRANSLATION_PREFIX + key);
|
||||
}
|
||||
|
||||
private static Component configTooltip(String key) {
|
||||
return Component.translatable(CONFIG_TRANSLATION_PREFIX + key + ".tooltip");
|
||||
}
|
||||
|
||||
public static float getBaseDamage() {
|
||||
return Math.clamp(ConfigUtil.readFloat(BASE_DAMAGE_PATH, BASE_DAMAGE_DEFAULT), BASE_DAMAGE_MIN, BASE_DAMAGE_MAX);
|
||||
}
|
||||
|
||||
public static double getSpeed() {
|
||||
return Math.clamp(ConfigUtil.readDouble(SPEED_PATH, SPEED_DEFAULT), SPEED_MIN, SPEED_MAX);
|
||||
}
|
||||
|
||||
public static int getMaxHit() {
|
||||
return Math.clamp(ConfigUtil.readInt(MAX_HIT_PATH, MAX_HIT_DEFAULT), MAX_HIT_MIN, MAX_HIT_MAX);
|
||||
}
|
||||
|
||||
public static final ConfigListItem CONFIG_LIST_ITEM = new ConfigListItem(
|
||||
"meteor_shot",
|
||||
ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "textures/item/meteor_shot.png"),
|
||||
Component.translatable("item.lzxnoneterraria.meteor_shot"),
|
||||
CONFIG_DATA
|
||||
);
|
||||
|
||||
public static final IStaticSummonBehavior SUMMON_BEHAVIOR = new IStaticSummonBehavior() {
|
||||
@Override
|
||||
public void tick(StaticSummon summon) {
|
||||
this.checkBeforeTick(summon);
|
||||
if(summon.isRemoved()) return;
|
||||
|
||||
double speed = getSpeed();
|
||||
Vec3 motion = summon.getDeltaMovement();
|
||||
if(motion.lengthSqr() < 0.0001) {
|
||||
motion = summon.getLookAngle().normalize().scale(speed);
|
||||
}else {
|
||||
motion = motion.normalize().scale(speed);
|
||||
}
|
||||
summon.setDeltaMovement(motion);
|
||||
|
||||
//碰撞检测
|
||||
AABB hitBox = new AABB(summon.position(), summon.position().add(motion)).inflate(0.25);
|
||||
List<Entity> targets = summon.level().getEntitiesOfClass(
|
||||
Entity.class,
|
||||
hitBox,
|
||||
FilterUtil.createTargetFilter(summon, summon.getOwner())
|
||||
);
|
||||
if(!targets.isEmpty()) {
|
||||
CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA);
|
||||
float damage = customData.contains("damage") ? customData.getFloat("damage") : 0;
|
||||
float knockbackScale = customData.contains("knockbackScale") ? customData.getFloat("knockbackScale") : 1.0f;
|
||||
int invulnerableTime = customData.contains("invulnerableTime") ? customData.getInt("invulnerableTime") : 20;
|
||||
|
||||
ItemStack sourceStack = summon.getEntityData().get(StaticSummon.STACK_SOURCE);
|
||||
Entity target = targets.getFirst();
|
||||
if(DamageUtil.summonAttack(summon, target, sourceStack, getBaseDamage() + damage, knockbackScale)) {
|
||||
target.invulnerableTime = invulnerableTime;
|
||||
if(MeteorShot.incrementHit(summon) >= getMaxHit()) {
|
||||
this.onDied(summon);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//方块检测
|
||||
BlockHitResult blockHitResult = CollisionUtil.checkBlockHit(summon, summon.position().add(motion));
|
||||
if(blockHitResult.getType() != HitResult.Type.MISS) {
|
||||
if(MeteorShot.incrementHit(summon) >= getMaxHit()) {
|
||||
this.onDied(summon);
|
||||
return;
|
||||
}
|
||||
|
||||
Vec3 reflectedMotion = MeteorShot.reflect(motion, blockHitResult.getDirection()).normalize().scale(speed);
|
||||
summon.setPos(blockHitResult.getLocation().add(Vec3.atLowerCornerOf(blockHitResult.getDirection().getNormal()).scale(0.05)));
|
||||
summon.setDeltaMovement(reflectedMotion);
|
||||
MeteorShot.updateRotation(summon, reflectedMotion);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private static int incrementHit(StaticSummon summon) {
|
||||
CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA);
|
||||
int hit = customData.getInt("hit") + 1;
|
||||
customData.putInt("hit", hit);
|
||||
summon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData);
|
||||
return hit;
|
||||
}
|
||||
|
||||
private static Vec3 reflect(Vec3 motion, Direction hitDirection) {
|
||||
Vec3 normal = Vec3.atLowerCornerOf(hitDirection.getNormal());
|
||||
return motion.subtract(normal.scale(2.0D * motion.dot(normal)));
|
||||
}
|
||||
|
||||
private static void updateRotation(StaticSummon summon, Vec3 motion) {
|
||||
float[] xyRot = MathUtil.computeXYRot(MathUtil.toVector3f(motion.normalize()));
|
||||
summon.setXRot(xyRot[0]);
|
||||
summon.xRotO = xyRot[0];
|
||||
summon.setYRot(xyRot[1]);
|
||||
summon.yRotO = xyRot[1];
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,104 @@
|
||||
package com.lzxnone.terraria.item.ammo;
|
||||
|
||||
import com.lzxnone.terraria.LzxnoneTerraria;
|
||||
import com.lzxnone.terraria.entity.summon.IStaticSummonBehavior;
|
||||
import com.lzxnone.terraria.entity.summon.StaticSummon;
|
||||
import com.lzxnone.terraria.ui.config.ConfigFactory;
|
||||
import com.lzxnone.terraria.ui.config.ConfigListItem;
|
||||
import com.lzxnone.terraria.ui.config.ConfigUtil;
|
||||
import com.lzxnone.terraria.ui.config.IConfigData;
|
||||
import com.lzxnone.terraria.utils.CollisionUtil;
|
||||
import com.lzxnone.terraria.utils.DamageUtil;
|
||||
import com.lzxnone.terraria.utils.FilterUtil;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
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.List;
|
||||
|
||||
public class MusketBall extends BulletAmmo {
|
||||
private static final String CONFIG_TRANSLATION_PREFIX = "lzxnoneterraria.configuration.";
|
||||
|
||||
public static final String BASE_DAMAGE_PATH = "ammo.musket_ball.base_damage";
|
||||
public static final float BASE_DAMAGE_DEFAULT = 0.8f;
|
||||
public static final float BASE_DAMAGE_MIN = 0.0f;
|
||||
public static final float BASE_DAMAGE_MAX = 8388600.0f;
|
||||
|
||||
public static final String SPEED_PATH = "ammo.musket_ball.speed";
|
||||
public static final double SPEED_DEFAULT = 3.0D;
|
||||
public static final double SPEED_MIN = 0.0D;
|
||||
public static final double SPEED_MAX = 24.0D;
|
||||
|
||||
public static final IConfigData CONFIG_DATA = new IConfigData() {
|
||||
@Override
|
||||
public void onConfigLoad() {
|
||||
ConfigFactory.loadFloatConfig(BASE_DAMAGE_PATH, configText("musket_ball_base_damage"), configTooltip("musket_ball_base_damage"), BASE_DAMAGE_DEFAULT, BASE_DAMAGE_MIN, BASE_DAMAGE_MAX);
|
||||
ConfigFactory.loadDoubleConfig(SPEED_PATH, configText("musket_ball_speed"), configTooltip("musket_ball_speed"), SPEED_DEFAULT, SPEED_MIN, SPEED_MAX);
|
||||
}
|
||||
};
|
||||
|
||||
private static Component configText(String key) {
|
||||
return Component.translatable(CONFIG_TRANSLATION_PREFIX + key);
|
||||
}
|
||||
|
||||
private static Component configTooltip(String key) {
|
||||
return Component.translatable(CONFIG_TRANSLATION_PREFIX + key + ".tooltip");
|
||||
}
|
||||
|
||||
public static float getBaseDamage() {
|
||||
return Math.clamp(ConfigUtil.readFloat(BASE_DAMAGE_PATH, BASE_DAMAGE_DEFAULT), BASE_DAMAGE_MIN, BASE_DAMAGE_MAX);
|
||||
}
|
||||
|
||||
public static double getSpeed() {
|
||||
return Math.clamp(ConfigUtil.readDouble(SPEED_PATH, SPEED_DEFAULT), SPEED_MIN, SPEED_MAX);
|
||||
}
|
||||
|
||||
public static final ConfigListItem CONFIG_LIST_ITEM = new ConfigListItem(
|
||||
"musket_ball",
|
||||
ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "textures/item/musket_ball.png"),
|
||||
Component.translatable("item.lzxnoneterraria.musket_ball"),
|
||||
CONFIG_DATA
|
||||
);
|
||||
|
||||
public static final IStaticSummonBehavior SUMMON_BEHAVIOR = new IStaticSummonBehavior() {
|
||||
@Override
|
||||
public void tick(StaticSummon summon) {
|
||||
this.checkBeforeTick(summon);
|
||||
Vec3 motion = summon.getLookAngle().normalize().scale(getSpeed());
|
||||
summon.setDeltaMovement(motion);
|
||||
|
||||
//碰撞检测
|
||||
AABB hitBox = new AABB(summon.position(), summon.position().add(motion)).inflate(0.25);
|
||||
List<Entity> targets = summon.level().getEntitiesOfClass(
|
||||
Entity.class,
|
||||
hitBox,
|
||||
FilterUtil.createTargetFilter(summon, summon.getOwner())
|
||||
);
|
||||
if(!targets.isEmpty()) {
|
||||
CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA);
|
||||
float damage = customData.contains("damage") ? customData.getFloat("damage") : 0;
|
||||
float knockbackScale = customData.contains("knockbackScale") ? customData.getFloat("knockbackScale") : 1.0f;
|
||||
int invulnerableTime = customData.contains("invulnerableTime") ? customData.getInt("invulnerableTime") : 20;
|
||||
|
||||
ItemStack sourceStack = summon.getEntityData().get(StaticSummon.STACK_SOURCE);
|
||||
Entity target = targets.getFirst();
|
||||
if(DamageUtil.summonAttack(summon, target, sourceStack, getBaseDamage() + damage, knockbackScale)) {
|
||||
target.invulnerableTime = invulnerableTime;
|
||||
this.onDied(summon);
|
||||
}
|
||||
}
|
||||
|
||||
//方块检测
|
||||
BlockHitResult blockHitResult = CollisionUtil.checkBlockHit(summon, summon.position().add(motion));
|
||||
if(blockHitResult.getType() != HitResult.Type.MISS) {
|
||||
this.onDied(summon);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -24,22 +24,12 @@ public class MagicWeapon extends Weapon {
|
||||
private final IntSupplier manaConsumeRate;
|
||||
private final IntSupplier manaRecoverRate;
|
||||
|
||||
public MagicWeapon(Tier tier, Properties properties, int manaConsumeRate, int manaRecoverRate) {
|
||||
this(tier, properties, () -> manaConsumeRate, () -> manaRecoverRate);
|
||||
}
|
||||
|
||||
public MagicWeapon(Tier tier, Properties properties, IntSupplier manaConsumeRate, IntSupplier manaRecoverRate) {
|
||||
super(tier, properties);
|
||||
this.manaConsumeRate = manaConsumeRate;
|
||||
this.manaRecoverRate = manaRecoverRate;
|
||||
}
|
||||
|
||||
public MagicWeapon(Properties properties) {
|
||||
super(properties);
|
||||
this.manaConsumeRate = () -> 1;
|
||||
this.manaRecoverRate = () -> 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUseTick(Level level, LivingEntity entity, ItemStack stack, int count) {
|
||||
if(!canUseMagic(stack, entity)) {
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
package com.lzxnone.terraria.item.weapon;
|
||||
|
||||
import com.lzxnone.terraria.enchantment.ModEnchantmentConfigs;
|
||||
import com.lzxnone.terraria.enchantment.ModEnchantments;
|
||||
import net.minecraft.core.component.DataComponents;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.entity.SlotAccess;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
@@ -15,6 +20,7 @@ import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.Tier;
|
||||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.item.component.CustomData;
|
||||
import net.minecraft.world.item.enchantment.Enchantment;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
||||
import java.util.List;
|
||||
@@ -26,10 +32,6 @@ public class RangedWeapon extends Weapon {
|
||||
super(tier, properties);
|
||||
}
|
||||
|
||||
public RangedWeapon(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
public boolean canUseAmmo(ItemStack weaponStack, ItemStack ammoStack) {
|
||||
return false;
|
||||
}
|
||||
@@ -42,6 +44,21 @@ public class RangedWeapon extends Weapon {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int getFinalAmmoConsumeAmount(ItemStack weaponStack, LivingEntity entity, int amount) {
|
||||
if(amount <= 0) return 0;
|
||||
int exhaustionLevel = getEnchantmentLevel(entity, weaponStack, ModEnchantments.AMMO_EXHAUSTION);
|
||||
return Math.max(0, amount + exhaustionLevel * ModEnchantmentConfigs.getAmmoExhaustionConsumeBonus());
|
||||
}
|
||||
|
||||
public boolean shouldSkipAmmoConsume(ItemStack weaponStack, LivingEntity entity) {
|
||||
int bulletHellLevel = getEnchantmentLevel(entity, weaponStack, ModEnchantments.BULLET_HELL);
|
||||
if(bulletHellLevel <= 0) return false;
|
||||
|
||||
double triggerChance = Math.pow(1.0D - ModEnchantmentConfigs.getBulletHellNotConsumeChance(), bulletHellLevel);
|
||||
double skipChance = 1.0D - triggerChance;
|
||||
return entity.getRandom().nextDouble() < skipChance;
|
||||
}
|
||||
|
||||
public boolean shouldShootThisTick(ItemStack weaponStack, LivingEntity entity, int remainingUseTicks) {
|
||||
int useTime = Math.max(1, getUseTime(weaponStack, entity));
|
||||
int elapsedMinecraftTicks = getUseDuration(weaponStack, entity) - remainingUseTicks;
|
||||
@@ -55,6 +72,7 @@ public class RangedWeapon extends Weapon {
|
||||
public boolean canShoot(ItemStack weaponStack, Player player) {
|
||||
ItemStack ammoStack = getAmmoStack(weaponStack);
|
||||
if(ammoStack.isEmpty() || !canUseAmmo(weaponStack, ammoStack)) return false;
|
||||
if(player.hasInfiniteMaterials()) return true;
|
||||
|
||||
Item ammoItem = ammoStack.getItem();
|
||||
for(ItemStack inventoryStack : player.getInventory().items) {
|
||||
@@ -65,6 +83,10 @@ public class RangedWeapon extends Weapon {
|
||||
|
||||
public boolean consumeAmmo(ItemStack weaponStack, Player player, int amount) {
|
||||
if(amount <= 0 || player.hasInfiniteMaterials()) return true;
|
||||
if(shouldSkipAmmoConsume(weaponStack, player)) return true;
|
||||
|
||||
amount = getFinalAmmoConsumeAmount(weaponStack, player, amount);
|
||||
if(amount <= 0) return true;
|
||||
|
||||
ItemStack ammoStack = getAmmoStack(weaponStack);
|
||||
if(ammoStack.isEmpty() || !canUseAmmo(weaponStack, ammoStack)) return false;
|
||||
@@ -92,23 +114,22 @@ public class RangedWeapon extends Weapon {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean tryShoot(Level level, Player player, ItemStack weaponStack) {
|
||||
public boolean tryShoot(Level level, Player player, InteractionHand hand, ItemStack weaponStack) {
|
||||
if(!canShoot(weaponStack, player)) return false;
|
||||
if(!level.isClientSide() && !consumeAmmo(weaponStack, player, getAmmoConsumeAmount(weaponStack, player))) return false;
|
||||
|
||||
shoot(level, player, weaponStack);
|
||||
shoot(level, player, hand, weaponStack);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void shoot(Level level, Player player, ItemStack weaponStack) {
|
||||
}
|
||||
protected void shoot(Level level, Player player, InteractionHand hand, ItemStack weaponStack) {}
|
||||
|
||||
@Override
|
||||
public void onUseTick(Level level, LivingEntity entity, ItemStack stack, int remainingUseTicks) {
|
||||
if(!(entity instanceof Player player)) return;
|
||||
if(!shouldShootThisTick(stack, entity, remainingUseTicks)) return;
|
||||
|
||||
if(!tryShoot(level, player, stack)) {
|
||||
if(!tryShoot(level, player, player.getUsedItemHand(), stack)) {
|
||||
player.stopUsingItem();
|
||||
}
|
||||
}
|
||||
@@ -156,4 +177,12 @@ public class RangedWeapon extends Weapon {
|
||||
ammoStack.getHoverName()
|
||||
).withStyle(style -> style.withColor(0x55FF55)));
|
||||
}
|
||||
|
||||
protected static int getEnchantmentLevel(LivingEntity entity, ItemStack stack, ResourceKey<Enchantment> enchantment) {
|
||||
return entity.registryAccess()
|
||||
.lookupOrThrow(Registries.ENCHANTMENT)
|
||||
.get(enchantment)
|
||||
.map(stack::getEnchantmentLevel)
|
||||
.orElse(0);
|
||||
}
|
||||
}
|
||||
@@ -30,10 +30,6 @@ public class SummonWeapon extends Weapon {
|
||||
super(tier, properties);
|
||||
}
|
||||
|
||||
public SummonWeapon(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
public static int getMaxSummonCount(Player player) {
|
||||
MobEffectInstance instance = player.getEffect(ModEffects.SUMMON);
|
||||
return 1 + (instance == null ? 0 : (instance.getAmplifier() + 1) * SummonEffect.getSummonCountPerLevel());
|
||||
@@ -88,13 +84,6 @@ public class SummonWeapon extends Weapon {
|
||||
player.level().addFreshEntity(summon);
|
||||
}
|
||||
|
||||
public static void removeSummon(Player player, Entity summon) {
|
||||
List<UUID> summons = getSummons(player);
|
||||
if(summons.remove(summon.getUUID())) {
|
||||
player.setData(ModAttachments.SUMMON_WEAPON_SUMMONS, summons);
|
||||
}
|
||||
}
|
||||
|
||||
public String getSummonId() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
package com.lzxnone.terraria.item.weapon.ranged;
|
||||
|
||||
import com.lzxnone.terraria.LzxnoneTerraria;
|
||||
import com.lzxnone.terraria.ModSounds;
|
||||
import com.lzxnone.terraria.entity.summon.StaticSummon;
|
||||
import com.lzxnone.terraria.item.ModItemTags;
|
||||
import com.lzxnone.terraria.item.weapon.RangedWeapon;
|
||||
import com.lzxnone.terraria.ui.config.ConfigFactory;
|
||||
import com.lzxnone.terraria.ui.config.ConfigListItem;
|
||||
import com.lzxnone.terraria.ui.config.ConfigUtil;
|
||||
import com.lzxnone.terraria.ui.config.IConfigData;
|
||||
import com.lzxnone.terraria.utils.AmmoUtil;
|
||||
import com.lzxnone.terraria.utils.SoundUtil;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResultHolder;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
@@ -17,14 +25,57 @@ import net.minecraft.world.item.Tiers;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
||||
public class SDMG extends RangedWeapon {
|
||||
private static final String CONFIG_TRANSLATION_PREFIX = "lzxnoneterraria.configuration.";
|
||||
|
||||
public static final String AMMO_NOT_CONSUME_CHANCE_PATH = "weapon.sdmg.ammo_not_consume_chance";
|
||||
public static final float AMMO_NOT_CONSUME_CHANCE_DEFAULT = 0.66f;
|
||||
public static final float AMMO_NOT_CONSUME_CHANCE_MIN = 0.0f;
|
||||
public static final float AMMO_NOT_CONSUME_CHANCE_MAX = 1.0f;
|
||||
|
||||
public static final String DAMAGE_PATH = "weapon.sdmg.damage";
|
||||
public static final float DAMAGE_DEFAULT = 1.0f;
|
||||
public static final float DAMAGE_MIN = 0.0f;
|
||||
public static final float DAMAGE_MAX = 8388600.0f;
|
||||
|
||||
public SDMG() {
|
||||
super(Tiers.NETHERITE, new Item.Properties().stacksTo(1).fireResistant().rarity(Rarity.EPIC));
|
||||
}
|
||||
|
||||
public static final IConfigData CONFIG_DATA = new IConfigData() {
|
||||
@Override
|
||||
public void onConfigLoad() {
|
||||
ConfigFactory.loadFloatConfig(AMMO_NOT_CONSUME_CHANCE_PATH, configText("sdmg_ammo_not_consume_chance"), configTooltip("sdmg_ammo_not_consume_chance"), AMMO_NOT_CONSUME_CHANCE_DEFAULT, AMMO_NOT_CONSUME_CHANCE_MIN, AMMO_NOT_CONSUME_CHANCE_MAX);
|
||||
ConfigFactory.loadFloatConfig(DAMAGE_PATH, configText("sdmg_damage"), configTooltip("sdmg_damage"), DAMAGE_DEFAULT, DAMAGE_MIN, DAMAGE_MAX);
|
||||
}
|
||||
};
|
||||
|
||||
private static Component configText(String key) {
|
||||
return Component.translatable(CONFIG_TRANSLATION_PREFIX + key);
|
||||
}
|
||||
|
||||
private static Component configTooltip(String key) {
|
||||
return Component.translatable(CONFIG_TRANSLATION_PREFIX + key + ".tooltip");
|
||||
}
|
||||
|
||||
public static float getAmmoNotConsumeChance() {
|
||||
return Math.clamp(ConfigUtil.readFloat(AMMO_NOT_CONSUME_CHANCE_PATH, AMMO_NOT_CONSUME_CHANCE_DEFAULT), AMMO_NOT_CONSUME_CHANCE_MIN, AMMO_NOT_CONSUME_CHANCE_MAX);
|
||||
}
|
||||
|
||||
public static float getDamage() {
|
||||
return Math.clamp(ConfigUtil.readFloat(DAMAGE_PATH, DAMAGE_DEFAULT), DAMAGE_MIN, DAMAGE_MAX);
|
||||
}
|
||||
|
||||
public static final ConfigListItem CONFIG_LIST_ITEM = new ConfigListItem(
|
||||
"sdmg",
|
||||
ResourceLocation.fromNamespaceAndPath(LzxnoneTerraria.MODID, "textures/item/sdmg.png"),
|
||||
Component.translatable("item.lzxnoneterraria.sdmg"),
|
||||
CONFIG_DATA
|
||||
);
|
||||
|
||||
@Override
|
||||
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) {
|
||||
ItemStack stack = player.getItemInHand(hand);
|
||||
if(!tryShoot(level, player, stack)) return InteractionResultHolder.fail(stack);
|
||||
if(!tryShoot(level, player, hand, stack)) return InteractionResultHolder.fail(stack);
|
||||
player.startUsingItem(hand);
|
||||
return InteractionResultHolder.consume(stack);
|
||||
}
|
||||
@@ -40,10 +91,20 @@ public class SDMG extends RangedWeapon {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void shoot(Level level, Player player, ItemStack stack) {
|
||||
public int getAmmoConsumeAmount(ItemStack weaponStack, LivingEntity entity) {
|
||||
return entity.getRandom().nextFloat() < getAmmoNotConsumeChance() ? 0 : 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void shoot(Level level, Player player, InteractionHand hand, ItemStack stack) {
|
||||
SoundUtil.playClientSound(player, ModSounds.SHOT.get());
|
||||
if(!level.isClientSide()) {
|
||||
StaticSummon summon = AmmoUtil.createAmmoSummon(level, player, stack);
|
||||
StaticSummon summon = AmmoUtil.createAmmoSummon(level, player, hand, stack);
|
||||
CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA);
|
||||
customData.putFloat("damage", getDamage());
|
||||
customData.putFloat("knockbackScale", 0.1f);
|
||||
customData.putInt("invulnerableTime", 5);
|
||||
summon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData);
|
||||
level.addFreshEntity(summon);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.lzxnone.terraria.effect.BloodButcheredEffect;
|
||||
import com.lzxnone.terraria.effect.DemonicFlamesEffect;
|
||||
import com.lzxnone.terraria.effect.SummonEffect;
|
||||
import com.lzxnone.terraria.enchantment.ModEnchantmentConfigs;
|
||||
import com.lzxnone.terraria.item.ammo.MeteorShot;
|
||||
import com.lzxnone.terraria.item.ammo.MusketBall;
|
||||
import com.lzxnone.terraria.item.weapon.magic.LastPrism;
|
||||
import com.lzxnone.terraria.item.weapon.melee.BeeKeeper;
|
||||
import com.lzxnone.terraria.item.weapon.melee.BladeOfGrass;
|
||||
@@ -28,6 +30,7 @@ import com.lzxnone.terraria.item.weapon.melee.TrueExcalibur;
|
||||
import com.lzxnone.terraria.item.weapon.melee.TrueNightsEdge;
|
||||
import com.lzxnone.terraria.item.weapon.melee.Volcano;
|
||||
import com.lzxnone.terraria.item.weapon.melee.Zenith;
|
||||
import com.lzxnone.terraria.item.weapon.ranged.SDMG;
|
||||
import com.lzxnone.terraria.item.weapon.summon.Terraprisma;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -35,6 +38,7 @@ import java.util.Map;
|
||||
|
||||
public class ConfigList {
|
||||
public static final String WEAPON = "weapon";
|
||||
public static final String AMMO = "ammo";
|
||||
public static final String EFFECT = "effect";
|
||||
public static final String ENCHANTMENT = "enchantment";
|
||||
|
||||
@@ -66,20 +70,28 @@ public class ConfigList {
|
||||
Mace.CONFIG_LIST_ITEM,
|
||||
DevilsDevastation.CONFIG_LIST_ITEM,
|
||||
Terraprisma.CONFIG_LIST_ITEM,
|
||||
LastPrism.CONFIG_LIST_ITEM
|
||||
LastPrism.CONFIG_LIST_ITEM,
|
||||
SDMG.CONFIG_LIST_ITEM
|
||||
});
|
||||
ITEMS.put(EFFECT, new ConfigListItem[]{
|
||||
BloodButcheredEffect.CONFIG_LIST_ITEM,
|
||||
DemonicFlamesEffect.CONFIG_LIST_ITEM,
|
||||
SummonEffect.CONFIG_LIST_ITEM
|
||||
});
|
||||
ITEMS.put(AMMO, new ConfigListItem[]{
|
||||
MusketBall.CONFIG_LIST_ITEM,
|
||||
MeteorShot.CONFIG_LIST_ITEM
|
||||
});
|
||||
ITEMS.put(ENCHANTMENT, new ConfigListItem[]{
|
||||
ModEnchantmentConfigs.MANA_LEAK_CONFIG_LIST_ITEM,
|
||||
ModEnchantmentConfigs.MANA_EFFICIENCY_CONFIG_LIST_ITEM,
|
||||
ModEnchantmentConfigs.MANA_GATHERING_CONFIG_LIST_ITEM,
|
||||
ModEnchantmentConfigs.MANA_GATHERING_CURSE_CONFIG_LIST_ITEM,
|
||||
ModEnchantmentConfigs.ARCANE_AMPLIFICATION_CONFIG_LIST_ITEM,
|
||||
ModEnchantmentConfigs.SUMMON_AMPLIFICATION_CONFIG_LIST_ITEM
|
||||
ModEnchantmentConfigs.SUMMON_AMPLIFICATION_CONFIG_LIST_ITEM,
|
||||
ModEnchantmentConfigs.AMMO_EXHAUSTION_CONFIG_LIST_ITEM,
|
||||
ModEnchantmentConfigs.BULLET_HELL_CONFIG_LIST_ITEM,
|
||||
ModEnchantmentConfigs.GUNPOWDER_CONFIG_LIST_ITEM
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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.EFFECT, ConfigList.ENCHANTMENT};
|
||||
private static final String[] NAV_KEYS = {ConfigList.WEAPON, ConfigList.AMMO, ConfigList.EFFECT, ConfigList.ENCHANTMENT};
|
||||
private static String selectedNavKey = ConfigList.WEAPON;
|
||||
private static final Map<String, Integer> NAV_SELECTED_INDEXES = new HashMap<>();
|
||||
|
||||
@@ -32,6 +32,7 @@ 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-effect", Button.class).setOnClick(event -> onNavSelected(ui, ConfigList.EFFECT));
|
||||
findElement(ui, "nav-button-enchantment", Button.class).setOnClick(event -> onNavSelected(ui, ConfigList.ENCHANTMENT));
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.lzxnone.terraria.utils;
|
||||
|
||||
import com.lzxnone.terraria.LzxnoneTerraria;
|
||||
import com.lzxnone.terraria.entity.ModEntities;
|
||||
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.RangedWeapon;
|
||||
import net.minecraft.core.component.DataComponents;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.component.CustomData;
|
||||
@@ -15,15 +16,20 @@ import net.minecraft.world.phys.Vec3;
|
||||
import org.joml.Vector3f;
|
||||
|
||||
public class AmmoUtil {
|
||||
public static final Vector3f OFFSET = new Vector3f(-0.3f, 0, 1.5f);
|
||||
public static final Vector3f OFFSET = new Vector3f(-0.3f, -0.15f, 1.5f);
|
||||
|
||||
public static StaticSummon createAmmoSummon(Level level, Player player, ItemStack stack) {
|
||||
return createAmmoSummon(level, player, InteractionHand.MAIN_HAND, stack);
|
||||
}
|
||||
|
||||
public static StaticSummon createAmmoSummon(Level level, Player player, InteractionHand hand, ItemStack stack) {
|
||||
Vector3f[] dirs = MathUtil.computeCoordinateSystem(player);
|
||||
Vec3 eyePos = player.getEyePosition();
|
||||
Vector3f offset = getOffset(hand);
|
||||
Vec3 pos = new Vec3(
|
||||
eyePos.x + dirs[0].x * OFFSET.z + dirs[1].x * OFFSET.y + dirs[2].x * OFFSET.x,
|
||||
eyePos.y + dirs[0].y * OFFSET.z + dirs[1].y * OFFSET.y + dirs[2].y * OFFSET.x,
|
||||
eyePos.z + dirs[0].z * OFFSET.z + dirs[1].z * OFFSET.y + dirs[2].z * OFFSET.x
|
||||
eyePos.x + dirs[0].x * offset.z + dirs[1].x * offset.y + dirs[2].x * offset.x,
|
||||
eyePos.y + dirs[0].y * offset.z + dirs[1].y * offset.y + dirs[2].y * offset.x,
|
||||
eyePos.z + dirs[0].z * offset.z + dirs[1].z * offset.y + dirs[2].z * offset.x
|
||||
);
|
||||
|
||||
StaticSummon summon = new StaticSummon(ModEntities.STATIC_SUMMON.get(), level);
|
||||
@@ -44,6 +50,14 @@ public class AmmoUtil {
|
||||
return summon;
|
||||
}
|
||||
|
||||
public static Vector3f getOffset(InteractionHand hand) {
|
||||
return new Vector3f(
|
||||
hand == InteractionHand.OFF_HAND ? -OFFSET.x : OFFSET.x,
|
||||
OFFSET.y,
|
||||
OFFSET.z
|
||||
);
|
||||
}
|
||||
|
||||
public static void setMusketBall(StaticSummon summon) {
|
||||
summon.getEntityData().set(StaticSummon.BEHAVIOR, StaticSummonBehaviors.MUSKET_BALL);
|
||||
summon.getEntityData().set(StaticSummon.ITEM, new ItemStack(ModItems.BULLET_PROJECTILE.get()));
|
||||
@@ -61,6 +75,9 @@ public class AmmoUtil {
|
||||
summon.getEntityData().set(StaticSummon.SCALE_X, 1.0f);
|
||||
summon.getEntityData().set(StaticSummon.SCALE_Y, 0.05f);
|
||||
summon.getEntityData().set(StaticSummon.SCALE_Z, 0.01f);
|
||||
CompoundTag customData = summon.getEntityData().get(StaticSummon.CUSTOM_DATA);
|
||||
customData.putInt("hit", 0);
|
||||
summon.getEntityData().set(StaticSummon.CUSTOM_DATA, customData);
|
||||
summon.setNoGravity(true);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user