Commented code is dead code!
This commit is contained in:
@@ -50,7 +50,7 @@ public class RecipeRechargeWithFlask extends ShapelessOreRecipe {
|
||||
|
||||
@Override
|
||||
public ItemStack getCraftingResult(InventoryCrafting inv){
|
||||
ItemStack result = super.getCraftingResult(inv);//lookupForIngredients(inv, true);
|
||||
ItemStack result = super.getCraftingResult(inv);
|
||||
rechargeItem(result, inv);
|
||||
return result;
|
||||
}
|
||||
@@ -60,7 +60,6 @@ public class RecipeRechargeWithFlask extends ShapelessOreRecipe {
|
||||
ItemStack stack = findItemToCharge(inv);
|
||||
if(!stack.isEmpty() && chargeable.isManaFull(stack)) return false;
|
||||
return super.matches(inv, world);
|
||||
//return !lookupForIngredients(inv, false).isEmpty();
|
||||
}
|
||||
|
||||
private void rechargeItem(ItemStack toCharge, InventoryCrafting inv){
|
||||
@@ -81,25 +80,6 @@ public class RecipeRechargeWithFlask extends ShapelessOreRecipe {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
// /** lookup for the needed ingredients && return the rechargeable itemstack */
|
||||
// private ItemStack lookupForIngredients(InventoryCrafting inv, boolean copy){
|
||||
// ItemStack flask = ItemStack.EMPTY;
|
||||
// ItemStack rechargeable = ItemStack.EMPTY;
|
||||
// for(int i = 0; (flask.isEmpty() || rechargeable.isEmpty()) && i < inv.getSizeInventory(); i++){
|
||||
// ItemStack itemstack = inv.getStackInSlot(i);
|
||||
// if(!itemstack.isEmpty()){
|
||||
// if(flask.isEmpty() && itemstack.getItem() == WizardryItems.mana_flask){
|
||||
// flask = itemstack;
|
||||
// }else if(rechargeable.isEmpty() && (itemstack.getItem() instanceof ItemWand || itemstack.getItem() instanceof ItemWizardArmour) && itemstack.getItemDamage() > 0){
|
||||
// rechargeable = copy ? itemstack.copy() : itemstack;
|
||||
// }else{
|
||||
// return ItemStack.EMPTY;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return flask.isEmpty() || rechargeable.isEmpty() ? ItemStack.EMPTY : rechargeable;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean isDynamic(){
|
||||
return true; // Stops it appearing in the recipe book
|
||||
|
||||
@@ -67,59 +67,4 @@ public final class WizardryRecipes {
|
||||
}
|
||||
}
|
||||
|
||||
// @SubscribeEvent
|
||||
// public static void onPlayerTickEvent(TickEvent.PlayerTickEvent event){
|
||||
//
|
||||
// if(event.phase == TickEvent.Phase.START){
|
||||
//
|
||||
// if(event.player.openContainer instanceof ContainerWorkbench){
|
||||
//
|
||||
// IInventory craftMatrix = ((ContainerWorkbench)event.player.openContainer).craftMatrix;
|
||||
// ItemStack output = ((ContainerWorkbench)event.player.openContainer).craftResult.getStackInSlot(0);
|
||||
// processManaFlaskCrafting(craftMatrix, output);
|
||||
//
|
||||
// }else if(event.player.openContainer instanceof ContainerPlayer){
|
||||
//
|
||||
// IInventory craftMatrix = ((ContainerPlayer)event.player.openContainer).craftMatrix;
|
||||
// ItemStack output = ((ContainerPlayer)event.player.openContainer).craftResult.getStackInSlot(0);
|
||||
// // Unfortunately I have no choice but to call this method every tick when the player isn't using another
|
||||
// // inventory, since the only thing tracking whether the player is looking at their inventory is the GUI
|
||||
// // itself, which is client-side only.
|
||||
// processManaFlaskCrafting(craftMatrix, output);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private static void processManaFlaskCrafting(IInventory craftMatrix, ItemStack output){
|
||||
//
|
||||
// // Charges wand using mana flask
|
||||
//
|
||||
// ItemManaFlask flask = null;
|
||||
// ItemStack input = ItemStack.EMPTY;
|
||||
//
|
||||
// for(int i = 0; i < craftMatrix.getSizeInventory(); i++){
|
||||
//
|
||||
// ItemStack stack = craftMatrix.getStackInSlot(i);
|
||||
//
|
||||
// if(stack.getItem() instanceof ItemManaFlask){
|
||||
// flask = (ItemManaFlask)stack.getItem();
|
||||
// }
|
||||
//
|
||||
// if(stack.getItem() instanceof IManaStoringItem){
|
||||
// input = stack;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if(flask == null) return;
|
||||
//
|
||||
// if(output.getItem() instanceof IManaStoringItem && !input.isEmpty()){
|
||||
//
|
||||
// output.setTagCompound((input.getTagCompound()));
|
||||
//
|
||||
// int currentMana = ((IManaStoringItem)input.getItem()).getMana(input);
|
||||
//
|
||||
// ((IManaStoringItem)output.getItem()).setMana(output, Math.min(currentMana + flask.size.capacity,
|
||||
// ((IManaStoringItem)input.getItem()).getManaCapacity(input)));
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user