mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-02-06 18:34:59 +01:00
Fix calls to getSize() on display link peripheral failing when the peripheral is newly loaded (#7059)
This commit is contained in:
parent
be026ece02
commit
0f9ba22aa2
1 changed files with 1 additions and 0 deletions
|
@ -36,6 +36,7 @@ public class DisplayLinkPeripheral extends SyncedPeripheral<DisplayLinkBlockEnti
|
||||||
|
|
||||||
@LuaFunction(mainThread = true)
|
@LuaFunction(mainThread = true)
|
||||||
public final Object[] getSize() {
|
public final Object[] getSize() {
|
||||||
|
blockEntity.updateGatheredData();
|
||||||
DisplayTargetStats stats = blockEntity.activeTarget.provideStats(new DisplayLinkContext(blockEntity.getLevel(), blockEntity));
|
DisplayTargetStats stats = blockEntity.activeTarget.provideStats(new DisplayLinkContext(blockEntity.getLevel(), blockEntity));
|
||||||
return new Object[]{stats.maxRows(), stats.maxColumns()};
|
return new Object[]{stats.maxRows(), stats.maxColumns()};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue