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
------------------------------------------- Source installation information for modders ------------------------------------------- This code follows the Minecraft Forge installation methodology. It will apply some small patches to the vanilla MCP source code, giving you and it access to some of the data and functions you need to build a successful mod. Note also that the patches are built against "unrenamed" MCP source code (aka srgnames) - this means that you will not be able to read them directly against normal code. Source pack installation information: Standalone source installation ============================== Step 1: Open your command-line and browse to the folder where you extracted the zip file. Step 2: Once you have a command window up in the folder that the downloaded material was placed, type: Windows: "gradlew setupDecompWorkspace" Linux/Mac OS: "./gradlew setupDecompWorkspace" Step 3: After all that finished, you're left with a choice. For eclipse, run "gradlew eclipse" (./gradlew eclipse if you are on Mac/Linux) If you preffer to use IntelliJ, steps are a little different. 1. Open IDEA, and import project. 2. Select your build.gradle file and have it import. 3. Once it's finished you must close IntelliJ and run the following command: "gradlew genIntellijRuns" (./gradlew genIntellijRuns if you are on Mac/Linux) Step 4: The final step is to open Eclipse and switch your workspace to /eclipse/ (if you use IDEA, it should automatically start on your project) If at any point you are missing libraries in your IDE, or you've run into problems you can run "gradlew --refresh-dependencies" to refresh the local cache. "gradlew clean" to reset everything {this does not effect your code} and then start the processs again. Should it still not work, Refer to #ForgeGradle on EsperNet for more information about the gradle environment. Tip: If you do not care about seeing Minecraft's source code you can replace "setupDecompWorkspace" with one of the following: "setupDevWorkspace": Will patch, deobfusicated, and gather required assets to run minecraft, but will not generated human readable source code. "setupCIWorkspace": Same as Dev but will not download any assets. This is useful in build servers as it is the fastest because it does the least work. Tip: When using Decomp workspace, the Minecraft source code is NOT added to your workspace in a editable way. Minecraft is treated like a normal Library. Sources are there for documentation and research purposes and usually can be accessed under the 'referenced libraries' section of your IDE. Forge source installation ========================= MinecraftForge ships with this code and installs it as part of the forge installation process, no further action is required on your part. LexManos' Install Video ======================= https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be For more details update more often refer to the Forge Forums: http://www.minecraftforge.net/forum/index.php/topic,14048.0.html
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.
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.
You were using the Column class which got removed. Now there is IColumn.
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
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
[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 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!
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.