mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-20 04:09:43 +00:00
Added support for connected texture facades with chisel mod. This is dependant on changes being pulled into chisel.
This commit is contained in:
1 parent
a85b9a282e
commit
8ce3b77fb9
2 files changed
+40
-1
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package crazypants.enderio.conduit;
|
||||
|
||||
import info.jbcs.minecraft.chisel.api.IFacade;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -52,7 +54,7 @@ import crazypants.enderio.network.PacketHandler;
|
||||
import crazypants.render.BoundingBox;
|
||||
import crazypants.util.Util;
|
||||
|
||||
public class BlockConduitBundle extends BlockEio implements IGuiHandler {
|
||||
public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade {
|
||||
|
||||
private static final String KEY_CONNECTOR_ICON = "enderIO:conduitConnector";
|
||||
|
||||
@@ -813,4 +815,28 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler {
|
||||
return hits;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFacadeMetadata(IBlockAccess world, int x, int y, int z, int side) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(!(te instanceof IConduitBundle)) {
|
||||
return 0;
|
||||
}
|
||||
IConduitBundle cb = (IConduitBundle)te;
|
||||
return cb.getFacadeMetadata();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getFacade(IBlockAccess world, int x, int y, int z, int side) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(!(te instanceof IConduitBundle)) {
|
||||
return this;
|
||||
}
|
||||
IConduitBundle cb = (IConduitBundle)te;
|
||||
Block res = cb.getFacadeId();
|
||||
if(res == null) {
|
||||
return this;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package info.jbcs.minecraft.chisel.api;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public interface IFacade {
|
||||
|
||||
int getFacadeMetadata(IBlockAccess world, int x, int y, int z, int side);
|
||||
|
||||
Block getFacade(IBlockAccess world, int x, int y, int z, int side);
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user