Exporter model

This commit is contained in:
Raoul Van den Berge
2016-07-09 01:48:37 +02:00
parent 2c5e543fc7
commit a802df3ccd
10 changed files with 1777 additions and 22 deletions

View File

@@ -10,6 +10,7 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import refinedstorage.api.network.INetworkMaster;
import refinedstorage.api.network.INetworkNode;
import refinedstorage.tile.TileBase;
import refinedstorage.tile.TileCable;
public class BlockCable extends BlockNode {
@@ -51,18 +52,26 @@ public class BlockCable extends BlockNode {
@Override
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) {
return super.getActualState(state, world, pos)
.withProperty(NORTH, hasConnectionWith(world, pos.north()))
.withProperty(EAST, hasConnectionWith(world, pos.east()))
.withProperty(SOUTH, hasConnectionWith(world, pos.south()))
.withProperty(WEST, hasConnectionWith(world, pos.west()))
.withProperty(UP, hasConnectionWith(world, pos.up()))
.withProperty(DOWN, hasConnectionWith(world, pos.down()));
.withProperty(NORTH, hasConnectionWith(world, pos, pos.north()))
.withProperty(EAST, hasConnectionWith(world, pos, pos.east()))
.withProperty(SOUTH, hasConnectionWith(world, pos, pos.south()))
.withProperty(WEST, hasConnectionWith(world, pos, pos.west()))
.withProperty(UP, hasConnectionWith(world, pos, pos.up()))
.withProperty(DOWN, hasConnectionWith(world, pos, pos.down()));
}
public static boolean hasConnectionWith(IBlockAccess world, BlockPos pos) {
private boolean hasConnectionWith(IBlockAccess world, BlockPos basePos, BlockPos pos) {
TileEntity tile = world.getTileEntity(pos);
return tile instanceof INetworkMaster || tile instanceof INetworkNode;
if (tile instanceof INetworkMaster || tile instanceof INetworkNode) {
if (getPlacementType() != null) {
return ((TileBase) world.getTileEntity(basePos)).getFacingTile() != tile;
}
return true;
}
return false;
}
@Override

View File

@@ -12,7 +12,7 @@ import refinedstorage.RefinedStorage;
import refinedstorage.RefinedStorageGui;
import refinedstorage.tile.TileExporter;
public class BlockExporter extends BlockNode {
public class BlockExporter extends BlockCable {
public BlockExporter() {
super("exporter");
}
@@ -30,7 +30,7 @@ public class BlockExporter extends BlockNode {
return true;
}
@Override
public EnumPlacementType getPlacementType() {
return EnumPlacementType.ANY;

View File

@@ -1,38 +1,81 @@
{
"forge_marker": 1,
"defaults": {
"model": "orientable",
"textures": {
"side": "refinedstorage:blocks/side",
"top": "refinedstorage:blocks/side",
"front": "refinedstorage:blocks/exporter"
}
"all": "refinedstorage:blocks/cable",
"particle": "refinedstorage:blocks/cable",
"line": "refinedstorage:blocks/importer_exporter"
},
"model": "refinedstorage:cable_core",
"uvlock": true
},
"variants": {
"inventory": [
{
"y": 0,
"model": "refinedstorage:exporter",
"transform": "forge:default-block"
}
],
"direction": {
"north": {
"y": 0
"submodel": "refinedstorage:exporter_north"
},
"east": {
"y": 90
"submodel": "refinedstorage:exporter_east"
},
"south": {
"y": 180
"submodel": "refinedstorage:exporter_south"
},
"west": {
"y": 270
"submodel": "refinedstorage:exporter_west"
},
"up": {
"x": 270
"submodel": "refinedstorage:exporter_up"
},
"down": {
"x": 90
"submodel": "refinedstorage:exporter_down"
}
},
"north": {
"true": {
"submodel": "refinedstorage:cable_north"
},
"false": {
}
},
"east": {
"true": {
"submodel": "refinedstorage:cable_east"
},
"false": {
}
},
"south": {
"true": {
"submodel": "refinedstorage:cable_south"
},
"false": {
}
},
"west": {
"true": {
"submodel": "refinedstorage:cable_west"
},
"false": {
}
},
"up": {
"true": {
"submodel": "refinedstorage:cable_up"
},
"false": {
}
},
"down": {
"true": {
"submodel": "refinedstorage:cable_down"
},
"false": {
}
}
}

View File

@@ -0,0 +1,419 @@
{
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"elements": [
{
"name": "Line1",
"from": [
6.0,
6.0,
0.0
],
"to": [
10.0,
10.0,
2.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
}
}
},
{
"name": "Line2",
"from": [
5.0,
5.0,
2.0
],
"to": [
11.0,
11.0,
4.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
}
}
},
{
"name": "Line3",
"from": [
3.0,
3.0,
4.0
],
"to": [
13.0,
13.0,
6.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
}
}
},
{
"name": "Core",
"from": [
6.0,
6.0,
6.0
],
"to": [
10.0,
10.0,
10.0
],
"faces": {
"north": {
"texture": "#all",
"uv": [
4.0,
4.0,
8.0,
8.0
]
},
"east": {
"texture": "#all",
"uv": [
0.0,
4.0,
4.0,
8.0
]
},
"south": {
"texture": "#all",
"uv": [
12.0,
4.0,
16.0,
8.0
]
},
"west": {
"texture": "#all",
"uv": [
8.0,
4.0,
12.0,
8.0
]
},
"up": {
"texture": "#all",
"uv": [
8.0,
4.0,
4.0,
0.0
]
},
"down": {
"texture": "#all",
"uv": [
12.0,
0.0,
8.0,
4.0
]
}
}
},
{
"name": "East",
"from": [
10.0,
6.0,
6.0
],
"to": [
16.0,
10.0,
10.0
],
"faces": {
"north": {
"texture": "#all",
"uv": [
4.0,
4.0,
8.0,
8.0
]
},
"east": {
"texture": "#all",
"uv": [
0.0,
4.0,
4.0,
8.0
]
},
"south": {
"texture": "#all",
"uv": [
12.0,
4.0,
16.0,
8.0
]
},
"west": {
"texture": "#all",
"uv": [
8.0,
4.0,
12.0,
8.0
]
},
"up": {
"texture": "#all",
"uv": [
8.0,
4.0,
4.0,
0.0
]
},
"down": {
"texture": "#all",
"uv": [
12.0,
0.0,
8.0,
4.0
]
}
}
},
{
"name": "West",
"from": [
0.0,
6.0,
6.0
],
"to": [
6.0,
10.0,
10.0
],
"faces": {
"north": {
"texture": "#all",
"uv": [
4.0,
4.0,
8.0,
8.0
]
},
"east": {
"texture": "#all",
"uv": [
0.0,
4.0,
4.0,
8.0
]
},
"south": {
"texture": "#all",
"uv": [
12.0,
4.0,
16.0,
8.0
]
},
"west": {
"texture": "#all",
"uv": [
8.0,
4.0,
12.0,
8.0
]
},
"up": {
"texture": "#all",
"uv": [
8.0,
4.0,
4.0,
0.0
]
},
"down": {
"texture": "#all",
"uv": [
12.0,
0.0,
8.0,
4.0
]
}
}
}
]
}

View File

@@ -0,0 +1,214 @@
{
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"textures": {
},
"elements": [
{
"name": "Line1",
"from": [
6.0,
0.0,
6.0
],
"to": [
10.0,
2.0,
10.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
}
}
},
{
"name": "Line2",
"from": [
5.0,
2.0,
5.0
],
"to": [
11.0,
4.0,
11.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
}
}
},
{
"name": "Line3",
"from": [
3.0,
4.0,
3.0
],
"to": [
13.0,
6.0,
13.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
}
}
}
]
}

