23 votes
Accepted

How do Minecraft know where village's buildings are if the village is not generated yet?

Yes, it generates more chunks (or at least more of the village tree) than you think it does. This is what I call "area of interest" in my voxel code. There are two kinds of area of interest: Logical (...
Engineer's user avatar
  • 29.5k
10 votes

How do Minecraft know where village's buildings are if the village is not generated yet?

Technical stuff During Minecraft's chunk generation a chunk passes several stages before it is done and can be rendered. These stages, in order, are as follows: ...
hoffmale's user avatar
  • 211
7 votes
Accepted

How would I actually implement A* pathfinding in a 3D world?

What A* needs to work is the following: Given the current node, get the list of possible nodes it can move to, with their costs. The ability to evaluate the heuristic function. Please notice I've ...
Theraot's user avatar
  • 26.6k
5 votes
Accepted

Iterating in "box" formation

First, we need to identify the square consists 4 symmetric sides, each of them of length 2*r. ...
wondra's user avatar
  • 4,930
4 votes

Programming with Python in a recent version of Minecraft

There are a wide variety of ways to interact with Minecraft programatically, including an official Javascript "add-on" API to the "bedrock" version of Minecraft, APIs for Minecraft ...
nealmcb's user avatar
  • 191
4 votes
Accepted

Interesting graphic artifact

That's usually just due to non-existent mipmapping. Turn it on.
Bálint's user avatar
  • 14.9k
4 votes
Accepted

How can I create a Minecraft: Bedrock Edition add-on?

πŸ… Objectives After reading this answer through and through, you should be able to effectively answer the following questions: What is an add-on? What is a resource pack? What is a behavior pack? ...
Hazel γΈγ„γœγ‚‹'s user avatar
3 votes
Accepted

How do i store blocks information in my Voxel game?

I would recommend you take a look at the flyweight pattern. It allows you to use objects such as tiles or blocks in very large numbers when a simple repeated representation would use an unacceptable ...
Shashimee's user avatar
  • 1,250
3 votes
Accepted

Name of this technique used in games such as Minecraft or the sims

It's either called Marching cubes/squares (depends on how many axes you're working with), autotile or -fence. The marching algorithms work on filled areas. You define whether the corners of the ...
Bálint's user avatar
  • 14.9k
3 votes

How to optimize a cubes made world game?

Basically what you said above answers your question... Split the world into "chunks," and only load these when the player is within a certain distance. Minecraft has that useful "Render Distance" ...
Oliver Yasuna's user avatar
3 votes
Accepted

Cube world rendering optimizations

(In this answer I assume that your world is made of separate cubes. If some cubes joined together into grids, then the algorithm can be improved a lot.) You can check if a side is completely inside ...
HolyBlackCat's user avatar
  • 2,006
3 votes
Accepted

Source code of Minecraft servers?

There is the modcoderpack. It contains the minecraft client and server code: http://www.modcoderpack.com/website/releases
Ludwig Schindler's user avatar
3 votes

Where is the GUI button press sound file for Minecraft?

Learning to better help yourself is a wonderful thing, it helps you the most! With most things programming, doing a simple Google search first is typically the best route. Then there's the option of ...
House's user avatar
  • 73.2k
3 votes

How can I use IntelliJ to make Minecraft mods?

Download IntelliJ Download Minecraft Forge from https://files.minecraftforge.net/, you'll want the MDK Depending on your needs, the recommended version is fine, but as changes are being made ...
Draco18s no longer trusts SE's user avatar
3 votes

How can I mod a Minecraft slime to be about the size of a full block?

You can't. You can't make a "size" 1.8 slime. The closest you can get is a size 2 slime because Slime.setSize(int) only takes an integer because the ...
aytimothy's user avatar
  • 273
3 votes

How to create persona pieces for Minecraft Bedrock?

I posted an issue at Minecraft Creator repository about this question. The answer is that, to be able to create persona pieces, one must be participant of the Minecraft Partner Program. There's ...
Rodrigo Balest's user avatar
2 votes

How to remove jitter from motion input?

I develop software that converts motion input to responsive and precise mouse input, as well as maintain a website that tries to help developers implement equally good solutions themselves. I ...
Jibb Smart's user avatar
  • 2,460
2 votes

How can I check if player is an operator in Forge?

Using EntityPlayerMP#canCommandSenderUseCommand(int permLevel, String commandName) might be a way to find out if a player is an operator.
scope's user avatar
  • 69
2 votes
Accepted

Minecraft Forge 1.8 Custom Recipe Manager, need help

I hope this function gives you a raw idea on how it might work: ...
ByteBiter's user avatar
2 votes

Name of this technique used in games such as Minecraft or the sims

I'm not aware of any special name for this technique. Nothing I can think of calling it is returning any meaningful results. I do know that when the texture is different (not the block shape) based ...
Draco18s no longer trusts SE's user avatar
2 votes

Where is the GUI button press sound file for Minecraft?

Copying my answer from Arqade. How to find a sound file Open \.minecraft\assets\indexes\<version>.json. <version> ...
Q20's user avatar
  • 121
2 votes
Accepted

How can I get old Minecraft style terrain biome selection?

What is the top right half? That part is omitted because under normal Earth environments, it's not observed to happen. Consider the following: Note that in the coldest (polar) regions, the ...
Pikalek's user avatar
  • 12.4k
2 votes
Accepted

How can I make an entity invulnerable to fall damage?

Your onEntityFall method is not registered to the event bus. Notice where your yourPlayerHarvestEvent method is and how its ...
Draco18s no longer trusts SE's user avatar
2 votes

Minecraft modding 1.12 draw image

int i = (this.width - this.xSize) / 4; int j = (this.height - this.ySize) / 2; this.drawTexturedModalRect(0, 0, 0, 0, 154, 226); Warning: unused variables ...
Draco18s no longer trusts SE's user avatar
2 votes

How minecraft manages interactable blocks (Chest)?

There is a separate "TileEntity" list per chunk which store the data for blocks that don't have enough with the id+metadata that is available for all blocks in the chunk. When the chunk gets loaded ...
ratchet freak's user avatar
2 votes
Accepted

Potion effect never wears out

I haven't actually implemented a Minecraft Mod. This answer is a bit of speculation, based on some old tutorials. Your method onItemRightClick will be called twice. ...
Theraot's user avatar
  • 26.6k
1 vote
Accepted

How can I use Cocoa beans in Minecraft Forge custom crafting recipes?

Coco beans are brown dye. Dye has metadata values that determine which specific item it is (until 1.13 and The Flattening). The data value you're looking for in this case, is 3. ...
Draco18s no longer trusts SE's user avatar
1 vote
Accepted

Does Minecraft Really Rely on CPU More Than GPU For FPS?

The point here is that although CPU and GPU works asynchronously they also work alternately. GPU can't draw what CPU didn't compute yet. If you have fast CPU and slow GPU then there's no point in ...
kolenda's user avatar
  • 1,370
1 vote

Minecraft/OpenGL - Create Multiple viewports

Create Multiple viewports You don't "create" viewports, because viewport is not an object. When you set a viewport you are setting the left, top, right bottom region that the GL context will use to ...
Ferreira da Selva's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible