Fix notifyGatherers not referencing a method with appropriate checks in place

This commit is contained in:
attackeight 2024-08-03 16:11:54 -04:00
parent e52b59097e
commit a8cf3e29a4

View File

@ -57,7 +57,7 @@ public class DisplayLinkBlock extends WrenchableDirectionalBlock implements IBE<
placed = placed.setValue(FACING, context.getClickedFace()); placed = placed.setValue(FACING, context.getClickedFace());
return placed.setValue(POWERED, shouldBePowered(placed, context.getLevel(), context.getClickedPos())); return placed.setValue(POWERED, shouldBePowered(placed, context.getLevel(), context.getClickedPos()));
} }
@Override @Override
public void setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) { public void setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) {
super.setPlacedBy(pLevel, pPos, pState, pPlacer, pStack); super.setPlacedBy(pLevel, pPos, pState, pPlacer, pStack);
@ -65,7 +65,7 @@ public class DisplayLinkBlock extends WrenchableDirectionalBlock implements IBE<
} }
public static void notifyGatherers(LevelAccessor level, BlockPos pos) { public static void notifyGatherers(LevelAccessor level, BlockPos pos) {
forEachAttachedGatherer(level, pos, DisplayLinkBlockEntity::updateGatheredData); forEachAttachedGatherer(level, pos, DisplayLinkBlockEntity::tickSource);
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")