mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-19 19:59:58 +00:00
Add IRedstoneConnectable to API to allow forced rs conduit connections
This commit is contained in:
1 parent
370f783373
commit
a8d734ddbb
7 files changed
+69
-33
No files matched your search
@@ -14,20 +14,22 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.TileEntityEio;
|
||||
import crazypants.enderio.api.redstone.IRedstoneConnectable;
|
||||
import crazypants.enderio.config.Config;
|
||||
import crazypants.util.BlockCoord;
|
||||
import crazypants.util.InventoryWrapper;
|
||||
import crazypants.util.ItemUtil;
|
||||
import crazypants.util.Lang;
|
||||
|
||||
public abstract class AbstractMachineEntity extends TileEntityEio implements ISidedInventory, IMachine, IRedstoneModeControlable,
|
||||
IIoConfigurable {
|
||||
public abstract class AbstractMachineEntity extends TileEntityEio implements ISidedInventory, IMachine, IRedstoneModeControlable,
|
||||
IRedstoneConnectable, IIoConfigurable {
|
||||
|
||||
public short facing;
|
||||
|
||||
@@ -64,7 +66,7 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
|
||||
public AbstractMachineEntity(SlotDefinition slotDefinition) {
|
||||
this.slotDefinition = slotDefinition;
|
||||
facing = 3;
|
||||
|
||||
|
||||
inventory = new ItemStack[slotDefinition.getNumSlots()];
|
||||
redstoneControlMode = RedstoneControlMode.IGNORE;
|
||||
soundRes = getSoundFor(getSoundName());
|
||||
@@ -102,7 +104,7 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
|
||||
faceModes.put(faceHit, mode);
|
||||
forceClientUpdate = true;
|
||||
notifyNeighbours = true;
|
||||
|
||||
|
||||
updateBlock();
|
||||
}
|
||||
|
||||
@@ -224,8 +226,6 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// --- Process Loop
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
@@ -275,8 +275,6 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
|
||||
|
||||
requiresClientSync |= processTasks(redstoneCheckPassed);
|
||||
|
||||
|
||||
|
||||
if(requiresClientSync) {
|
||||
|
||||
// this will cause 'getPacketDescription()' to be called and its result
|
||||
@@ -324,6 +322,7 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
|
||||
|
||||
BlockCoord loc = getLocation().getLocation(dir);
|
||||
TileEntity te = worldObj.getTileEntity(loc.x, loc.y, loc.z);
|
||||
|
||||
if(te == null) {
|
||||
return false;
|
||||
}
|
||||
@@ -602,8 +601,6 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
return null;
|
||||
@@ -669,5 +666,11 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
|
||||
public void onNeighborBlockChange(Block blockId) {
|
||||
redstoneStateDirty = true;
|
||||
}
|
||||
|
||||
|
||||
/* IRedstoneConnectable */
|
||||
|
||||
@Override
|
||||
public boolean shouldRedstoneConduitConnect(World world, int x, int y, int z, ForgeDirection from) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user