Skip to content

Instantly share code, notes, and snippets.

<?php
// Get architecture
if (count ($argv) < 2 || ($argv [1] != 'x64' && $argv [1] != 'x86' && $argv [1] != 'arm')) {
usage ();
exit -1;
}
$architecture = $argv [1];
[["0.13.0.0","4D92D8BE-3E26-4E55-B737-337D66EBDD27",0],["0.13.1.0","1EE5AC16-D2EA-4CAB-A4B8-ACE4BAA305FD",0],["0.13.2.0","80A4FB93-A7E4-44B1-974F-5DBEAAF0EF37",0],["0.14.0.0","007886A5-AFD3-4956-BA71-E1E84ACE8E56",0],["0.14.2.0","CEDADC28-5047-4666-84D2-EDC205513CAC",0],["0.15.0.0","635521EE-F0C3-4138-88AE-135ECE51CC03",0],["0.15.4.0","16914BE1-A0CF-4F32-8365-B54466F5F9E9",0],["0.15.6.0","80BD247E-8D7C-4201-8A37-0E12B100B770",0],["0.15.7.0","D855AF74-F506-49E9-B682-68115818842E",0],["0.15.8.0","867A6D51-EEE9-4AC0-8B72-87E51CA30854",0],["0.15.9.0","19733685-098B-4DC1-9143-91065772FE1D",0],["0.16.0.5","669240E4-1377-47F3-AAED-44D7696125D6",0],["0.16.1.0","0EB56B2B-8E28-49A5-A839-439B2F7EF23A",0],["1.0.0.16","D4AD506F-E6E6-44FF-8EED-13B474DB1FA4",0],["1.1.5.0","3855BC2A-DA97-487C-AA6A-F756B70A5EBF",0],["1.2.2.3","328862DD-A7C2-48AD-A35D-23029EC788DC",0],["1.2.3.6","A22F3860-1B61-4530-BD67-CAE4934480DF",0],["1.2.8.0","8729B46C-32C0-4584-92A4-5882DA4AFEF7",0],["1.2.10.2","BE395790-8B62-4109-A87B-38F3722D729A",0],[
@mojontwins
mojontwins / GuiCreativeInventory.java
Last active October 18, 2022 05:50
Simple Creative Inventory for Minecraft Alpha
package net.minecraft.src;
import java.util.ArrayList;
import java.util.List;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
package net.minecraft.src;
import java.util.StringTokenizer;
import net.minecraft.client.Minecraft;
public class SinglePlayerCommands {
/*
* Implements a simple command parser launched from the chat console, easily hookable:
@mojontwins
mojontwins / optimization.java
Created October 18, 2022 10:15
EntityRenderer.renderSnow refactoring / optimization
/*
* This is a optimization via simple code refactoring of the renderSnow method in EntityRenderer.java in Minecraft a1.1.X,
* probably works in other versions. Gains some fps in my i3, so may be interesting.
*/
private void renderSnow(float renderPartialTick) {
EntityPlayerSP entityPlayerSP = this.mc.thePlayer;
World world = this.mc.theWorld;
// player block coordinates
@mojontwins
mojontwins / 256blockIDs.md
Last active October 19, 2022 11:29
256 Block IDs in Minecraft pre-release

256 block IDs

The Block.blocksList array is created with 256 elements. The problem is that block IDs are stored in a signed byte array, so when values are popped several arrays try to be accessed with a negative index if you stored a block ID > 127. You can overcome this limitation quite easily with a few fixes here and there and use the full 0-255 range and have up to 256 different blocks without needing more memory or creating incompatibilites with existing saves.

The trick is that you can easily convert signed byte values to unsigned ints ranging 0-255 using casting and a bitwise AND. Type casting a negative byte to an int extends bit 7 (the sign). After that, a & 0xFF will clear all bits but those in the least significant byte, so you get your 0-255 value back!

You have to change these bits of code:

Chunk.java