wireless transmitter texture
@@ -1,10 +1,14 @@
|
|||||||
package storagecraft.block;
|
package storagecraft.block;
|
||||||
|
|
||||||
|
import net.minecraft.block.properties.IProperty;
|
||||||
|
import net.minecraft.block.properties.PropertyBool;
|
||||||
|
import net.minecraft.block.state.BlockState;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import storagecraft.StorageCraft;
|
import storagecraft.StorageCraft;
|
||||||
import storagecraft.StorageCraftGUI;
|
import storagecraft.StorageCraftGUI;
|
||||||
@@ -13,11 +17,31 @@ import storagecraft.tile.TileWirelessTransmitter;
|
|||||||
// @TODO: This texture behaves differently
|
// @TODO: This texture behaves differently
|
||||||
public class BlockWirelessTransmitter extends BlockMachine
|
public class BlockWirelessTransmitter extends BlockMachine
|
||||||
{
|
{
|
||||||
|
public static final PropertyBool WORKING = PropertyBool.create("working");
|
||||||
|
|
||||||
public BlockWirelessTransmitter()
|
public BlockWirelessTransmitter()
|
||||||
{
|
{
|
||||||
super("wireless_transmitter");
|
super("wireless_transmitter");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected BlockState createBlockState()
|
||||||
|
{
|
||||||
|
return new BlockState(this, new IProperty[]
|
||||||
|
{
|
||||||
|
DIRECTION,
|
||||||
|
CONNECTED,
|
||||||
|
WORKING
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||||
|
{
|
||||||
|
return super.getActualState(state, world, pos)
|
||||||
|
.withProperty(WORKING, ((TileWirelessTransmitter) world.getTileEntity(pos)).isWorking());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createTileEntity(World world, IBlockState state)
|
public TileEntity createTileEntity(World world, IBlockState state)
|
||||||
{
|
{
|
||||||
|
@@ -113,5 +113,6 @@ public class ClientProxy extends CommonProxy
|
|||||||
mesher.register(Item.getItemFromBlock(StorageCraftBlocks.CONSTRUCTOR), 0, new ModelResourceLocation("storagecraft:constructor", "inventory"));
|
mesher.register(Item.getItemFromBlock(StorageCraftBlocks.CONSTRUCTOR), 0, new ModelResourceLocation("storagecraft:constructor", "inventory"));
|
||||||
mesher.register(Item.getItemFromBlock(StorageCraftBlocks.DESTRUCTOR), 0, new ModelResourceLocation("storagecraft:destructor", "inventory"));
|
mesher.register(Item.getItemFromBlock(StorageCraftBlocks.DESTRUCTOR), 0, new ModelResourceLocation("storagecraft:destructor", "inventory"));
|
||||||
mesher.register(Item.getItemFromBlock(StorageCraftBlocks.SOLDERER), 0, new ModelResourceLocation("storagecraft:solderer", "inventory"));
|
mesher.register(Item.getItemFromBlock(StorageCraftBlocks.SOLDERER), 0, new ModelResourceLocation("storagecraft:solderer", "inventory"));
|
||||||
|
mesher.register(Item.getItemFromBlock(StorageCraftBlocks.WIRELESS_TRANSMITTER), 0, new ModelResourceLocation("storagecraft:wireless_transmitter", "inventory"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
55
src/main/resources/assets/storagecraft/blockstates/wireless_transmitter.json
Executable file
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"forge_marker": 1,
|
||||||
|
"defaults": {
|
||||||
|
"model": "orientable",
|
||||||
|
"textures": {
|
||||||
|
"side": "storagecraft:blocks/wireless_transmitter_side",
|
||||||
|
"top": "storagecraft:blocks/wireless_transmitter_side",
|
||||||
|
"front": "storagecraft:blocks/wireless_transmitter"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"variants": {
|
||||||
|
"inventory": [
|
||||||
|
{
|
||||||
|
"y": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"connected": {
|
||||||
|
"true": {
|
||||||
|
},
|
||||||
|
"false": {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"north": {
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"east": {
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"south": {
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"west": {
|
||||||
|
"y": 270
|
||||||
|
},
|
||||||
|
"up": {
|
||||||
|
"x": 270
|
||||||
|
},
|
||||||
|
"down": {
|
||||||
|
"x": 90
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"working": {
|
||||||
|
"true": {
|
||||||
|
"textures": {
|
||||||
|
"side": "storagecraft:blocks/wireless_transmitter_side_working",
|
||||||
|
"top": "storagecraft:blocks/wireless_transmitter_side_working",
|
||||||
|
"front": "storagecraft:blocks/wireless_transmitter_working"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"false": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 382 B After Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 380 B |