@@ -62,11 +62,6 @@ public ExplorersCompassScreen(Level level, Player player, ItemStack stack, Explo
6262 }
6363 }
6464
65- @ Override
66- public boolean mouseScrolled (double par1 , double par2 , double par3 , double par4 ) {
67- return selectionList .mouseScrolled (par1 , par2 , par3 , par4 );
68- }
69-
7065 @ Override
7166 protected void init () {
7267 setupWidgets ();
@@ -82,8 +77,7 @@ public void tick() {
8277 removeWidget (selectionList );
8378 allowedStructures = new ArrayList <Identifier >(ExplorersCompass .allowedStructures );
8479 structuresMatchingSearch = new ArrayList <Identifier >(allowedStructures );
85- selectionList = new StructureSearchList (this , minecraft , player , foundStructureId , width + 110 , height - 50 , 40 , 50 );
86- addRenderableWidget (selectionList );
80+ selectionList = addRenderableWidget (new StructureSearchList (this , minecraft , player , foundStructureId , 130 , 40 , width - 140 , height - 50 , 50 ));
8781
8882 teleportButton .visible = ExplorersCompass .canTeleport ;
8983 searchForNextButton .visible = ExplorersCompass .maxNextSearches > 0 ;
@@ -210,11 +204,8 @@ private void setupWidgets() {
210204 }));
211205
212206 searchBox = addRenderableWidget (new TransparentEditBox (font , 130 , 10 , 140 , 20 , Component .translatable ("string.explorerscompass.search" ).withColor (0xff808080 )));
213-
214- if (selectionList == null ) {
215- selectionList = new StructureSearchList (this , minecraft , player , foundStructureId , width + 110 , height - 50 , 40 , 50 );
216- }
217- addRenderableWidget (selectionList );
207+
208+ selectionList = addRenderableWidget (new StructureSearchList (this , minecraft , player , foundStructureId , 130 , 40 , width - 140 , height - 50 , 50 ));
218209 }
219210
220211}
0 commit comments