Initial stab at 1.11

About halfway.
This commit is contained in:
Nicholas Ignoffo 2016-12-12 19:56:36 -08:00
parent ce52aea512
commit 00d6f8eb46
157 changed files with 1036 additions and 1554 deletions

View file

@ -51,13 +51,11 @@ public class AlchemyTableDyeableRecipe extends AlchemyTableRecipe
if (match)
{
inputItemLocation = x;
continue;
} else
{
if (slot.getItem() == Items.NAME_TAG || slot.getItem() == Items.DYE)
{
nameTagOrDyeLocation = x;
continue;
}
}
}
@ -108,30 +106,19 @@ public class AlchemyTableDyeableRecipe extends AlchemyTableRecipe
boolean hasNameTagOrDye = false;
boolean hasInputItem = false;
for (int x = 0; x < checkedList.size(); x++)
{
ItemStack slot = checkedList.get(x);
if (slot != null)
{
for (ItemStack slot : checkedList) {
if (slot != null) {
boolean match = OreDictionary.itemMatches(inputItem, slot, false);
if (match && hasInputItem)
{
if (match && hasInputItem) {
return false;
} else if (match)
{
} else if (match) {
hasInputItem = true;
continue;
} else
{
if (slot.getItem() == Items.NAME_TAG || slot.getItem() == Items.DYE)
{
if (hasNameTagOrDye)
{
} else {
if (slot.getItem() == Items.NAME_TAG || slot.getItem() == Items.DYE) {
if (hasNameTagOrDye) {
return false;
} else
{
} else {
hasNameTagOrDye = true;
}
}

View file

@ -1,9 +1,6 @@
package WayofTime.bloodmagic.recipe.alchemyTable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.*;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
@ -38,7 +35,7 @@ public class AlchemyTablePotionAugmentRecipe extends AlchemyTablePotionRecipe
public AlchemyTablePotionAugmentRecipe(int lpDrained, int ticksRequired, int tierRequired, ItemStack inputItem, PotionEffect baseEffect, double lengthAugment, int powerAugment)
{
this(lpDrained, ticksRequired, tierRequired, Arrays.asList(inputItem), baseEffect, lengthAugment, powerAugment);
this(lpDrained, ticksRequired, tierRequired, Collections.singletonList(inputItem), baseEffect, lengthAugment, powerAugment);
}
@Override
@ -79,19 +76,14 @@ public class AlchemyTablePotionAugmentRecipe extends AlchemyTablePotionRecipe
List<PotionEffect> effectList = PotionUtils.getEffectsFromStack(outputStack);
List<PotionEffect> newEffectList = new ArrayList<PotionEffect>();
Iterator<PotionEffect> effectIterator = effectList.iterator();
while (effectIterator.hasNext())
{
PotionEffect effect = effectIterator.next();
if (effect.getPotion() == wantedPotion)
{
for (PotionEffect effect : effectList) {
if (effect.getPotion() == wantedPotion) {
double currentLengthAugment = Math.max(lengthAugment, BMPotionUtils.getLengthAugment(outputStack, wantedPotion));
int currentPowerAugment = Math.max(powerAugment, effect.getAmplifier());
int potionLength = wantedPotion.isInstant() ? 1 : BMPotionUtils.getAugmentedLength(baseEffect.getDuration(), currentLengthAugment, currentPowerAugment);
newEffectList.add(new PotionEffect(wantedPotion, potionLength, currentPowerAugment));
BMPotionUtils.setLengthAugment(outputStack, wantedPotion, currentLengthAugment);
} else
{
} else {
newEffectList.add(effect);
}
}

View file

@ -1,9 +1,6 @@
package WayofTime.bloodmagic.recipe.alchemyTable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.*;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
@ -40,7 +37,7 @@ public class AlchemyTablePotionRecipe extends AlchemyTableRecipe
public AlchemyTablePotionRecipe(int lpDrained, int ticksRequired, int tierRequired, ItemStack inputItem, PotionEffect baseEffect)
{
this(lpDrained, ticksRequired, tierRequired, Arrays.asList(inputItem), baseEffect);
this(lpDrained, ticksRequired, tierRequired, Collections.singletonList(inputItem), baseEffect);
}
@Override
@ -58,7 +55,6 @@ public class AlchemyTablePotionRecipe extends AlchemyTableRecipe
if (match)
{
flaskLocation = x;
continue;
}
}
}
@ -68,7 +64,7 @@ public class AlchemyTablePotionRecipe extends AlchemyTableRecipe
return getModifiedFlaskForInput(inputList.get(flaskLocation));
}
return getModifiedFlaskForInput(null);
return getModifiedFlaskForInput(ItemStack.EMPTY);
}
@Override
@ -76,39 +72,27 @@ public class AlchemyTablePotionRecipe extends AlchemyTableRecipe
{
ArrayList<Object> required = new ArrayList<Object>(input);
for (int x = 0; x < checkedList.size(); x++)
{
ItemStack slot = checkedList.get(x);
if (slot != null)
{
for (ItemStack slot : checkedList) {
if (slot != null) {
boolean inRecipe = false;
Iterator<Object> req = required.iterator();
while (req.hasNext())
{
for (Object aRequired : required) {
boolean match = false;
Object next = req.next();
Object next = aRequired;
if (next instanceof ItemStack)
{
if (next instanceof ItemStack) {
match = OreDictionary.itemMatches((ItemStack) next, slot, false);
} else if (next instanceof List)
{
} else if (next instanceof List) {
Iterator<ItemStack> itr = ((List<ItemStack>) next).iterator();
while (itr.hasNext() && !match)
{
while (itr.hasNext() && !match) {
match = OreDictionary.itemMatches(itr.next(), slot, false);
}
}
if (match)
{
if (next instanceof ItemStack && ((ItemStack) next).getItem() == ModItems.POTION_FLASK)
{
if (!isPotionFlaskValidInput(slot))
{
if (match) {
if (next instanceof ItemStack && ((ItemStack) next).getItem() == ModItems.POTION_FLASK) {
if (!isPotionFlaskValidInput(slot)) {
break;
}
}
@ -119,8 +103,7 @@ public class AlchemyTablePotionRecipe extends AlchemyTableRecipe
}
}
if (!inRecipe)
{
if (!inRecipe) {
return false;
}
}
@ -150,7 +133,7 @@ public class AlchemyTablePotionRecipe extends AlchemyTableRecipe
public ItemStack getModifiedFlaskForInput(ItemStack inputStack)
{
if (inputStack == null)
if (inputStack.isEmpty())
{
ItemStack outputStack = new ItemStack(ModItems.POTION_FLASK);