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

@@ -4,7 +4,6 @@
WIP WIP
**TODO** **TODO**
- Crafter direction
- Textures - Textures
- Update wiki - Update wiki

View File

@@ -108,7 +108,12 @@ public abstract class BlockBase extends Block {
if (tile instanceof TileBase) { if (tile instanceof TileBase) {
EnumFacing facing = BlockPistonBase.getFacingFromEntity(pos, player); 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(); facing = facing.getOpposite();
} }

View File

@@ -66,7 +66,7 @@ public class GuiCrafter extends GuiBase {
float scale = 0.5f; float scale = 0.5f;
GlStateManager.scale(scale, scale, 1); 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(); GlStateManager.popMatrix();
} }

View File

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