Questions tagged [minecraft]

Use this tag for programming-related questions about the computer game Minecraft. Note: Minecraft questions are generally OFF-TOPIC on Stack Overflow unless they relate to creating mods/plugins or otherwise developing for the game. Questions related to gameplay are best asked on gaming.stackexchange.com.

Minecraft is a voxel-based sandbox game coded in Java with LWJGL (which includes OpenGL) by Markus "Notch" Persson and his company Mojang.

In September 2014 Mojang was bought by Microsoft and the founders including Notch no longer work for the company. Source.

In the game players interact with the world formed of blocks to gain resources that can be used to create tools, structures, shelter, and eventually, complicated machinery. The game comes with enough features of wiring to allow the complexity to build a full 16-bit CPU out of its wiring.

Multiplayer functionality can be used by downloading a server that runs in Java and takes commands from the command line or from users typing commands starting with a slash / in-game on the server chat.

Questions are also sometimes used with to denote coding Bukkit plugins written in Java, which modify serverside behavior of the game (but cannot add new blocks or items, only new behaviours). Such plugins normally support the CraftBukkit and Spigot implementations of the API, although there are some with specific implementation dependencies. A Bukkit plugin's base plugin class must extend org.bukkit.plugin.java.JavaPlugin for the Bukkit Server class loader to recognize them. Note that as of August 21, 2014 at 8:42 AM, Bukkit has been discontinued, and both CraftBukkit and Spigot (implementations of Bukkit) has been taken down due to DMCA requests.

Clientside mods are usually written using [MinecraftForge] and are capable of adding new blocks and items. For more information about MinecraftForge, see .

Minecraft is available on:

  • PC May 17, 2009 (first public release as Developmental Alpha Version)
  • Xperia Play - August 16, 2011 (Pocket Edition)
  • Android - October 7, 2011 (Pocket Edition)
  • iOS - November 17, 2011 (Pocket Edition)
  • PC - November 18, 2011 (Official Release)
  • Raspberry Pi - February 11, 2013 (Pi Edition based on the Pocket Edition)
  • Playstation 3 - May 14, 2014
  • Playstation 4 - October 3, 2014
  • Xbox 360 - May 9, 2012
  • Xbox One - September 5, 2014
  • Nintendo Switch - May 12, 2017

The game has reached huge levels of popularity and has made a large sensation (Minecraft has now sold over 15 million copies for PC/Mac).

Official website of the game: Minecraft.net

NOTICE: Questions about playing Minecraft are generally OFF-TOPIC on Stack Overflow. Please post on our sister site, Arqade, using one of the following tags depending on which edition of Minecraft you have:

Questions regarding developing mods are, however, on-topic.

3762 questions
6
votes
1 answer

how do I run a computercraft program like 'excavate 5'

can someone tell me the command so I can make programs like: 'program 19' or 'build house 5 3 10' instead of having to rely on input = read()? I've been hunting this down forever and haven't figured it out or found it yet, so it would be nice if…
Edward Ford
  • 71
  • 1
  • 1
  • 3
6
votes
1 answer

What library does minecraft use for its 3D graphics?

I know Minecraft uses the LWJGL library, but is that what allows it to have 3D graphics?
Foobar
  • 7,458
  • 16
  • 81
  • 161
6
votes
5 answers

Where are the source files for forge?

When I try to open Block.class, or any other classes from the same package as Block.class, eclipse will say: "the source attachment does not contain the source for the Block.class. You can change the source attachment by clicking Change Attached…
lllendexll
  • 81
  • 1
  • 1
  • 3
6
votes
1 answer

Running a minecraft server from within my own program

I am trying to set up a minecraft server, for fun, and want to add a control panel to make managing it easier. Part of this control panel is to run the server FROM the panel to reduce miss-clicking the exit button and what-not. (the minecraft server…
PulsePanda
  • 1,806
  • 10
  • 33
  • 56
6
votes
3 answers

Infinite cube world engine (like Minecraft) optimization suggestions?

Voxel engine (like Minecraft) optimization suggestions? As a fun project (and to get my Minecraft-adict son excited for programming) I am building a 3D Minecraft-like voxel engine using C# .NET4.5.1, OpenGL and GLSL 4.x. Right now my world is built…
It's me ... Alex
  • 279
  • 4
  • 11
6
votes
6 answers

Only trigger proximity detector when object enters the range, not when he moves within range

I'm making a text-based radar for Minecraft. If a player comes within 20 blocks of you, it will say in chat. As of now, it spams the chat. How can I get it to only write to chat about that player ONCE? Even if you don't play the game, it should be…
Brad
  • 115
  • 3
6
votes
2 answers

Unknown Source in Stacktrace Java Eclipse

I have the very annoying problem, that when exporting a jar-file out of my source code in eclipse I will get no information in the stacktrace about the source and line number in which the error occurs. I have checked the compiler settings in ecplise…
Nerade
  • 61
  • 1
  • 3
5
votes
2 answers

Python Recursive Data Reading

The following will make more sense if you have ever played minecraft. Since many of you have not, I will try to explain it as best as I can I am trying to write a recursive function that can find the steps to craft any minecraft item from a flatfile…
giodamelio
  • 5,465
  • 14
  • 44
  • 72
5
votes
1 answer

Creating a check that needs to loop outwards from the middle of 3 variables ( x y z )

for (int ix = x - r; ix < x + r + 1; ix++) { for (int iz = z - r; iz < z + r + 1; iz++) { for (int iy = y - r; iy < y + r + 1; iy++) { // if ix,iy,iz = something blah blah (this part isn't needed) } …
Casper7526
  • 341
  • 3
  • 13
5
votes
3 answers

What is needed to launch external JAR files, like the Minecraft launcher?

If you have never played Minecraft, then this is how the mechanics of the launcher work. The user can download a JAR (Or a JAR packaged into an EXE), which has absolutely no code for the Minecraft client at all. This is deemed the launcher. When the…
liamzebedee
  • 14,010
  • 21
  • 72
  • 118
5
votes
3 answers

Description for Minecraft Renderengine

I'd like to find out how the minecraft renderengine works and perhabs adapt it to other technologies. Is there an analysis of the seemingly quite simple render engine of minecraft? Voxels, just orthogonal borders and some other constraints apply to…
UllaDieTrulla
  • 573
  • 1
  • 5
  • 18
5
votes
1 answer

Is there a way to cast enum into other enum?

I'm trying to make a mod for 1.7.10 (I know, outdated, but I don't think it matters much in this context) merging a few mods with CustomNPC, basically adding a few weapons that would look and work like CustomNPC weapons but made of differen mods'…
AHuIci
  • 51
  • 2
5
votes
1 answer

Minecraft speed for loading chunks

I am working on a voxel terrain generator. Everything is fine, I have biomes, blocks, etc. What tickles me is the speed of my project in unity. If I run everything on the main thread I can only load and render 1 to 2 chunks without dropping below…
5
votes
3 answers

Windows ssh - How to keep proccess running after Disconnect

I want to start a java Process(Minecraft Server) over SSH(PHP Script). And on disconnect it should not be closed. I am using Bitvise SSH Server for Windows and 64 Bit Java. I can start the server but if I disconnect from the ssh server then the…
Flam3rboy
  • 95
  • 2
  • 7
5
votes
2 answers

NBT Parser Minecraft mca file not a gzipped file error

I try to read a Minecraft world with Python from the filesystem and the .mca region/anvil files using the NBT 1.4.1 module (Named Binary Tag Reader/Writer), which is supposed to read the NBT format used in Minecraft. It works fine for files such as…
Torben545
  • 97
  • 1
  • 9