wireless transmitter texture
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
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.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import storagecraft.StorageCraft;
|
||||
import storagecraft.StorageCraftGUI;
|
||||
@@ -13,11 +17,31 @@ import storagecraft.tile.TileWirelessTransmitter;
|
||||
// @TODO: This texture behaves differently
|
||||
public class BlockWirelessTransmitter extends BlockMachine
|
||||
{
|
||||
public static final PropertyBool WORKING = PropertyBool.create("working");
|
||||
|
||||
public BlockWirelessTransmitter()
|
||||
{
|
||||
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
|
||||
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.DESTRUCTOR), 0, new ModelResourceLocation("storagecraft:destructor", "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"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user