重命名AA12换弹过程

This commit is contained in:
Light_Quanta 2024-05-12 14:51:33 +08:00
parent a7c98f6c45
commit f3c0f173eb
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
2 changed files with 3 additions and 3 deletions

View file

@ -37,7 +37,7 @@ public class Aa12WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
}
if (itemstack.getOrCreateTag().getDouble("reloadtime") == 1 && (entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getOrCreateTag().getDouble("id") == id) {
if (entity instanceof LivingEntity) {
AA12ReloadProcedure.execute((LivingEntity) entity, false);
ShotgunReloadProcedure.execute((LivingEntity) entity, false);
}
}
} else if (itemstack.getOrCreateTag().getDouble("reloading") == 1 && itemstack.getOrCreateTag().getDouble("ammo") > 0) {
@ -62,7 +62,7 @@ public class Aa12WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
}
if (itemstack.getOrCreateTag().getDouble("reloadtime") == 1 && (entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getOrCreateTag().getDouble("id") == id) {
if (entity instanceof LivingEntity) {
AA12ReloadProcedure.execute((LivingEntity) entity, true);
ShotgunReloadProcedure.execute((LivingEntity) entity, true);
}
}
}

View file

@ -4,7 +4,7 @@ import net.mcreator.target.network.TargetModVariables;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.entity.LivingEntity;
public class AA12ReloadProcedure {
public class ShotgunReloadProcedure {
public static void execute(LivingEntity entity, boolean plusOne) {
CompoundTag tag = entity.getMainHandItem().getOrCreateTag();
double mag = tag.getDouble("mag");