Skip to content

Instantly share code, notes, and snippets.

Avatar

Pokechu22 Pokechu22

View GitHub Profile
@Pokechu22
Pokechu22 / applyEntityCollision.java
Last active Oct 3, 2020
Minecraft entity collision logic (simplified)
View applyEntityCollision.java
public class Entity {
public void applyEntityCollision(Entity other) {
double dx = other.posX - this.posX;
double dz = other.posZ - this.posZ;
double largestDistance = Math.max(Math.abs(dx), Math.abs(dz));
if (largestDistance >= 0.01) {
double vx = dx / 20;
double vz = dz / 20;
if (largestDistance < 1) {
@Pokechu22
Pokechu22 / 15w51b_16w02a.diff
Last active Jul 12, 2020
1.8.9/1.9 BiomeGenBase
View 15w51b_16w02a.diff
diff --git a/15w51b/aib.java b/16w02a/aic.java
index bf60267..204f2a6 100755
--- a/15w51b/aib.java
+++ b/16w02a/aic.java
@@ -1,278 +1,176 @@
import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import java.util.Collections;
import java.util.List;
@Pokechu22
Pokechu22 / .gitignore
Last active Feb 2, 2020
Wii/Gamecube DTK hardware test
View .gitignore
build_gc/
build_wii/
*.elf
@Pokechu22
Pokechu22 / .gitignore
Last active Feb 2, 2020
Wii/Gamecube DI Inquiry hardware test
View .gitignore
build_gc/
build_wii/
*.elf
@Pokechu22
Pokechu22 / Balance board addresses.md
Last active Jul 15, 2019
Wii balance board notes, based on Wii Fit (original)
View Balance board addresses.md

Memory:

  • 80693348 through 8069335f: a bunch of shorts that contain the weight calibration values from 0x24 through 0x3b, as documented on https://wiibrew.org/wiki/Wii_Balance_Board#Calibration_Data.
  • 80693360 through 8069336f: 16 bytes that are used to temporarilly store data extension register stuff.
  • 80693370: the byte at 0x20
  • 80693371: the byte at 0x21
  • 80693372: the byte at 0x60
  • 80693373: the byte at 0x61
  • 80693374: the 4-byte checksum at 0x3c
@Pokechu22
Pokechu22 / !README.md
Last active Jan 22, 2020
Sample chunk packets
View !README.md

Some sample chunk data packets.

Format

The *.bin files are complete chunk data packet payloads (however, they do not have a packet length or ID specified, and are neither compressed nor encrypted).

The *.data.bin files are the data arrays within the packets, matching the data structure.

Most of these chunks have data only located in the bottom section, with a few exceptions. All of them have only the void biome set, and no block entities. The dimension is the overworld (skylight is present). All data is based on the format in 1.13.2.

View !MC-123773.md

Like most of my posts, this ended up being long and full of details that usually do not matter but may be useful as reference. Feel free to jump to the conclusion and/or to skip information on how I gathered data.

The change that caused this

18w01a fixed MC-122053, which was an issue where the amount that the mouse scrolled by was ignored. This meant that for some mouses, on windows, scrolling would scroll extremely fast and far; note that this issue was not reported for 1.13 but rather 1.12, and actually existed far before then.

Here are the changes relevant to that fix (MCP names):

--- a/src/main/java/net/minecraft/client/gui/GuiSlot.java
@Pokechu22
Pokechu22 / DataVersions.csv
Last active Mar 3, 2019
All current Minecraft data versions (values for DataVersion)
View DataVersions.csv
Version Name DataVersion
17w50a 1457
17w49b 1455
17w49a 1454
17w48a 1453
17w47b 1452
17w47a 1451
17w46a 1449
17w45b 1448
17w45a 1447
View MCP 1.12.2 steps.md

Please use this guide instead, this one was written in a hurry and I forgot I had the older one.

~~Basically, you'll want to start with the MCP 1.12 release (temporarily at http://www.modcoderpack.com/files/mcp940.zip ), and then modify it to work with 1.12.2. This is actually quite simple. First, you need to edit conf/version.cfg and set both versions to 1.12.2. That on its own is not enough, but it's a critical step. Then you need to grab new SRG mappings. Normally you'd get that through the !srg command, but MCPBot doesn't have it for some versions. Instead, you can get it through forge's maven. (normally it's also on the export site but not for 1.12.2). The link is http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/1.12.2/mcp-1.12.2-srg.zip . To set that up, first delete the conf/patches folder (otherwise patches will be merged, breaking things), and then unzip the contents of that ZIP into conf, overwriting files as pr

You can’t perform that action at this time.