Posted September 17, 20223 yr I need to get values like current dimension of chunk but i cant find anywhere how to get dimension name, is chunk new etc. And i need to disable ore vein generation (code for disabling ore gen dont work there) Version 1.18 Edited September 17, 20223 yr by _KS_
September 17, 20223 yr 1 hour ago, _KS_ said: I need to get values like current dimension of chunk but i cant find anywhere how to get dimension name, is chunk new etc. In what context? The names of the current dimension can always be obtained through a `Level` instance which you most likely have in some interface abstract. 1 hour ago, _KS_ said: And i need to disable ore vein generation (code for disabling ore gen dont work there) There's not really a good way to do this. You could attempt to find all `PlacedFeature`s which are registered for ore generation, but it depends on how other mods choose to implement this. The best you could do would be for vanilla.
September 17, 20223 yr Author 51 minutes ago, ChampionAsh5357 said: There's not really a good way to do this. You could attempt to find all `PlacedFeature`s which are registered for ore generation, but it depends on how other mods choose to implement this. The best you could do would be for vanilla. I know about this, and i making mod just for me and few friends for private server and we dont gonna add any other mods with ore gen ore something like this 1 hour ago, ChampionAsh5357 said: In what context? The names of the current dimension can always be obtained through a `Level` instance which you most likely have in some interface abstract i cant find this in any of level variables, i need to get dimension and lvl name for custom ores generation
September 17, 20223 yr 1 minute ago, _KS_ said: I know about this, and i making mod just for me and few friends for private server and we dont gonna add any other mods with ore gen ore something like this Then just use a datapack and remove the ore generation from the JSON.
September 17, 20223 yr Author 52 minutes ago, ChampionAsh5357 said: Then just use a datapack and remove the ore generation from the JSON. Data packs cant change your world generation like mods
September 17, 20223 yr 29 minutes ago, _KS_ said: Data packs cant change your world generation like mods Yes it can. If you just want to stop ore spawning, simply remove the ore placed features from the associated list in the features object.
September 17, 20223 yr Author 4 hours ago, ChampionAsh5357 said: Yes it can. If you just want to stop ore spawning, simply remove the ore placed features from the associated list in the features object. Btw is there any event for chunk what is generated first time?
September 17, 20223 yr There is `ChunkEvent$Load`, but that is fired any time a chunk is loaded. You can check if the chunk is a proto chunk, but that would be the best you could do.
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.