A simple python script to pregenerate minecraft worlds.

Overview

mcloady

mcloady is a lightweight python script used to pre-generate Minecraft terrain using MCRcon and carpet mod (optional). Inspired by Pre-Generating A Minecraft World (Hermitcraft Season Seven) by Xisumavoid.

Has this ever happened to you? You are about to open your Minecraft server to the public but you need to pre-generate the terrain to avoid any lag issues when 20 people connect all at the same time to the server and start travelling in different direction. You would love to use pre-generating mods such as Chunky but they're not available for the version of Minecraft you want to play yet!

Fear no more, you don't need a dedicated Minecraft mod for it, just a player in a world, flying and looking around.

Usage

Download the python file (you will need to have python 3 installed on your machine) or the compiled exe file. Fill in the config.ini file. If you have carpet installed on your server you do not need to spawn a player. If you don't have carpet in your server, you need to spawn a player and leave it logged on in the world.

Make sure RCON is enabled in your server.properties file by setting these parameters:

rcon.port=25575
enable-rcon=true
rcon.password=setyourownpassword

Once that is done you can execute the script and leave it running until it finishes. You can stop it at any time and continue afterwards, the script will remember where it stopped and continue from there.

How does it work

The script uses a player for loading areas in the world. It puts the player into spectator mode and it moves it around in increments, drawing a grid. You can use carpet mod if you don't want to have a Minecraft client open.

If stopped at any time and started again, it will start from the last saved position (which it does automatically).

Depending on the area you want to load and the time increments you're using, it can take a long time to pregenerate it. An area of 10000x10000 will take around 17 hours with the default parameters in the configuration file. If you want to reduce the time and your server can handle loading the terrain in less time than specified in the configuration file, you can lower the 'first_wait' and 'second_wait' parameters to make it shorter.

Configuration parameters

Parameter Description
server_ip This is yoru server IP
password The password you've set in rcon.password in your server.properties file
name The player name you want to use. If you're not using carpet, that has to be your player and it must be logged on and have op permissions
use_carpet In case carpet is available and you don't want to spawn your player into the world, you can use carpet to spawn a bot for you so you don't need to have the Minecraft client open.
last_tp This is the name of the file where the last teleport will be saved in case the program is interrupted. If it is interrupted it will start again from where it last stopped.
radius This is the radius from the spawn of the world that you would like to generate.
altitude You can change this parameter if you want. You don't need to.
increments The increments in which the teleports will occur. For a render distance of 12 chunks (196 blocks), an increment of 200 is good. For render distance of 10 chunks, you can set it to increments of 150.
first_wait When the first teleport to a new part of the world occurs, the program will wait this time until starting to turn the player around.
second_wait After the first turn of the player has occurred, the program will wait this time to turn the player around.

Dependencies

Python dependencies:

  • mcrcon (required), a python library that implements the rcon communication protocol
  • configparser (required), a python library that implements a basic configuration language

Minecraft dependencies:

  • carpet mod (optional), used in this context to spawn a bot into a world

Improving execution time and resource usage

If carpet mod is available for the version you want to pregenerate, I strongly suggest you use it. This way you don't need to have a minecraft client open and a player logged on. Using carpet is also good to prevent connection issues, if your Minecraft player disconnects the program will fail.

The script uses next to none resources of your computer. I suggest running it on a raspberry pi if you have one available. I ran this script for a server with a raspberry pi 0w with no problems.

Future improvements

  • Error Handing: Right now the program does not do any error handling. If an error occurs the user will not know why and the program may not stop.
  • Spiraling moving algorithm: An algorithm that pregenerates the terrain in a spiral instead of just iterating rows and columns in a grid is a priority improvement. This would mean that the program would start from the middle and start moving outwards. If the program has not reached the radius border, the world is still playable.
  • Singleplayer pregenerating: Whether it's for a singleplayer or to later upload to a server, the program should have an option to run it in singleplayer without using rcon.
  • Graphical Interface: This would help less experienced server admins to use the program.

Contributing

Pull requests are welcome.

License

MIT

You might also like...
PyCraft - A Minecraft launcher made in python

A Minecraft launcher made in python. The main objective of this launcher is to enable players to enjoy minecraft (especially those without a mojang/microsoft account). This launcher is not illegal as all files are downloaded from libraries.minecraft.net

 A Minecraft clone written in python and pyglet.
