Can anyone tell me what I have to edit in this code to change how frequently the villages spawn? I want them to spawn at the normal vanilla rate but I'm not sure what part of the code I should be messing with.
config.load();
villageDistance = config.get("Customization", "Village Distance - 32 is vanilla, 16 is more common, 8 is extremely common, 4 is just insane.", villageDistance).getInt();
if (villageDistance < 4) {
villageDistance = 4;
}
You don't edit the code, you edit the config. In the "Customization" section, the "Village Distance - 32 is vanilla, 16 is more common, 8 is extremely common, 4 is just insane." setting. "Village Distance - 32 is vanilla, 16 is more common, 8 is extremely common, 4 is just insane." is literally the name of the setting to change the value of. The default value for this setting from the mod is 16. You can make it any integer, including greater than 32 (aka, less common than vanilla), though values less than 4 will be changed to 4 via the code -- that way the villages don't overlap TOO, too much.
Rollback Post to RevisionRollBack
If I said I'd do something and haven't, please remind me; I didn't lie, I just forgot.
I program
Ah sorry yeah, Didn't expect you to reply so fast. I found out I was looking at the wrong thing pretty quick and was about to edit my post.
so it is this code right?
[in file MoVillagesConfigurationVillage.class]
public static int villageDistance = 31;
specifically the 31 (which is 16 normally for the mod).
I managed to extract the class file out of the mod and decompile the it, however I'm having a hell of a time recompiling it into a class file (i know now doing this with only the java file and CMD isn't the right way). I'm working on understanding how to use MCU (and eclipse) to decompile, edit, and then recompile it but after about a total of 4 hours looking around and learning this stuff would you consider having this integer configurable in the mod list with a slider or something?
Also I gotta say this is a really good mod and thanks for keeping it working.
Ah sorry yeah, Didn't expect you to reply so fast. I found out I was looking at the wrong thing pretty quick and was about to edit my post.
so it is this code right?
[in file MoVillagesConfigurationVillage.class]
public static int villageDistance = 31;
specifically the 31 (which is 16 normally for the mod).
I managed to extract the class file out of the mod and decompile the it, however I'm having a hell of a time recompiling it into a class file (i know now doing this with only the java file and CMD isn't the right way). I'm working on understanding how to use MCU (and eclipse) to decompile, edit, and then recompile it but after about a total of 4 hours looking around and learning this stuff would you consider having this integer configurable in the mod list with a slider or something?
Also I gotta say this is a really good mod and thanks for keeping it working.
I'll have to learn the new Forge in-game property stuff, but sure; though it's still already editable via the cfg --"Village Distance - 32 is vanilla, 16 is more common, 8 is extremely common, 4 is just insane." Freakishly long name for a setting, but that's what it is.
What are you aiming to do by doing this, though? Just change how common the villages are? Or make a version for a microcontroller or other device for some dumb reason? I'm really not sure.
Rollback Post to RevisionRollBack
If I said I'd do something and haven't, please remind me; I didn't lie, I just forgot.
I program
I'm just wanting to change how common the villages are back to their default state (or slightly more common if possible, if not just its default).
Also can't seem to find this CFG file your talking about, only find Class files, Text files, and a MF file. That's why i've been trying to muck around with the class file.
It's in the Minecraft "config" folder, inside the "MoVillages" subfolder. It's currently the only file in there, as the other settings for the mod are hidden away in text files inside the jar
If you installed the mod manually, the config folder is generated right next to the "mods" folder that you put this mod inside of.
Rollback Post to RevisionRollBack
If I said I'd do something and haven't, please remind me; I didn't lie, I just forgot.
I program
That's something I've never seen before. Guess that's the end of this wild goose chase, at least I learned some more stuff about java on the way. Thanks for the help.
Question, are the villages created across world at fixed locations when the world is created, like vanilla villages and temples and stuff, or are they created as the chunks are loaded, like in Millenaire? What I mean is, if I add this mod to a world already created, will villages still be created or do I need the mod installed when the world is first created in order for the villages to be spawned in?
Crafty_Angyl -- sorry; didn't see your post. This mod only alters vanilla's spawn rate, rather than add some new way of spawning the villages. The majority of this tiny mod is the bit of code for dealing with block replacements and the text-based config inside of the jar for said replacements. Almost everything else is vanilla or closely vanilla-based -- that's actually how the mod manages to be so small!
Rollback Post to RevisionRollBack
If I said I'd do something and haven't, please remind me; I didn't lie, I just forgot.
I program
The Meaning of Life, the Universe, and Everything.
Join Date:
1/14/2011
Posts:
59
Minecraft:
Socko972001
Member Details
I hate to be the one to ask, but Is there any chance that you will update this for v1.12? We love having towns in any biome here. Really adds to the game.
In the 1.7.10 config, if I enter the biome names correctly, will villages spawn in that biome? Or is it just not working because I'm trying to put villages in other dimensions?
I.E.: Is there anything I can do to put villages in any biome in any dimension just by editing the config myself?
Paintbrush11 - Sadly not. The config folder file is about toggling pre-defined groups of biomes -- each setting controls multiple biomes that fit that sort of description. For example, the "Jungle" setting controls all five jungle variants (Jungle, Jungle M, Jungle Edge, Jungle Edge M, Jungle Hills).
From there, the mod is simply marking the biomes as supporting villages (based on those settings) and letting vanilla handle the actual placement. Dimensions aren't playing any role (if the biome spawns, it should support villages regardless of dimension number).
(Changing the blocks based on biome is handled separately in a different section of code.)
Rollback Post to RevisionRollBack
If I said I'd do something and haven't, please remind me; I didn't lie, I just forgot.
I program
I want to turn down spawns just a bit, how do i do that? The MoVillagesConfigurationVillage.class file is hard to understand since i have no coding experience
..Don't edit that file. In your .minecraft file, find the config file. Find the MoVillages file and open the VillageDistance document. See that number near the top after the = (should be 16)? Make the number larger for less villages.
You didn't have to extract the .jar file, really.
AIRdog01 - Paintbrush11 is correct, though he is using the word 'file' to refer to both what we would call a file as well as a folder/directory. Though I should also let you know that more villages also means smaller villages, and fewer villages also means larger villages. (This mod increases the frequency and so also decreases the size of them, as compared to regular vanilla.)
As for your confusion, are you seeing a lot of strange characters (such as from opening it in a text editor)? Or perhaps as pairs of numbers and letters from A to F (opening it in a hex editor)? Or did you decompile it and are confused on the generated source code?
In a related matter, the mod has a few more configuration files, but for now they are still located inside the jar. These are responsible for the block replacement maps.
Rollback Post to RevisionRollBack
If I said I'd do something and haven't, please remind me; I didn't lie, I just forgot.
I program
How would I change doors in the block replacement txt? For example, mineshafts in the mesa biome use dark oak planks and fences, so I want to replace the oak doors with dark oak doors.
This is what I have for the mesa biome right now (I also changed the stairs to red sandstone stairs instead of terracotta)
minecraft:mesa
minecraft:gravel -> minecraft:stained_hardened_clay meta 0
minecraft:cobblestone -> minecraft:hardened_clay
minecraft:planks -> minecraft:stained_hardened_clay meta 1
minecraft:oak_stairs -> minecraft:red_sandstone_stairs meta keep
minecraft:log -> minecraft:stained_hardened_clay meta 1
minecraft:stone_stairs -> minecraft:red_sandstone_stairs meta keep
minecraft:stone_brick_stairs -> minecraft:red_sandstone_stairs meta keep
minecraft:dirt -> minecraft:stained_hardened_clay meta 14
minecraft:wool -> meta 1
minecraft:fence -> minecraft:dark_oak_fence
minecraft:wooden_door -> minecraft:dark_oak_door meta keep
You don't edit the code, you edit the config. In the "Customization" section, the "Village Distance - 32 is vanilla, 16 is more common, 8 is extremely common, 4 is just insane." setting. "Village Distance - 32 is vanilla, 16 is more common, 8 is extremely common, 4 is just insane." is literally the name of the setting to change the value of. The default value for this setting from the mod is 16. You can make it any integer, including greater than 32 (aka, less common than vanilla), though values less than 4 will be changed to 4 via the code -- that way the villages don't overlap TOO, too much.
I program
Ah sorry yeah, Didn't expect you to reply so fast. I found out I was looking at the wrong thing pretty quick and was about to edit my post.
so it is this code right?
[in file MoVillagesConfigurationVillage.class]
I managed to extract the class file out of the mod and decompile the it, however I'm having a hell of a time recompiling it into a class file (i know now doing this with only the java file and CMD isn't the right way). I'm working on understanding how to use MCU (and eclipse) to decompile, edit, and then recompile it but after about a total of 4 hours looking around and learning this stuff would you consider having this integer configurable in the mod list with a slider or something?
Also I gotta say this is a really good mod and thanks for keeping it working.
I'll have to learn the new Forge in-game property stuff, but sure; though it's still already editable via the cfg --"Village Distance - 32 is vanilla, 16 is more common, 8 is extremely common, 4 is just insane." Freakishly long name for a setting, but that's what it is.
What are you aiming to do by doing this, though? Just change how common the villages are? Or make a version for a microcontroller or other device for some dumb reason? I'm really not sure.
I program
I'm just wanting to change how common the villages are back to their default state (or slightly more common if possible, if not just its default).
Also can't seem to find this CFG file your talking about, only find Class files, Text files, and a MF file. That's why i've been trying to muck around with the class file.
It's in the Minecraft "config" folder, inside the "MoVillages" subfolder. It's currently the only file in there, as the other settings for the mod are hidden away in text files inside the jar
If you installed the mod manually, the config folder is generated right next to the "mods" folder that you put this mod inside of.
I program
Ah, ok...
That's something I've never seen before. Guess that's the end of this wild goose chase, at least I learned some more stuff about java on the way. Thanks for the help.
Question, are the villages created across world at fixed locations when the world is created, like vanilla villages and temples and stuff, or are they created as the chunks are loaded, like in Millenaire? What I mean is, if I add this mod to a world already created, will villages still be created or do I need the mod installed when the world is first created in order for the villages to be spawned in?
Ice and Fire: Dragons in a whole new light
Crafty_Angyl -- sorry; didn't see your post. This mod only alters vanilla's spawn rate, rather than add some new way of spawning the villages. The majority of this tiny mod is the bit of code for dealing with block replacements and the text-based config inside of the jar for said replacements. Almost everything else is vanilla or closely vanilla-based -- that's actually how the mod manages to be so small!
I program
I hate to be the one to ask, but Is there any chance that you will update this for v1.12? We love having towns in any biome here. Really adds to the game.
In the 1.7.10 config, if I enter the biome names correctly, will villages spawn in that biome? Or is it just not working because I'm trying to put villages in other dimensions?
I.E.: Is there anything I can do to put villages in any biome in any dimension just by editing the config myself?
Greetings, Earthling!
No.
Paintbrush11 - Sadly not. The config folder file is about toggling pre-defined groups of biomes -- each setting controls multiple biomes that fit that sort of description. For example, the "Jungle" setting controls all five jungle variants (Jungle, Jungle M, Jungle Edge, Jungle Edge M, Jungle Hills).
From there, the mod is simply marking the biomes as supporting villages (based on those settings) and letting vanilla handle the actual placement. Dimensions aren't playing any role (if the biome spawns, it should support villages regardless of dimension number).
(Changing the blocks based on biome is handled separately in a different section of code.)
I program
Alright. Thanks for replying so fast!
Greetings, Earthling!
No.
Any idea how to get this to work with Realistic Terrain Generation ? I enabled villages in every biome in the config. 1.7.10
edit: you just have to set "Enable village modifications"=false in rtg.cfg
I want to turn down spawns just a bit, how do i do that? The MoVillagesConfigurationVillage.class file is hard to understand since i have no coding experience
You didn't have to extract the .jar file, really.
Greetings, Earthling!
No.
AIRdog01 - Paintbrush11 is correct, though he is using the word 'file' to refer to both what we would call a file as well as a folder/directory. Though I should also let you know that more villages also means smaller villages, and fewer villages also means larger villages. (This mod increases the frequency and so also decreases the size of them, as compared to regular vanilla.)
As for your confusion, are you seeing a lot of strange characters (such as from opening it in a text editor)? Or perhaps as pairs of numbers and letters from A to F (opening it in a hex editor)? Or did you decompile it and are confused on the generated source code?
In a related matter, the mod has a few more configuration files, but for now they are still located inside the jar. These are responsible for the block replacement maps.
I program
Is there a way to add BOP biomes to this?
How would I change doors in the block replacement txt? For example, mineshafts in the mesa biome use dark oak planks and fences, so I want to replace the oak doors with dark oak doors.
This is what I have for the mesa biome right now (I also changed the stairs to red sandstone stairs instead of terracotta)
How long do you think it would take to update this mod to 1.13.2?