Skip to content

Commit 1299537

Browse files
committed
fix: optimize sublevel raycast and fix gps satellite sneak wrench
1 parent 991460d commit 1299537

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/com/github/winexp/aeronauticsextra/content/blocks/gps/satellite/GPSSatelliteBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public InteractionResult onSneakWrenched(BlockState state, UseOnContext context)
125125
if (!player.isCreative()) {
126126
player.getInventory().placeItemBackInInventory(be.getAntenna().copyWithCount(1));
127127
}
128-
be.getAntenna().consume(1, player);
128+
be.getAntenna().shrink(1);
129129
}
130130
});
131131
level.setBlock(blockPos, state.setValue(ANTENNA, false), Block.UPDATE_ALL);

src/main/java/com/github/winexp/aeronauticsextra/utility/RaycastUtil.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ private static Multimap<Block, Section> blockRaycastInternal(Level level, Vec3 s
5353
ArrayListMultimap<Block, Section> blockMap = ArrayListMultimap.create();
5454
BlockGetter.traverseBlocks(start, end, context, (ctx, blockPos) -> {
5555
Vec3 from = ctx.getFrom(), to = ctx.getTo();
56+
if (!level.isLoaded(blockPos)) return blockPos;
5657
BlockState state = level.getBlockState(blockPos);
5758
if (!filter.test(state)) return null;
5859
Block block = state.getBlock();

0 commit comments

Comments
 (0)