From 4f122610805d0c676f3ea41539ac5c050ae754a7 Mon Sep 17 00:00:00 2001 From: tterrag Date: Fri, 4 Oct 2019 02:26:54 -0400 Subject: [PATCH] Move OnlyIn patches on DyeColor to SAS file Also fix broken cobblestone stairs recipe --- .../net/minecraft/item/DyeColor.java.patch | 39 ++----------------- .../minecraft/recipes/cobblestone_stairs.json | 17 -------- .../common/data/ForgeRecipeProvider.java | 2 + src/main/resources/forge.sas | 3 ++ 4 files changed, 8 insertions(+), 53 deletions(-) delete mode 100644 src/generated/resources/data/minecraft/recipes/cobblestone_stairs.json diff --git a/patches/minecraft/net/minecraft/item/DyeColor.java.patch b/patches/minecraft/net/minecraft/item/DyeColor.java.patch index 92af7a8f8..f4af7fa8d 100644 --- a/patches/minecraft/net/minecraft/item/DyeColor.java.patch +++ b/patches/minecraft/net/minecraft/item/DyeColor.java.patch @@ -1,15 +1,6 @@ --- a/net/minecraft/item/DyeColor.java +++ b/net/minecraft/item/DyeColor.java -@@ -7,8 +7,6 @@ - import javax.annotation.Nullable; - import net.minecraft.block.material.MaterialColor; - import net.minecraft.util.IStringSerializable; --import net.minecraftforge.api.distmarker.Dist; --import net.minecraftforge.api.distmarker.OnlyIn; - - public enum DyeColor implements IStringSerializable { - WHITE(0, "white", 16383998, MaterialColor.field_151666_j, 15790320, 16777215), -@@ -43,6 +41,7 @@ +@@ -43,6 +43,7 @@ private final int field_196066_w; private final float[] field_193352_x; private final int field_196067_y; @@ -17,7 +8,7 @@ private final int field_218390_z; private DyeColor(int p_i50049_3_, String p_i50049_4_, int p_i50049_5_, MaterialColor p_i50049_6_, int p_i50049_7_, int p_i50049_8_) { -@@ -55,6 +54,7 @@ +@@ -55,6 +56,7 @@ int j = (p_i50049_5_ & '\uff00') >> 8; int k = (p_i50049_5_ & 255) >> 0; this.field_196066_w = k << 16 | j << 8 | i << 0; @@ -25,31 +16,7 @@ this.field_193352_x = new float[]{(float)i / 255.0F, (float)j / 255.0F, (float)k / 255.0F}; this.field_196067_y = p_i50049_7_; } -@@ -67,7 +67,6 @@ - return this.field_176785_v; - } - -- @OnlyIn(Dist.CLIENT) - public int func_196057_c() { - return this.field_196066_w; - } -@@ -84,7 +83,6 @@ - return this.field_196067_y; - } - -- @OnlyIn(Dist.CLIENT) - public int func_218388_g() { - return this.field_218390_z; - } -@@ -108,7 +106,6 @@ - } - - @Nullable -- @OnlyIn(Dist.CLIENT) - public static DyeColor func_196058_b(int p_196058_0_) { - return field_196063_r.get(p_196058_0_); - } -@@ -120,4 +117,25 @@ +@@ -120,4 +122,25 @@ public String func_176610_l() { return this.field_176785_v; } diff --git a/src/generated/resources/data/minecraft/recipes/cobblestone_stairs.json b/src/generated/resources/data/minecraft/recipes/cobblestone_stairs.json deleted file mode 100644 index be5fc6672..000000000 --- a/src/generated/resources/data/minecraft/recipes/cobblestone_stairs.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "# ", - "## ", - "###" - ], - "key": { - "#": { - "tag": "forge:cobblestone" - } - }, - "result": { - "item": "minecraft:cobblestone_stairs", - "count": 4 - } -} \ No newline at end of file diff --git a/src/main/java/net/minecraftforge/common/data/ForgeRecipeProvider.java b/src/main/java/net/minecraftforge/common/data/ForgeRecipeProvider.java index 725393660..55bed47cb 100644 --- a/src/main/java/net/minecraftforge/common/data/ForgeRecipeProvider.java +++ b/src/main/java/net/minecraftforge/common/data/ForgeRecipeProvider.java @@ -87,6 +87,8 @@ public class ForgeRecipeProvider extends RecipeProvider exclude(Items.IRON_NUGGET); exclude(Blocks.DIAMOND_BLOCK); exclude(Blocks.EMERALD_BLOCK); + + exclude(Blocks.COBBLESTONE_STAIRS); super.registerRecipes(vanilla -> { IFinishedRecipe modified = enhance(vanilla); diff --git a/src/main/resources/forge.sas b/src/main/resources/forge.sas index f41314738..d7857e112 100644 --- a/src/main/resources/forge.sas +++ b/src/main/resources/forge.sas @@ -31,6 +31,9 @@ net/minecraft/block/CropsBlock func_199772_f()Lnet/minecraft/util/IItemProvider; net/minecraft/block/PotatoBlock func_199772_f()Lnet/minecraft/util/IItemProvider; net/minecraft/block/SoundType func_185845_c()Lnet/minecraft/util/SoundEvent; # getBreakSound net/minecraft/block/SoundType func_185846_f()Lnet/minecraft/util/SoundEvent; # getHitSound +net/minecraft/item/DyeColor func_196057_c()I # getSwappedColorValue +net/minecraft/item/DyeColor func_218388_g()I # getTextColor +net/minecraft/item/DyeColor func_196058_b(I)Lnet/minecraft/item/DyeColor; # byFireworkColor net/minecraft/item/crafting/Ingredient func_193365_a()[Lnet/minecraft/item/ItemStack; # getMatchingStacks net/minecraft/item/crafting/Ingredient func_193369_a([Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/crafting/Ingredient; # fromStacks net/minecraft/item/crafting/IRecipe func_222128_h()Lnet/minecraft/item/ItemStack; # getIcon