Skip to content

Instantly share code, notes, and snippets.

@Barteks2x
Barteks2x / liveMcpMappings.sh
Last active July 2, 2019 16:27
A script to start local maven sfile server with live MCPBot exports. Use channel "live" and version number shown just before starting HTTP server in buildscript, add maven repository with URL "http://127.0.0.1:8000/". If everything is working, you should see the mappings file being accessed in HTTP server output.
#!/bin/bash
tmp_dir=$(mktemp -p "" -d -t liveMcpMappings-XXXXXXXXXX)
version_string=$RANDOM
echo Downloading live mappings to temporary directory $tmp_dir
cd $tmp_dir
wget -o /dev/null http://export.mcpbot.bspk.rs/fields.csv || echo "Downloading field.csv failed"
wget -o /dev/null http://export.mcpbot.bspk.rs/methods.csv || echo "Downloading methods.csv failed"
wget -o /dev/null http://export.mcpbot.bspk.rs/params.csv || echo "Downloading params.csv failed"
@Barteks2x
Barteks2x / ForgeSystemProperties.md
Last active January 19, 2021 08:31
Forge system properties

Forge

Property Description Default value
b3dloader.printLoadedModels false
fml.doNotBackup don't backup world when loading with missing registry entries false
fml.queryResult specifies accepting loading world with missing registry entries false
fml.noGrab disable mouse grab false
forge.enableExtendedSave enable saving chunks >1MB in size true
forge.verboseMissingModelLogging false
@Barteks2x
Barteks2x / build.gradle.kts
Created June 13, 2019 16:14
ForgeGradle3 buildscript using kotlin DSL. Note: Start with initial.build.gradle.kts and run task kotlinDslAccessorsSnapshot
import java.text.SimpleDateFormat
import java.util.*
buildscript {
repositories {
maven { setUrl("https://files.minecraftforge.net/maven") }
jcenter()
mavenCentral()
}
dependencies {
<<https://raw.githubusercontent.com/OpenCubicChunks/CubicChunks/9038dec47469ba24e64c9957052a9c52e349182c/src/main/resources/cubicchunks/logo.png>>
=>
<:cubicchunks:339448515027664896> CUBIC CHUNKS (CC)<:cubicchunks:339448515027664896>
...is a mod allowing you to build pretty much as high or dig as low as you want. At present it is not available on Curseforge until it becomes full alpha. It is compatible with many mods, including Optifine with shaders!
Where this mod excels is in the terrain generation of CustomCubic worldtype, which requires MalisisCore to function.
Original mod by Robinton (2011). Current mod created by Barteks2x.
**NOT COMPATIBLE WITH** WORLDPAINTER, MCEDIT OR WORLDEDIT
@Barteks2x
Barteks2x / 1.13-Worldgen.md
Last active September 4, 2022 14:06
MC 1.13 Worldgen

Overview of changes

  • net.minecraftforge.fml.common.IWorldGenerator -> net.minecraft.world.gen.feature.Feature
    • No longer needed. I think it should be removed by forge, as it has been superseded by vanilla functionality. See below.
  • net.minecraft.world.gen.feature.WorldGenerator -> net.minecraft.world.gen.feature.Feature
    • This would also be the most common replacement of Forge's IWorldGenerator. This should be the solution for anything smaller than a chunk.
    • Except the 8 blocks offset. This is not a thing anymore. Population now works just like any normal person would expect.
    • Position of features is controlled by instances of net.minecraft.world.gen.placement.BasePlacement instead of by the feature itself.
  • net.minecraft.world.gen.MapGenBase -> net.minecraft.world.gen.carver.IWorldCarver
  • This is now finally exposed to mods in a useful way. As it was mostly hidden from modders before, not eveyone may know what it is, so it will be explained later. Generates caves a
@Barteks2x
Barteks2x / BiomeControlledGradValPerlinNoise.java
Last active April 29, 2019 22:08
Mixed gradient-value noise that generates it's values based on Minecraft biome data.
package io.github.opencubicchunks.cubicchunks.cubicgen.noise;
import com.flowpowered.noise.Utils;
import com.flowpowered.noise.module.Module;
import io.github.opencubicchunks.cubicchunks.cubicgen.math.Vec2d;
import net.minecraft.util.math.MathHelper;
public class BiomeControlledGradValPerlinNoise extends Module {
private static final int X_NOISE_GEN = 1619;
private static final int Y_NOISE_GEN = 31337;
{"waterLevel":63,"caves":true,"strongholds":true,"alternateStrongholdsPositions":false,"villages":true,"mineshafts":true,"temples":true,"oceanMonuments":true,"woodlandMansions":true,"ravines":true,"dungeons":true,"dungeonCount":7,"waterLakes":true,"waterLakeRarity":4,"lavaLakes":true,"lavaLakeRarity":8,"aboveSeaLavaLakeRarity":13,"lavaOceans":false,"biome":-1,"biomeSize":4,"riverSize":4,"standardOres":[{"blockstate":{"Properties":{"variant":"dirt","snowy":"false"},"Name":"minecraft:dirt"},"spawnSize":33,"spawnTries":10,"spawnProbability":0.0625,"minHeight":-Infinity,"maxHeight":Infinity},{"blockstate":{"Name":"minecraft:gravel"},"spawnSize":33,"spawnTries":8,"spawnProbability":0.0625,"minHeight":-Infinity,"maxHeight":Infinity},{"blockstate":{"Properties":{"variant":"granite"},"Name":"minecraft:stone"},"spawnSize":33,"spawnTries":10,"spawnProbability":0.2,"minHeight":-Infinity,"maxHeight":0.25},{"blockstate":{"Properties":{"variant":"diorite"},"Name":"minecraft:stone"},"spawnSize":33,"spawnTries":10,"spawnProb
@Barteks2x
Barteks2x / preset-curse-screenshot.json
Last active October 3, 2018 19:47
preset-curse-screenshot
{
"waterLevel":63,
"caves":true,
"strongholds":true,
"alternateStrongholdsPositions":false,
"villages":true,
"mineshafts":true,
"temples":true,
"oceanMonuments":true,
"woodlandMansions":true,
@Barteks2x
Barteks2x / DiscordInfo
Last active August 1, 2019 00:26
CubicChunks discord info
<<https://raw.githubusercontent.com/OpenCubicChunks/CubicChunks/9038dec47469ba24e64c9957052a9c52e349182c/src/main/resources/cubicchunks/logo.png>>
=>
...
is a mod allowing you to build pretty much as high or dig as low as you want. It is compatible with many mods, including Optifine with shaders!
Where this mod excels is in the terrain generation of CustomCubic worldtype with CubicWorldGen sub-mod, which requires MalisisCore for complete functionality.
Original mod by Robinton (2011). Current mod created by Barteks2x.
**NOT COMPATIBLE WITH MCEDIT, SPONGE or BUKKIT**
WorldEdit: Compatible build in #cc_add-ons
{
"waterLevel": 63,
"caves": true,
"strongholds": true,
"alternateStrongholdsPositions": false,
"villages": true,
"mineshafts": true,
"temples": true,
"oceanMonuments": true,
"woodlandMansions": true,