mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-24 05:54:27 +00:00
Add Immibis Microblocks support for conduits
This commit is contained in:
1 parent
712e1262ce
commit
9c315e7557
30 files changed
+1560
-19
No files matched your search
@@ -9,6 +9,10 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import mods.immibis.microblocks.api.EnumPartClass;
|
||||
import mods.immibis.microblocks.api.EnumPosition;
|
||||
import mods.immibis.microblocks.api.IMicroblockCoverSystem;
|
||||
import mods.immibis.microblocks.api.Part;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -233,6 +237,9 @@ public abstract class AbstractConduit implements IConduit {
|
||||
if(conduit == null) {
|
||||
return false;
|
||||
}
|
||||
if (MicroblocksUtil.supportMicroblocks() && isBlockedByMicroblocks(direction, conduit)) {
|
||||
return false;
|
||||
}
|
||||
return getConnectionMode(direction) != ConnectionMode.DISABLED && conduit.getConnectionMode(direction.getOpposite()) != ConnectionMode.DISABLED;
|
||||
}
|
||||
|
||||
@@ -241,6 +248,22 @@ public abstract class AbstractConduit implements IConduit {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean isBlockedByMicroblocks(ForgeDirection direction, IConduit conduit) {
|
||||
IMicroblockCoverSystem covers = getBundle().getCoverSystem();
|
||||
for (Part part : covers.getAllParts()) {
|
||||
if (part.type.getPartClass() == EnumPartClass.Panel) {
|
||||
return part.pos == EnumPosition.getFacePosition(direction.ordinal());
|
||||
}
|
||||
}
|
||||
covers = conduit.getBundle().getCoverSystem();
|
||||
for (Part part : covers.getAllParts()) {
|
||||
if (part.type.getPartClass() == EnumPartClass.Panel) {
|
||||
return part.pos == EnumPosition.getFacePosition(direction.getOpposite().ordinal());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<ForgeDirection> getExternalConnections() {
|
||||
return externalConnections;
|
||||
|
||||
@@ -6,6 +6,8 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import mods.immibis.core.api.multipart.IMultipartRenderingBlockMarker;
|
||||
import mods.immibis.core.api.multipart.IMultipartSystem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.ISound;
|
||||
@@ -36,6 +38,7 @@ import com.enderio.core.common.util.Util;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.Optional.Interface;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -72,8 +75,11 @@ import crazypants.enderio.network.PacketHandler;
|
||||
import crazypants.enderio.tool.ToolUtil;
|
||||
import crazypants.util.IFacade;
|
||||
|
||||
@Optional.Interface(iface = "powercrystals.minefactoryreloaded.api.rednet.IRedNetOmniNode", modid = "MineFactoryReloaded")
|
||||
public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade, IRotatableFacade, IRedNetOmniNode {
|
||||
@Optional.InterfaceList({
|
||||
@Interface(iface = "powercrystals.minefactoryreloaded.api.rednet.IRedNetOmniNode", modid = "MineFactoryReloaded"),
|
||||
@Interface(iface = "mods.immibis.core.api.multipart.IMultipartRenderingBlockMarker", modid = "ImmibisMicroblocks")
|
||||
})
|
||||
public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade, IRotatableFacade, IRedNetOmniNode, IMultipartRenderingBlockMarker {
|
||||
|
||||
private static final String KEY_CONNECTOR_ICON = "enderIO:conduitConnector";
|
||||
private static final String KEY_CONNECTOR_ICON_EXTERNAL = "enderIO:conduitConnectorExternal";
|
||||
@@ -132,6 +138,10 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer) {
|
||||
if (MicroblocksUtil.supportMicroblocks() && IM__addHitEffects(world, target, effectRenderer)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
IIcon tex = null;
|
||||
|
||||
TileConduitBundle cb = (TileConduitBundle) world.getTileEntity(target.blockX, target.blockY, target.blockZ);
|
||||
@@ -157,6 +167,10 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean addDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer) {
|
||||
if (MicroblocksUtil.supportMicroblocks() && IM__addDestroyEffects(world, x, y, z, meta, effectRenderer)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
IIcon tex = lastRemovedComponetIcon;
|
||||
byte b0 = 4;
|
||||
for (int j1 = 0; j1 < b0; ++j1) {
|
||||
@@ -291,8 +305,12 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade
|
||||
|
||||
@Override
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
||||
if (MicroblocksUtil.supportMicroblocks() && IM__isSideSolid(world, x, y, z, side)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(!(te instanceof IConduitBundle)) {
|
||||
if (!(te instanceof IConduitBundle)) {
|
||||
return false;
|
||||
}
|
||||
IConduitBundle con = (IConduitBundle) te;
|
||||
@@ -446,18 +464,26 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade
|
||||
|
||||
breakBlock = te.getConduits().isEmpty() && !te.hasFacade();
|
||||
|
||||
if(!world.isRemote && !player.capabilities.isCreativeMode) {
|
||||
if(!breakBlock) {
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
|
||||
// TODO no microblock sounds...not sure if fixable, need to contact immibis
|
||||
if (MicroblocksUtil.supportMicroblocks()) {
|
||||
IM__getDrops(drop, world, x, y, z, te.getEntity().getBlockMetadata(), 0);
|
||||
}
|
||||
|
||||
if (!world.isRemote && !player.capabilities.isCreativeMode) {
|
||||
for (ItemStack st : drop) {
|
||||
Util.dropItems(world, st, x, y, z, false);
|
||||
}
|
||||
}
|
||||
|
||||
if(!breakBlock) {
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
return false;
|
||||
if (breakBlock) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
return true;
|
||||
}
|
||||
world.setBlockToAir(x, y, z);
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean breakConduit(IConduitBundle te, List<ItemStack> drop, RaytraceResult rt, EntityPlayer player) {
|
||||
@@ -761,6 +787,10 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade
|
||||
@Override
|
||||
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB axisalignedbb, @SuppressWarnings("rawtypes") List arraylist,
|
||||
Entity par7Entity) {
|
||||
|
||||
if (MicroblocksUtil.supportMicroblocks()) {
|
||||
IM__addCollisionBoxesToList(world, x, y, z, axisalignedbb, arraylist, par7Entity);
|
||||
}
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(!(te instanceof IConduitBundle)) {
|
||||
@@ -849,16 +879,21 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade
|
||||
|
||||
@Override
|
||||
public MovingObjectPosition collisionRayTrace(World world, int x, int y, int z, Vec3 origin, Vec3 direction) {
|
||||
|
||||
RaytraceResult raytraceResult = doRayTrace(world, x, y, z, origin, direction, null);
|
||||
if(raytraceResult == null) {
|
||||
return null;
|
||||
MovingObjectPosition ret = null;
|
||||
if (raytraceResult != null) {
|
||||
ret = raytraceResult.movingObjectPosition;
|
||||
if (ret != null) {
|
||||
ret.hitInfo = raytraceResult.component;
|
||||
}
|
||||
}
|
||||
|
||||
if(raytraceResult.movingObjectPosition != null) {
|
||||
raytraceResult.movingObjectPosition.hitInfo = raytraceResult.component;
|
||||
|
||||
if (MicroblocksUtil.supportMicroblocks()) {
|
||||
return IM__collisionRayTrace(ret, world, x, y, z, origin, direction);
|
||||
}
|
||||
return raytraceResult.movingObjectPosition;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public RaytraceResult doRayTrace(World world, int x, int y, int z, EntityPlayer entityPlayer) {
|
||||
@@ -1032,4 +1067,41 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade
|
||||
IConduitBundle bundle = (IConduitBundle) te;
|
||||
return bundle.getConduit(IRedstoneConduit.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
ItemStack coverPick = IMultipartSystem.instance.hook_getPickBlock(target, world, x, y, z, player);
|
||||
if(coverPick != null)
|
||||
return coverPick;
|
||||
|
||||
return super.getPickBlock(target, world, x, y, z, player);
|
||||
}
|
||||
|
||||
// IM Hooks
|
||||
|
||||
private boolean IM__isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
||||
return IMultipartSystem.instance.hook_isSideSolid(world, x, y, z, side);
|
||||
}
|
||||
|
||||
private boolean IM__addDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer) {
|
||||
return IMultipartSystem.instance.hook_addDestroyEffects(world, x, y, z, meta, effectRenderer);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private boolean IM__addHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer) {
|
||||
return IMultipartSystem.instance.hook_addHitEffects(worldObj, target, effectRenderer);
|
||||
}
|
||||
|
||||
private MovingObjectPosition IM__collisionRayTrace(MovingObjectPosition cur, World world, int x, int y, int z, Vec3 src, Vec3 dst) {
|
||||
return IMultipartSystem.instance.hook_collisionRayTrace(cur, world, x, y, z, src, dst);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private void IM__addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB mask, List list, Entity entity) {
|
||||
IMultipartSystem.instance.hook_addCollisionBoxesToList(world, x, y, z, mask, list, entity);
|
||||
}
|
||||
|
||||
private ArrayList<ItemStack> IM__getDrops(List<ItemStack> cur, World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return IMultipartSystem.instance.hook_getDrops(cur, world, x, y, z, metadata, fortune);
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.gas.IGasHandler;
|
||||
import mods.immibis.microblocks.api.IMicroblockSupporterTile;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -27,9 +28,10 @@ import crazypants.enderio.power.IInternalPowerHandler;
|
||||
|
||||
@InterfaceList({
|
||||
@Interface(iface = "appeng.api.networking.IGridHost", modid = "appliedenergistics2"),
|
||||
@Interface(iface = "mekanism.api.gas.IGasHandler", modid = "MekanismAPI|gas")
|
||||
@Interface(iface = "mekanism.api.gas.IGasHandler", modid = "MekanismAPI|gas"),
|
||||
@Interface(iface = "mods.immibis.microblocks.api.IMicroblockSupporterTile", modid = "ImmibisMicroblocks")
|
||||
})
|
||||
public interface IConduitBundle extends IInternalPowerHandler, IFluidHandler, IItemDuct, IGasHandler, IGridHost {
|
||||
public interface IConduitBundle extends IInternalPowerHandler, IFluidHandler, IItemDuct, IGasHandler, IGridHost, IMicroblockSupporterTile {
|
||||
|
||||
TileEntity getEntity();
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package crazypants.enderio.conduit;
|
||||
|
||||
import mods.immibis.microblocks.api.EnumPosition;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional.Method;
|
||||
|
||||
public class MicroblocksUtil {
|
||||
|
||||
private static boolean useCheckPerformed = false;
|
||||
private static boolean supportMicroblocks = false;
|
||||
|
||||
public static boolean supportMicroblocks() {
|
||||
if (!useCheckPerformed) {
|
||||
supportMicroblocks = Loader.isModLoaded("ImmibisMicroblocks");
|
||||
useCheckPerformed = true;
|
||||
}
|
||||
return supportMicroblocks;
|
||||
}
|
||||
|
||||
@Method(modid = "ImmibisMicroblocks")
|
||||
public static ForgeDirection posToDir(EnumPosition pos) {
|
||||
switch(pos) {
|
||||
case FaceNX:
|
||||
return ForgeDirection.WEST;
|
||||
case FaceNY:
|
||||
return ForgeDirection.DOWN;
|
||||
case FaceNZ:
|
||||
return ForgeDirection.NORTH;
|
||||
case FacePX:
|
||||
return ForgeDirection.EAST;
|
||||
case FacePY:
|
||||
return ForgeDirection.UP;
|
||||
case FacePZ:
|
||||
return ForgeDirection.SOUTH;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,10 +9,21 @@ import java.util.Set;
|
||||
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mods.immibis.microblocks.api.EnumPartClass;
|
||||
import mods.immibis.microblocks.api.EnumPosition;
|
||||
import mods.immibis.microblocks.api.IMicroblockCoverSystem;
|
||||
import mods.immibis.microblocks.api.IMicroblockSystem;
|
||||
import mods.immibis.microblocks.api.MicroblockAPIUtils;
|
||||
import mods.immibis.microblocks.api.Part;
|
||||
import mods.immibis.microblocks.api.PartType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@@ -23,7 +34,9 @@ import appeng.api.networking.IGridNode;
|
||||
import appeng.api.util.AECableType;
|
||||
|
||||
import com.enderio.core.client.render.BoundingBox;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional.Method;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -72,9 +85,13 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
|
||||
private FacadeRenderState facadeRenderAs;
|
||||
|
||||
private ConduitDisplayMode lastMode = ConduitDisplayMode.ALL;
|
||||
|
||||
|
||||
private boolean supportsMicroblocks;
|
||||
private Object covers;
|
||||
|
||||
public TileConduitBundle() {
|
||||
blockType = EnderIO.blockConduitBundle;
|
||||
this.blockType = EnderIO.blockConduitBundle;
|
||||
initMicroblocks();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -108,6 +125,10 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
|
||||
}
|
||||
nbtRoot.setInteger("facadeMeta", facadeMeta);
|
||||
nbtRoot.setShort("nbtVersion", NBT_VERSION);
|
||||
|
||||
if (supportsMicroblocks) {
|
||||
writeMicroblocksToNBT(nbtRoot);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -143,6 +164,9 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
|
||||
clientUpdated = true;
|
||||
}
|
||||
|
||||
if (supportsMicroblocks) {
|
||||
readMicroblocksFromNBT(nbtRoot);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -890,4 +914,127 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
|
||||
public boolean displayPower() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Immibis Microblocks
|
||||
|
||||
private void initMicroblocks() {
|
||||
this.supportsMicroblocks = Loader.isModLoaded("ImmibisMicroblocks");
|
||||
if (this.supportsMicroblocks) {
|
||||
createCovers();
|
||||
}
|
||||
}
|
||||
|
||||
private void createCovers() {
|
||||
IMicroblockSystem ims = MicroblockAPIUtils.getMicroblockSystem();
|
||||
if (ims != null) {
|
||||
covers = ims.createMicroblockCoverSystem(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "ImmibisMicroblocks")
|
||||
public boolean isPlacementBlocked(PartType<?> part, EnumPosition pos) {
|
||||
EnumPartClass type = part.getPartClass();
|
||||
if (type == EnumPartClass.Strip) {
|
||||
// No slab strips or pillars
|
||||
return part.getSize() > 0.3 || pos == EnumPosition.PostX || pos == EnumPosition.PostY || pos == EnumPosition.PostZ;
|
||||
} else if (type == EnumPartClass.Panel || type == EnumPartClass.HollowPanel) {
|
||||
return part.getSize() > 0.3;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "ImmibisMicroblocks")
|
||||
public IMicroblockCoverSystem getCoverSystem() {
|
||||
return (IMicroblockCoverSystem) covers;
|
||||
}
|
||||
|
||||
private void writeMicroblocksToNBT(NBTTagCompound tag) {
|
||||
if (covers != null) {
|
||||
((IMicroblockCoverSystem) covers).writeToNBT(tag);
|
||||
}
|
||||
}
|
||||
|
||||
private void readMicroblocksFromNBT(NBTTagCompound tag) {
|
||||
if (covers != null) {
|
||||
((IMicroblockCoverSystem) covers).readFromNBT(tag);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "ImmibisMicroblocks")
|
||||
public Packet getDescriptionPacket() {
|
||||
if (covers == null)
|
||||
return null;
|
||||
|
||||
S35PacketUpdateTileEntity p = (S35PacketUpdateTileEntity) super.getDescriptionPacket();
|
||||
|
||||
NBTTagCompound tag = p.func_148857_g();
|
||||
tag.setByteArray("C", ((IMicroblockCoverSystem) covers).writeDescriptionBytes());
|
||||
return p;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "ImmibisMicroblocks")
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
super.onDataPacket(net, pkt);
|
||||
if (covers != null) {
|
||||
((IMicroblockCoverSystem) covers).readDescriptionBytes(pkt.func_148857_g().getByteArray("C"), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMicroblocksChanged() {
|
||||
Set<ForgeDirection> needUpdates = EnumSet.allOf(ForgeDirection.class);
|
||||
for (Part p : getCoverSystem().getAllParts()) {
|
||||
if (p.type.getPartClass() == EnumPartClass.Panel) {
|
||||
ForgeDirection dir = MicroblocksUtil.posToDir(p.pos);
|
||||
updateConnections(dir, true);
|
||||
needUpdates.remove(dir);
|
||||
}
|
||||
}
|
||||
for (ForgeDirection dir : needUpdates) {
|
||||
updateConnections(dir, false);
|
||||
}
|
||||
|
||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType());
|
||||
updateBlock();
|
||||
}
|
||||
|
||||
private void updateConnections(ForgeDirection dir, boolean remove) {
|
||||
TileEntity neighbor = getLocation().getLocation(dir).getTileEntity(worldObj);
|
||||
IConduitBundle neighborBundle = (IConduitBundle) (neighbor instanceof IConduitBundle ? neighbor : null);
|
||||
for (IConduit c : getConduits()) {
|
||||
if (remove) {
|
||||
removeConnection(dir, c);
|
||||
} else if (neighborBundle != null) {
|
||||
addConnection(dir, c, neighborBundle.getConduit(c.getBaseConduitType()));
|
||||
}
|
||||
c.connectionsChanged();
|
||||
}
|
||||
dir = dir.getOpposite();
|
||||
if (neighbor instanceof IConduitBundle) {
|
||||
for (IConduit c : ((TileConduitBundle) neighbor).getConduits()) {
|
||||
if (remove) {
|
||||
removeConnection(dir, c);
|
||||
} else if (neighborBundle != null) {
|
||||
addConnection(dir, neighborBundle.getConduit(c.getBaseConduitType()), c);
|
||||
}
|
||||
c.connectionsChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void removeConnection(ForgeDirection dir, IConduit c) {
|
||||
if (c.getConduitConnections().contains(dir)) {
|
||||
c.conduitConnectionRemoved(dir);
|
||||
}
|
||||
}
|
||||
|
||||
private void addConnection(ForgeDirection dir, IConduit c, IConduit connectingTo) {
|
||||
if (!c.getConduitConnections().contains(dir) && connectingTo.canConnectToConduit(dir, c)) {
|
||||
c.conduitConnectionAdded(dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user