调整了撬棍的判定
This commit is contained in:
parent
33dc341e54
commit
a16aea5e01
1 changed files with 1 additions and 2 deletions
|
@ -90,7 +90,6 @@ public class VehicleEntity extends Entity {
|
||||||
protected void readAdditionalSaveData(CompoundTag compound) {
|
protected void readAdditionalSaveData(CompoundTag compound) {
|
||||||
this.entityData.set(LAST_ATTACKER_UUID, compound.getString("LastAttacker"));
|
this.entityData.set(LAST_ATTACKER_UUID, compound.getString("LastAttacker"));
|
||||||
this.entityData.set(HEALTH, compound.getFloat("Health"));
|
this.entityData.set(HEALTH, compound.getFloat("Health"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -104,7 +103,7 @@ public class VehicleEntity extends Entity {
|
||||||
if (player.getVehicle() == this) return InteractionResult.PASS;
|
if (player.getVehicle() == this) return InteractionResult.PASS;
|
||||||
|
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
if (player.isShiftKeyDown() && stack.is(ModItems.CROWBAR.get())) {
|
if (player.isShiftKeyDown() && stack.is(ModItems.CROWBAR.get()) && this.getFirstPassenger() == null) {
|
||||||
ItemStack container = ContainerBlockItem.createInstance(this);
|
ItemStack container = ContainerBlockItem.createInstance(this);
|
||||||
if (!player.addItem(container)) {
|
if (!player.addItem(container)) {
|
||||||
player.drop(container, false);
|
player.drop(container, false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue