Crafter shows direction it is placed
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
WIP
|
||||
|
||||
**TODO**
|
||||
- Crafter direction
|
||||
- Textures
|
||||
- Update wiki
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user