添加撬棍回收63式的功能
This commit is contained in:
parent
c47a62591a
commit
d12ab212a6
1 changed files with 13 additions and 0 deletions
|
@ -6,6 +6,8 @@ import com.atsuishio.superbwarfare.entity.OBBEntity;
|
|||
import com.atsuishio.superbwarfare.entity.vehicle.base.ContainerMobileVehicleEntity;
|
||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||
import com.atsuishio.superbwarfare.init.ModSounds;
|
||||
import com.atsuishio.superbwarfare.init.ModTags;
|
||||
import com.atsuishio.superbwarfare.item.ContainerBlockItem;
|
||||
import com.atsuishio.superbwarfare.tools.CustomExplosion;
|
||||
import com.atsuishio.superbwarfare.tools.OBB;
|
||||
import com.atsuishio.superbwarfare.tools.ParticleTool;
|
||||
|
@ -140,6 +142,17 @@ public class Type63Entity extends ContainerMobileVehicleEntity implements GeoEnt
|
|||
player.swing(InteractionHand.MAIN_HAND);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.isShiftKeyDown() && stack.is(ModTags.Items.CROWBAR) && this.getPassengers().isEmpty()) {
|
||||
ItemStack container = ContainerBlockItem.createInstance(this);
|
||||
if (!player.addItem(container)) {
|
||||
player.drop(container, false);
|
||||
}
|
||||
this.remove(RemovalReason.DISCARDED);
|
||||
this.discard();
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
return InteractionResult.FAIL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue