Skip to content

Commit

Permalink
Switch to use the SignText.LINES constant
Browse files Browse the repository at this point in the history
  • Loading branch information
sekwah41 committed Sep 26, 2023
1 parent c65b706 commit f5c397e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.CampfireBlockEntity;
import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.level.block.entity.SignText;

import javax.annotation.Nullable;

Expand All @@ -30,7 +31,7 @@ private static BlockDescription describeSign(LocalPlayer player, final SignBlock
Component message = player == null ? sign.getFrontText().getMessage(0, false)
: sign.getTextFacingPlayer(player).getMessage(0, false);
// Was using SignBlockEntity.LINES but that no longer seems to exist
for (int i = 1; i < 4; i++) {
for (int i = 1; i < SignText.LINES; i++) {
message = CommonComponents.joinForNarration(message, player == null ? sign.getFrontText().getMessage(i, false)
: sign.getTextFacingPlayer(player).getMessage(i, false));
}
Expand Down

0 comments on commit f5c397e

Please sign in to comment.