Compatibility
Minecraft: Java Edition
Platforms
Supported environments
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
NotEnoughMinecraft
Did you ever want to play Minecraft inside of Minecraft without installing any mods on the client? NO??? Anyways, now you can!
Setup
- Install fabric-api and polymer.
- This mod requires a server resource pack. The easiest way to host this is by enabling polymers autohost
- Give yourself a computer
/give @s not-enough-minecraft:computer
and place it down. - Right-click on a computer to start playing
Controls
- The input for movement, jumping and sprinting is the same as your default inputs
- Breaking, placing, dropping and picking blocks also use your default inputs
- Use the scroll wheel or number keys to navigate the hotbar
- You can right-click (to start) using an item. You can right-click again to finish using the item.
- You can sneak to stop playing and exit the computer
- You can press your inventory key to toggle a fps counter
Because this is a serverside-only mod, it is limited to inputs the client sends to it!
How it works
When playing, a fake player is created and added to the server. Each tick an image is rendered using a server-side raycasting renderer from tomalbrc. The rendered image is then displayed to the client using a custom screen item, where each pixel can be colored using custom model data colors.
Config
The config is located at config/not-enough-minecraft.json
.
{
// Render distance in blocks
"renderDistance": 64,
// Flag for experimental entity rendering
"renderEntities": false,
// Amount of entities to render when entity rendering is enabled
"renderEntitiesAmount": 20,
// Flag wether light levels should be ignored, rendering everything with the highest light level.
"fullbright": false,
// Field of View, functions the same way the vanilla client FOV works, minimum value is 30, maximum 110 (Quake Pro).
"fov": 70,
// Biome blend value
"biomeBlend": 1,
// How many threads should be render all instances. This can be used to increase or reduce the amount of CPU usage on
// the server and has a direct impact on FPS count
"renderThreadCount": 4,
// A list of commands that get executed when a fake player entity is spawned
// This can for example be used to give custom items or move to specific locations
"spawnCommands": [
"item replace entity @s hotbar.0 with minecraft:grass_block",
"item replace entity @s hotbar.1 with minecraft:dirt",
"item replace entity @s hotbar.2 with minecraft:stone",
"item replace entity @s hotbar.3 with minecraft:cobblestone",
"item replace entity @s hotbar.4 with minecraft:oak_planks",
"item replace entity @s hotbar.5 with minecraft:oak_log",
"item replace entity @s hotbar.6 with minecraft:glass",
"item replace entity @s hotbar.7 with minecraft:oak_door",
"item replace entity @s hotbar.8 with minecraft:oak_stairs"
],
// Should fake player be allowed to place blocks
"allowPlacing": true,
// Should fake player be allowed to break blocks
"allowBreaking": true,
// Should fake player be allowed to use items
"allowItemUsage": true,
// Should fake player be allowed to drop items
"allowDropping": false,
// Should fake player be allowed to pick items from block
"allowPicking": true
}
Licenses
This mod uses the rendering code from https://github.com/tomalbrc/camera-obscura. All code in the
de.tomalbrc.cameraobscura
package is licensed under LGPL-3.0-only.
The idea of using a custom screen item to display the rendered image is taken from https://github.com/tomalbrc/BlockBoy-Arcade,
which is licensed under MIT
Limitations
This is a quite cursed/hacky weekend project.
Rendering on the server like this is quite inefficient and will increase CPU usage significantly, which can cause issues on lower end setups.
We don't have any way to compress or optimize the screen data for sending it over the network, so we have to send the raw pixels each frame. This can lead to an increased network load when viewing computer screens. You can expect 300-400 KiB/s increase per screen with default minecraft network compression.
Fake players will behave like regular players in almost all aspects, such as world interactions, commands, player list, player data and more. Each player gets their own unique fake player companion, which has the same UUID, but with the lowest bit increase by one.