调整快艇物品存储的功能
This commit is contained in:
parent
2242c3551f
commit
29b0c7bc85
2 changed files with 3 additions and 2 deletions
|
@ -184,7 +184,7 @@ public class SpeedboatEntity extends Entity implements GeoEntity, IChargeEntity,
|
|||
|
||||
@Override
|
||||
public void remove(Entity.RemovalReason pReason) {
|
||||
if (!this.level().isClientSide && pReason.shouldDestroy()) {
|
||||
if (!this.level().isClientSide && pReason != RemovalReason.DISCARDED) {
|
||||
Containers.dropContents(this.level(), this, this);
|
||||
}
|
||||
|
||||
|
@ -248,6 +248,7 @@ public class SpeedboatEntity extends Entity implements GeoEntity, IChargeEntity,
|
|||
if (!player.addItem(stack)) {
|
||||
player.drop(stack, false);
|
||||
}
|
||||
this.remove(RemovalReason.DISCARDED);
|
||||
this.discard();
|
||||
return InteractionResult.sidedSuccess(this.level().isClientSide());
|
||||
} else {
|
||||
|
|
|
@ -33,7 +33,7 @@ public class SpeedboatMenu extends AbstractContainerMenu {
|
|||
|
||||
for (int j = 0; j < this.containerRows; ++j) {
|
||||
for (int k = 0; k < 17; ++k) {
|
||||
this.addSlot(new Slot(pContainer, k + j * 9, 8 + k * 18, 18 + j * 18));
|
||||
this.addSlot(new Slot(pContainer, k + j * 17, 8 + k * 18, 18 + j * 18));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue