Fixed errors in Armbot
This commit is contained in:
parent
660288b230
commit
ede36bfead
8 changed files with 41 additions and 25 deletions
|
@ -17,6 +17,8 @@ import resonantinduction.core.resource.ResourceGenerator;
|
|||
import resonantinduction.core.resource.fluid.BlockFluidMixture;
|
||||
import resonantinduction.core.resource.fluid.TileFluidMixture;
|
||||
import resonantinduction.core.resource.item.ItemDust;
|
||||
import calclavia.lib.multiblock.link.BlockMulti;
|
||||
import calclavia.lib.multiblock.link.TileMultiBlockPart;
|
||||
import calclavia.lib.network.PacketHandler;
|
||||
import calclavia.lib.network.PacketTile;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
|
@ -65,6 +67,8 @@ public class ResonantInduction
|
|||
/**
|
||||
* Blocks and Items
|
||||
*/
|
||||
public static BlockMulti blockMulti;
|
||||
|
||||
public static ItemDust itemDust;
|
||||
public static Block blockFluidMixture;
|
||||
|
||||
|
@ -85,6 +89,8 @@ public class ResonantInduction
|
|||
|
||||
Settings.CONFIGURATION.load();
|
||||
|
||||
blockMulti = new BlockMulti(Settings.getNextBlockID()).setPacketType(PACKET_TILE);
|
||||
|
||||
MIXTURE = new Fluid("mixture");
|
||||
FluidRegistry.registerFluid(MIXTURE);
|
||||
blockFluidMixture = new BlockFluidMixture(Settings.getNextBlockID(), MIXTURE);
|
||||
|
@ -93,6 +99,9 @@ public class ResonantInduction
|
|||
itemDust = new ItemDust(Settings.getNextItemID());
|
||||
GameRegistry.registerItem(itemDust, itemDust.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerTileEntity(TileMultiBlockPart.class, "TileEntityMultiBlockPart");
|
||||
GameRegistry.registerBlock(blockMulti, "blockMulti");
|
||||
|
||||
GameRegistry.registerBlock(blockFluidMixture, blockFluidMixture.getUnlocalizedName());
|
||||
GameRegistry.registerTileEntity(TileFluidMixture.class, blockFluidMixture.getUnlocalizedName());
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.network.packet.Packet;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.network.ISimplePacketReceiver;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
|
@ -183,7 +184,7 @@ public abstract class TileEntityMachine extends TileEntityInv implements ISidedI
|
|||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
this.writeToNBT(tag);
|
||||
PacketHandler.sendPacketToClients(PacketHandler.getTilePacket(this.getChannel(), SimplePacketTypes.NBT.name, this, tag), worldObj, new Vector3(this), 64);
|
||||
PacketHandler.sendPacketToClients(ResonantInduction.PACKET_TILE.getPacket(this, SimplePacketTypes.NBT.name, this, tag), worldObj, new Vector3(this), 64);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,7 +193,7 @@ public abstract class TileEntityMachine extends TileEntityInv implements ISidedI
|
|||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
PacketHandler.sendPacketToClients(PacketHandler.getTilePacket(this.getChannel(), SimplePacketTypes.RUNNING.name, this, this.functioning), worldObj, new Vector3(this), 64);
|
||||
PacketHandler.sendPacketToClients(ResonantInduction.PACKET_TILE.getPacket(this, SimplePacketTypes.RUNNING.name, this, this.functioning), worldObj, new Vector3(this), 64);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,9 +11,11 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.prefab.block.BlockMachine;
|
||||
import resonantinduction.old.client.render.BlockRenderingHandler;
|
||||
import resonantinduction.old.client.render.RenderArmbot;
|
||||
import calclavia.lib.multiblock.link.IBlockActivate;
|
||||
import calclavia.lib.multiblock.link.IMultiBlock;
|
||||
|
||||
import com.builtbroken.common.Pair;
|
||||
|
@ -42,7 +44,7 @@ public class BlockArmbot extends BlockMachine implements IExtraBlockInfo
|
|||
|
||||
if (tileEntity instanceof IMultiBlock)
|
||||
{
|
||||
DarkCore.multiBlock.createMultiBlockStructure((IMultiBlock) tileEntity);
|
||||
ResonantInduction.blockMulti.createMultiBlockStructure((IMultiBlock) tileEntity);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,9 +53,9 @@ public class BlockArmbot extends BlockMachine implements IExtraBlockInfo
|
|||
{
|
||||
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
|
||||
if (tileEntity instanceof IBlockActivated)
|
||||
if (tileEntity instanceof IBlockActivate)
|
||||
{
|
||||
return ((IBlockActivated) tileEntity).onActivated(player);
|
||||
return ((IBlockActivate) tileEntity).onActivated(player);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -67,7 +69,7 @@ public class BlockArmbot extends BlockMachine implements IExtraBlockInfo
|
|||
if (tileEntity instanceof TileEntityArmbot)
|
||||
{
|
||||
((TileEntityArmbot) tileEntity).dropHeldObject();
|
||||
DarkCore.multiBlock.destroyMultiBlockStructure((TileEntityArmbot) tileEntity);
|
||||
ResonantInduction.blockMulti.destroyMultiBlockStructure((TileEntityArmbot) tileEntity);
|
||||
}
|
||||
this.dropBlockAsItem_do(world, x, y, z, new ItemStack(this));
|
||||
super.breakBlock(world, x, y, z, par5, par6);
|
||||
|
|
|
@ -301,7 +301,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
|
|||
@Override
|
||||
public Packet getDescriptionPacket()
|
||||
{
|
||||
return ResonantInduction.getTilePacket().getPacket(this, "armbot", this.functioning, this.targetYaw, this.targetPitch, this.actualYaw, this.actualPitch);
|
||||
return ResonantInduction.PACKET_TILE.getPacket(this, "armbot", this.functioning, this.targetYaw, this.targetPitch, this.actualYaw, this.actualPitch);
|
||||
}
|
||||
|
||||
public void sendGrabItemToClient()
|
||||
|
|
|
@ -16,6 +16,7 @@ import resonantinduction.old.api.coding.args.ArgumentIntData;
|
|||
import universalelectricity.api.vector.Vector2;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.utility.InvInteractionHelper;
|
||||
import calclavia.lib.utility.MathUtility;
|
||||
|
||||
import com.builtbroken.common.science.units.UnitHelper;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import resonantinduction.electrical.armbot.TaskBaseProcess;
|
|||
import resonantinduction.old.api.IArmbot;
|
||||
import resonantinduction.old.api.coding.args.ArgumentIntData;
|
||||
import universalelectricity.api.vector.Vector2;
|
||||
import calclavia.lib.utility.MathUtility;
|
||||
|
||||
import com.builtbroken.common.science.units.UnitHelper;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import resonantinduction.electrical.armbot.TaskBaseProcess;
|
|||
import resonantinduction.old.api.IArmbot;
|
||||
import resonantinduction.old.api.coding.args.ArgumentIntData;
|
||||
import universalelectricity.api.vector.Vector2;
|
||||
import calclavia.lib.utility.MathUtility;
|
||||
|
||||
import com.builtbroken.common.science.units.UnitHelper;
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import resonantinduction.old.api.coding.args.ArgumentIntData;
|
|||
import universalelectricity.api.vector.Vector2;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.utility.InvInteractionHelper;
|
||||
import calclavia.lib.utility.MathUtility;
|
||||
|
||||
import com.builtbroken.common.science.units.UnitHelper;
|
||||
|
||||
|
|
Loading…
Reference in a new issue