diff --git a/src/main/java/org/dynmap/hdmap/IsoHDPerspective.java b/src/main/java/org/dynmap/hdmap/IsoHDPerspective.java index 57562d83..41bb284b 100644 --- a/src/main/java/org/dynmap/hdmap/IsoHDPerspective.java +++ b/src/main/java/org/dynmap/hdmap/IsoHDPerspective.java @@ -76,6 +76,7 @@ public class IsoHDPerspective implements HDPerspective { private static final int CHEST_BLKTYPEID = 54; private static final int FENCE_BLKTYPEID = 85; + private static final int REDSTONE_BLKTYPEID = 55; private enum ChestData { SINGLE_WEST, SINGLE_SOUTH, SINGLE_EAST, SINGLE_NORTH, LEFT_WEST, LEFT_SOUTH, LEFT_EAST, LEFT_NORTH, RIGHT_WEST, RIGHT_SOUTH, RIGHT_EAST, RIGHT_NORTH @@ -386,6 +387,62 @@ public class IsoHDPerspective implements HDPerspective { return cd.ordinal(); } + /** + * Generate redstone wire model data: + * 0 = NSEW wire + * 1 = NS wire + * 2 = EW wire + * 3 = NE wire + * 4 = NW wire + * 5 = SE wire + * 6 = SW wire + * 7 = NSE wire + * 8 = NSW wire + * 9 = NEW wire + * 10 = SEW wire + * @param mapiter + * @return + */ + private int generateRedstoneWireBlockData(MapIterator mapiter) { + /* Check adjacent block IDs */ + int ids[] = { mapiter.getBlockTypeIDAt(BlockStep.Z_PLUS), /* To west */ + mapiter.getBlockTypeIDAt(BlockStep.X_PLUS), /* To south */ + mapiter.getBlockTypeIDAt(BlockStep.Z_MINUS), /* To east */ + mapiter.getBlockTypeIDAt(BlockStep.X_MINUS) }; /* To north */ + int flags = 0; + for(int i = 0; i < 4; i++) + if(ids[i] == REDSTONE_BLKTYPEID) flags |= (1<