mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 02:20:01 +03:00
43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
--- ../src-base/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java
|
|
+++ ../src-work/minecraft/net/minecraft/item/crafting/RecipesMapCloning.java
|
|
@@ -5,11 +5,15 @@
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.util.NonNullList;
|
|
import net.minecraft.world.World;
|
|
-import net.minecraftforge.fml.relauncher.Side;
|
|
-import net.minecraftforge.fml.relauncher.SideOnly;
|
|
|
|
-public class RecipesMapCloning implements IRecipe
|
|
+public class RecipesMapCloning extends ShapelessRecipes implements IRecipe
|
|
{
|
|
+ // CraftBukkit start - Delegate to new parent class
|
|
+ public RecipesMapCloning() {
|
|
+ super("", new ItemStack(Items.MAP, 0, -1), NonNullList.from(Ingredient.EMPTY, Ingredient.fromItem(Items.MAP)));
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
public boolean matches(InventoryCrafting inv, World worldIn)
|
|
{
|
|
int i = 0;
|
|
@@ -111,11 +115,7 @@
|
|
for (int i = 0; i < nonnulllist.size(); ++i)
|
|
{
|
|
ItemStack itemstack = inv.getStackInSlot(i);
|
|
-
|
|
- if (itemstack.getItem().hasContainerItem())
|
|
- {
|
|
- nonnulllist.set(i, new ItemStack(itemstack.getItem().getContainerItem()));
|
|
- }
|
|
+ nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack));
|
|
}
|
|
|
|
return nonnulllist;
|
|
@@ -126,7 +126,6 @@
|
|
return true;
|
|
}
|
|
|
|
- @SideOnly(Side.CLIENT)
|
|
public boolean canFit(int width, int height)
|
|
{
|
|
return width >= 3 && height >= 3;
|