添加其他武器的tips

This commit is contained in:
Atsuihsio 2024-08-08 19:43:21 +08:00
parent 78ec337a85
commit 908390d649
3 changed files with 11 additions and 16 deletions

View file

@ -207,7 +207,6 @@ public class SenpaiEntity extends Spider implements GeoEntity, AnimatedEntity {
@Override
public void die(DamageSource source) {
super.die(source);
this.setPose(Pose.SLEEPING);
}
@Override

View file

@ -119,20 +119,6 @@ public class Target1Entity extends PathfinderMob implements GeoEntity, AnimatedE
return super.hurt(source, amount);
}
// @Override
// public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, MobSpawnType reason, @Nullable SpawnGroupData livingdata, @Nullable CompoundTag tag) {
// SpawnGroupData data = super.finalizeSpawn(world, difficulty, reason, livingdata, tag);
//
// this.setYRot(0);
// this.setXRot(0);
// this.setYBodyRot(this.getYRot());
// this.setYHeadRot(this.getYRot());
// this.yRotO = this.getYRot();
// this.xRotO = this.getXRot();
//
// return data;
// }
@Override
public void addAdditionalSaveData(CompoundTag compound) {
super.addAdditionalSaveData(compound);

View file

@ -1,6 +1,7 @@
package net.mcreator.superbwarfare.tools;
import net.mcreator.superbwarfare.entity.DroneEntity;
import net.mcreator.superbwarfare.perk.AmmoPerk;
import net.mcreator.superbwarfare.perk.Perk;
import net.mcreator.superbwarfare.perk.PerkHelper;
import net.minecraft.ChatFormatting;
@ -51,6 +52,7 @@ public class TooltipTool {
addLevelTips(tooltip, stack);
addBypassTips(tooltip, stack);
addPerkTips(tooltip, stack);
}
private static void addLevelTips(List<Component> tooltip, ItemStack stack) {
@ -77,7 +79,13 @@ public class TooltipTool {
}
private static void addBypassTips(List<Component> tooltip, ItemStack stack) {
double byPassRate = ItemNBTTool.getDouble(stack, "BypassesArmor", 0);
double perkbypassArmorRate = 0;
var perk = PerkHelper.getPerkByType(stack, Perk.Type.AMMO);
if (perk instanceof AmmoPerk ammoPerk) {
perkbypassArmorRate = ammoPerk.bypassArmorRate;
}
double byPassRate = ItemNBTTool.getDouble(stack, "BypassesArmor", 0) + perkbypassArmorRate;
tooltip.add(Component.translatable("des.superbwarfare.tips.bypass").withStyle(ChatFormatting.GRAY)
.append(Component.literal("").withStyle(ChatFormatting.RESET))
@ -138,6 +146,7 @@ public class TooltipTool {
addLevelTips(tooltip, stack);
addBypassTips(tooltip, stack);
addPerkTips(tooltip, stack);
}
public static void addSentinelTips(List<Component> tooltip, ItemStack stack) {
@ -167,6 +176,7 @@ public class TooltipTool {
addLevelTips(tooltip, stack);
addBypassTips(tooltip, stack);
addPerkTips(tooltip, stack);
stack.getCapability(ForgeCapabilities.ENERGY).ifPresent(
e -> tooltip.add(Component.literal(e.getEnergyStored() + " / " + e.getMaxEnergyStored() + " FE").withStyle(ChatFormatting.GRAY))