Skip to content

Instantly share code, notes, and snippets.

@LexManos
Created September 14, 2017 21:15
Show Gist options
  • Save LexManos/5316d058d5deff454e216d5f64296acf to your computer and use it in GitHub Desktop.
Save LexManos/5316d058d5deff454e216d5f64296acf to your computer and use it in GitHub Desktop.
--- ../src-base/minecraft/net/minecraft/item/crafting/ShapedRecipes.java
+++ ../src-work/minecraft/net/minecraft/item/crafting/ShapedRecipes.java
@@ -19,10 +19,8 @@
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-public class ShapedRecipes implements IRecipe
+public class ShapedRecipes extends net.minecraftforge.registries.IForgeRegistryEntry.Impl<IRecipe> implements net.minecraftforge.common.crafting.IShapedRecipe
{
public final int field_77576_b;
public final int field_77577_c;
@@ -39,7 +37,6 @@
this.field_77575_e = p_i47501_5_;
}
- @SideOnly(Side.CLIENT)
public String func_193358_e()
{
return this.field_194137_e;
@@ -58,10 +55,7 @@
{
ItemStack itemstack = p_179532_1_.func_70301_a(i);
- if (itemstack.func_77973_b().func_77634_r())
- {
- nonnulllist.set(i, new ItemStack(itemstack.func_77973_b().func_77668_q()));
- }
+ nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack));
}
return nonnulllist;
@@ -72,7 +66,6 @@
return this.field_77574_d;
}
- @SideOnly(Side.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_)
{
return p_194133_1_ >= this.field_77576_b && p_194133_2_ >= this.field_77577_c;
@@ -136,12 +129,12 @@
return this.func_77571_b().func_77946_l();
}
- public int func_192403_f()
+ public int getWidth()
{
return this.field_77576_b;
}
- public int func_192404_g()
+ public int getHeight()
{
return this.field_77577_c;
}
@@ -379,4 +372,14 @@
return new ItemStack(item, j, i);
}
}
+
+ //================================================ FORGE START ================================================
+ public int getWidth()
+ {
+ return this.getWidth();
+ }
+ public int getHeight()
+ {
+ return this.getHeight();
+ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment