允许使用撬棍移除标靶和DPS发电机

This commit is contained in:
Light_Quanta 2025-06-30 04:09:54 +08:00
parent 2a3432560f
commit f8484d1f2b
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
2 changed files with 2 additions and 2 deletions

View file

@ -161,7 +161,7 @@ public class DPSGeneratorEntity extends LivingEntity implements GeoEntity {
@Override
public @NotNull InteractionResult interact(Player player, @NotNull InteractionHand hand) {
if (player.getMainHandItem() != ItemStack.EMPTY) {
if (player.getMainHandItem() != ItemStack.EMPTY && player.getMainHandItem().getItem() != ModItems.CROWBAR.get()) {
return InteractionResult.PASS;
}

View file

@ -137,7 +137,7 @@ public class TargetEntity extends LivingEntity implements GeoEntity {
@Override
public @NotNull InteractionResult interact(Player player, @NotNull InteractionHand hand) {
if (player.getMainHandItem() != ItemStack.EMPTY) {
if (player.getMainHandItem() != ItemStack.EMPTY && player.getMainHandItem().getItem() != ModItems.CROWBAR.get()) {
return InteractionResult.PASS;
}