暂时禁用bocek的部分动画逻辑

This commit is contained in:
17146 2025-04-22 00:57:36 +08:00 committed by Light_Quanta
parent a710b6b807
commit 47ea1b967a
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959

View file

@ -13,7 +13,6 @@ import com.atsuishio.superbwarfare.network.message.receive.ShootClientMessage;
import com.atsuishio.superbwarfare.perk.AmmoPerk;
import com.atsuishio.superbwarfare.perk.Perk;
import com.atsuishio.superbwarfare.tools.GunsTool;
import com.atsuishio.superbwarfare.tools.InventoryTool;
import com.atsuishio.superbwarfare.tools.SoundTool;
import net.minecraft.client.Minecraft;
import net.minecraft.client.player.LocalPlayer;
@ -104,7 +103,10 @@ public class BocekItem extends GunItem implements GeoItem {
var data = GunData.from(stack);
if (GunsTool.getGunIntTag(GunData.from(stack).tag, "ArrowEmpty") > 0 && data.ammo.get() == 0 && (data.countBackupAmmo(player) > 0 || InventoryTool.hasCreativeAmmoBox(player))) {
// TODO 调整成正常的判断逻辑
if (GunsTool.getGunIntTag(GunData.from(stack).tag, "ArrowEmpty") > 0 && data.ammo.get() == 0
// && (data.countBackupAmmo(player) > 0 || InventoryTool.hasCreativeAmmoBox(player))
) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.bocek.reload"));
}
@ -131,11 +133,12 @@ public class BocekItem extends GunItem implements GeoItem {
@ParametersAreNonnullByDefault
public void inventoryTick(ItemStack stack, Level world, Entity entity, int slot, boolean selected) {
super.inventoryTick(stack, world, entity, slot, selected);
var data = GunData.from(stack);
if (entity instanceof Player player) {
if (GunsTool.getGunIntTag(data.tag, "ArrowEmpty") > 0) {
GunsTool.setGunIntTag(data.tag, "ArrowEmpty", GunsTool.getGunIntTag(data.tag, "ArrowEmpty") - 1);
var data = GunData.from(stack);
if (GunsTool.getGunIntTag(GunData.from(stack).tag, "ArrowEmpty") > 0) {
GunsTool.setGunIntTag(data.tag, "ArrowEmpty", GunsTool.getGunIntTag(GunData.from(stack).tag, "ArrowEmpty") - 1);
}
if (GunsTool.getGunIntTag(data.tag, "ArrowEmpty") == 0 && data.ammo.get() == 0 && data.hasBackupAmmo(player)) {