MonkeyBusiness Posted December 29, 2019 Share Posted December 29, 2019 Calling the following method sometimes causes the client to attempt to switch to a P2P world, is this a bug or am I switching worlds incorrectly? getMap().worlds.hopToF2PWorld(); Quote Link to comment Share on other sites More sharing options...
FuryShark Posted December 29, 2019 Share Posted December 29, 2019 You can do getWorlds().hopToF2PWorld(); What world is it trying to hop to ? Quote Link to comment Share on other sites More sharing options...
MonkeyBusiness Posted December 29, 2019 Author Share Posted December 29, 2019 59 minutes ago, FuryShark said: You can do getWorlds().hopToF2PWorld(); What world is it trying to hop to ? Isn't that a different way to access the same method? I will need to monitor the members world(s) it is trying to hop to as it only happens occasionally. I was just wondering if I was doing something wrong before investigating. Quote Link to comment Share on other sites More sharing options...
Kramnik Posted December 29, 2019 Share Posted December 29, 2019 This is because of twisted league world that's why. Make a custom world hopper if you want to solve this 1 Quote Link to comment Share on other sites More sharing options...
MonkeyBusiness Posted December 29, 2019 Author Share Posted December 29, 2019 27 minutes ago, Malcolm said: I have reported this to Patrick already. He is aware of it. Yes it tries to hop to Twisted League worlds. Yeah, you and @Kramnik are correct, it's because of Twisted League worlds! Thanks for confirming Quote Link to comment Share on other sites More sharing options...
Medusa Posted December 29, 2019 Share Posted December 29, 2019 (edited) You could make a list of worlds yourself. Here is a snippet of what you could do (Nothing in here has to be static). public static ArrayList<Integer> worlds = new ArrayList<Integer>(); public static ArrayList<Integer> blockedWorlds = new ArrayList<Integer>(); @Override public void onStart() throws InterruptedException { blockWorlds(); getWorlds().getAvailableWorlds(false).forEach(w -> { if (!w.isMembers() && !w.isPvpWorld() && !blockedWorlds.contains(w.getId()) && getWorlds().isWorldAllowedForHop(w)) { worlds.add(w.getId()); } }); log(worlds.size() + " worlds added to hop list."); } //To block worlds you just add to the array of integers called b static int[] b = {318, 400, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 443, 462, 463, 512, 535, 536}; public static void blockWorlds() { for (int i : b) { blockedWorlds.add(i); } } Then you could make a custom method to get a random world etc. Not quite sure which worlds are blocked here, but it blocks league worlds (So they won't be added to worlds arraylist) Edited January 3, 2020 by Medusa Quote Link to comment Share on other sites More sharing options...