polyhedraldev / terra Goto Github PK
View Code? Open in Web Editor NEWVoxel world generation modding platform
License: MIT License
Voxel world generation modding platform
License: MIT License
When taking terra out of the mods folder, Optifine works completely fine as normal, Once in, it fails to produce the settings tab or anything to do with Optifine/Optifabric.
https://www.curseforge.com/minecraft/mc-mods/optifabric
One of the logs when starting game with both mods installed, if it helps
https://pastebin.com/zwgsWR9n
I haven't tested anywhere else, but purpur appears to have errors and shut the server down for no reason, (the mod worked previously, it just broke now)
Log:
https://paste.gg/p/anonymous/87e00ab165504c78a1ed69aaca5e36f9
Configs:
https://paste.gg/p/anonymous/5ed5b8db6a434ec6a64ca01abbe14414
To avoid all maps of world -> things, add a toWorldConfig
method to ConfigPack
which accepts a World
as a parameter and creates a WorldConfig
instance.
WorldConfig
would build all world-dependent objects independently from the parent ConfigPack
instance, and would be attached to a TerraWorld
instead of a ConfigPack
.
Advantages of this over old approach:
ConfigPack
instead of all worlds on a particular pack sharing a pack instance.Maps to eliminate:
SamplerCache
world -> Container
mapGeneratorBuilder
world -> WorldGenerator map (this has the potential to significantly boost perf, this map is accessed a ton, this would completely remove the need to have it)UserDefinedCarver
world -> CarverCache mapAllow the block argument for the Terrascript block function to be dynamic. Eg. picking a random ore type to be contained in a boulder would require duplicating all the block functions for each ore, which is unwieldy, but with dynamic blocks you could just set the block to a variable and change that variable in one place.
inside a custom config pack.yml, the "version" option cannot be a "double"
version: 0.1 -- Doesn't work, as a double cannot apparently be cast into a string. (at least it didnt work for me. I didnt do any extra testing)
version: 0.1.0 -- Does work. not seen as a double.
We should look at adding files such as CONTRIBUTING.md
, CODE_OF_CONDUCT.md
, and FUNDING.yml
, .github/ISSUE_TEMPLATE/*
files, and .github/PULL_REQUEST_TEMPLATE/*
.
It's pretty self-explanatory why these files would be good to have.
I'm currently looking at making PR and issue templates, (combining the good features from some already premade ones + adding some specifics for our project), but we'll need to go over them to make sure they fit our needs. I'll open a PR when I finish that.
Title is fairly explanatory, allow noise functions to be used within terrascript
Not sure if it's already an option but seems like a good thing to be able to configure in the pack manifest.
BetterEnd trees are bad and should be removed. Now that TerraScript is a thing, and the addon system is to be a thing in the future, there is no reason to have them included.
Allow the noise key to be defined in biome configurations just like its defined in pack.yml
Environment:
Mods:
Attempting to load a world yields a crash similar to this one initially provided to me
I'm not familiar with CCA's internals, but it seems like entities might be being created before CCA can properly bootstrap itself, hence the combination of missing classes and invalid stack, however that's just a guess
Config loading should be improved. Things to do:
abstract
directory. Replace with abstract
key in config.Any idea how can I configure pack, so trees would be without fences? I briefly read wiki, but I couldn't find it anywhere.
There are options to treat the base equation as 2D. These are just pointless to have, the 2D noise cache takes care of any performance issues anyways. These options should be removed.
Things to do:
When trying to load the Fabric Version of Terra with Slight GUI Modifications (https://www.curseforge.com/minecraft/mc-mods/slight-gui-modifications), the game crashes before startup.
Error log:
error log.txt
Add a way to register custom Parsii functions in the pack manifest, probably under a functions
key analogous to variables.
Functions would have a customizable number of arguments, represented as alphabetic variables within a parsii equation, e.g. 3 arguments = a
b
and c
as vars within the equation.
Mockup:
functions:
fourMax:
arguments: 4
function: "max(max(max(a, b), c), d)"
These would be parsed per-biome, and registered separately to each biome's Expression instances, to allow them to
Having the option to use noise like the image below as an extension of the current cellular return options would be nice for things like palettes, where you could could have 'cracked' looking grounds, or whatever else people come up with. You can get kinda similar results with the current distance return, but the issue is that centers of cells look very circular
This page has an example implementation https://www.ronja-tutorials.com/2018/09/29/voronoi-noise.html
recently im updated multiverse core and this started happening
mv create world_name NORMAL -g Terra:DEFAULT
[10:45:54 WARN]: [Multiverse-Core] Failed to get the default chunk generator: java.lang.IllegalArgumentException: No such config pack "DEFAULT"
[10:45:54 WARN]: [Multiverse-Core] This is a bug in Terra, NOT a bug in Multiverse!
[10:45:54 INFO]: Invalid generator! 'Terra:DEFAULT'. Aborting world creation.
Server version: Paper spigot 1.15.2
Client version: Vanilla 1.15.2
Terra version: Terra 5.1.0-BETA (i also tried to use older)
The option to provide a 'Schema version' (there's probably a better name) for Terra packs, such that in the event of an update changing the way things are configured, a warning will be thrown if the pack's schema version does not match the plugin's schema version. This will allow for packs to maintain parity between old and new versions, and notify people in the case that a pack hasn't been updated to match any changes to the way things are configured.
Recently I was trying to add vines to the crag biome, and doing it with flora was the logical way but it had a minor issue that made it a bit infuriating, the vines weren't going up to the very top of the moutains like so :
and I had to make a terrascript to have the wines that I wanted, but it could be still possible to do with flora with a little adjustement
it would a path in the flora config adjacent:
that could look like so
adjacent:
- top:
- "minecraft:stone"
- left:
- "minecraft:sand"
...
it would spawn blocks next to where the flora is supposed to be spawned (and would only replace air ?)
maybe having something more flexible like :
adjacent:
- 0, 0, 1:
- "minecraft:stone"
- 1, 0, 0:
- "minecraft:sand"
...
where 1, 0, 0:
would be the offset from the initial position
Thanks you for reading, I hope that my explanations are clear enough :)
Hi there,
Would be a great addition if Terra supported MythicMobs spawning similar to how BetterEnd does for each biome.
Alternatively to biome grids, allow for users to set a value in their config so that they use a custom variable which relies on a noise map to generate the biomes. For example a temperature.
When generating the biomes, it will generate any biome within a specified range of the temperature, or it will increase that range as needed if there are no available biomes.
An implementation of NoiseSampler that uses an image with a configurable color channel to pull noise values from.
Similar to getOriginX - Y - Z() functions, but would return the rotation of a structure relative to the world.
Similar to world edit, it would be nice to have the ability to add an optional argument to the end of the export command to ignore air when exporting an object.
bukkit.yml error:
[17:39:41 INFO]: Preparing level "world" [17:39:41 ERROR]: [Terra] Could not set generator for default world 'world': Plugin 'Terra v3.1.0-BETA+1ee2b18 java.lang.IllegalArgumentException: No such config pack "DEFAULT" at com.dfsek.terra.bukkit.TerraBukkitPlugin.lambda$getDefaultWorldGenerator$3(TerraBukkitPlugin.java:162) ~[?:?] at java.util.HashMap.computeIfAbsent(Unknown Source) ~[?:1.8.0_261] at com.dfsek.terra.bukkit.TerraBukkitPlugin.getDefaultWorldGenerator(TerraBukkitPlugin.java:161) ~[?:?] at org.bukkit.craftbukkit.v1_16_R1.CraftServer.getGenerator(CraftServer.java:1445) ~[patched_1.16.1.jar:git-Paper-135] at net.minecraft.server.v1_16_R1.MinecraftServer.loadWorld(MinecraftServer.java:369) ~[patched_1.16.1.jar:git-Paper-135] at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:241) ~[patched_1.16.1.jar:git-Paper-135] at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:941) ~[patched_1.16.1.jar:git-Paper-135] at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.1.jar:git-Paper-135] at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
MV2 error:
[17:33:00 WARN]: [Multiverse-Core] Failed to get the default chunk generator: java.lang.IllegalArgumentException: No such config pack "DEFAULT" [17:33:00 WARN]: [Multiverse-Core] This is a bug in Terra, NOT a bug in Multiverse! [17:33:00 INFO]: Invalid generator! 'Terra:DEFAULT'. §cAborting world creation.
Help is appreciated! @dfsek
Currently all image providers are unaligned. Possible alignment options to include:
CENTER
NONE
(Current default)OFFSET
(specify custom offset X and Y)Currently all image providers tile. Possible tile options:
TILE
(Current default)CONSTANT
(Set a constant biome to use after edge of image is reached)I seem to have an issue with structures that I've exported using the /te structure export
command.
I have 4 structures, as follows:
OAK_LARGE01: https://pastebin.com/trzzRxA3
OAK_LARGE02: https://pastebin.com/AgMsFQYW
OAK_LARGE03: https://pastebin.com/xvizfLMx
OAK_LARGE04: https://pastebin.com/sktYJt3c
These were schematics that I imported into the world, selected and set up signs for, and then exported with Terra. When loading these trees via the /te structure load full <NAME> 0
command, they generate as expected.
However, when generating a new world with them *(using Multiverse) I get the stacktrace below.
The first one will generate in my world correctly, however, the other three do not. When any of the bottom three are included in my biome .yml file the server will crash upon generation with the stacktrace.
I have tried including the generator in the bukkit.yml
and not including it, but it occurs in both instances.
Versions
Terra: Terra-bukkit-4.3.0-BETA+6d51da31-shaded
Tuinity: tuinity-paperclip.jar build #192
Multiverse: Multiverse-Core-4.2.2
In order to be able to handle chat in a platform-agnostic way (beyond just strings), implement Adventure.
Adventure has implementations for all platforms we plan to support. (Fabric, Bukkit, and Sponge. It would be unneeded in the region generator.)
Advantages:
Disadvantages:
uhm yeah as the title says; normal Guardians don't spawn at sea temple on default generation
Add a loot generate event for chests and other tile entities that generate with terra's custom structures just like one present in spigot api LootGenerateEvent
See this:
Line 65 in 669cb1b
Line 78 in 669cb1b
Both these local repositories in the config are becoming invalid when other people clone the repository. It would be helpful if you would either
state in the readme.md where those can be downloaded to the user's local repo and tell them where to change the pom.xml or
create a public repository where they can be accessed, change the POM accordingly or
include the files in this repository and make the path relative to those files instead.
if you help me with 1., I can make a pull request for 3.
When running //regen with world edit on a bit of terrain, it errors because getDefaultWorldGenerator
is not run.
We should stop relying on this method and move that code elsewhere.
(I can't find the old stack trace and am lazy, but there was an NPE at TerraWorld
line 34.)
Honestly, the whole WorldConfig
class should be completely redone, as there is no reason to store the image in memory once it's loaded and you've built an array of the biomes.
Would be nice to be able to set an option within terrascript scripts that adds the waterlogged blockstate to any block() function if the x, y, z returns "OCEAN" with the check() function
This is possible to implement by hand but would be very time consuming - especially if you have a large amount of scripts that run into this issue:
Similar to how expression samplers can already have their own variables and noise definitions, it would be helpful to allow math functions to be defined within expression samplers too. Perhaps to avoid confusion between noise definitions (which is under the functions
key, it could be re-named to something like noise-functions
.
Normally with plugins you can do the following command to generate a world "/mv create (Worldname) NORMAL -g (Plugin)" And i think Terra should support this.
The original idea comes from DeltaRays#0054 on discord:
"...maybe it would be cool to also have caves made with 3d gradient noise, or caves made with cellular automata, aka pseudo-randomly generated 3d grid of values = 0 or 1 and then with a smoothing function they’ll start looking more and more like the caves that are going to be added in 1.17"
This is an additional feature and should not replace the standard caves
Sort of a duplicate of #52 but rather than re-doing how slopes and palettes are handled, just allow different sets of palettes to be defined at different slants.
slant:
- threshold: 2
palette:
- "..." # Areas where: {2 > gradient > 9}
- "..."
- "..."
- threshold: 9
palette:
- "..." # Areas where {gradient > 9}
- "..."
- "..."
Currently the terra locate command only returns one structure or biome, the closest one.
It would be nice if the command could return multiple results (amount of results possibly configurable)
e.g. /te structure locate village 5
would return with the locations of the 5 closest villages, sorted by distance.
Add options to define palettes that are constrained to a range of slopes.
For example, if I wanted different palettes based on the inclination of terrain, I could define palette A for super steep areas, and palette B for very flat areas - which would be overlaid on the palettes already defined for the biome. Would also take absolute height into consideration. Perhaps this could be merged into the palette configuration, so that you don't have to define multiple palettes for each combination of height and slope.
A proposed palette configuration system including slope support:
palette:
"BLOCK:minecraft:bedrock": #palettes at start would take priority over ones defined below it
height:
- max: 1 #only max is defined so min would default to min world height
bedrock_2:
height:
- max: 5 #same here, note bedrock_1 & 2 would overlap so 1 takes priority since its higher
striped:
height:
- min: 50 #this palette would stripe between y50 and y60
max: 52
- min: 54
max: 56
- min: 58
max: 60
slope_striped:
height:
- min: 50
max: 52
- min: 54
max: 56
- min: 58
max: 60
slope:
- min: 5
max: 255
grassy:
height:
- min: 60
max: 200
slope:
- min: 0,
max: 1.5
rock: #palettes with no options would just mean it spawns under every condition - since this is at the bottom, anywhere without a palette will default to rock
It would be less simple to configure (not by much) but more powerful compared to the current method
The current MOUNTAINS_PRETTY palette config converted to this proposed system would look like:
palette:
"BLOCK:minecraft:bedrock":
height:
- max: 0
BEDROCK_MOST:
height:
- max: 1
BEDROCK_HALF:
height:
- max: 2
BEDROCK_LITTLE:
height:
- max: 3
RIVER_BOTTOM:
height:
- max: 61
RIVER_SHORE:
height:
- max: 62
MOUNTAIN_PRETTY:
height:
- max: 255
i dont know how to make .structure files i tried searching it and it just showed me structure blocks
Being able to define different noise settings per layer of blocks within a noise palette would be very handy - lets say you wanted the top layer of blocks to be organized by blobs of cellular noise, then the layer below that to be a static arrangement of blocks. This wouldn't be possible with the current config options (you could do it with absolute noise but that doesn't factor in terrain shape).
Could be configured simply like so:
layers:
- materials:
- "minecraft:ice": 1
noise:
noise-stuff
layers: 1
- materials:
- "minecraft:water": 1
noise:
noise-stuff
layers: 1
When setting generator to be Terra
(i.e. with empty config id) instead of Terra:DEFAULT
it will throw a IllegalArgumentException. I feel that it will be better to just make it use the DEFAULT instead.
This will help for those new to the plugin, as well as world management plugin like multiverse in detecting possible generators as they assume that default ID is just empty which works for most generators, but not Terra as mentioned.
Tell multiverse about which packs are currently loaded via an API. This will help with command completion & will allow multiverse to list which packs we have.
Also: perhaps have an easy to use public API for getting a string list of all the loaded config packs?
When building, the output jar contains the config packs
When building for the first time, the output jar does not contain the config packs.
This exception occurs when throwing an eye of ender in a non-Terra world with default settings (/mvcreate example normal
). From what I can tell, this does not occur in Terra worlds.
Initially discovered on my survival server which has quite a few plugins so I went ahead and booted up a server which only had a few base plugins (Terra
, Chunky
and Multiverse-Core
to be specific) and I was able to reproduce it there as well.
[07:02:00 ERROR]: Could not pass event EntitySpawnEvent to Terra v1.5.0-BETA+70ec483
java.lang.NullPointerException: null
at com.dfsek.terra.TerraWorld.<init>(TerraWorld.java:30) ~[?:?]
at java.util.HashMap.computeIfAbsent(HashMap.java:1133) ~[?:?]
at com.dfsek.terra.TerraWorld.getWorld(TerraWorld.java:87) ~[?:?]
at com.dfsek.terra.EventListener.onEnderEye(EventListener.java:40) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor2.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.4.jar:git-Paper-314]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.4.jar:git-Paper-314]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.4.jar:git-Paper-314]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.4.jar:git-Paper-314]
at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callEntitySpawnEvent(CraftEventFactory.java:661) ~[patched_1.16.4.jar:git-Paper-314]
at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.doEntityAddEventCalling(CraftEventFactory.java:636) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.WorldServer.addEntity0(WorldServer.java:1187) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.WorldServer.addEntity(WorldServer.java:1083) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.ItemEnderEye.a(ItemEnderEye.java:83) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.ItemStack.a(ItemStack.java:379) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.PlayerInteractManager.a(PlayerInteractManager.java:414) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:1609) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:28) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:5) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:23) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1133) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1126) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1087) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1001) ~[patched_1.16.4.jar:git-Paper-314]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:178) ~[patched_1.16.4.jar:git-Paper-314]
at java.lang.Thread.run(Thread.java:834) [?:?]
The ability to distort noise by putting input coordinates of a noise generator through another defined noise generator - along the lines of this https://www.iquilezles.org/www/articles/warp/warp.htm
This should also be nest-able, so you can distort the noise that's distorting noise, dawg
Within the population order, there could be a new stage that gets executed between the base terrain generation and decorating that terrain. This new stage would place TS scripts (similar to how trees / structures are handled) on to the basic generated terrain, then any blocks placed by said scripts would be treated the same as terrain generated via noise equations, with palettes and other post processors applied.
noise-equation
In the Pillagers' towers, they do not appear, they do not directly spawn, I have to add them by hand, and that is like the plugin, it does not fulfill its function
Currently the biome/ocean/level
configuration lets you define a Y-value at which water can be generated. This is a single value and applies to the whole erosion.
By adding an optional noise-equation (or any other implementation) this could be further improved (e.g. for making realistic rivers, see attached image).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.