File tree Expand file tree Collapse file tree
src/main/java/com/researchcube/client/screen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -249,8 +249,9 @@ private void onWipeTank() {
249249 }
250250
251251 private void onSwitchToTreeView () {
252- preferredView = ViewMode .TREE ;
253- updateViewMode ();
252+ Minecraft mc = Minecraft .getInstance ();
253+ if (mc .player == null ) return ;
254+ mc .setScreen (new ResearchTreeScreen (menu , mc .player .getInventory (), this .title ));
254255 }
255256
256257 private void onSwitchToListView () {
@@ -260,12 +261,19 @@ private void onSwitchToListView() {
260261
261262 /**
262263 * Updates the view mode based on research state and user preference.
263- * When researching: always show PROGRESS view
264+ * When researching AND definition is available: show PROGRESS view
264265 * When not researching: show user's preferred view (LIST or TREE)
265266 */
266267 private void updateViewMode () {
267268 if (menu .isResearching ()) {
268- currentView = ViewMode .PROGRESS ;
269+ // Only show PROGRESS view if the active definition is synced to client
270+ ResearchDefinition activeDef = menu .getBlockEntity ().getActiveDefinition ();
271+ if (activeDef != null ) {
272+ currentView = ViewMode .PROGRESS ;
273+ } else {
274+ // Stay in current view until definition is synced
275+ currentView = preferredView ;
276+ }
269277 } else {
270278 currentView = preferredView ;
271279 }
You can’t perform that action at this time.
0 commit comments