reworked recipe system and main class file
This commit is contained in:
parent
8bdec4d608
commit
96f485042e
22 changed files with 195 additions and 197 deletions
|
@ -28,15 +28,15 @@ import dark.assembly.common.CommonProxy;
|
||||||
import dark.assembly.common.armbot.TileEntityArmbot;
|
import dark.assembly.common.armbot.TileEntityArmbot;
|
||||||
import dark.assembly.common.imprinter.TileEntityImprinter;
|
import dark.assembly.common.imprinter.TileEntityImprinter;
|
||||||
import dark.assembly.common.machine.TileEntityCrate;
|
import dark.assembly.common.machine.TileEntityCrate;
|
||||||
|
import dark.assembly.common.machine.TileEntityDetector;
|
||||||
import dark.assembly.common.machine.TileEntityManipulator;
|
import dark.assembly.common.machine.TileEntityManipulator;
|
||||||
import dark.assembly.common.machine.TileEntityRejector;
|
import dark.assembly.common.machine.TileEntityRejector;
|
||||||
import dark.assembly.common.machine.belt.TileEntityConveyorBelt;
|
import dark.assembly.common.machine.belt.TileEntityConveyorBelt;
|
||||||
import dark.assembly.common.machine.crane.TileEntityCraneController;
|
import dark.assembly.common.machine.crane.TileEntityCraneController;
|
||||||
import dark.assembly.common.machine.crane.TileEntityCraneRail;
|
import dark.assembly.common.machine.crane.TileEntityCraneRail;
|
||||||
import dark.assembly.common.machine.detector.TileEntityDetector;
|
|
||||||
import dark.assembly.common.machine.encoder.TileEntityEncoder;
|
import dark.assembly.common.machine.encoder.TileEntityEncoder;
|
||||||
import dark.core.DarkMain;
|
import dark.core.DarkMain;
|
||||||
import dark.library.effects.FXBeam;
|
import dark.core.client.FXBeam;
|
||||||
|
|
||||||
public class ClientProxy extends CommonProxy
|
public class ClientProxy extends CommonProxy
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
||||||
@Override
|
@Override
|
||||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
|
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||||
{
|
{
|
||||||
if (block.blockID == AssemblyLine.blockConveyorBelt.blockID)
|
if (block.blockID == AssemblyLine.recipeLoader.blockConveyorBelt.blockID)
|
||||||
{
|
{
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslatef((float) 0.0F, (float) 1.5F, (float) 0.0F);
|
GL11.glTranslatef((float) 0.0F, (float) 1.5F, (float) 0.0F);
|
||||||
|
@ -38,7 +38,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
||||||
modelConveyorBelt.render(0.0625F, 0, false, false, false, false);
|
modelConveyorBelt.render(0.0625F, 0, false, false, false, false);
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
else if (block.blockID == AssemblyLine.blockRejector.blockID)
|
else if (block.blockID == AssemblyLine.recipeLoader.blockRejector.blockID)
|
||||||
{
|
{
|
||||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "rejector.png"));
|
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "rejector.png"));
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
|
@ -49,7 +49,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
||||||
modelEjector.renderPiston(0.0625F, 1);
|
modelEjector.renderPiston(0.0625F, 1);
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
else if (block.blockID == AssemblyLine.blockManipulator.blockID)
|
else if (block.blockID == AssemblyLine.recipeLoader.blockManipulator.blockID)
|
||||||
{
|
{
|
||||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "manipulator1.png"));
|
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "manipulator1.png"));
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
|
@ -59,7 +59,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
||||||
modelInjector.render(0.0625F, true, 0);
|
modelInjector.render(0.0625F, true, 0);
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
else if (block.blockID == AssemblyLine.blockArmbot.blockID)
|
else if (block.blockID == AssemblyLine.recipeLoader.blockArmbot.blockID)
|
||||||
{
|
{
|
||||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.MODEL_DIRECTORY + RenderArmbot.TEXTURE));
|
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.MODEL_DIRECTORY + RenderArmbot.TEXTURE));
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
|
@ -70,7 +70,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
||||||
RenderArmbot.MODEL.render(0.0625F, 0, 0);
|
RenderArmbot.MODEL.render(0.0625F, 0, 0);
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
else if (block.blockID == AssemblyLine.blockCraneController.blockID)
|
else if (block.blockID == AssemblyLine.recipeLoader.blockCraneController.blockID)
|
||||||
{
|
{
|
||||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.MODEL_DIRECTORY + RenderCraneController.TEXTURE));
|
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.MODEL_DIRECTORY + RenderCraneController.TEXTURE));
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
|
@ -80,7 +80,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
||||||
RenderCraneController.MODEL.render(0.0625f, false, false);
|
RenderCraneController.MODEL.render(0.0625f, false, false);
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
else if (block.blockID == AssemblyLine.blockCraneFrame.blockID)
|
else if (block.blockID == AssemblyLine.recipeLoader.blockCraneFrame.blockID)
|
||||||
{
|
{
|
||||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.MODEL_DIRECTORY + RenderCraneFrame.TEXTURE));
|
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.MODEL_DIRECTORY + RenderCraneFrame.TEXTURE));
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
|
|
70
src/minecraft/dark/assembly/common/ALRecipeLoader.java
Normal file
70
src/minecraft/dark/assembly/common/ALRecipeLoader.java
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
package dark.assembly.common;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
|
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import dark.assembly.common.machine.BlockCrate;
|
||||||
|
import dark.core.RecipeLoader;
|
||||||
|
|
||||||
|
public class ALRecipeLoader extends RecipeLoader
|
||||||
|
{
|
||||||
|
|
||||||
|
public Block blockConveyorBelt;
|
||||||
|
public Block blockManipulator;
|
||||||
|
public BlockCrate blockCrate;
|
||||||
|
public Block blockImprinter;
|
||||||
|
public Block blockEncoder;
|
||||||
|
public Block blockDetector;
|
||||||
|
public Block blockRejector;
|
||||||
|
public Block blockArmbot;
|
||||||
|
public Block blockCraneController;
|
||||||
|
public Block blockCraneFrame;
|
||||||
|
public Block blockTurntable;
|
||||||
|
|
||||||
|
public Item itemImprint;
|
||||||
|
public Item itemDisk;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadRecipes()
|
||||||
|
{
|
||||||
|
super.loadRecipes();
|
||||||
|
this.createStandardRecipes();
|
||||||
|
this.createUERecipes();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createUERecipes()
|
||||||
|
{
|
||||||
|
// Armbot
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockArmbot, new Object[] { "II ", "SIS", "MCM", 'S', ALRecipeLoader.steelPlate, 'C', ALRecipeLoader.circuit2, 'I', ALRecipeLoader.steel, 'M', ALRecipeLoader.motor }));
|
||||||
|
// Disk
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(itemDisk, new Object[] { "III", "ICI", "III", 'I', itemImprint, 'C', ALRecipeLoader.circuit2 }));
|
||||||
|
// Encoder
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockEncoder, new Object[] { "SIS", "SCS", "SSS", 'I', itemImprint, 'S', ALRecipeLoader.steel, 'C', ALRecipeLoader.circuit2 }));
|
||||||
|
// Detector
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockDetector, new Object[] { "SES", "SCS", "S S", 'S', ALRecipeLoader.steel, 'C', ALRecipeLoader.circuit, 'E', Item.eyeOfEnder }));
|
||||||
|
// Conveyor Belt
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockConveyorBelt, 10), new Object[] { "III", "WMW", 'I', ALRecipeLoader.steel, 'W', Block.planks, 'M', ALRecipeLoader.motor }));
|
||||||
|
// Rejector
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockRejector, new Object[] { "CPC", "@R@", '@', steel, 'R', Item.redstone, 'P', Block.pistonBase, 'C', ALRecipeLoader.circuit }));
|
||||||
|
// Turntable
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockTurntable, new Object[] { "IMI", " P ", 'M', ALRecipeLoader.motor, 'P', Block.pistonBase, 'I', ALRecipeLoader.steel }));
|
||||||
|
// Manipulator
|
||||||
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(blockManipulator, 2), new Object[] { Block.dispenser, ALRecipeLoader.circuit }));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createStandardRecipes()
|
||||||
|
{
|
||||||
|
// Imprint
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(itemImprint, 2), new Object[] { "R", "P", "I", 'P', Item.paper, 'R', Item.redstone, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
|
||||||
|
// Imprinter
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(blockImprinter, new Object[] { "SIS", "SPS", "WCW", 'S', Item.ingotIron, 'C', Block.chest, 'W', Block.workbench, 'P', Block.pistonBase, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
|
||||||
|
// Crate
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCrate, 1, 0), new Object[] { "TST", "S S", "TST", 'S', Item.ingotIron, 'T', Block.planks }));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCrate, 1, 1), new Object[] { "TST", "SCS", "TST", 'C', new ItemStack(blockCrate, 1, 0), 'S', ALRecipeLoader.steel, 'T', Block.wood }));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCrate, 1, 2), new Object[] { "TST", "SCS", "TST", 'C', new ItemStack(blockCrate, 1, 1), 'S', ALRecipeLoader.steelPlate, 'T', Block.wood }));
|
||||||
|
}
|
||||||
|
}
|
|
@ -35,11 +35,13 @@ import dark.assembly.common.imprinter.BlockImprinter;
|
||||||
import dark.assembly.common.imprinter.ItemImprinter;
|
import dark.assembly.common.imprinter.ItemImprinter;
|
||||||
import dark.assembly.common.imprinter.TileEntityImprinter;
|
import dark.assembly.common.imprinter.TileEntityImprinter;
|
||||||
import dark.assembly.common.machine.BlockCrate;
|
import dark.assembly.common.machine.BlockCrate;
|
||||||
|
import dark.assembly.common.machine.BlockDetector;
|
||||||
import dark.assembly.common.machine.BlockManipulator;
|
import dark.assembly.common.machine.BlockManipulator;
|
||||||
import dark.assembly.common.machine.BlockRejector;
|
import dark.assembly.common.machine.BlockRejector;
|
||||||
import dark.assembly.common.machine.BlockTurntable;
|
import dark.assembly.common.machine.BlockTurntable;
|
||||||
import dark.assembly.common.machine.ItemBlockCrate;
|
import dark.assembly.common.machine.ItemBlockCrate;
|
||||||
import dark.assembly.common.machine.TileEntityCrate;
|
import dark.assembly.common.machine.TileEntityCrate;
|
||||||
|
import dark.assembly.common.machine.TileEntityDetector;
|
||||||
import dark.assembly.common.machine.TileEntityManipulator;
|
import dark.assembly.common.machine.TileEntityManipulator;
|
||||||
import dark.assembly.common.machine.TileEntityRejector;
|
import dark.assembly.common.machine.TileEntityRejector;
|
||||||
import dark.assembly.common.machine.belt.BlockConveyorBelt;
|
import dark.assembly.common.machine.belt.BlockConveyorBelt;
|
||||||
|
@ -48,15 +50,13 @@ import dark.assembly.common.machine.crane.BlockCraneController;
|
||||||
import dark.assembly.common.machine.crane.BlockCraneFrame;
|
import dark.assembly.common.machine.crane.BlockCraneFrame;
|
||||||
import dark.assembly.common.machine.crane.TileEntityCraneController;
|
import dark.assembly.common.machine.crane.TileEntityCraneController;
|
||||||
import dark.assembly.common.machine.crane.TileEntityCraneRail;
|
import dark.assembly.common.machine.crane.TileEntityCraneRail;
|
||||||
import dark.assembly.common.machine.detector.BlockDetector;
|
|
||||||
import dark.assembly.common.machine.detector.TileEntityDetector;
|
|
||||||
import dark.assembly.common.machine.encoder.BlockEncoder;
|
import dark.assembly.common.machine.encoder.BlockEncoder;
|
||||||
import dark.assembly.common.machine.encoder.ItemDisk;
|
import dark.assembly.common.machine.encoder.ItemDisk;
|
||||||
import dark.assembly.common.machine.encoder.TileEntityEncoder;
|
import dark.assembly.common.machine.encoder.TileEntityEncoder;
|
||||||
import dark.core.DarkMain;
|
import dark.core.DarkMain;
|
||||||
import dark.core.ModPrefab;
|
import dark.core.ModPrefab;
|
||||||
import dark.prefab.machine.BlockMulti;
|
import dark.core.blocks.BlockMulti;
|
||||||
import dark.prefab.machine.TileEntityMulti;
|
import dark.core.blocks.TileEntityMulti;
|
||||||
|
|
||||||
@ModstatInfo(prefix = "asmline")
|
@ModstatInfo(prefix = "asmline")
|
||||||
@Mod(modid = AssemblyLine.CHANNEL, name = AssemblyLine.MOD_NAME, version = DarkMain.VERSION, dependencies = "after:DarkCore", useMetadata = true)
|
@Mod(modid = AssemblyLine.CHANNEL, name = AssemblyLine.MOD_NAME, version = DarkMain.VERSION, dependencies = "after:DarkCore", useMetadata = true)
|
||||||
|
@ -82,6 +82,8 @@ public class AssemblyLine extends ModPrefab
|
||||||
@Instance(AssemblyLine.CHANNEL)
|
@Instance(AssemblyLine.CHANNEL)
|
||||||
public static AssemblyLine instance;
|
public static AssemblyLine instance;
|
||||||
|
|
||||||
|
public static ALRecipeLoader recipeLoader;
|
||||||
|
|
||||||
@Metadata(AssemblyLine.MOD_ID)
|
@Metadata(AssemblyLine.MOD_ID)
|
||||||
public static ModMetadata meta;
|
public static ModMetadata meta;
|
||||||
|
|
||||||
|
@ -91,22 +93,6 @@ public class AssemblyLine extends ModPrefab
|
||||||
|
|
||||||
public static final Configuration CONFIGURATION = new Configuration(new File(Loader.instance().getConfigDir(), "Dark/AssemblyLine.cfg"));
|
public static final Configuration CONFIGURATION = new Configuration(new File(Loader.instance().getConfigDir(), "Dark/AssemblyLine.cfg"));
|
||||||
|
|
||||||
|
|
||||||
public static Block blockConveyorBelt;
|
|
||||||
public static Block blockManipulator;
|
|
||||||
public static BlockCrate blockCrate;
|
|
||||||
public static Block blockImprinter;
|
|
||||||
public static Block blockEncoder;
|
|
||||||
public static Block blockDetector;
|
|
||||||
public static Block blockRejector;
|
|
||||||
public static Block blockArmbot;
|
|
||||||
public static Block blockCraneController;
|
|
||||||
public static Block blockCraneFrame;
|
|
||||||
public static Block blockTurntable;
|
|
||||||
|
|
||||||
public static Item itemImprint;
|
|
||||||
public static Item itemDisk;
|
|
||||||
|
|
||||||
public static Logger FMLog = Logger.getLogger(AssemblyLine.MOD_NAME);
|
public static Logger FMLog = Logger.getLogger(AssemblyLine.MOD_NAME);
|
||||||
|
|
||||||
// TODO: MAKE THIS FALSE EVERY BUILD!
|
// TODO: MAKE THIS FALSE EVERY BUILD!
|
||||||
|
@ -117,48 +103,27 @@ public class AssemblyLine extends ModPrefab
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent event)
|
public void preInit(FMLPreInitializationEvent event)
|
||||||
{
|
{
|
||||||
|
super.preInit(event);
|
||||||
FMLog.setParent(FMLLog.getLogger());
|
FMLog.setParent(FMLLog.getLogger());
|
||||||
instance = this;
|
instance = this;
|
||||||
|
recipeLoader = new ALRecipeLoader();
|
||||||
|
|
||||||
/* UPDATE NOTIFIER */
|
/* UPDATE NOTIFIER */
|
||||||
Modstats.instance().getReporter().registerMod(this);
|
Modstats.instance().getReporter().registerMod(this);
|
||||||
|
|
||||||
CONFIGURATION.load();
|
|
||||||
blockConveyorBelt = new BlockConveyorBelt(BLOCK_ID_PREFIX);
|
|
||||||
blockManipulator = new BlockManipulator(BLOCK_ID_PREFIX++);
|
|
||||||
blockCrate = new BlockCrate(BLOCK_ID_PREFIX++);
|
|
||||||
blockImprinter = new BlockImprinter(BLOCK_ID_PREFIX++);
|
|
||||||
blockDetector = new BlockDetector(BLOCK_ID_PREFIX++);
|
|
||||||
blockRejector = new BlockRejector(BLOCK_ID_PREFIX++);
|
|
||||||
blockEncoder = new BlockEncoder(BLOCK_ID_PREFIX++);
|
|
||||||
blockArmbot = new BlockArmbot(BLOCK_ID_PREFIX++);
|
|
||||||
blockCraneController = new BlockCraneController(BLOCK_ID_PREFIX++);
|
|
||||||
blockCraneFrame = new BlockCraneFrame(BLOCK_ID_PREFIX++);
|
|
||||||
blockTurntable = new BlockTurntable(BLOCK_ID_PREFIX++);
|
|
||||||
|
|
||||||
itemImprint = new ItemImprinter(CONFIGURATION.getItem("Imprint", ITEM_ID_PREFIX).getInt());
|
|
||||||
itemDisk = new ItemDisk(CONFIGURATION.getItem("Disk", ITEM_ID_PREFIX + 1).getInt());
|
|
||||||
|
|
||||||
AssemblyLine.REQUIRE_NO_POWER = !CONFIGURATION.get("general", "requirePower", true).getBoolean(true);
|
|
||||||
AssemblyLine.VINALLA_RECIPES = CONFIGURATION.get("general", "Vinalla_Recipes", false).getBoolean(false);
|
|
||||||
if (CONFIGURATION.hasChanged())
|
|
||||||
{
|
|
||||||
CONFIGURATION.save();
|
|
||||||
}
|
|
||||||
|
|
||||||
NetworkRegistry.instance().registerGuiHandler(this, this.proxy);
|
NetworkRegistry.instance().registerGuiHandler(this, this.proxy);
|
||||||
|
|
||||||
GameRegistry.registerBlock(blockConveyorBelt, "ConveyorBelt");
|
GameRegistry.registerBlock(recipeLoader.blockConveyorBelt, "ConveyorBelt");
|
||||||
GameRegistry.registerBlock(blockCrate, ItemBlockCrate.class, "Crate");
|
GameRegistry.registerBlock(recipeLoader.blockCrate, ItemBlockCrate.class, "Crate");
|
||||||
GameRegistry.registerBlock(blockManipulator, "Manipulator");
|
GameRegistry.registerBlock(recipeLoader.blockManipulator, "Manipulator");
|
||||||
GameRegistry.registerBlock(blockImprinter, "Imprinter");
|
GameRegistry.registerBlock(recipeLoader.blockImprinter, "Imprinter");
|
||||||
GameRegistry.registerBlock(blockEncoder, "Encoder");
|
GameRegistry.registerBlock(recipeLoader.blockEncoder, "Encoder");
|
||||||
GameRegistry.registerBlock(blockDetector, "Detector");
|
GameRegistry.registerBlock(recipeLoader.blockDetector, "Detector");
|
||||||
GameRegistry.registerBlock(blockRejector, "Rejector");
|
GameRegistry.registerBlock(recipeLoader.blockRejector, "Rejector");
|
||||||
GameRegistry.registerBlock(blockArmbot, "Armbot");
|
GameRegistry.registerBlock(recipeLoader.blockArmbot, "Armbot");
|
||||||
GameRegistry.registerBlock(blockTurntable, "Turntable");
|
GameRegistry.registerBlock(recipeLoader.blockTurntable, "Turntable");
|
||||||
GameRegistry.registerBlock(blockCraneController, "CraneController");
|
GameRegistry.registerBlock(recipeLoader.blockCraneController, "CraneController");
|
||||||
GameRegistry.registerBlock(blockCraneFrame, "Crane Frame");
|
GameRegistry.registerBlock(recipeLoader.blockCraneFrame, "Crane Frame");
|
||||||
|
|
||||||
GameRegistry.registerTileEntity(TileEntityConveyorBelt.class, "ALConveyorBelt");
|
GameRegistry.registerTileEntity(TileEntityConveyorBelt.class, "ALConveyorBelt");
|
||||||
GameRegistry.registerTileEntity(TileEntityRejector.class, "ALSorter");
|
GameRegistry.registerTileEntity(TileEntityRejector.class, "ALSorter");
|
||||||
|
@ -171,7 +136,7 @@ public class AssemblyLine extends ModPrefab
|
||||||
GameRegistry.registerTileEntity(TileEntityCraneRail.class, "ALCraneRail");
|
GameRegistry.registerTileEntity(TileEntityCraneRail.class, "ALCraneRail");
|
||||||
GameRegistry.registerTileEntity(TileEntityImprinter.class, "ALImprinter");
|
GameRegistry.registerTileEntity(TileEntityImprinter.class, "ALImprinter");
|
||||||
|
|
||||||
TabAssemblyLine.itemStack = new ItemStack(AssemblyLine.blockConveyorBelt);
|
TabAssemblyLine.itemStack = new ItemStack(recipeLoader.blockConveyorBelt);
|
||||||
|
|
||||||
proxy.preInit();
|
proxy.preInit();
|
||||||
}
|
}
|
||||||
|
@ -179,24 +144,12 @@ public class AssemblyLine extends ModPrefab
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void load(FMLInitializationEvent evt)
|
public void load(FMLInitializationEvent evt)
|
||||||
{
|
{
|
||||||
|
super.init(evt);
|
||||||
proxy.init();
|
proxy.init();
|
||||||
|
|
||||||
FMLog.info("Loaded: " + TranslationHelper.loadLanguages(LANGUAGE_PATH, LANGUAGES_SUPPORTED) + " languages.");
|
FMLog.info("Loaded: " + TranslationHelper.loadLanguages(LANGUAGE_PATH, LANGUAGES_SUPPORTED) + " languages.");
|
||||||
|
|
||||||
/* MCMOD.INFO FILE BUILDER? */
|
recipeLoader.loadRecipes();
|
||||||
meta.modId = AssemblyLine.MOD_ID;
|
|
||||||
meta.name = AssemblyLine.MOD_NAME;
|
|
||||||
meta.description = "Simi Realistic factory system for minecraft bring in conveyor belts, robotic arms, and simple machines";
|
|
||||||
|
|
||||||
meta.url = "http://universalelectricity.com/assembly-line";
|
|
||||||
|
|
||||||
meta.logoFile = "/al_logo.png";
|
|
||||||
meta.version = DarkMain.VERSION;
|
|
||||||
meta.authorList = Arrays.asList(new String[] { "DarkGuardsman" });
|
|
||||||
meta.credits = "Please see the website.";
|
|
||||||
meta.autogenerated = false;
|
|
||||||
|
|
||||||
Recipes.loadRecipes();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,14 +162,45 @@ public class AssemblyLine extends ModPrefab
|
||||||
@Override
|
@Override
|
||||||
public void loadConfig()
|
public void loadConfig()
|
||||||
{
|
{
|
||||||
// TODO Auto-generated method stub
|
CONFIGURATION.load();
|
||||||
|
recipeLoader.blockConveyorBelt = new BlockConveyorBelt(BLOCK_ID_PREFIX);
|
||||||
|
recipeLoader.blockManipulator = new BlockManipulator(BLOCK_ID_PREFIX++);
|
||||||
|
recipeLoader.blockCrate = new BlockCrate(BLOCK_ID_PREFIX++);
|
||||||
|
recipeLoader.blockImprinter = new BlockImprinter(BLOCK_ID_PREFIX++);
|
||||||
|
recipeLoader.blockDetector = new BlockDetector(BLOCK_ID_PREFIX++);
|
||||||
|
recipeLoader.blockRejector = new BlockRejector(BLOCK_ID_PREFIX++);
|
||||||
|
recipeLoader.blockEncoder = new BlockEncoder(BLOCK_ID_PREFIX++);
|
||||||
|
recipeLoader.blockArmbot = new BlockArmbot(BLOCK_ID_PREFIX++);
|
||||||
|
recipeLoader.blockCraneController = new BlockCraneController(BLOCK_ID_PREFIX++);
|
||||||
|
recipeLoader.blockCraneFrame = new BlockCraneFrame(BLOCK_ID_PREFIX++);
|
||||||
|
recipeLoader.blockTurntable = new BlockTurntable(BLOCK_ID_PREFIX++);
|
||||||
|
|
||||||
|
recipeLoader.itemImprint = new ItemImprinter(CONFIGURATION.getItem("Imprint", ITEM_ID_PREFIX).getInt());
|
||||||
|
recipeLoader.itemDisk = new ItemDisk(CONFIGURATION.getItem("Disk", ITEM_ID_PREFIX + 1).getInt());
|
||||||
|
|
||||||
|
AssemblyLine.REQUIRE_NO_POWER = !CONFIGURATION.get("general", "requirePower", true).getBoolean(true);
|
||||||
|
AssemblyLine.VINALLA_RECIPES = CONFIGURATION.get("general", "Vinalla_Recipes", false).getBoolean(false);
|
||||||
|
if (CONFIGURATION.hasChanged())
|
||||||
|
{
|
||||||
|
CONFIGURATION.save();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadModMeta()
|
public void loadModMeta()
|
||||||
{
|
{
|
||||||
// TODO Auto-generated method stub
|
meta.modId = AssemblyLine.MOD_ID;
|
||||||
|
meta.name = AssemblyLine.MOD_NAME;
|
||||||
|
meta.description = "Simi Realistic factory system for minecraft bring in conveyor belts, robotic arms, and simple machines";
|
||||||
|
|
||||||
|
meta.url = "http://universalelectricity.com/assembly-line";
|
||||||
|
|
||||||
|
meta.logoFile = "/al_logo.png";
|
||||||
|
meta.version = DarkMain.VERSION;
|
||||||
|
meta.authorList = Arrays.asList(new String[] { "DarkGuardsman" });
|
||||||
|
meta.credits = "Please see the website.";
|
||||||
|
meta.autogenerated = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,87 +0,0 @@
|
||||||
package dark.assembly.common;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
|
||||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
|
||||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
|
|
||||||
public class Recipes
|
|
||||||
{
|
|
||||||
static Object circuit;
|
|
||||||
static Object circuit2;
|
|
||||||
static Object circuit3;
|
|
||||||
static Object steel;
|
|
||||||
static Object steelPlate;
|
|
||||||
static Object motor;
|
|
||||||
|
|
||||||
public static void loadRecipes()
|
|
||||||
{
|
|
||||||
circuit = Item.redstoneRepeater;
|
|
||||||
circuit2 = Item.comparator;
|
|
||||||
steel = Item.ingotIron;
|
|
||||||
steelPlate = Item.ingotGold;
|
|
||||||
motor = Block.pistonBase;
|
|
||||||
|
|
||||||
if (!AssemblyLine.VINALLA_RECIPES)
|
|
||||||
{
|
|
||||||
if (OreDictionary.getOres("basicCircuit").size() > 0)
|
|
||||||
{
|
|
||||||
circuit = "basicCircuit";
|
|
||||||
}
|
|
||||||
if (OreDictionary.getOres("advancedCircuit").size() > 0)
|
|
||||||
{
|
|
||||||
circuit = "advancedCircuit";
|
|
||||||
}
|
|
||||||
if (OreDictionary.getOres("ingotSteel").size() > 0)
|
|
||||||
{
|
|
||||||
steel = "ingotSteel";
|
|
||||||
}
|
|
||||||
if (OreDictionary.getOres("plateSteel").size() > 0)
|
|
||||||
{
|
|
||||||
steelPlate = "plateSteel";
|
|
||||||
}
|
|
||||||
if (OreDictionary.getOres("motor").size() > 0)
|
|
||||||
{
|
|
||||||
motor = "motor";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Recipes.createStandardRecipes();
|
|
||||||
Recipes.createUERecipes();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void createUERecipes()
|
|
||||||
{
|
|
||||||
// Armbot
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.blockArmbot, new Object[] { "II ", "SIS", "MCM", 'S', Recipes.steelPlate, 'C', Recipes.circuit2, 'I', Recipes.steel, 'M', Recipes.motor }));
|
|
||||||
// Disk
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.itemDisk, new Object[] { "III", "ICI", "III", 'I', AssemblyLine.itemImprint, 'C', Recipes.circuit2 }));
|
|
||||||
// Encoder
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.blockEncoder, new Object[] { "SIS", "SCS", "SSS", 'I', AssemblyLine.itemImprint, 'S', Recipes.steel, 'C', Recipes.circuit2 }));
|
|
||||||
// Detector
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.blockDetector, new Object[] { "SES", "SCS", "S S", 'S', Recipes.steel, 'C', Recipes.circuit, 'E', Item.eyeOfEnder }));
|
|
||||||
// Conveyor Belt
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(AssemblyLine.blockConveyorBelt, 10), new Object[] { "III", "WMW", 'I', Recipes.steel, 'W', Block.planks, 'M', Recipes.motor }));
|
|
||||||
// Rejector
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.blockRejector, new Object[] { "CPC", "@R@", '@', Recipes.steel, 'R', Item.redstone, 'P', Block.pistonBase, 'C', Recipes.circuit }));
|
|
||||||
// Turntable
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.blockTurntable, new Object[] { "IMI", " P ", 'M', Recipes.motor, 'P', Block.pistonBase, 'I', Recipes.steel }));
|
|
||||||
// Manipulator
|
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(AssemblyLine.blockManipulator, 2), new Object[] { Block.dispenser, Recipes.circuit }));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void createStandardRecipes()
|
|
||||||
{
|
|
||||||
// Imprint
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(AssemblyLine.itemImprint, 2), new Object[] { "R", "P", "I", 'P', Item.paper, 'R', Item.redstone, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
|
|
||||||
// Imprinter
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.blockImprinter, new Object[] { "SIS", "SPS", "WCW", 'S', Item.ingotIron, 'C', Block.chest, 'W', Block.workbench, 'P', Block.pistonBase, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
|
|
||||||
// Crate
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(AssemblyLine.blockCrate, 1, 0), new Object[] { "TST", "S S", "TST", 'S', Item.ingotIron, 'T', Block.planks }));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(AssemblyLine.blockCrate, 1, 1), new Object[] { "TST", "SCS", "TST", 'C', new ItemStack(AssemblyLine.blockCrate, 1, 0), 'S', Recipes.steel, 'T', Block.wood }));
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(AssemblyLine.blockCrate, 1, 2), new Object[] { "TST", "SCS", "TST", 'C', new ItemStack(AssemblyLine.blockCrate, 1, 1), 'S', Recipes.steelPlate, 'T', Block.wood }));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -12,7 +12,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import dark.assembly.client.render.BlockRenderingHandler;
|
import dark.assembly.client.render.BlockRenderingHandler;
|
||||||
import dark.assembly.common.machine.BlockAssembly;
|
import dark.assembly.common.machine.BlockAssembly;
|
||||||
import dark.prefab.machine.IMultiBlock;
|
import dark.core.blocks.IMultiBlock;
|
||||||
|
|
||||||
public class BlockArmbot extends BlockAssembly
|
public class BlockArmbot extends BlockAssembly
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,8 +41,8 @@ import dark.assembly.common.armbot.command.CommandUse;
|
||||||
import dark.assembly.common.machine.TileEntityAssembly;
|
import dark.assembly.common.machine.TileEntityAssembly;
|
||||||
import dark.assembly.common.machine.encoder.ItemDisk;
|
import dark.assembly.common.machine.encoder.ItemDisk;
|
||||||
import dark.core.DarkMain;
|
import dark.core.DarkMain;
|
||||||
import dark.helpers.ItemFindingHelper;
|
import dark.core.blocks.IMultiBlock;
|
||||||
import dark.prefab.machine.IMultiBlock;
|
import dark.core.helpers.ItemFindingHelper;
|
||||||
|
|
||||||
public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, IInventory, IPacketReceiver, IArmbot, IPeripheral
|
public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, IInventory, IPacketReceiver, IArmbot, IPeripheral
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.core.vector.Vector3;
|
||||||
import dark.helpers.ItemFindingHelper;
|
import dark.core.helpers.ItemFindingHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by arms to break a specific block in a position.
|
* Used by arms to break a specific block in a position.
|
||||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.core.vector.Vector3;
|
||||||
import dark.helpers.ItemFindingHelper;
|
import dark.core.helpers.ItemFindingHelper;
|
||||||
|
|
||||||
public class CommandPowerTo extends Command
|
public class CommandPowerTo extends Command
|
||||||
{
|
{
|
||||||
|
|
23
src/minecraft/dark/assembly/common/bottler/BlockBottler.java
Normal file
23
src/minecraft/dark/assembly/common/bottler/BlockBottler.java
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
package dark.assembly.common.bottler;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import dark.assembly.common.machine.BlockAssembly;
|
||||||
|
|
||||||
|
public class BlockBottler extends BlockAssembly
|
||||||
|
{
|
||||||
|
|
||||||
|
public BlockBottler(int id)
|
||||||
|
{
|
||||||
|
super(id, Material.iron, "AutoBottler");
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package dark.assembly.common.bottler;
|
||||||
|
|
||||||
|
import dark.core.blocks.TileEntityMachine;
|
||||||
|
|
||||||
|
public class TileEntityBottler extends TileEntityMachine
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -6,10 +6,10 @@ import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import dark.assembly.common.AssemblyLine;
|
import dark.assembly.common.AssemblyLine;
|
||||||
import dark.library.gui.ISlotWatcher;
|
import dark.core.gui.ISlotWatcher;
|
||||||
import dark.library.gui.SlotCraftingResult;
|
import dark.core.gui.SlotCraftingResult;
|
||||||
import dark.library.gui.SlotRestricted;
|
import dark.core.gui.SlotRestricted;
|
||||||
import dark.library.gui.WatchedSlot;
|
import dark.core.gui.WatchedSlot;
|
||||||
|
|
||||||
public class ContainerImprinter extends Container implements ISlotWatcher
|
public class ContainerImprinter extends Container implements ISlotWatcher
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ public class ContainerImprinter extends Container implements ISlotWatcher
|
||||||
}
|
}
|
||||||
|
|
||||||
// Imprint Input for Imprinting
|
// Imprint Input for Imprinting
|
||||||
this.addSlotToContainer(new SlotRestricted(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START, 68, 34, new ItemStack(AssemblyLine.itemImprint)));
|
this.addSlotToContainer(new SlotRestricted(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START, 68, 34, new ItemStack(AssemblyLine.recipeLoader.itemImprint)));
|
||||||
// Item to be imprinted
|
// Item to be imprinted
|
||||||
this.addSlotToContainer(new WatchedSlot(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START + 1, 92, 34, this));
|
this.addSlotToContainer(new WatchedSlot(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START + 1, 92, 34, this));
|
||||||
// Result of Crafting/Imprinting
|
// Result of Crafting/Imprinting
|
||||||
|
|
|
@ -27,11 +27,11 @@ import com.google.common.io.ByteArrayDataInput;
|
||||||
import dark.assembly.api.IArmbot;
|
import dark.assembly.api.IArmbot;
|
||||||
import dark.assembly.api.IArmbotUseable;
|
import dark.assembly.api.IArmbotUseable;
|
||||||
import dark.assembly.common.AssemblyLine;
|
import dark.assembly.common.AssemblyLine;
|
||||||
import dark.helpers.Pair;
|
import dark.core.blocks.TileEntityMulti;
|
||||||
import dark.library.gui.ISlotPickResult;
|
import dark.core.gui.ISlotPickResult;
|
||||||
import dark.prefab.machine.AutoCraftingManager;
|
import dark.core.helpers.AutoCraftingManager;
|
||||||
import dark.prefab.machine.IAutoCrafter;
|
import dark.core.helpers.IAutoCrafter;
|
||||||
import dark.prefab.machine.TileEntityMulti;
|
import dark.core.helpers.Pair;
|
||||||
|
|
||||||
public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInventory, IArmbotUseable, IPacketReceiver, ISlotPickResult, IAutoCrafter
|
public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInventory, IArmbotUseable, IPacketReceiver, ISlotPickResult, IAutoCrafter
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,7 +11,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import dark.api.INetworkPart;
|
import dark.api.INetworkPart;
|
||||||
import dark.assembly.common.AssemblyLine;
|
import dark.assembly.common.AssemblyLine;
|
||||||
import dark.assembly.common.TabAssemblyLine;
|
import dark.assembly.common.TabAssemblyLine;
|
||||||
import dark.prefab.machine.BlockMachine;
|
import dark.core.blocks.BlockMachine;
|
||||||
|
|
||||||
public abstract class BlockAssembly extends BlockMachine
|
public abstract class BlockAssembly extends BlockMachine
|
||||||
{
|
{
|
||||||
|
|
|
@ -136,7 +136,7 @@ public class BlockCrate extends BlockAssembly
|
||||||
{
|
{
|
||||||
if (checkTile instanceof TileEntityCrate)
|
if (checkTile instanceof TileEntityCrate)
|
||||||
{
|
{
|
||||||
AssemblyLine.blockCrate.tryInsert(((TileEntityCrate) checkTile), player, allMode, false);
|
AssemblyLine.recipeLoader.blockCrate.tryInsert(((TileEntityCrate) checkTile), player, allMode, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ public class BlockCrate extends BlockAssembly
|
||||||
|
|
||||||
if (currentStack != null)
|
if (currentStack != null)
|
||||||
{
|
{
|
||||||
if (currentStack.getItem().itemID == AssemblyLine.blockCrate.blockID)
|
if (currentStack.getItem().itemID == AssemblyLine.recipeLoader.blockCrate.blockID)
|
||||||
{
|
{
|
||||||
ItemStack containedStack = ItemBlockCrate.getContainingItemStack(currentStack);
|
ItemStack containedStack = ItemBlockCrate.getContainingItemStack(currentStack);
|
||||||
ItemStack crateStack = tileEntity.getSampleStack();
|
ItemStack crateStack = tileEntity.getSampleStack();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package dark.assembly.common.machine.detector;
|
package dark.assembly.common.machine;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IconRegister;
|
import net.minecraft.client.renderer.texture.IconRegister;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
|
@ -12,7 +12,7 @@ import net.minecraft.tileentity.TileEntityChest;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import universalelectricity.core.vector.Vector3;
|
import universalelectricity.core.vector.Vector3;
|
||||||
import dark.prefab.machine.TileEntityMulti;
|
import dark.core.blocks.TileEntityMulti;
|
||||||
|
|
||||||
public class InvInteractionHelper
|
public class InvInteractionHelper
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,8 +23,8 @@ import com.google.common.io.ByteArrayDataInput;
|
||||||
|
|
||||||
import dark.api.INetworkPart;
|
import dark.api.INetworkPart;
|
||||||
import dark.assembly.common.AssemblyLine;
|
import dark.assembly.common.AssemblyLine;
|
||||||
|
import dark.core.blocks.TileEntityMachine;
|
||||||
import dark.core.tile.network.NetworkTileEntities;
|
import dark.core.tile.network.NetworkTileEntities;
|
||||||
import dark.prefab.machine.TileEntityMachine;
|
|
||||||
|
|
||||||
/** A class to be inherited by all machines on the assembly line. This class acts as a single peace
|
/** A class to be inherited by all machines on the assembly line. This class acts as a single peace
|
||||||
* in a network of similar tiles allowing all to share power from one or more sources
|
* in a network of similar tiles allowing all to share power from one or more sources
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package dark.assembly.common.machine.detector;
|
package dark.assembly.common.machine;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -58,13 +58,13 @@ public class TileEntityDetector extends TileEntityFilterable
|
||||||
if (powerCheck != this.powering)
|
if (powerCheck != this.powering)
|
||||||
{
|
{
|
||||||
this.powering = powerCheck;
|
this.powering = powerCheck;
|
||||||
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, AssemblyLine.blockDetector.blockID);
|
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, AssemblyLine.recipeLoader.blockDetector.blockID);
|
||||||
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord + 1, this.zCoord, AssemblyLine.blockDetector.blockID);
|
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord + 1, this.zCoord, AssemblyLine.recipeLoader.blockDetector.blockID);
|
||||||
for (int x = this.xCoord - 1; x <= this.xCoord + 1; x++)
|
for (int x = this.xCoord - 1; x <= this.xCoord + 1; x++)
|
||||||
{
|
{
|
||||||
for (int z = this.zCoord - 1; z <= this.zCoord + 1; z++)
|
for (int z = this.zCoord - 1; z <= this.zCoord + 1; z++)
|
||||||
{
|
{
|
||||||
this.worldObj.notifyBlocksOfNeighborChange(x, this.yCoord + 1, z, AssemblyLine.blockDetector.blockID);
|
this.worldObj.notifyBlocksOfNeighborChange(x, this.yCoord + 1, z, AssemblyLine.recipeLoader.blockDetector.blockID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,8 +76,8 @@ public class TileEntityDetector extends TileEntityFilterable
|
||||||
@Override
|
@Override
|
||||||
public void invalidate()
|
public void invalidate()
|
||||||
{
|
{
|
||||||
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, AssemblyLine.blockDetector.blockID);
|
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, AssemblyLine.recipeLoader.blockDetector.blockID);
|
||||||
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord + 1, this.zCoord, AssemblyLine.blockDetector.blockID);
|
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord + 1, this.zCoord, AssemblyLine.recipeLoader.blockDetector.blockID);
|
||||||
super.invalidate();
|
super.invalidate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class TileEntityConveyorBelt extends TileEntityAssembly implements IPacke
|
||||||
|
|
||||||
if (this.worldObj.isRemote && this.isRunning() && !this.worldObj.isBlockIndirectlyGettingPowered(this.xCoord, this.yCoord, this.zCoord))
|
if (this.worldObj.isRemote && this.isRunning() && !this.worldObj.isBlockIndirectlyGettingPowered(this.xCoord, this.yCoord, this.zCoord))
|
||||||
{
|
{
|
||||||
if (this.ticks % 10 == 0 && this.worldObj.isRemote && this.worldObj.getBlockId(this.xCoord - 1, this.yCoord, this.zCoord) != AssemblyLine.blockConveyorBelt.blockID && this.worldObj.getBlockId(xCoord, yCoord, zCoord - 1) != AssemblyLine.blockConveyorBelt.blockID)
|
if (this.ticks % 10 == 0 && this.worldObj.isRemote && this.worldObj.getBlockId(this.xCoord - 1, this.yCoord, this.zCoord) != AssemblyLine.recipeLoader.blockConveyorBelt.blockID && this.worldObj.getBlockId(xCoord, yCoord, zCoord - 1) != AssemblyLine.recipeLoader.blockConveyorBelt.blockID)
|
||||||
{
|
{
|
||||||
this.worldObj.playSound(this.xCoord, this.yCoord, this.zCoord, "mods.assemblyline.conveyor", 0.5f, 0.7f, true);
|
this.worldObj.playSound(this.xCoord, this.yCoord, this.zCoord, "mods.assemblyline.conveyor", 0.5f, 0.7f, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import dark.assembly.common.AssemblyLine;
|
import dark.assembly.common.AssemblyLine;
|
||||||
import dark.library.gui.SlotRestricted;
|
import dark.core.gui.SlotRestricted;
|
||||||
|
|
||||||
public class ContainerEncoder extends Container
|
public class ContainerEncoder extends Container
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ public class ContainerEncoder extends Container
|
||||||
this.tileEntity = encoder;
|
this.tileEntity = encoder;
|
||||||
|
|
||||||
// Disk
|
// Disk
|
||||||
this.addSlotToContainer(new SlotRestricted(encoder, 0, 80, 24 + Y_OFFSET, new ItemStack(AssemblyLine.itemDisk)));
|
this.addSlotToContainer(new SlotRestricted(encoder, 0, 80, 24 + Y_OFFSET, new ItemStack(AssemblyLine.recipeLoader.itemDisk)));
|
||||||
|
|
||||||
int var3;
|
int var3;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class SlotDisk extends Slot
|
||||||
|
|
||||||
public boolean isItemValid(ItemStack itemStack)
|
public boolean isItemValid(ItemStack itemStack)
|
||||||
{
|
{
|
||||||
return itemStack.itemID == AssemblyLine.itemDisk.itemID;
|
return itemStack.itemID == AssemblyLine.recipeLoader.itemDisk.itemID;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue