Search the Community
Showing results for tags 'worldgen'.
-
Hello, I've been trying to get this modpack from 1.16.5 up to 1.19.2 and have been doing great up until I got hit by that wall. According to Cyanide, some vanilla features try to generate later than modded world gen which leads to a full on crash even before the world can generate. I don't know how to solve this issue or why it's been happening, can anyone help me ? https://paste.ubuntu.com/p/2Ss8jF4Qt8/ I'd be more than happy to have at least a hint on what to do next. Thanks in advance.
-
So im full into world generation right now, carving shit for a dimension I'm doing. I understand what the CarvingMask is, if i understand correctly, an array of bits that, for each chunk, marks wether the block the bit represent is (1) or isn't (0) carved. But I'm not seeing what uses it can have. Under what circumstances is good to make and keep track of a carvingmask?
-
Hello! I'm having a problem generating data from registered blocks, I've looked through everything and haven't found anything that could be causing this problem, so I come to the Forge community as a last resort. The log information is in a gist with the file data debug.log. This is the project link on GitHub: GitHub: https://github.com/eterium-network/quantum-praeda Solved, the problem was in the structure of the LootTables file generation class. Thank you in advance for the community's help! Original Text:
-
I am making a mod for 1.20.6 I want to make a randomly generated structure using jigsaw but want to guarantee that a specific room is generated and not more than once. I cant generate starting from this room as I need to do this for 2 different rooms. I cant find more info on this in the Minecraft wiki or the forums. is it possible to set a min and max count for structure pieces?
-
So i have a custom ore and, arround the ore, a bunch of randomly placed custom stone blocks should be placed. After applying it, i've found that it causes moderate to extreme world generation lag (new chunks refusing to load after moving for a while, height slices of the same chunk appearing and disappearing as I get into them instead of the usual long continous chunk, new chunks generating extremely close to me instead of to the set render distance...) I've been debugging for a while and I know for a fact this is causing the lag (and sometimes freeze of the world loading screen on a new world and/or the saving world screen when quitting), since comenting it just makes the worldgen work as usual and I want to see if its really that computationally expensive, if there are other ways of doing it or if the process can be simplfied or optimized. I've tried a lot of combinations for the same code but I am just stuck. Is it some kind of generation cascading im missing? Here is the code for the class. The code inside the if (placed) is the one causing this mess. I can see that the code might not be the most optimized thing, but it does what's supposed to... but at the cost of causing all this. Any tips? package es.nullbyte.relativedimensions.worldgen.oregen.oreplacements; import es.nullbyte.relativedimensions.blocks.BlockInit; import es.nullbyte.relativedimensions.blocks.ModBlockTags; import net.minecraft.core.BlockPos; import net.minecraft.world.level.WorldGenLevel; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext; import net.minecraft.world.level.levelgen.feature.OreFeature; import net.minecraft.world.level.levelgen.feature.configurations.OreConfiguration; import java.util.Optional; public class AberrantOreFeature extends OreFeature { public AberrantOreFeature() { super(OreConfiguration.CODEC); } @Override public boolean place(FeaturePlaceContext<OreConfiguration> ctx) { // Get the world and the position from the context WorldGenLevel world = ctx.level(); BlockPos origin = ctx.origin(); // Offset the origin by 8 in the x and z directions to avoid cascading chunk generation BlockPos offsetOrigin = origin.offset(8, 0, 8); // Create a new context with the offset origin FeaturePlaceContext<OreConfiguration> offsetCtx = new FeaturePlaceContext<>( Optional.empty(), world, ctx.chunkGenerator(), ctx.random(), offsetOrigin, ctx.config() ); // Generate the entire vein of ore at the offset origin boolean placed = super.place(offsetCtx); // If the vein was generated successfully if (placed) { // Define the block to replace surrounding blocks with BlockState surroundingBlockState = BlockInit.ABERRANT_MINERALOID.get().defaultBlockState(); // Generate a random size for the area of corruption int areaSizeX = ctx.random().nextInt(3) + 1; // between 1 and 4 int areaSizeY = ctx.random().nextInt(3) + 1; // between 1 and 4 int areaSizeZ = ctx.random().nextInt(3) + 1; // between 1 and 4 // Calculate the number of blocks to be corrupted based on the area size double numBlocksToCorrupt = (areaSizeX + areaSizeY + areaSizeZ / 2.0) ; // Counter for the number of blocks corrupted int numBlocksCorrupted = 0; // Loop for each block to be corrupted while (numBlocksCorrupted < numBlocksToCorrupt) { // Generate a random position within the area, using the offset origin BlockPos randomPos = offsetOrigin.offset( ctx.random().nextInt(2 * areaSizeX + 1) - areaSizeX, // between -areaSize and areaSize ctx.random().nextInt(2 * areaSizeY + 1) - areaSizeY, ctx.random().nextInt(2 * areaSizeZ + 1) - areaSizeZ ); // If the block at the random position is in the IS_ORE_ABERRANTABLE tag, replace it if (world.getBlockState(randomPos).is(ModBlockTags.STONE_ABERRANTABLE)) { world.setBlock(randomPos, surroundingBlockState, 2); numBlocksCorrupted++; } } } return placed; } }
-
Hello, I want to create an item that when used, generates a structure. (structure don't generates naturally in world) Now I am having trouble generating a structure (jigsaw). The code below works, BUT the structure does not appear in the world until I re-enter it. This is a significant flaw that I would like to get rid of. My current code: public class MineshaftSpawnerItem extends Item { public MineshaftSpawnerItem(Properties pProperties) { super(pProperties); } @Override public @NotNull InteractionResult useOn(UseOnContext pContext) { Level pLevel = pContext.getLevel(); Player pPlayer = pContext.getPlayer(); BlockPos pBlockPos = pContext.getClickedPos(); ItemStack item = pContext.getItemInHand(); if (!pLevel.isClientSide()) { assert pPlayer != null; item.setCount(0); String command = MessageFormat.format("place structure weirdoitems:mineshaft {0} {1} {2}", pBlockPos.getX(), pBlockPos.getY(), pBlockPos.getZ()); System.out.println(command); try { Objects.requireNonNull(pLevel.getServer()).getCommands().getDispatcher().execute(command, pLevel.getServer().createCommandSourceStack()); } catch (CommandSyntaxException e) { throw new RuntimeException(e); } } return InteractionResult.PASS; } } I know about the PlaceCommand.placeStructure() method, but I can't figure out how to use it, and I can't find any documentation or examples of how to use it on the internet. Edit: I searched and tried normal options to solve this problem for a very long time, but nothing. I ended up doing it like this. And it works (in my case). @Override public @NotNull InteractionResult useOn(UseOnContext pContext) { Level pLevel = pContext.getLevel(); BlockPos pBlockPos = pContext.getClickedPos(); ItemStack item = pContext.getItemInHand(); if (!pLevel.isClientSide()) { item.setCount(0); JigsawBlockEntity jigsawBlockEntity = new JigsawBlockEntity(pBlockPos, Blocks.JIGSAW.defaultBlockState()); jigsawBlockEntity.setPool(Pools.createKey("weirdoitems:mineshaft/tunnels")); jigsawBlockEntity.setName(new ResourceLocation("weirdoitems:tunnel")); jigsawBlockEntity.setTarget(new ResourceLocation("weirdoitems:tunnel")); jigsawBlockEntity.setFinalState("minecraft:oak_planks"); jigsawBlockEntity.generate((ServerLevel) pLevel, 7, false); } return InteractionResult.CONSUME; }
-
When I create a new world, after having configured the new biome using Citadel's ExpandedBiomes, it is not generated. I have decided to take the map code from Alex Caves, just for testing purposes, then I will delete it. This map can't find it either. But, in locate the biome appears, even if it cannot be found and when generating a world with a single biome, I can choose the biome and it "generates" it. I don't know where I could have made a mistake. Github repository Any help is welcome. Thank you all in advance, for helping or taking the time to read.
-
I have been practicing modding minecraft, and I needed to make a pine forest biome, but my game crashes whenever I try to either load into, or generate, a world. I have no idea why. I will upload my crash report and pine_forest.json files. I do have some java knowledge, but I am still fairly out of my depth here. Here is the tutorial I used: Forge Modding Tutorial - Minecraft 1.20.1: CUSTOM BIOMES | #43
-
Topic for making tags
-
- 1.10.2
- 1.11.2
-
(and 81 more)
Tagged with:
- 1.10.2
- 1.11.2
- 1.12.2
- 1.13.2
- 1.14.4
- 1.15.2
- 1.16.5
- 1.17.1
- 1.18.2
- 1.19.0
- 1.19.1
- 1.19.2
- 1.19.3
- 1.19.4
- 1.2.5
- 1.20.0
- 1.3.2
- 1.4.7
- 1.5.2
- 1.6.4
- 1.7.10
- 1.8.9
- 1.9.4
- armour
- bad jvm args
- biomes
- blocks
- broken mod
- bug
- capabilities
- client
- client-only mods on server
- codecs
- commands
- dimensions
- effects
- enchantments
- entities
- events
- feature request
- fluids
- food
- gradle
- groovy
- guis
- ide
- installer
- items
- java
- kotlin
- launcher
- libraries
- loot
- metadata
- missing jar association
- missing java
- missing mods
- mixin
- needs more info
- networking
- news
- optifine
- ores
- out of memory
- outdated drivers
- particles
- performance
- porting
- potions
- recipes
- registries
- rendering
- scala
- server
- solved
- sounds
- textures
- tools
- tutorial
- weapons
- worldgen
- wrong java version
- wrong mod version
-
1.20.1 World generation in custom dimension(1.20.1)
ReinierTheGhost posted a topic in Modder Support
Hallo I am working on a fantasy rpg mod for 1.20.1. In this mod I want to create my own dimension which will generate a continent that we have already decided on how it should look, so the biomes should generate on the places we want them to generate instead of random like it does in vanilla minecraft. I know it should be posible since the LOTR mod has this done as well.