mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-20 12:19:55 +00:00
Added creative capacitor bank.
This commit is contained in:
1 parent
0b51a522e2
commit
70db4f38e8
10 files changed
+124
-69
No files matched your search
@@ -299,8 +299,13 @@ public class RenderUtil {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static List<ForgeDirection> getNonConectedEdgesForFace(IBlockAccess blockAccess, int x, int y, int z, ForgeDirection face) {
|
||||
return getNonConectedEdgesForFace(blockAccess, x, y, z, face, false);
|
||||
}
|
||||
|
||||
public static List<ForgeDirection> getNonConectedEdgesForFace(IBlockAccess blockAccess, int x, int y, int z, ForgeDirection face, boolean matchMetaData) {
|
||||
|
||||
Block block = blockAccess.getBlock(x, y, z);
|
||||
if(block == null) {
|
||||
return Collections.emptyList();
|
||||
@@ -316,13 +321,14 @@ public class RenderUtil {
|
||||
}
|
||||
List<ForgeDirection> result = new ArrayList<ForgeDirection>(4);
|
||||
for (EdgeNeighbour edge : edges) {
|
||||
if(blockAccess.getBlock(edge.bc.x, edge.bc.y, edge.bc.z) != block) {
|
||||
boolean matchingNeighbour = blockAccess.getBlock(edge.bc.x, edge.bc.y, edge.bc.z) == block;
|
||||
if(matchingNeighbour && matchMetaData) {
|
||||
matchingNeighbour = blockAccess.getBlockMetadata(x, y, z) == blockAccess.getBlockMetadata(edge.bc.x, edge.bc.y, edge.bc.z) ;
|
||||
}
|
||||
if(!matchingNeighbour) {
|
||||
result.add(edge.dir);
|
||||
}
|
||||
// else if(blockAccess.getBlockId(edge.bc.x + face.offsetX, edge.bc.y +
|
||||
// face.offsetY, edge.bc.z + face.offsetZ) == blockID) {
|
||||
// result.add(edge.dir); //corner
|
||||
// }
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user