View File

@@ -0,0 +1,214 @@
{
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"textures": {
},
"elements": [
{
"name": "Line1",
"from": [
14.0,
6.0,
6.0
],
"to": [
16.0,
10.0,
10.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
}
}
},
{
"name": "Line2",
"from": [
12.0,
5.0,
5.0
],
"to": [
14.0,
11.0,
11.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
}
}
},
{
"name": "Line3",
"from": [
10.0,
3.0,
3.0
],
"to": [
12.0,
13.0,
13.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
}
}
}
]
}

View File

@@ -0,0 +1,214 @@
{
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"textures": {
},
"elements": [
{
"name": "Line1",
"from": [
6.0,
6.0,
0.0
],
"to": [
10.0,
10.0,
2.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
}
}
},
{
"name": "Line2",
"from": [
5.0,
5.0,
2.0
],
"to": [
11.0,
11.0,
4.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
}
}
},
{
"name": "Line3",
"from": [
3.0,
3.0,
4.0
],
"to": [
13.0,
13.0,
6.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
}
}
}
]
}

View File

@@ -0,0 +1,214 @@
{
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"textures": {
},
"elements": [
{
"name": "Line1",
"from": [
6.0,
6.0,
14.0
],
"to": [
10.0,
10.0,
16.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
}
}
},
{
"name": "Line2",
"from": [
5.0,
5.0,
12.0
],
"to": [
11.0,
11.0,
14.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
}
}
},
{
"name": "Line3",
"from": [
3.0,
3.0,
10.0
],
"to": [
13.0,
13.0,
12.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
}
}
}
]
}

View File

@@ -0,0 +1,214 @@
{
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"textures": {
},
"elements": [
{
"name": "Line1",
"from": [
6.0,
14.0,
6.0
],
"to": [
10.0,
16.0,
10.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
}
}
},
{
"name": "Line2",
"from": [
5.0,
12.0,
5.0
],
"to": [
11.0,
14.0,
11.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
}
}
},
{
"name": "Line3",
"from": [
3.0,
10.0,
3.0
],
"to": [
13.0,
12.0,
13.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
}
}
}
]
}

View File

@@ -0,0 +1,214 @@
{
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"textures": {
},
"elements": [
{
"name": "Line1",
"from": [
0.0,
6.0,
6.0
],
"to": [
2.0,
10.0,
10.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
4.0,
4.0
]
}
}
},
{
"name": "Line2",
"from": [
2.0,
5.0,
5.0
],
"to": [
4.0,
11.0,
11.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
6.0,
6.0
]
}
}
},
{
"name": "Line3",
"from": [
4.0,
3.0,
3.0
],
"to": [
6.0,
13.0,
13.0
],
"faces": {
"north": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"east": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"south": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"west": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
2.0
]
},
"up": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
},
"down": {
"texture": "#line",
"uv": [
0.0,
0.0,
10.0,
10.0
]
}
}
}
]
}