Skip to content

Commit

Permalink
修复无法输出至大箱子的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Gu-ZT committed Mar 12, 2024
1 parent 5eea1d0 commit edb2dae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public void setDirection(Direction direction) {
}

private boolean dropItem(Direction direction, Level level, @NotNull BlockPos pos, ItemStack item) {
Container outContainer = BaseMachineBlockEntity.getOutputContainer(level, pos, direction);
Container outContainer = HopperBlockEntity.getContainerAt(level, pos.relative(direction));
if (null == outContainer) {
BlockPos out = pos.relative(direction);
Vec3 vec3 = out.getCenter().relative(direction, -0.5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected BaseMachineBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockSta
}

public static void tick(Level level, BlockPos pos, BaseMachineBlockEntity entity) {
Container outContainer = BaseMachineBlockEntity.getOutputContainer(level, pos, entity.direction);
Container outContainer = HopperBlockEntity.getContainerAt(level, pos.relative(entity.direction));
if (outContainer == null) return;
int slot = entity.getContainerSize() - 1;
ItemStack itemStack = entity.getItem(slot);
Expand Down

0 comments on commit edb2dae

Please sign in to comment.