Compare commits

...
4 Commits
Author SHA1 Message Date
mezz 3e6c8407ff Bump version 2015-09-09 23:16:33 -07:00
mezz 87908d2a35 Merge pull request #818 from bdew/3.6-fixes
Fixes for 3.6.x - BeekeepingLogic overwriting queens with old data + OreDict use in Squeezer recipes
2015-09-09 23:13:21 -07:00
bdew a137cf8f12 Fixed BeekeepingLogic overwriting queen with old data 2015-09-09 13:38:26 +03:00
bdew 70f710231d Changed squeezer recipes to prioritize specific recipes over OD and fixed accepting items 2015-09-09 11:45:27 +03:00
3 changed files with 19 additions and 5 deletions

No files matched your search

+1 -1
View File
@@ -2,4 +2,4 @@ mcversion=1.7.10
forgeversion=10.13.3.1370-1.7.10
version_major=3
version_minor=6
version_patch=4
version_patch=5
@@ -46,6 +46,7 @@ public class BeekeepingLogic implements IBeekeepingLogic {
private int breedingTime;
private int queenWorkCycleThrottle;
private IEffectData effectData[] = new IEffectData[2];
private ItemStack queenStack;
private IBee queen;
private IIndividual pollen;
private int attemptedPollinations = 0;
@@ -309,6 +310,11 @@ public class BeekeepingLogic implements IBeekeepingLogic {
ItemStack queenStack = housing.getQueen();
if (!ItemStack.areItemStacksEqual(this.queenStack, queenStack)) {
this.queen = BeeManager.beeRoot.getMember(queenStack);
this.queenStack = queenStack;
}
if (queenStack == null || !ForestryItem.beeQueenGE.isItemEqual(queenStack)) {
housingErrorState = EnumErrorCode.NOQUEEN;
hasQueen = false;
@@ -76,8 +76,8 @@ public class MachineSqueezer extends TilePowered implements ISidedInventory, ILi
this.chance = chance;
}
public boolean matches(ItemStack[] res) {
return StackUtils.containsSets(resources, res, true, true) > 0;
public boolean matches(ItemStack[] res, boolean oreDict) {
return StackUtils.containsSets(resources, res, oreDict, true) > 0;
}
}
@@ -104,8 +104,16 @@ public class MachineSqueezer extends TilePowered implements ISidedInventory, ILi
}
public static Recipe findMatchingRecipe(ItemStack[] items) {
// First try to match a specific recipe (without OD)
for (Recipe recipe : recipes) {
if (recipe.matches(items)) {
if (recipe.matches(items, false)) {
return recipe;
}
}
// If that fails - try again with oredict support enabled
for (Recipe recipe : recipes) {
if (recipe.matches(items, true)) {
return recipe;
}
}
@@ -118,7 +126,7 @@ public class MachineSqueezer extends TilePowered implements ISidedInventory, ILi
return true;
}
for (ItemStack recipeInput : recipeInputs) {
if (StackUtils.isCraftingEquivalent(recipeInput, itemStack)) {
if (StackUtils.isCraftingEquivalent(recipeInput, itemStack, true, true)) {
return true;
}
}