Merge pull request #6769 from Attack8/mc1.18/pause-display-links

Add check for Display Link power before gathering data
This commit is contained in:
simibubi 2024-08-06 14:00:50 +02:00 committed by GitHub
commit 80f2836b40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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