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
0
votes
1 answer

What could I do to optimise this Minecraft Forge code in 1.19.2?

I'm pretty new to Minecraft modding and would like to know if there's a better way to test for a block in a radius around my player. my current implementation is the following: if ((world.getBlockState(new BlockPos(x + sx, y + sy, z +…
Eckso
  • 1
0
votes
0 answers

Is there a way to store data in JavaScript/EcmaScript in Minecraft?

I'm trying to make a Private Minecraft Bedrock Edition Realm/Server and want to store the users data so i can access it even when the Server is offline for rework or changes but I don't know how, can anyone help me? To clarify my question, is there…
iEnis
  • 15
  • 4
0
votes
0 answers

Prevent a Zoomable IFrame from Scrolling Parent Page when Mouse Over

I have an embedded MC Map (Bluemap) that I have access to, embedded in my main site using an IFrame. Scrolling to zoom when mouse is over the map zooms the map, but ALSO scrolls the parent page simultaneously, which I obviously want to prevent. I…
Tristan
  • 1
  • 2
0
votes
2 answers

Issue when using dataFolder on Java plugin - cannot find where the folder is saved

I would like to save the output (player coordinates) of the minecraft game into a file named player.log. If my player username was 'abce', the name of the file should be 'abce.log'. However, I can't find where on my server this file has been stored…
Caledonian26
  • 727
  • 1
  • 10
  • 27
0
votes
1 answer

Saving minecraft data to file on bukkit/spigot plugin not working

I have created a plugin using the Bukkit/Spigot API. The aim of the plugin is to save player coordinates every second on Minecraft and store this in a '.log' file. If my username on minecraft is 'abce', then there should be a file in the plugins…
Caledonian26
  • 727
  • 1
  • 10
  • 27
0
votes
1 answer

Trying to teleport mobs to a random location around a player

I can't get the location setup correctly. I've tried a few ways and what I came to now I felt was right but I just can't figure out what I'm doing wrong. package nathaniel.newplugin.eventlistener; import org.bukkit.Location; import…
0
votes
1 answer

Cancelling a scheduled repeater on Bukkit/Java

I am programming a plugin that records the coordinates of players in minecraft throughout the game, in Java with Bukkit API. I have used a 'repeating task' structure in my bukkit/java code below. However, I need to 'cancel' this repeating task when…
Caledonian26
  • 727
  • 1
  • 10
  • 27
0
votes
4 answers

What does "Process finished with exit code 1" in intellij-idea?

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization…
MintyX
  • 1
0
votes
1 answer

Java incorrect bytecode

I am decompiling Minecraft 1.5.2 code, and in file als.java there is subtraction performed with void method, also void tried to put to int var: /* * Decompiled with CFR 0.152. */ import java.util.Random; public class als extends aly implements…
0
votes
1 answer

Lua program throwing error with stdin after completion

I've written a lua program for OpenComputers in Minecraft which downloads a github repo to the computer, file structure and all. The code: internet = require("internet") io = require("io") filesystem = require("filesystem") handle =…
Vedvart1
  • 302
  • 4
  • 21
0
votes
0 answers

Cross-origin token redemption is permitted only for the 'Single-Page Application'

I have been trying all day to get a minecraft plugin to allow players on bedrock edition on my geyser sever to (OPTIONALY) sign in to java edition using OAuth2's device code flow. I successfully can get a code and url but when I go to poll the API…
0
votes
1 answer

Issue with specifying goal in pom.xml (a Maven project)

I have the following code. I am trying to create a 'pom.xml' file for a bukkit plugin (Minecraft) using Maven.
Caledonian26
  • 727
  • 1
  • 10
  • 27
0
votes
1 answer

Java: could not find or load main class main - not sure why

I am trying to upload a .jar file onto eclipse in order to be able to edit it. The purpose of the .jar file is to track player coordinates on minecraft. I have decompiled this .jar file on Eclipse, using the eclipse Java Decompiler. However, when I…
Caledonian26
  • 727
  • 1
  • 10
  • 27
0
votes
1 answer

Using Bukkit and Java to create a 'repeating task' code on a Minecraft spigot plugin

I am in the process of creating a spigot plugin (using Java and Bukkit language) that will allow me to store the coordinates of players in minecraft (Java edition) in real time. I want to use a 'scheduler' to do this with a 'repeating task'…
Caledonian26
  • 727
  • 1
  • 10
  • 27
0
votes
0 answers

Got a problem launching Minecraft on Tecknix Launcher from Zorin OS. How can I solve?

First, my problem was that the launcher set a wrong /.minecraft/ directory as default and as expected there were none of the files that the process was expecting to find, so I selected the correct one and the problem didn't show any more. Then this…
Pika
  • 1