_KS_ Posted September 17, 2022 Posted September 17, 2022 (edited) 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, 2022 by _KS_ Quote
ChampionAsh5357 Posted September 17, 2022 Posted September 17, 2022 On 9/17/2022 at 12:17 PM, _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. Expand 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. On 9/17/2022 at 12:17 PM, _KS_ said: And i need to disable ore vein generation (code for disabling ore gen dont work there) Expand 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. Quote
_KS_ Posted September 17, 2022 Author Posted September 17, 2022 On 9/17/2022 at 1:35 PM, 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. Expand 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 On 9/17/2022 at 1:35 PM, 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 Expand i cant find this in any of level variables, i need to get dimension and lvl name for custom ores generation Quote
ChampionAsh5357 Posted September 17, 2022 Posted September 17, 2022 On 9/17/2022 at 2:58 PM, _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 Expand Then just use a datapack and remove the ore generation from the JSON. Quote
_KS_ Posted September 17, 2022 Author Posted September 17, 2022 On 9/17/2022 at 3:00 PM, ChampionAsh5357 said: Then just use a datapack and remove the ore generation from the JSON. Expand Data packs cant change your world generation like mods Quote
ChampionAsh5357 Posted September 17, 2022 Posted September 17, 2022 On 9/17/2022 at 3:53 PM, _KS_ said: Data packs cant change your world generation like mods Expand 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. Quote
_KS_ Posted September 17, 2022 Author Posted September 17, 2022 On 9/17/2022 at 4:23 PM, 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. Expand Btw is there any event for chunk what is generated first time? Quote
ChampionAsh5357 Posted September 17, 2022 Posted September 17, 2022 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. Quote
Recommended Posts
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.