changed base block file
This commit is contained in:
parent
4e9da6a76f
commit
c479ce22ac
12 changed files with 50 additions and 36 deletions
|
@ -72,10 +72,13 @@ public class ClientProxy extends CommonProxy
|
||||||
switch (ID)
|
switch (ID)
|
||||||
{
|
{
|
||||||
case GUI_IMPRINTER:
|
case GUI_IMPRINTER:
|
||||||
|
{
|
||||||
return new GuiImprinter(player.inventory, (TileEntityImprinter) tileEntity);
|
return new GuiImprinter(player.inventory, (TileEntityImprinter) tileEntity);
|
||||||
|
}
|
||||||
case GUI_ENCODER:
|
case GUI_ENCODER:
|
||||||
if (tileEntity != null && tileEntity instanceof TileEntityEncoder)
|
{
|
||||||
return new GuiEncoder(player.inventory, (TileEntityEncoder) tileEntity);
|
return new GuiEncoder(player.inventory, (TileEntityEncoder) tileEntity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,15 +91,13 @@ public class ClientProxy extends CommonProxy
|
||||||
return GuiScreen.isCtrlKeyDown();
|
return GuiScreen.isCtrlKeyDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Renders a laser beam from one power to another by a set color for a set time
|
||||||
* Renders a laser beam from one power to another by a set color for a set time
|
|
||||||
*
|
*
|
||||||
* @param world - world this laser is to be rendered in
|
* @param world - world this laser is to be rendered in
|
||||||
* @param position - start vector3
|
* @param position - start vector3
|
||||||
* @param target - end vector3
|
* @param target - end vector3
|
||||||
* @param color - color of the beam
|
* @param color - color of the beam
|
||||||
* @param age - life of the beam in 1/20 secs
|
* @param age - life of the beam in 1/20 secs */
|
||||||
*/
|
|
||||||
public void renderBeam(World world, Vector3 position, Vector3 target, Color color, int age)
|
public void renderBeam(World world, Vector3 position, Vector3 target, Color color, int age)
|
||||||
{
|
{
|
||||||
if (world.isRemote || FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
|
if (world.isRemote || FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
|
||||||
|
|
|
@ -19,9 +19,7 @@ public class BlockArmbot extends BlockALMachine
|
||||||
{
|
{
|
||||||
public BlockArmbot(int id)
|
public BlockArmbot(int id)
|
||||||
{
|
{
|
||||||
super(id, UniversalElectricity.machine);
|
super(id, UniversalElectricity.machine,"armbot");
|
||||||
this.setUnlocalizedName("armbot");
|
|
||||||
this.setCreativeTab(TabAssemblyLine.INSTANCE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -41,6 +41,7 @@ import assemblyline.common.armbot.command.CommandRotateTo;
|
||||||
import assemblyline.common.armbot.command.CommandUse;
|
import assemblyline.common.armbot.command.CommandUse;
|
||||||
import assemblyline.common.machine.TileEntityAssembly;
|
import assemblyline.common.machine.TileEntityAssembly;
|
||||||
import assemblyline.common.machine.encoder.ItemDisk;
|
import assemblyline.common.machine.encoder.ItemDisk;
|
||||||
|
import buildcraft.api.power.PowerProvider;
|
||||||
|
|
||||||
import com.google.common.io.ByteArrayDataInput;
|
import com.google.common.io.ByteArrayDataInput;
|
||||||
|
|
||||||
|
@ -991,5 +992,4 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,20 +2,26 @@ package assemblyline.common.block;
|
||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IconRegister;
|
import net.minecraft.client.renderer.texture.IconRegister;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.Icon;
|
import net.minecraft.util.Icon;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
import universalelectricity.prefab.block.BlockAdvanced;
|
import universalelectricity.prefab.block.BlockAdvanced;
|
||||||
import assemblyline.common.AssemblyLine;
|
import assemblyline.common.AssemblyLine;
|
||||||
|
import assemblyline.common.TabAssemblyLine;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import dark.core.api.INetworkPart;
|
||||||
|
|
||||||
public class BlockALMachine extends BlockAdvanced
|
public class BlockALMachine extends BlockAdvanced
|
||||||
{
|
{
|
||||||
public Icon machine_icon;
|
public Icon machine_icon;
|
||||||
|
|
||||||
public BlockALMachine(int id, Material material)
|
public BlockALMachine(int id, Material material, String name)
|
||||||
{
|
{
|
||||||
super(id, material);
|
super(id, material);
|
||||||
|
this.setUnlocalizedName(name);
|
||||||
|
this.setCreativeTab(TabAssemblyLine.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
@ -39,4 +45,28 @@ public class BlockALMachine extends BlockAdvanced
|
||||||
return this.machine_icon;
|
return this.machine_icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockAdded(World world, int x, int y, int z)
|
||||||
|
{
|
||||||
|
super.onBlockAdded(world, x, y, z);
|
||||||
|
|
||||||
|
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||||
|
|
||||||
|
if (tileEntity instanceof INetworkPart)
|
||||||
|
{
|
||||||
|
((INetworkPart) tileEntity).updateNetworkConnections();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNeighborBlockChange(World world, int x, int y, int z, int blockID)
|
||||||
|
{
|
||||||
|
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||||
|
|
||||||
|
if (tileEntity instanceof INetworkPart)
|
||||||
|
{
|
||||||
|
((INetworkPart) tileEntity).updateNetworkConnections();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -32,9 +32,7 @@ public class BlockCrate extends BlockALMachine
|
||||||
|
|
||||||
public BlockCrate(int id, int texture)
|
public BlockCrate(int id, int texture)
|
||||||
{
|
{
|
||||||
super(id, UniversalElectricity.machine);
|
super(id, UniversalElectricity.machine,"crate");
|
||||||
this.setUnlocalizedName("crate");
|
|
||||||
this.setCreativeTab(TabAssemblyLine.INSTANCE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|
|
@ -27,9 +27,7 @@ public class BlockTurntable extends BlockALMachine
|
||||||
|
|
||||||
public BlockTurntable(int par1)
|
public BlockTurntable(int par1)
|
||||||
{
|
{
|
||||||
super(par1, Material.piston);
|
super(par1, Material.piston,"turntable");
|
||||||
this.setUnlocalizedName("turntable");
|
|
||||||
this.setCreativeTab(TabAssemblyLine.INSTANCE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -27,9 +27,7 @@ public class BlockImprinter extends BlockALMachine
|
||||||
|
|
||||||
public BlockImprinter(int id, int texture)
|
public BlockImprinter(int id, int texture)
|
||||||
{
|
{
|
||||||
super(id, Material.wood);
|
super(id, Material.wood,"imprinter");
|
||||||
this.setUnlocalizedName("imprinter");
|
|
||||||
this.setCreativeTab(TabAssemblyLine.INSTANCE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|
|
@ -23,8 +23,7 @@ public abstract class BlockImprintable extends BlockALMachine
|
||||||
{
|
{
|
||||||
public BlockImprintable(String name, int id, Material material, CreativeTabs creativeTab)
|
public BlockImprintable(String name, int id, Material material, CreativeTabs creativeTab)
|
||||||
{
|
{
|
||||||
super(id, material);
|
super(id, material,name);
|
||||||
this.setUnlocalizedName(name);
|
|
||||||
this.setCreativeTab(creativeTab);
|
this.setCreativeTab(creativeTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,10 +30,8 @@ public class BlockConveyorBelt extends BlockALMachine
|
||||||
{
|
{
|
||||||
public BlockConveyorBelt(int id)
|
public BlockConveyorBelt(int id)
|
||||||
{
|
{
|
||||||
super(id, UniversalElectricity.machine);
|
super(id, UniversalElectricity.machine,"conveyorBelt");
|
||||||
this.setUnlocalizedName("conveyorBelt");
|
|
||||||
this.setBlockBounds(0, 0, 0, 1, 0.3f, 1);
|
this.setBlockBounds(0, 0, 0, 1, 0.3f, 1);
|
||||||
this.setCreativeTab(TabAssemblyLine.INSTANCE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,9 +16,7 @@ public class BlockCraneController extends BlockALMachine
|
||||||
{
|
{
|
||||||
public BlockCraneController(int id)
|
public BlockCraneController(int id)
|
||||||
{
|
{
|
||||||
super(id, UniversalElectricity.machine);
|
super(id, UniversalElectricity.machine,"craneController");
|
||||||
this.setUnlocalizedName("craneController");
|
|
||||||
this.setCreativeTab(TabAssemblyLine.INSTANCE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,9 +16,7 @@ public class BlockCraneFrame extends BlockALMachine
|
||||||
{
|
{
|
||||||
public BlockCraneFrame(int id)
|
public BlockCraneFrame(int id)
|
||||||
{
|
{
|
||||||
super(id, UniversalElectricity.machine);
|
super(id, UniversalElectricity.machine,"craneFrame");
|
||||||
this.setUnlocalizedName("craneFrame");
|
|
||||||
this.setCreativeTab(TabAssemblyLine.INSTANCE);
|
|
||||||
this.setBlockBounds(0.25f, 0.25f, 0.25f, 0.75f, 0.75f, 0.75f);
|
this.setBlockBounds(0.25f, 0.25f, 0.25f, 0.75f, 0.75f, 0.75f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,7 @@ public class BlockEncoder extends BlockALMachine
|
||||||
Icon encoder_bottom;
|
Icon encoder_bottom;
|
||||||
public BlockEncoder(int id, int texture)
|
public BlockEncoder(int id, int texture)
|
||||||
{
|
{
|
||||||
super(id, Material.wood);
|
super(id, Material.wood,"encoder");
|
||||||
this.setUnlocalizedName("encoder");
|
|
||||||
this.setCreativeTab(TabAssemblyLine.INSTANCE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|
Loading…
Reference in a new issue