Skip to content

Instantly share code, notes, and snippets.

View Darkhax's full-sized avatar
🇨🇦
Modding everying.

Darkhax Darkhax

🇨🇦
Modding everying.
View GitHub Profile
@williewillus
williewillus / foo.java
Last active July 4, 2023 01:01
recipe to json dumper
// You can include this in your mod/a pack/whatever you want, as long as that work follows the Mojang EULA.
// The original source is viewable at https://gist.github.com/williewillus/a1a899ce5b0f0ba099078d46ae3dae6e
// This is a janky JSON generator, for porting from below 1.12 to 1.12.
// Simply replace calls to GameRegistry.addShapeless/ShapedRecipe with these methods, which will dump it to a json in RECIPE_DIR
// Also works with OD, replace GameRegistry.addRecipe(new ShapedOreRecipe/ShapelessOreRecipe with the same calls
// After you are done, call generateConstants()
// Note that in many cases, you can combine multiple old recipes into one, since you can now specify multiple possibilities for an ingredient without using the OD. See vanilla for examples.
private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();
@LexManos
LexManos / LootTables.patch
Created May 7, 2016 18:16
First draft of modifications to Loot Tables for modder usage/modification.
diff --git a/patches/minecraft/net/minecraft/world/storage/loot/LootEntry.java.patch b/patches/minecraft/net/minecraft/world/storage/loot/LootEntry.java.patch
new file mode 100644
index 0000000..31c3c53
--- /dev/null
+++ b/patches/minecraft/net/minecraft/world/storage/loot/LootEntry.java.patch
@@ -0,0 +1,59 @@
+--- ../src-base/minecraft/net/minecraft/world/storage/loot/LootEntry.java
++++ ../src-work/minecraft/net/minecraft/world/storage/loot/LootEntry.java
+@@ -18,15 +18,17 @@
+