Comments (10)
I have also fixed the documentation of the addSpawn
command.
from biometweaker.
You can effectively weight entries by lowering or raising their spawn cost. There is no actual weighting system anymore, but this is roughly equivalent. A lower cost entity will spawn more frequently.
from biometweaker.
Does this mean that the weight values in the default vanilla datapack are useless then? Good to know, thanks.
from biometweaker.
I think the weight is actually a parameter?
I tried doing
soulSandValley.addSpawn("MONSTER", "minecraft:wither_skeleton", 1, 5)
soulSandValley.setSpawnCost("minecraft:wither_skeleton", 0.15, 0.75)
But I get an arror in the chat:
Failed to parse arguments for command addSpawn("MONSTER", "minecraft:wither_skeleton", 1, 5) @ ScriptContext[scriptName=main.cfg, lineNumber=2]. Reason: No constructors found with matching arguments.
I tried adding an extra numeric parameter and it doesn't throw any error (it still doesn't add any mob, but but at least it compiles)
from biometweaker.
Ah, yes, this is my mistake in generating the docs. There is a weight parameter that is the first numeric argument of three at the end. You can verify that the spawn is being added by regenerating the output files.
from biometweaker.
I can't find anything in the output scripts. I assume there should be something in either .minecraft\config\biometweaker\output\entity\minecraft_wither_skeleton.json or .minecraft\config\biometweaker\output\biome\minecraft_soul_sand_valley.json, but there's no mention of spawns in the biome file and there's no biome list in the entity's file. Still, the script is working as intended (it's easy to check since it replaces mobs in a biome), I'll just leave it here for anybody that eventually stumbles upon this issue :
soulSandValley = forBiomes("minecraft:soul_sand_valley")
soulSandValley.removeSpawn("MONSTER", "minecraft:skeleton")
soulSandValley.addSpawn("MONSTER", "minecraft:wither_skeleton", 5000, 1, 5)
soulSandValley.setSpawnCost("minecraft:wither_skeleton", 0.15, 0.75)
Just a small side note: I was being dumb and I did forBiomes("minecraft_soul_sand_valley") instead of forBiomes("minecraft:soul_sand_valley") (I mistakenly copied the name of the output file), but I didn't get any error. The lack of error messages might be intended, but I thought it was worth mentioning.
from biometweaker.
That should cause an error to be printed in the log, it won't crash the game. Not seeing spawns in the biome output is also a bug that you should look into in the log.
from biometweaker.
I made a new instance just to test this. This is the test script I used:
soulSandValley = forBiomes("minecraft_soul_sand_valley")
soulSandValley.removeSpawn("MONSTER", "minecraft:skeleton")
soulSandValley.addSpawn("MONSTER", "minecraft:wither_skeleton", 5000, 1, 5)
soulSandValley.setSpawnCost("minecraft:wither_skeleton", 0.15, 0.75)
And here is the log
https://pastebin.com/JFE0F3z9
I don't see anything in there, and there is obviously nothing in the output files since the biome name in the script is wrong
from biometweaker.
I restarted the instance after correcting the script and I regenerated the output files. Everything is working fine, but I still don't see anything in them.
minecraft_soul_sand_valley.json: https://pastebin.com/HJ305xTD
minecraft_wither_skeleton.json and minecraft_skeleton.json: https://pastebin.com/x6XuE0qY
from biometweaker.
So what's happening here is a few things:
- The lack of error is because I now store resource locations internally and there is no check that the resource location actually corresponds to a biome. At some point after the initial registry setup, a check should be run to verify all the resource locations actually correspond to a biome.
- Spawn information is not included in output because of holder issues causing me to use the network codec and I forgot to manually serialize the spawn info. I'll have to add that back in.
from biometweaker.
Related Issues (20)
- forBiomesOfTypes() does not respect previously set types [1.12.2]
- [1.19.2-4.1.3] `/biometweaker output` doesn't generate biomes HOT 1
- Some chunks do not get their blocks replaced when using registerGenBlockRep [1.18.2]
- Cannot seem to remove a biome nor replace it in 1.19.2 HOT 2
- biomeTweaker fails to use remove() command [1.19.2] HOT 4
- Biometweaker not creating boimetweaker.cfg HOT 6
- registerGenBlockRep not working on custom biome HOT 1
- [1.18.2] Issues with the Tectonic Datapack
- cannot remove spawns from Panthalassa and Terralith
- [1.12.2] Set biome command not working
- [1.18.2] BiomeTweaker's blockRep configuration does not work on terrain datapacks HOT 1
- [1.19.2] issue with the "remove" command HOT 1
- [1.7.10] BiomeTweaker does not create scripts folder and mod is "loaded" not not "active" HOT 4
- Advanced block placement not working [1.19.2] HOT 1
- [Question] [1.18.2] Biome Dimension Placement HOT 1
- [1.12.2] Can't get get new biome to spawn in nether HOT 6
- Script doesn't work HOT 1
- [1.12.2] replacing one flower with another
- addSpawn doesn't work HOT 1
- newSplotchDecoration doesn't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from biometweaker.