Skip to content

Commit

Permalink
CraftingManager Working to its full extend, thanks to: MinecraftForge…
Browse files Browse the repository at this point in the history
  • Loading branch information
ResaloliPT committed Oct 3, 2017
1 parent d9372e8 commit e5dea2e
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 457 deletions.
Expand Up @@ -2,13 +2,13 @@

import com.resaloli.eim.content.crafting.CraftingManagerDCT;
import com.resaloli.eim.content.crafting.DCTCrafting;
import com.resaloli.eim.interfaces.IRecipe;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.InventoryPlayer;
import com.resaloli.eim.content.crafting.InventoryCraftingResult;
import net.minecraft.inventory.*;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.network.play.server.SPacketSetSlot;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
Expand Down Expand Up @@ -68,7 +68,7 @@ public void onCraftMatrixChanged(IInventory inventoryIn)
ItemStack itemstack = ItemStack.EMPTY;
IRecipe irecipe = CraftingManagerDCT.findMatchingRecipes(this.craftMatrix, this.world);

if (irecipe != null && (irecipe.isHidden() || !this.world.getGameRules().getBoolean("doLimitedCrafting") || entityplayermp.getRecipeBook().containsRecipe((net.minecraft.item.crafting.IRecipe) irecipe)))
if (irecipe != null && (irecipe.isDynamic() || !this.world.getGameRules().getBoolean("doLimitedCrafting") || entityplayermp.getRecipeBook().isUnlocked(irecipe)))
{
this.craftResult.setRecipeUsed(irecipe);
itemstack = irecipe.getCraftingResult(this.craftMatrix);
Expand Down
@@ -1,9 +1,9 @@
package com.resaloli.eim.content.crafting;

import com.resaloli.eim.interfaces.IRecipe;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.registry.RegistryNamespaced;
Expand Down
@@ -1,10 +1,10 @@
package com.resaloli.eim.content.crafting;

import com.resaloli.eim.interfaces.IRecipe;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ItemStackHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.NonNullList;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentString;
Expand Down

0 comments on commit e5dea2e

Please sign in to comment.