Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
Handle missing AgriCraft rakes better
Don't crash when being patched by Buldcraft/Immibis
Off-by-one error in Waterworks fluid storage
Supress error message when embedded AgriCraft cannot be loaded
  • Loading branch information
HenryLoenwind committed Dec 12, 2015
1 parent 8e29a24 commit c9aa45f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ minecraft_version=1.7.10
forge_version=10.13.4.1492-1.7.10
forgeDep_version=10.13.4

mod_version=0.9.10
mod_version=0.9.11

#Comment out this line to get rid of the appendix
mod_appendix=beta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public class AgriDetector {
}
Log.info("Agricraft API is " + (hasAgriAPI ? "" : "not ") + "installed. Agricraft is " + (hasAgri ? "" : "not ")
+ "installed. AgriCarft Farming station is " + (hasAgri ? "" : "not ") + "available.");
} catch (ClassNotFoundException e) {
hasAgriAPI = hasAgri = false;
} catch (Throwable t) {
hasAgriAPI = hasAgri = false;
Log.info("Crashed while trying to find out if AgriCraft is installed. AgriCraft Farming station is not available.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import info.loenwind.autosave.annotations.Store;
import info.loenwind.enderioaddons.EnderIOAddons;
import info.loenwind.enderioaddons.common.Profiler;
import info.loenwind.enderioaddons.common.SideRestriction;
import info.loenwind.enderioaddons.config.Config;
import info.loenwind.enderioaddons.machine.flag.BlockFlag;
import info.loenwind.enderioaddons.machine.flag.ItemFlag;
Expand All @@ -16,7 +17,6 @@
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import crazypants.enderio.EnderIO;
import crazypants.enderio.machine.SlotDefinition;
import crazypants.enderio.power.BasicCapacitor;
Expand All @@ -27,9 +27,9 @@ public class TileMagCharger extends AbstractTileFramework implements INetworkUpd
protected @Store int progress = -1; // in ticks, counting down
public @Store({ CLIENT }) int itemsInQueue = 0;

@SideOnly(Side.CLIENT)
@SideRestriction(Side.CLIENT)
public int renderOffset = 0;
@SideOnly(Side.CLIENT)
@SideRestriction(Side.CLIENT)
public float renderLastProgress = 0;

public TileMagCharger() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private void set(int col, int elem, @Nullable Object o) {
}

private boolean contains(int col, @Nullable Object o) {
for (int i = 0; i <= elements; i++) {
for (int i = 0; i < elements; i++) {
Object c = get(col, i);
if (o == null && c == null || (o != null && o.equals(c))) {
return true;
Expand All @@ -46,7 +46,7 @@ private boolean contains(int col, @Nullable Object o) {
}

private int find(int col, @Nullable Object o) {
for (int i = 0; i <= elements; i++) {
for (int i = 0; i < elements; i++) {
Object c = get(col, i);
if (o == null && c == null || (o != null && o.equals(c))) {
return i;
Expand Down
22 changes: 18 additions & 4 deletions src/main/java/info/loenwind/enderioaddons/recipe/Recipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import static info.loenwind.enderioaddons.machine.voidtank.BlockVoidTank.blockVoidTank;
import static info.loenwind.enderioaddons.machine.waterworks.BlockWaterworks.blockWaterworks;
import info.loenwind.enderioaddons.common.InitAware;
import info.loenwind.enderioaddons.common.Log;
import info.loenwind.enderioaddons.config.Config;
import info.loenwind.enderioaddons.machine.afarm.AgriDetector;
import info.loenwind.enderioaddons.machine.afarm.BlockAfarm;
Expand Down Expand Up @@ -356,9 +357,16 @@ public void init(FMLInitializationEvent event) {
addShaped(farm, "ehe", "eCe", "cMc", 'e', electricSteel, 'h', Items.diamond_hoe, 'C', machineChassi, 'M', moduleIQ, 'c', crystal);
addShaped(induRake, "bb", " d", " d", 'b', darkSteelBars, 'd', darkSteel);
addShaped(induRake, "bb", "d ", "d ", 'b', darkSteelBars, 'd', darkSteel);
addShapeless(handRake_wood, brokenRakeWood, "stickWood", brokenRakeWood);
addShapeless(handRake_wood, brokenRakeWood, "woodStick", brokenRakeWood);
addShapeless(handRake_iron, brokenRakeIron, "nuggetIron", brokenRakeIron);
if (handRake_wood != null) {
addShapeless(handRake_wood, brokenRakeWood, "stickWood", brokenRakeWood);
addShapeless(handRake_wood, brokenRakeWood, "woodStick", brokenRakeWood);
} else {
Log.warn("Failed to find AgriCraft's Wooden Hand Rake. Some recipes will be missing!");
}
if (handRake_iron != null) {
addShapeless(handRake_iron, brokenRakeIron, "nuggetIron", brokenRakeIron);
Log.warn("Failed to find AgriCraft's Iron Hand Rake. Some recipes will be missing!");
}

ItemStack BREED = new ItemStack(ItemModule.itemModule, 1, Module.BREED.ordinal());
ItemStack CROSSBREED = new ItemStack(ItemModule.itemModule, 1, Module.CROSSBREED.ordinal());
Expand All @@ -378,7 +386,13 @@ public void init(FMLInitializationEvent event) {
addShapeless(MULTIPLY, crops, moduleIQ, crops);
addShapeless(HARVESTUNANALYZED, Items.diamond_shovel, moduleBase, magGlass);
addShapeless(REPLACEBETTER, Items.diamond_shovel, moduleIQ, magGlass);
addShapeless(WEED, weeds, moduleBase, handRake_wood);
if (handRake_wood != null) {
addShapeless(WEED, weeds, moduleBase, handRake_wood);
}
if (handRake_iron != null) {
addShapeless(WEED, weeds, moduleBase, handRake_iron);
}
addShapeless(WEED, weeds, moduleBase, induRake);
addShapeless(EJECTSEEDS, "listAllseed", moduleBase, "blockHopper");
addShapeless(BESTONLY, EJECTSEEDS, moduleIQ, magGlass);
}
Expand Down

0 comments on commit c9aa45f

Please sign in to comment.