BiomeTweaker

BiomeTweaker

13M Downloads

Request: Biomes: Select range; select "all but"; merge groups

keybounce opened this issue · 25 comments

commented

I'd like to be able to select a range of biomes.
Or, merge two groups of biomes.
Or, exclude biomes.

Examples:
Select biomes 0-39
Select biomes 128-167
Merge them
Do something to them (NB: This catches all vanilla biomes and mutants, but ignores mod biomes that are outside the vanilla range).

Example:
Ignore the twilight forest: Select all biomes except 40-58 (well, that's where they are configured in my pack).

Or: Select all biomes
Exclude biomes 40-58

Baseset = forBiomes(0 .. 39)
Mutants = forBiomes(128 .. 167)
Vanilla = forBIomes(Baseset, Mutants)

TF = forBiomes(40 .. 58)
All = forAllBiomes()
ChangeMe = excludeBiomes (All, TF)

Or something like that.

commented

a supported version containing these changes has been released.

http://minecraft.curseforge.com/mc-mods/228895-biometweaker/files/2234661

commented

Thank you.

commented

Alright, what did I do wrong?

https://gist.github.com/keybounce/96a4743fd3fd995ec9a3

[23:32:18] [Server thread/ERROR] [FML]: A fatal exception occurred during the server about to start event
java.lang.ArrayIndexOutOfBoundsException: 31
at java.util.RegularEnumSet$EnumSetIterator.next(RegularEnumSet.java:104) ~[?:1.7.0_72]
at java.util.RegularEnumSet$EnumSetIterator.next(RegularEnumSet.java:78) ~[?:1.7.0_72]
at java.util.AbstractCollection.toArray(AbstractCollection.java:195) ~[?:1.7.0_72]
at net.minecraftforge.common.BiomeDictionary.getTypesForBiome(BiomeDictionary.java:206) ~[BiomeDictionary.class:?]
at me.superckl.biometweaker.util.BiomeHelper.fillJsonObject(BiomeHelper.java:72) ~[BiomeTweaker-1.7.10-0.6.39.jar:?]
at me.superckl.biometweaker.BiomeTweaker.onLoadComplete(BiomeTweaker.java:73) ~[BiomeTweaker.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_72]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_72]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_72]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_72]
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) ~[forge-1.7.10-10.13.2.1343-1.7.10.jar:?]
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_72]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_72]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-16.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-16.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-16.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-16.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-16.0.jar:?]
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[LoadController.class:?]
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[LoadController.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_72]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_72]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_72]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_72]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-16.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-16.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-16.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-16.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-16.0.jar:?]
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) ~[LoadController.class:?]
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:696) ~[Loader.class:?]
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288) ~[FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:541) ~[bao.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:867) ~[bao.class:?]
at net.minecraft.client.main.Main.main(SourceFile:148) ~[1.7.10-Forge10.13.2.1343-1.7.10.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_72]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_72]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_72]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_72]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) ~[launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) ~[launchwrapper-1.11.jar:?]

commented

This one appears to be my bad.

First off, BiomeTweaker does not support mid-line comments. Doing something like this

toRestore = forBiomes(166, 167) #Mesa plateau M's (both) are normal; F M gets dirt/trees.

will cause BiomeTweaker to ignore the line (and thus all subsequent lines that use that object). I'll add that in the future. The comments have to be made as entire lines, starting with '#'.

Second, are you aware that "HELLISH" is not a predefined BiomeDictionary type? Even so, BiomeTweaker is supposed to be able to handle that, and it's not - That's what's causing the crash. You'll have to live without this line

plateauNonMBiomes.addDicType("HELLISH")

until I get a fix out.

commented

HA. I thought "HELLISH" was the tag for the super-hot (typically nether) biomes.

I can adjust my script for those :-)
Thank you.

commented

Well, I found and fixed the issue. It has to do with how EnumSets optimize themselves. Adding new elements to an enum will break when added to an EnumSet created before that element was added (not surprisingly an ArrayIndexOutOfBoundsException).

The fix simply requires recreating the EnumSet:

cfcc848

I will (re)close this issue when I release the next version.

commented

Alright, I think I have another issue. Updated file:
https://gist.github.com/keybounce/96a4743fd3fd995ec9a3

My line:
beaches=forBiomesOfType("BEACH")
beaches.set("topBlock", "minecraft:sand")

seems to be triggering errors:
[15:55:06] [main/INFO] [BiomeTweakerCore/]: Sucessfully patched net.minecraft.world.biome.BiomeGenBase! 14 patches were applied.
[15:55:06] [main/ERROR] [BiomeTweakerCore/]: Object not found: beaches
[15:55:06] [main/INFO] [BiomeTweakerCore/]: Finished script parsing. Ready to tweak.

Version: 49

commented
commented

The sample line:
sandyWarmBiomes = forBiomesOfType("SANDY", "WARM")

I have
beaches=forBiomesOfType("BEACH")

I have changed two strings to one string.
... I verified that "BEACH" is a valid dictionary tag:

"Dictionary Types": [
"MUSHROOM",
"BEACH"
],

... if it's a typo, I don't see it.

commented

You have

forBiomesOfType("BEACH")

which isn't a defined command. You're missing an 's':

forBiomesOfTypes("BEACH")
commented

Oh fudge.

commented

The sample code in the docs is also missing that s.

commented

Touche >.<

commented

What do you mean by tag?

commented

Okay, I am now badly in need of being able to add a tag to selected biomes. There is no unused tag that I can re-use.

Awaiting re-compile ... :-)

commented

Oh, that was fixed a while ago. Whenever I commit a change the Jenkins server builds it. The fix I mentioned before is in build 51:

http://jenkins.superckl.me/job/BiomeTweaker/51/

Keep in mind though, it hasn't been completely tested.

commented

Being able to tag a bunch of biomes with some new dictionary tag
allBiomes = forAllBiomesExcept(40-58, 163, 164, 166, 167)

I'd like to be able to tag 40-58 with TWILIGHT; some with HELLISH, some with UNCHANGED, etc.

Then, in Custom Ore Generation, I can trivially select biomes by a tag (it is hard to select by specific biome numbers, one line per biome, and there is no selecting ranges).

commented

Version 0.8.63 is out with these fixes and features.

commented

Thank you.

commented

I'll be sure to add this in the next release.

commented

Thanks.

On 2015-04-15, at 5:22 PM, Chris [email protected] wrote:

I'll be sure to add this in the next release.


Reply to this email directly or view it on GitHub.


Entertaining minecraft videos
http://YouTube.com/keybounce

commented

Update: Some of the functionality you requested has been written.

ID ranges: a812428
Merging objects: e2b79cd

The ability to specify exclusions might take a while. This is due to the fact that the script commands are actually decoupled from the object. They are provided a biome id on instantiation. I'll have to do some rewriting of the command handling system for that functionality.

If you require the functionality I have written now, you can grab an untested build here.

commented

Thank you.

Next request: For Biomes by type.

In other words, all biomes tagged as forest.
Or all biomes tagged as jungle.
Or all biomes tagged as sandy.

commented

All requested features have been written. I'll close this issue when I release the next version. You can find a build with the features on the Jenkins server I linked earlier if you want it now.

commented

Thank you.

I'm actually at the point of writing up the configs now. First "sanity" is being able to say "all biomes except twilight forest", without writing 60-ish biome numbers.