Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@ public void postInit(FMLPostInitializationEvent event) {
"StorageDrawers",
"net.blay09.mods.cookingforblockheads.compat.StorageDrawersAddon");
}
if (CookingConfig.moduleJabba) {
event.buildSoftDependProxy("JABBA", "net.blay09.mods.cookingforblockheads.compat.JabbaAddon");
}
if (CookingConfig.moduleDreamcraft) {
event.buildSoftDependProxy("dreamcraft", "net.blay09.mods.cookingforblockheads.compat.DreamcraftAddon");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public class CookingConfig {
public static boolean moduleEnviroMine;
public static boolean moduleAppleCore;
public static boolean moduleStorageDrawers;
public static boolean moduleJabba;
public static boolean moduleDreamcraft;
public static boolean moduleGrectech5U;
public static boolean usePamsToast;
Expand Down Expand Up @@ -93,6 +94,7 @@ public static void load(File configFile) {
moduleEnviroMine = config.getBoolean("EnviroMine", "modules", true, "Multiblock Kitchen Support (Freezer)");
moduleAppleCore = config.getBoolean("AppleCore", "modules", true, "Dynamic Food Values");
moduleStorageDrawers = config.getBoolean("StorageDrawers", "modules", true, "StorageDrawers");
moduleJabba = config.getBoolean("Jabba", "modules", true, "Jabba");
moduleDreamcraft = config.getBoolean("Dreamcraft", "modules", true, "Dreamcraft");
moduleGrectech5U = config.getBoolean("Gregtech5U", "modules", true, "Gregtech5U");
usePamsToast = config.getBoolean(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package net.blay09.mods.cookingforblockheads.compat;

import net.blay09.mods.cookingforblockheads.KitchenMultiBlock;
import net.minecraftforge.common.MinecraftForge;

public class JabbaAddon {

public JabbaAddon() {
KitchenMultiBlock.tileEntityWrappers
.put("mcp.mobius.betterbarrels.common.blocks.TileEntityBarrel", SimpleStorageProvider.class);
MinecraftForge.EVENT_BUS.register(this);
}
}
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
package net.blay09.mods.cookingforblockheads.compat;

import net.blay09.mods.cookingforblockheads.KitchenMultiBlock;
import net.blay09.mods.cookingforblockheads.api.kitchen.IKitchenStorageProvider;
import net.minecraft.inventory.IInventory;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.MinecraftForge;

import cpw.mods.fml.common.registry.GameRegistry;

public class StorageDrawersAddon {

public StorageDrawersAddon() {
KitchenMultiBlock.tileEntityWrappers
.put("com.jaquadro.minecraft.storagedrawers.block.tile.TileEntityDrawersStandard", DrawerWrapper.class);
KitchenMultiBlock.tileEntityWrappers.put(
"com.jaquadro.minecraft.storagedrawers.block.tile.TileEntityDrawersStandard",
SimpleStorageProvider.class);
KitchenMultiBlock.tileEntityWrappers.put(
"com.jaquadro.minecraft.storagedrawers.block.tile.TileEntityController",
SimpleStorageProvider.class);

KitchenMultiBlock.registerConnectorBlock(GameRegistry.findBlock("StorageDrawers", "trim"));
MinecraftForge.EVENT_BUS.register(this);
}

public static class DrawerWrapper implements IKitchenStorageProvider {

TileEntity tile;

public DrawerWrapper(TileEntity tile) {
this.tile = tile;
}

@Override
public IInventory getInventory() {
return (IInventory) tile;
}
}
}