A Minecraft clone written in python and pyglet.

PyCraft A Minecraft clone written in python and pyglet. Running PyCraft To run PyCraft, run the following code: git clone https://github.com/TheWebCra

A 16x16 clone of Minecraft Classic, written in Python with the Ursina Engine

VoxelCraft A 16x16 clone of Minecraft Classic, written in Python with the Ursina Engine Features:Trees, Water(But there's no gravity, so if you break

A minecraft bedrock server software written in python (3.X)
A minecraft bedrock server software written in python (3.X)

Podrum README also available in: English 🇺🇸 Français 🇫🇷 Deutsch 🇩🇪 Español 🇪🇸 Tiếng Việt 🇻🇳 Italiana 🇮🇹 Русский 🇷🇺 中文 🇨🇳 Is a Minecraf

Multi minecraft server helper for python
Multi minecraft server helper for python

呐 Yuki 您的群组服操作小助手。 使用Python3编写。使用 .yaml 配置文件记录子服,配合Screen管理Linux系统上的Minecraft子服,支持MCDR子服与非MCDR子服。 功能: 开启所有子服 关闭所有子服 重载所有子服MCDR 重载所有子服ChatBridge 使用方法:

2D Minecraft Clone made with Python & Pygame & OpenGL
2D Minecraft Clone made with Python & Pygame & OpenGL

2D Minecraft Clone This is a 2D clone of the well-known game Minecraft made in Python using Pygame and ModernGL I started this mostly as a self-improv

A Python based program that displays Your Minecraft Server's Status Infos.

Minecraft-server-Status This (very) small python script allows you to view any Minecraft server's status Information Usage Download the file, install

Open-source project written in the ursina engine, simulating the popular game Minecraft.
Open-source project written in the ursina engine, simulating the popular game Minecraft.

Voxelcraft is an open-source project written in the ursina engine, simulating the popular game Minecraft.

Setup minecraft server (Tuinity) to your directory
Setup minecraft server (Tuinity) to your directory

hapeshiva server-setup Setup minecraft server (Tuinity) for you. Support for optimization Create optimized yml Customazible server port and view dista

Comments
  • Include an estimated time remaining in the console output?

    Include an estimated time remaining in the console output?

    Loving this but I was wondering how long it would take to finish running this script when I was (still am!) using it. Should be easy to calculate the remaining time using the time values given from the .ini file.

    I had to do the math myself and ended up with about 31 hours total but it'd be nice to see the progress remaining and maybe a % complete!

    Just a suggestion 😊

    opened by maxheyn 1
  • Utilize Spiral Algorithm for mcloady

    Utilize Spiral Algorithm for mcloady

    mcloady now starts from 0,0 in the world and spirals outward. Modified the saving feature to accommodate this change. Utilizes a spiral algorithm I found on StackOverflow. Linked in the code in a comment.

    I also did a bit of refactoring.

    opened by anthonymendez 0
  • Set game rules during world generation

    Set game rules during world generation

    In Xisuma's video (timestamp), he mentions that there are some game rules that should be set to particular values. I looked through the code, and it doesn't seem like that's happening. I think it would be useful to set these rules when generation begins or resumes. These could be toggled on or off with command-line arguments, possibly.

    The game rules Xisuma mentions in particular include:

    • Turning off the daylight cycle gamerule doDaylightCycle false
    • Turning off weather gamerule doWeatherCycle false
    • Turning off mob spawning gamerule doMobSpawning false

    I would also recommend turning off fire ticking (gamerule doFireTick false).

    When generation completes, the gamerules should be reset to their default values (true in each case).

    This will help reduce the overhead of a user trying to do this/following along.

    opened by greenstack 0
Releases(v0.2)
Flappy Bird clone in Python using Pyglet

python_Flappy-Bird This is the Game Flappy Bird which was originally developt by Dong Nguyen under .Gears recreated in Python. Requirements (used to d

Konstantin Opora 1 Dec 10, 2021
🍦 Cheat for cs:go written in Python.

Cs::Fuck 🍦 Cheat for cs:go written in Python. You can show a video here: https://vimeo.com/642730650 Feature. TriggerBot Glow Esp NoFlash Setup. 0. p

Ѵιcнч 10 Sep 23, 2022
A launcher to launch games from Riot Games under Linux

rito-launcher A launcher to launch games from Riot Games under Linux Requirements: Python 3, with the following pip plugins: 'configparser, pathlib, w

6 Mar 07, 2022
Bingo game now in python play as much you want :) no need to give me credit it's open as fuck

Bingo-py-game A game coded with Python Introduction This is a Terminal-based game currently in its initial stage. I am working on adding more efficien

Frey 5 Aug 12, 2021
Lucky Balls is gambling game where user try to guess 6 numbers from 1 to 48 that computer has picked.

LUCKY BALLS Lucky Balls is gambling game where user try to guess 6 numbers from 1 to 48 that computer has picked. INSTRUCTIONS User input his bet, tha

rile037 2 Dec 28, 2021
Wordle is a word game reminiscent of mastermind

Wordle is a word game reminiscent of mastermind. The player tries to guess a five letter word within six attempts. After each attempt, hints are given. Green tiles show that the letter is in the righ

Sidharth Anand 1 Feb 09, 2022
A game that depicts a real astronaut's struggles

Interstel-quickscooping-game Right from the beginning of our (i.e, me and me alone) journey in the creation of this game, our goal was to give a game

Sharath V 3 Jul 12, 2021
A short non 100% Accurate Solar System in pygame

solar-system-pygame Controls UP/DOWN for Emulation Speed Control ESC for Pause/Unpause q to Quit c or ESC again to Continue LEFT CLICK to Add an orbit

LightCrimson 2 May 28, 2022
Track your favorite minecraft servers' (too bee too tee) queue at any time at your own convenience!

2b2t Queue Monitor Track your favorite minecraft servers' (too bee too tee) queue at any time at your own convenience! Compiled Usage go to https://gi

Addi 1 Feb 05, 2022
Command-line Hangman game

Hang-_an-game-python-build Hangman C command-line Hangman game. Compilation Navigate to the root of the repository from your Terminal and run make to

Hemant Choudhary 3 Jan 16, 2022
We tried to recreate this classic game using python physics libraries.

We tried to recreate this classic game using python physics libraries. The result is certainly hilarious but enjoyable. One of my very first physics application.

Delwys Glokpor 2 Dec 12, 2021
A tool to design a planet for Galaxy Life Reborn game.

GLRBaseDesigner A program to design your planet for Galaxy Life Reborn game. Description Do you want to share your base design with friends? Now it's

jjay31 9 Dec 16, 2022
Cocos2d-x is a suite of open-source, cross-platform, game-development tools used by millions of developers all over the world.

cocos2d-x Win32 Others cocos2d-x is a multi-platform framework for building 2d games, interactive books, demos and other graphical applications. It is

cocos2d 16.7k Jan 04, 2023
Code infrastructure and player algorithms for the Codenames board game.

Codenames Code infrastructure and player algorithms for the Codenames board game. This is the active fork of mkali-personal/codenames. Intro This is b

Asaf Kali 1 May 18, 2022
GardenZen Prototype 2.5D Game

Relaxing 2.5D Game about gardening a small farm and growing food, plants and other things. Follow my Youtube Devlog for further details (see about me section)

Paul 3 Apr 15, 2022
Game of life, with python code.

Game of Life The Game of Life, also known simply as Life, is a cellular automaton. It is a zero-player game, meaning that its evolution is determined

Mohammad Dori 3 Jul 15, 2022
A small Python Library to process Game Boy Camera images

GameBEye GameBEye is a Python Library to process Game Boy Camera images. Source code 📁 : https://github.com/mtouzot/GameBEye Issues 🆘 : https://gith

Martin TOUZOT 4 Nov 25, 2022
I automated the lumberjack game on telegram, by recognising pixels and using pyautogui module

Lumberjack Automated: @gamebot According to the official documentation, @gamebot is a demo bot for the Telegram Gaming Platform.` It provides some sam

Yew Chong 1 Dec 07, 2021
2d war game single player

WarGame-third-version-0.0.4- 2d war game single player Hi ! Today, I publish on GitHub the version 0.0.4 of "WarGame". In this version, you can find a

Edouard Vincent 2 Apr 08, 2022
This is a classic guess coin game (Heads or Tails) implemented by the Chialisp.

This is a classic guess coin game (Heads or Tails) implemented by the Chialisp. It is an absolutely fair P2P game based on the Chia blockchain. You can play with anyone in the world without custody.

Kronus91 14 Jul 02, 2022