Skip to content

Instantly share code, notes, and snippets.

@PG85
PG85 / otgreleasepost.txt
Created April 23, 2017 01:23
reddit post OTG release
Hey folks,
I'm PeeGee and I've been working on custom terrain generation mods TerrainControl (TC) and Minecraft Worlds (MCW) for the past couple of years. MCPitman and LordSmellyPants are TerrainControl's foremost content creator and have made Biome Bundle, the biggest custom biome collection out there with over 450 different biomes and 2000 custom objects. A few months ago we decided to join forces to make a new version of TerrainControl, solving nearly all known bugs, mod compatibility issues, adding tons of usability stuff and lots of new features and customisation options. We aim to create a terrain generator that can be completely customised and can create any kind of world or dimension including procedurally generated trees, structures, ores, mobs, chests, villagers, bosses, you name it. Today we're proud to release the first version of OpenTerrainGenerator, 5 different pre-set worlds and a new version of Biome Bundle with lots of new biomes and improvements. Without further ado here's the official mod
Hey folks,
I'm PeeGee and I've been working on custom terrain generation mods TerrainControl (TC) and Minecraft Worlds (MCW) for the past couple of years. MCPitman and LordSmellyPants are TerrainControl's foremost content creator and have made Biome Bundle, the biggest custom biome collection out there with over 450 different biomes and 2000 custom objects. A few months ago we decided to join forces to make a new version of TerrainControl, solving nearly all known bugs, mod compatibility issues, adding tons of usability stuff and lots of new features and customisation options. We aim to create a terrain generator that can be completely customised and can create any kind of world or dimension including procedurally generated trees, structures, ores, mobs, chests, villagers, bosses, you name it. Today we're proud to release the first version of OpenTerrainGenerator, 5 different pre-set worlds and a new version of Biome Bundle with lots of new biomes and improvements. Without further ado here's the official mod
@PG85
PG85 / dim options
Created May 28, 2017 23:14
OTG dim options
// Game rules for worlds used as dimensions with Forge // TODO: Apply to overworld too?
public String commandBlockOutput = "true"; // Whether command blocks should notify admins when they perform commands
public String disableElytraMovementCheck = "false"; // Whether the server should skip checking player speed when the player is wearing elytra. Often helps with jittering due to lag in multiplayer, but may also be used to travel unfairly long distances in survival mode (cheating).
public String doDaylightCycle = "true"; // Whether the day-night cycle and moon phases progress
public String doEntityDrops = "true"; // Whether entities that are not mobs should have drops
public String doFireTick = "true"; // Whether fire should spread and naturally extinguish
public String doLimitedCrafting = "false"; // Whether players should only be able to craft recipes that they've unlocked first
public String doMobLoot = "true"; // Whether mobs should drop items
public String doMobSpawning
@PG85
PG85 / gist:79f9aceae660ff60ce6de8ea4fc6945f
Created August 31, 2019 10:51
OTG v8_r4 (dev) + Streams 1.12.2 (latest)
java.lang.NoClassDefFoundError: com/pg85/otg/forge/ForgeWorld
at farseek.world.gen.OtgHook$.generateTerrain(OtgHook.scala:17)
at farseek.world.gen.OtgHook.generateTerrain(OtgHook.scala)
at com.pg85.otg.generator.ChunkProviderOTG.generate(ChunkProviderOTG.java:128)
at com.pg85.otg.forge.generator.OTGChunkGenerator.getBlocks(OTGChunkGenerator.java:489)
at com.pg85.otg.forge.generator.OTGChunkGenerator.func_185932_a(OTGChunkGenerator.java:201)
at net.minecraft.world.gen.ChunkProviderServer.func_186025_d(ChunkProviderServer.java:143)
at net.minecraft.world.World.func_72964_e(World.java:310)
at net.minecraft.world.World.func_175726_f(World.java:305)
at net.minecraft.world.World.func_180495_p(World.java:911)
###########################
# World provider settings #
###########################
# World provider settings for this world. These settings are still in development, may not all work (please submit an issue on the git) and may be subject to change in upcoming releases.
# A message to display to the user when they transfer to this dimension.
WelcomeMessage:
# A Message to display to the user when they transfer out of this dimension.
@PG85
PG85 / gist:fc9e18f190cc3f078a5ea4298903dd65
Last active July 27, 2020 21:02
BO4 branching mechanics
BO4 branching mechanics
BO4 branching structures generate from a single origin BO4 and expand outwards in pulses, each pulse extending branches by one segment, until the maximum branch depth is reached, there is no more space, or there are no more branches to spawn.
There are 2 types of branches; required and optional branches.
- Required branches are used to chain together BO4's that must all be spawned at once, or none at all, for instance multiple 16x16 BO4's that form one room or building. Required branches are spawned in chains, so the entire room spawns, or none of it.
- Optional branches are used to create parts of a structure that may spawn if there is enough space, but won't cause the entire structure to fail to spawn if they can't be placed, for instance a tunnel of varying length with randomised corners and rooms. A maximum branch depth can be defined in any branch to limit the maximum number of optional branches it can have as children, so as to limit the size of the structure.
To create varia
protected BlockPos findNearestStructurePosBySpacing(World worldIn, BlockPos startPos, int distanceStep, int stepOffset, int randomSeedZ, boolean addExtraRandomness, int maxAttempts, boolean findUnexplored)
{
int i = startPos.getX() >> 4;
int j = startPos.getZ() >> 4;
int k = 0;
for (Random random = new Random(); k <= maxAttempts; ++k)
{
for (int l = -k; l <= k; ++l)
{
#######################################################################
# +-----------------------------------------------------------------+ #
# | Biome Identity | #
# +-----------------------------------------------------------------+ #
#######################################################################
# When converting an existing OTG world to a vanilla world that can be
# used without OTG, this is the vanilla biome that replaces this biome.
# * Converting to vanilla biomes via console command is not yet
# implemented, but is planned for the future.