Included multipart prefab from core

This commit is contained in:
Robert 2013-12-28 21:54:20 -05:00
parent 99143865cc
commit cd5e2f15f1
5 changed files with 63 additions and 3 deletions

@ -1 +1 @@
Subproject commit 14f5f62bfc2541cd72b3780e4b2d817fb04ac206
Subproject commit 5418d6c015beef731551bf131879a399cb3cd8c1

View file

@ -4,7 +4,7 @@
<property file="build.properties" />
<property environment="env" />
<property name="file.core" value="[Unstable]AssemblyLine_v${version.mod.major}.${version.mod.minor}.${version.mod.revis}.${env.BUILD_NUMBER}.jar" />
<property name="file.core" value="[Indev]AssemblyLine_v${version.mod.major}.${version.mod.minor}.${version.mod.revis}.${env.BUILD_NUMBER}.jar" />
<target name="build">
<copy todir="${dir.development}">
<fileset dir="../Minecraft Forge Latest/" />

View file

@ -1,24 +1,48 @@
package com.builtbroken.assemblyline.crafting;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.minecraft.prefab.BlockMachine;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/** Advanced tiering of a crafting table adding advanced features such as visual crafting, and auto
* crafting. Original idea by Infinite
*
* @author DarkGuardsman */
public class BlockCraftingTable extends BlockMachine
{
@SideOnly(Side.CLIENT)
private Icon workbenchIconTop;
@SideOnly(Side.CLIENT)
private Icon workbenchIconFront;
public BlockCraftingTable()
{
super(AssemblyLine.CONFIGURATION, "CraftingTable", Material.rock);
}
@SideOnly(Side.CLIENT)
public Icon getIcon(int par1, int par2)
{
return par1 == 1 ? this.workbenchIconTop : (par1 == 0 ? Block.planks.getBlockTextureFromSide(par1) : (par1 != 2 && par1 != 4 ? this.blockIcon : this.workbenchIconFront));
}
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister)
{
this.blockIcon = par1IconRegister.registerIcon(this.getTextureName() + "_side");
this.workbenchIconTop = par1IconRegister.registerIcon(this.getTextureName() + "_top");
this.workbenchIconFront = par1IconRegister.registerIcon(this.getTextureName() + "_front");
}
@Override
public TileEntity createNewTileEntity(World world)
{

View file

@ -0,0 +1,37 @@
package com.builtbroken.assemblyline.multipart;
import net.minecraft.block.Block;
import codechicken.multipart.TMultiPart;
import codechicken.multipart.handler.MultipartProxy;
public abstract class PartAdvanced extends TMultiPart
{
protected long ticks = 0;
public void initiate()
{
}
@Override
public void update()
{
if (ticks == 0)
{
initiate();
}
if (ticks >= Long.MAX_VALUE)
{
ticks = 1;
}
ticks++;
}
@Override
public void onAdded()
{
world().notifyBlocksOfNeighborChange(x(), y(), z(), ((Block) MultipartProxy.block()).blockID);
}
}

View file

@ -10,7 +10,6 @@ import universalelectricity.api.energy.IEnergyNetwork;
import universalelectricity.api.vector.Vector3;
import universalelectricity.api.vector.VectorHelper;
import com.builtbroken.minecraft.multipart.PartAdvanced;
//@UniversalClass
public class PartBasicWire extends PartAdvanced implements IConductor