Skip to content

Commit

Permalink
fix: incompatibility with invmove
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulvdberge committed Feb 17, 2024
1 parent 80a9ef1 commit 7b3e998
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Added

- Ported to Minecraft 1.20.4.
- Ported to Minecraft 1.20.4.
- Custom disk models. Fluid disks now have a different model.
- Portable Grid

Expand All @@ -21,6 +21,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Fixed

- Fixed bug where Grid contents weren't synced properly when a network merge occurs.
- Fixed incompatibility crash with InvMove on Fabric.

## [2.0.0-milestone.3.2] - 2023-11-03

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@

public class SmallTextClientTooltipComponent implements ClientTooltipComponent {
private final Component text;
private final float scale;

public SmallTextClientTooltipComponent(final Component text) {
this.text = text;
this.scale = SmallText.getScale();
}

@Override
Expand All @@ -21,6 +19,7 @@ public void renderText(final Font font,
final int y,
final Matrix4f pose,
final MultiBufferSource.BufferSource buffer) {
final float scale = SmallText.getScale();
SmallText.render(font, text.getVisualOrderText(), x, y, scale, pose, buffer);
}

Expand All @@ -31,6 +30,7 @@ public int getHeight() {

@Override
public int getWidth(final Font font) {
final float scale = SmallText.getScale();
return (int) (font.width(text) * scale);
}
}

0 comments on commit 7b3e998

Please sign in to comment.