foghrye4 / labyrinth Goto Github PK
View Code? Open in Web Editor NEWDungeon generator for Cubic chunks Minecraft mod
License: Other
Dungeon generator for Cubic chunks Minecraft mod
License: Other
[06:04:18] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.util.ReportedException: Saving entity NBT
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1939) ~[Entity.class:?]
at net.minecraft.entity.Entity.writeToNBTOptional(Entity.java:1822) ~[Entity.class:?]
at cubicchunks.world.EntityContainer.writeToNbt(EntityContainer.java:163) ~[EntityContainer.class:?]
at cubicchunks.server.chunkio.IONbtWriter.writeEntities(IONbtWriter.java:157) ~[IONbtWriter.class:?]
at cubicchunks.server.chunkio.IONbtWriter.write(IONbtWriter.java:90) ~[IONbtWriter.class:?]
at cubicchunks.server.chunkio.RegionCubeIO.saveCube(RegionCubeIO.java:159) ~[RegionCubeIO.class:?]
at cubicchunks.server.CubeProviderServer.saveChunks(CubeProviderServer.java:163) ~[CubeProviderServer.class:?]
at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:1073) ~[WorldServer.class:?]
at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:426) ~[MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.saveAllWorlds(IntegratedServer.java:238) ~[IntegratedServer.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:722) ~[MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) ~[IntegratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:548) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: java.lang.NullPointerException
at labyrinth.entity.EntitySlimeLeveled.writeEntityToNBT(EntitySlimeLeveled.java:51) ~[EntitySlimeLeveled.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1910) ~[Entity.class:?]
... 13 more
I got this exception when flying straight down in spectator mode for long enough. I was running it in dev environment because I was testing if my changes didn't break this mod.
This is not a huge performance issue in CubicChunks thanks to changes made by xcube16, but it's still the wrong thing to do. Without these changes, your mod would immediateely crash with StackOverflowError
. You are setting blocks at the x=0/z=0 border of the give chunk, which when given "do block updates" flag also notifies neighbors... which causes neighbor chunks to be generated. In vanilla this could cause infinite chain of chunk generation and population that would almost instantly crash. With cubic chunks it "only" causes generating more chunks. In the near future I'm going to add warnings when this happens.
Also it would break if I ever go back to the vanilla way (which isn't that unlikely).
So basically what you are doing:
# - the area you are populating.
The middle chunk is the one you got as CubePos.
+--------+--------+--------+
| | | |
| | | |
+--------+--------+--------+
| |########| |
| |########| |
+--------+--------+--------+
| | | |
| | | |
+--------+--------+--------+
And what you should do (this is also now explained in javadoc):
# - the area you are populating.
The middle chunk is the one you got as CubePos.
+--------+--------+--------+
| | | |
| | ####|#### |
+--------+--------+--------+
| | ####|#### |
| | | |
+--------+--------+--------+
| | | |
| | | |
+--------+--------+--------+
The reason for this is that the vast majoroty of populators need to set blocks outside of the directly populated area, like trees for example. If the middle chunk was to be populated directly, populating this one chunk could affect - in vanilla - 8 neighbor chunks, and - in cubic chunks - 26 neighbor cubes. This means that to make sure that all the chunks that affect the currently populated cube are populated, we would need to populate 27 cubes which would need actually generating a whole 125 of them.
Now we need to populate only 8 of them and actually generate 27.
You were using the Column class which got removed. Now there is IColumn.
This mod is very epic, but unfortunately, it lack one major thing.
I trust you to have a good idea on how you can do this.
But here is what I have in mind.
In the preset, we can determine how rare it is to spawn one type of dungeon. Once this dungeon spawn, it generate other "cube" all around it with a percentage chance of happening, which we can edit in the preset. Then this other cube being generated also have the same percentage chance of spawning other cubes all around it. Eventually, the end of the dungeon. By having 100% chance, then dungeon will spawn infinitely.
The first and main cube being generated which generate other cubes afterward is the boss room to find inside each labyrinth (unless multiple labyrinth connect together to form larger labyrinth). This cube spawn a boss and a couple of good dungeon chests.
I have heard about your idea of creating tunnels connecting cubes together. I'm not sure of what this means, but this made my imagination go wild. It make me think of the plastic labyrinth we create for our little mice. Each cubes generate other cubes but they can generate tunnels instead with a random chance we can configure in the preset as well. But I'd rather have random dungeons first than having tunnels!
crash-2018-09-19_16.57.38-client.txt
Exact versions are all in the log.
understandably probably cause it's 1.12.2 and I remember the page saying it's for 1.12.1 but anyways
The mod should be able to have world specific location settings rather than a global setting so it doesn't fudge up existing worlds. Preferably by world generation menu, but any method is fine
The mod should NEVER set blocks directly in ExtededBlockStorage and should never have the need to set the light array. Instead you should offset the blocks you set by 8 in each direction and set them through World. Yes, it won't be as fast. Mainly because you are skipping a lot of the things that make it slow that will cause issues.
Or you might have better luck creating new Labirynth world type (a cubic chunks one) with your own chunk generator, that doesn't even bother doing anything below the point where your structure starts, and place just them and nothing else. This would have the obvious downside that it won't support any world types that you don't intend it to support.
Or it can be done as early structure generator, I can add an event to add custom ones. You would work with CubePrimer there. And then only add tile entities in populator.
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.