Skip to content

Commit

Permalink
Fix meta not being considered for book structures
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Oct 9, 2016
1 parent 92d60d9 commit c6c923d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
Expand Up @@ -54,15 +54,13 @@ public ElementStructure(int x, int y, int width, int height, int[] size, BlockDa
}

boolean canTick = true;
boolean showCompleted = false;
int tick = 0;

float rotX = 0;
float rotY = 0;
float rotZ = 0;
List<String> componentTooltip;

//ItemStack[][][] structureData;
StructureInfo structureData;
StructureBlockAccess blockAccess;

Expand All @@ -88,7 +86,7 @@ public void init(int[] size, BlockData[] data) {
for(int sz = 0; sz < size[2]; sz++) {
for(BlockData blockData : data) {
if(inside(sx, sy, sz, blockData.pos, blockData.endPos)) {
structure[sy][sx][sz] = new ItemStack(Block.getBlockFromName(blockData.block));
structure[sy][sx][sz] = new ItemStack(Block.getBlockFromName(blockData.block), 1, blockData.meta);
}
}
}
Expand All @@ -101,8 +99,8 @@ public void init(int[] size, BlockData[] data) {

rotX = 25;
rotY = -45;

/*boolean canRenderFormed = multiblock.canRenderFormedStructure();
/*
boolean canRenderFormed = multiblock.canRenderFormedStructure();
// yOff = (structureHeight-1)*12+structureWidth*5+structureLength*5+16;
// yOff = Math.max(48, yOff);
float f = (float)Math.sqrt(structureHeight*structureHeight + structureWidth*structureWidth + structureLength*structureLength);
Expand All @@ -117,7 +115,7 @@ public void init(int[] size, BlockData[] data) {
{
pageButtons.add(new GuiButtonManualNavigation(gui, 101, x+4,y+yOff/2-(canRenderFormed?14:8)-16, 10,16, 3));
pageButtons.add(new GuiButtonManualNavigation(gui, 102, x+4,y+yOff/2+(canRenderFormed?14:8), 10,16, 2));
}*/
}
/*
IngredientStack[] totalMaterials = this.multiblock.getTotalMaterials();
if(false && false)
Expand Down Expand Up @@ -189,7 +187,6 @@ public void draw(int mouseX, int mouseY, float partialTicks, FontRenderer fontRe
}
}

canTick = false;
if(canTick) {
if(++tick % 20 == 0) {
structureData.step();
Expand Down
Expand Up @@ -4,27 +4,31 @@
{
"pos": [1, 0, 1],
"endPos": [3, 0, 3],
"block": "minecraft:stone"
"block": "minecraft:stonebrick"
},
{
"pos": [0, 1, 1],
"endPos": [0, 2, 3],
"block": "minecraft:stone"
"block": "minecraft:stonebrick",
"meta": 0
},
{
"pos": [4, 1, 1],
"endPos": [4, 2, 3],
"block": "minecraft:stone"
"block": "minecraft:stonebrick",
"meta": 1
},
{
"pos": [1, 1, 0],
"endPos": [3, 2, 0],
"block": "minecraft:stone"
"block": "minecraft:stonebrick",
"meta": 2
},
{
"pos": [1, 1, 4],
"endPos": [3, 2, 4],
"block": "minecraft:stone"
"block": "minecraft:stonebrick",
"meta": 3
},
{
"pos": [2, 2, 2],
Expand Down

0 comments on commit c6c923d

Please sign in to comment.