Posted May 22, 20196 yr Hi guys, i know how to cancel ores and Decorations and that stuff, but how can i cancel Mineshafts and vanilla dungeons?
May 24, 20196 yr Author wait what? how to override a void method huh? @SubscribeEvent public void onEventGenerateStructure(InitMapGenEvent event){ if(event.getType() == InitMapGenEvent.EventType.MINESHAFT){ } } got that but idk how to override that, i only know how to override objects, also i tried in the if statement to setCancelled, that chrashes and setNewGen also crashes On 5/22/2019 at 10:11 PM, diesieben07 said: Mineshafts: Subscribe to InitMapGenEvent (fired on MinecraftForge.TERRAIN_GEN_BUS) and check for InitMapGenEvent.EventType.MINESHAFT. Then override the generator with one that simply generates nothing. Dungeons: Subscribe to PopulateChunkEvent.Populate (also fired on MinecraftForge.TERRAIN_GEN_BUS) and set it's result to DENY for PopulateChunkEvent.Populate.EventType.DUNGEON.
May 25, 20196 yr Author @SubscribeEvent public void onInitMapGenEvent(InitMapGenEvent event) { if(event.getType() == InitMapGenEvent.EventType.MINESHAFT) { event.setNewGen(new MapGenRavine()); } } tried to override them with ravines but that crash, null also crash and new MapGenBase() also crash, idk hot to use that event im sorry
May 25, 20196 yr 16 hours ago, diesieben07 said: You need to call setNewGen and provide a generator that does not generate anything, like I said. If it crashes, post the log. We can’t help you based on “it crashes” Edited May 25, 20196 yr by Cadiboo About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
May 25, 20196 yr Author if it crashes i need something diffrent i i know its whrong what i did, i only want to know how to cancel InitMapGenEvent or override it
May 25, 20196 yr 7 hours ago, Schleim_time said: i need something diffrent Post the log first. 7 hours ago, Cadiboo said: We can’t help you based on “it crashes” 7 hours ago, Schleim_time said: i only want to know how to cancel InitMapGenEvent On 5/24/2019 at 2:47 PM, diesieben07 said: setCancelled will indeed crash, because InitMapGenEvent is not cancellable.
May 25, 20196 yr Author @SubscribeEvent public void onInitMapGenEvent(InitMapGenEvent event) { if(event.getType() == InitMapGenEvent.EventType.MINESHAFT) { event.setNewGen(x); } } so thats my code and the only thing i want to know what i have to fit in for "x" to remove the mineshafts, i tried null and also new MapGenBase but both just doent worked like i wanted them to work, i need something to fit in for x and i think a log will not help for that problem
May 25, 20196 yr Author does it makes it easier when i say i am owning a custom world type? and it only have to be disabled in that world type
May 26, 20196 yr “x” needs to be your own implementation that doesn’t generate anything About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
May 26, 20196 yr Author 9 hours ago, Cadiboo said: “x” needs to be your own implementation that doesn’t generate anything there is my problem, i never used that event or created anything like that, like i said i tried to replace the mineshaft by putting for x "new MapGenRavine()" so how does that work? and new MapGenRavine() didnt worked for that Edited May 26, 20196 yr by Schleim_time extra info
May 26, 20196 yr It needs to be your own implementation that doesn’t generate anything. So “new DummyMapGen()” About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.