Auto-Sync
This commit is contained in:
parent
cfc0ef4a6e
commit
6dea7410b2
4 changed files with 11 additions and 26 deletions
|
@ -14,7 +14,6 @@ import dark.core.prefab.invgui.GuiButtonImage.ButtonIcon;
|
|||
|
||||
public class GuiEncoderCoder extends GuiEncoderBase
|
||||
{
|
||||
public static final ResourceLocation TEXTURE_CODE_BACK = new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.GUI_DIRECTORY + "gui_encoder_coder.png");
|
||||
private GuiTaskList taskListGui;
|
||||
GuiButtonImage left, right, up, down;
|
||||
GuiButton newTask, newTask2;
|
||||
|
@ -165,7 +164,7 @@ public class GuiEncoderCoder extends GuiEncoderBase
|
|||
{
|
||||
super.drawGuiContainerForegroundLayer(x, y);
|
||||
taskListGui.drawGuiContainerForegroundLayer(this.mc, x, y);
|
||||
if(!this.insertingTask)
|
||||
if (!this.insertingTask)
|
||||
{
|
||||
this.helpMessage = "";
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ public abstract class TileEntityAssembly extends TileEntityEnergyMachine impleme
|
|||
@Override
|
||||
public float getPartMaxEnergy()
|
||||
{
|
||||
return this.MAX_WATTS;
|
||||
return this.MAX_JOULES_STORED;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,7 +2,6 @@ package dark.assembly.machine.encoder;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -15,21 +14,14 @@ import com.google.common.io.ByteArrayDataInput;
|
|||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
import dark.api.al.coding.IProcessTask;
|
||||
import dark.api.al.coding.IProgram;
|
||||
import dark.api.al.coding.ITask;
|
||||
import dark.api.al.coding.TaskRegistry;
|
||||
import dark.assembly.armbot.Program;
|
||||
import dark.assembly.armbot.command.TaskDrop;
|
||||
import dark.assembly.armbot.command.TaskGOTO;
|
||||
import dark.assembly.armbot.command.TaskGive;
|
||||
import dark.assembly.armbot.command.TaskGrabItem;
|
||||
import dark.assembly.armbot.command.TaskIF;
|
||||
import dark.assembly.armbot.command.TaskRotateTo;
|
||||
import dark.core.common.DarkMain;
|
||||
import dark.core.network.PacketHandler;
|
||||
import dark.core.prefab.machine.TileEntityMachine;
|
||||
import dark.core.prefab.machine.TileEntityMachine.SimplePacketTypes;
|
||||
|
||||
public class TileEntityEncoder extends TileEntityMachine implements ISidedInventory
|
||||
{
|
||||
|
@ -179,12 +171,9 @@ public class TileEntityEncoder extends TileEntityMachine implements ISidedInvent
|
|||
|
||||
/** Sends a gui packet only to the given player */
|
||||
@Override
|
||||
public void sendGUIPacket(EntityPlayer entity)
|
||||
public Packet getGUIPacket()
|
||||
{
|
||||
if (entity != null)
|
||||
{
|
||||
PacketDispatcher.sendPacketToPlayer(this.getDescriptionPacket(), (Player) entity);
|
||||
}
|
||||
return this.getDescriptionPacket();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package dark.assembly.machine.processor;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
@ -19,7 +18,7 @@ import dark.core.prefab.invgui.InvChest;
|
|||
import dark.core.prefab.machine.TileEntityEnergyMachine;
|
||||
|
||||
/** Basic A -> B recipe processor machine designed mainly to handle ore blocks
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public class TileEntityProcessor extends TileEntityEnergyMachine
|
||||
{
|
||||
|
@ -39,8 +38,8 @@ public class TileEntityProcessor extends TileEntityEnergyMachine
|
|||
if (this.processorData == null)
|
||||
{
|
||||
this.processorData = ProcessorData.values()[this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord) / 4];
|
||||
this.WATTS_PER_TICK = processorData.wattPerTick;
|
||||
this.MAX_WATTS = this.WATTS_PER_TICK * 20;
|
||||
this.JOULES_PER_TICK = processorData.wattPerTick;
|
||||
this.MAX_JOULES_STORED = this.JOULES_PER_TICK * 20;
|
||||
|
||||
this.processingTime = processorData.processingTicks;
|
||||
}
|
||||
|
@ -273,12 +272,10 @@ public class TileEntityProcessor extends TileEntityEnergyMachine
|
|||
}
|
||||
|
||||
@Override
|
||||
public void sendGUIPacket(EntityPlayer entity)
|
||||
public Packet getGUIPacket()
|
||||
{
|
||||
if (!this.worldObj.isRemote && entity instanceof EntityPlayerMP)
|
||||
{
|
||||
((EntityPlayerMP) entity).playerNetServerHandler.sendPacketToPlayer(PacketHandler.instance().getTilePacket(this.getChannel(), this, SimplePacketTypes.GUI.name, this.processingTicks, this.processingTime, this.energyStored));
|
||||
}
|
||||
return PacketHandler.instance().getTilePacket(this.getChannel(), this, SimplePacketTypes.GUI.name, this.processingTicks, this.processingTime, this.energyStored);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue