new block textures

This commit is contained in:
Raoul Van den Berge
2015-12-23 01:36:06 +01:00
parent 7ec94f6b6b
commit 7044d56ecb
30 changed files with 15 additions and 13 deletions

View File

@@ -13,7 +13,7 @@ import storagecraft.tile.TileController;
public class BlockController extends BlockBase implements ITileEntityProvider public class BlockController extends BlockBase implements ITileEntityProvider
{ {
private IIcon sideIcon; private IIcon sideIcon;
private IIcon[] icons = new IIcon[6]; private IIcon[] icons = new IIcon[8];
public BlockController() public BlockController()
{ {
@@ -48,7 +48,7 @@ public class BlockController extends BlockBase implements ITileEntityProvider
@Override @Override
public void registerBlockIcons(IIconRegister register) public void registerBlockIcons(IIconRegister register)
{ {
for (int i = 0; i <= 5; ++i) for (int i = 0; i <= 7; ++i)
{ {
icons[i] = register.registerIcon("storagecraft:controller" + i); icons[i] = register.registerIcon("storagecraft:controller" + i);
} }
@@ -66,7 +66,7 @@ public class BlockController extends BlockBase implements ITileEntityProvider
TileController controller = (TileController) world.getTileEntity(x, y, z); TileController controller = (TileController) world.getTileEntity(x, y, z);
return icons[(int) ((float) controller.getEnergyStored(null) / (float) controller.getMaxEnergyStored(null) * 5f)]; return icons[(int) ((float) controller.getEnergyStored(null) / (float) controller.getMaxEnergyStored(null) * 7f)];
} }
@Override @Override

View File

@@ -12,7 +12,8 @@ import storagecraft.tile.TileDetector;
public class BlockDetector extends BlockBase implements ITileEntityProvider public class BlockDetector extends BlockBase implements ITileEntityProvider
{ {
private IIcon frontIcon; private IIcon poweredIcon;
private IIcon unpoweredIcon;
private IIcon sideIcon; private IIcon sideIcon;
public BlockDetector() public BlockDetector()
@@ -60,31 +61,32 @@ public class BlockDetector extends BlockBase implements ITileEntityProvider
@Override @Override
public void registerBlockIcons(IIconRegister register) public void registerBlockIcons(IIconRegister register)
{ {
frontIcon = register.registerIcon("storagecraft:detector"); poweredIcon = register.registerIcon("storagecraft:detectorPowered");
unpoweredIcon = register.registerIcon("storagecraft:detectorUnpowered");
sideIcon = register.registerIcon("storagecraft:generic"); sideIcon = register.registerIcon("storagecraft:generic");
} }
@Override @Override
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side)
{ {
TileDetector tile = (TileDetector) world.getTileEntity(x, y, z); if (side == 0 || side == 1)
if (side == tile.getDirection().ordinal())
{ {
return frontIcon; return sideIcon;
} }
return sideIcon; TileDetector tile = (TileDetector) world.getTileEntity(x, y, z);
return tile.providesPower() ? poweredIcon : unpoweredIcon;
} }
@Override @Override
public IIcon getIcon(int side, int meta) public IIcon getIcon(int side, int meta)
{ {
if (side == 3) if (side == 0 || side == 1)
{ {
return frontIcon; return sideIcon;
} }
return sideIcon; return unpoweredIcon;
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 B

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 B

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 263 B