Crafter shows direction it is placed

This commit is contained in:
Raoul Van den Berge
2016-05-08 16:31:26 +02:00
parent ace6a56ffe
commit d14aed63a4
4 changed files with 19 additions and 6 deletions

View File

@@ -108,7 +108,12 @@ public abstract class BlockBase extends Block {
if (tile instanceof TileBase) {
EnumFacing facing = BlockPistonBase.getFacingFromEntity(pos, player);
if (player.isSneaking() && (blockPlaced == RefinedStorageBlocks.IMPORTER || blockPlaced == RefinedStorageBlocks.EXPORTER || blockPlaced == RefinedStorageBlocks.EXTERNAL_STORAGE || blockPlaced == RefinedStorageBlocks.CONSTRUCTOR || blockPlaced == RefinedStorageBlocks.DESTRUCTOR)) {
if (player.isSneaking() && (blockPlaced == RefinedStorageBlocks.IMPORTER ||
blockPlaced == RefinedStorageBlocks.EXPORTER ||
blockPlaced == RefinedStorageBlocks.EXTERNAL_STORAGE ||
blockPlaced == RefinedStorageBlocks.CONSTRUCTOR ||
blockPlaced == RefinedStorageBlocks.DESTRUCTOR ||
blockPlaced == RefinedStorageBlocks.CRAFTER)) {
facing = facing.getOpposite();
}

View File

@@ -66,7 +66,7 @@ public class GuiCrafter extends GuiBase {
float scale = 0.5f;
GlStateManager.scale(scale, scale, 1);
drawString(calculateOffsetOnScale(x + (ItemPattern.isProcessing(pattern) ? 5 : 20), scale), calculateOffsetOnScale(y + 6, scale), text);
drawString(calculateOffsetOnScale(x + (ItemPattern.isProcessing(pattern) ? 1 : 20), scale), calculateOffsetOnScale(y + 6, scale), text);
GlStateManager.popMatrix();
}

View File

@@ -1,15 +1,18 @@
{
"forge_marker": 1,
"defaults": {
"model": "cube_all",
"model": "orientable",
"textures": {
"all": "refinedstorage:blocks/crafter"
"side": "refinedstorage:blocks/side",
"top": "refinedstorage:blocks/side",
"front": "refinedstorage:blocks/crafter"
}
},
"variants": {
"inventory": [
{
"transform": "forge:default-block"
"transform": "forge:default-block",
"y": 0
}
],
"connected": {
@@ -20,16 +23,22 @@
},
"direction": {
"north": {
"y": 0
},
"east": {
"y": 90
},
"south": {
"y": 180
},
"west": {
"y": 270
},
"up": {
"x": 270
},
"down": {
"x": 90
}
}
}