Skip to content

Commit

Permalink
getNearPoses EMCBattery
Browse files Browse the repository at this point in the history
  • Loading branch information
PTOM76 committed Sep 18, 2024
1 parent f7fbc22 commit c480316
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/net/pitan76/itemalchemy/block/EMCRepeater.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ private static List<BlockPos> getNearPoses(World world, BlockPos[] blockPoses, L
if (emcRepeaterPosList.contains(pos)) continue;

if (WorldUtil.getBlockState(world, pos).getBlock() instanceof EMCRepeater) {
if (WorldUtil.getBlockState(world, pos).getBlock() instanceof EMCBattery && !blockPosList.contains(pos))
blockPosList.add(pos);

emcRepeaterPosList.add(pos);
BlockPos[] nearPoses = {pos.up(), pos.down(), pos.north(), pos.south(), pos.east(), pos.west()};
blockPosList.addAll(getNearPoses(world, nearPoses, emcRepeaterPosList));
Expand Down

0 comments on commit c480316

Please sign in to comment.