Skip to content

Commit 99f946d

Browse files
committed
switch to panel handler interface
1 parent 17cc621 commit 99f946d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main/java/gregtech/common/metatileentities/storage/MetaTileEntityCrate.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,16 @@
3333
import codechicken.lib.render.CCRenderState;
3434
import codechicken.lib.render.pipeline.IVertexOperation;
3535
import codechicken.lib.vec.Matrix4;
36+
import com.cleanroommc.modularui.api.IPanelHandler;
3637
import com.cleanroommc.modularui.api.drawable.IKey;
3738
import com.cleanroommc.modularui.api.widget.IGuiAction;
3839
import com.cleanroommc.modularui.api.widget.IWidget;
39-
import com.cleanroommc.modularui.api.widget.Interactable;
4040
import com.cleanroommc.modularui.drawable.GuiTextures;
4141
import com.cleanroommc.modularui.drawable.ItemDrawable;
4242
import com.cleanroommc.modularui.factory.PosGuiData;
4343
import com.cleanroommc.modularui.factory.SidedPosGuiData;
4444
import com.cleanroommc.modularui.screen.ModularPanel;
4545
import com.cleanroommc.modularui.utils.Alignment;
46-
import com.cleanroommc.modularui.value.sync.PanelSyncHandler;
4746
import com.cleanroommc.modularui.value.sync.PanelSyncManager;
4847
import com.cleanroommc.modularui.value.sync.SyncHandlers;
4948
import com.cleanroommc.modularui.widgets.ButtonWidget;
@@ -207,7 +206,7 @@ private Flow createCoverWidgets(PosGuiData data, PanelSyncManager manager, Modul
207206
.height(24 * 3);
208207

209208
int numCovers = 0;
210-
List<PanelSyncHandler> coverPanels = new ArrayList<>();
209+
List<IPanelHandler> coverPanels = new ArrayList<>();
211210
for (EnumFacing side : EnumFacing.VALUES) {
212211
if (getCoverAtSide(side) instanceof CoverWithUI cover) {
213212
if (!cover.shouldShowSmallUI()) continue;
@@ -216,7 +215,7 @@ private Flow createCoverWidgets(PosGuiData data, PanelSyncManager manager, Modul
216215
data.getY(), data.getZ(), side);
217216

218217
// todo better key for this?
219-
var panel = (PanelSyncHandler) manager.panel("cover at side: " + side.getName(),
218+
var panel = manager.panel("cover at side: " + side.getName(),
220219
(syncManager, syncHandler) -> cover.getSmallGUI(sideData, syncManager), true);
221220
coverPanels.add(panel);
222221

@@ -229,7 +228,6 @@ private Flow createCoverWidgets(PosGuiData data, PanelSyncManager manager, Modul
229228
} else {
230229
panel.closePanel();
231230
}
232-
Interactable.playButtonClickSound();
233231
return true;
234232
};
235233

0 commit comments

Comments
 (0)