mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-14 01:04:11 +00:00
*Fixed redstone advanced machine container bug. *Removed unused methods from IEnergizedItem. *Added 'IPeripheral' CC support to IElectricMachine. *Removed tile entity-based texture system. *Fixed advanced electric machine active update. *Moved to TextureFX for machine animations. *Removed old textures from terrain.png and added new pictures for all animations. *Added CC support for machines and power units. *Removed texture preloads for non-existant textures. *Bumped version to 4.2.2!
70 lines
1.5 KiB
Java
70 lines
1.5 KiB
Java
package net.uberkat.obsidian.api;
|
|
|
|
import java.util.List;
|
|
|
|
import dan200.computer.api.IPeripheral;
|
|
|
|
import ic2.api.IWrenchable;
|
|
import net.minecraft.src.*;
|
|
import net.minecraftforge.common.ISidedInventory;
|
|
|
|
/**
|
|
* A group of common methods used by all Obsidian Ingots machines.
|
|
* @author AidanBrady
|
|
*
|
|
*/
|
|
public interface IElectricMachine extends IInventory, ISidedInventory, IWrenchable, INetworkedMachine, IPeripheral
|
|
{
|
|
/**
|
|
* Update call for machines. Use instead of updateEntity() - it's called every tick.
|
|
*/
|
|
public void onUpdate();
|
|
|
|
/**
|
|
* Whether or not this machine can operate.
|
|
* @return can operate
|
|
*/
|
|
public boolean canOperate();
|
|
|
|
/**
|
|
* Runs this machine's operation -- or smelts the item.
|
|
*/
|
|
public void operate();
|
|
|
|
/**
|
|
* Sends a tile entity packet to the server.
|
|
*/
|
|
public void sendPacket();
|
|
|
|
/**
|
|
* Sends a tile entity packet to the server with a defined range.
|
|
*/
|
|
public void sendPacketWithRange();
|
|
|
|
/**
|
|
* Gets the recipe vector from the machine tile entity.
|
|
* @return recipes
|
|
*/
|
|
public List getRecipes();
|
|
|
|
/**
|
|
* Gets the scaled charge level for the GUI.
|
|
* @param i - control
|
|
* @return scaled charge level
|
|
*/
|
|
public int getScaledChargeLevel(int i);
|
|
|
|
/**
|
|
* Gets the scaled progress for the GUI.
|
|
* @param i - control
|
|
* @return scaled progress
|
|
*/
|
|
public int getScaledProgress(int i);
|
|
|
|
/**
|
|
* Sets this machine's active state, sending a packet to the server if it differs from the previous update.
|
|
* @param active
|
|
*/
|
|
public void setActive(boolean active);
|
|
}
|