Re-add Debug blocks
This commit is contained in:
parent
0e901070d7
commit
c1f8082fe4
6 changed files with 121 additions and 137 deletions
|
@ -28,7 +28,6 @@ public class BlockDebug extends BlockRI implements IBlockInfo
|
|||
public BlockDebug()
|
||||
{
|
||||
super("DebugBlock");
|
||||
this.setCreativeTab(ResonantInductionTabs.CORE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -37,13 +36,10 @@ public class BlockDebug extends BlockRI implements IBlockInfo
|
|||
{
|
||||
super.registerIcons(iconReg);
|
||||
for (DebugBlocks block : DebugBlocks.values())
|
||||
{
|
||||
if (block.enabled)
|
||||
{
|
||||
block.icon = iconReg.registerIcon(Reference.PREFIX + block.getTextureName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
@ -79,38 +75,22 @@ public class BlockDebug extends BlockRI implements IBlockInfo
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World world, int x, int y, int z)
|
||||
{
|
||||
super.onBlockAdded(world, x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta >= DebugBlocks.values().length || !DebugBlocks.values()[meta].enabled)
|
||||
{
|
||||
world.setBlock(x, y, z, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(int blockID, CreativeTabs tab, List creativeTabList)
|
||||
{
|
||||
for (DebugBlocks block : DebugBlocks.values())
|
||||
{
|
||||
if (block.enabled)
|
||||
{
|
||||
creativeTabList.add(new ItemStack(blockID, 1, block.ordinal()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getTileEntities(int blockID, Set<Pair<String, Class<? extends TileEntity>>> list)
|
||||
{
|
||||
for (DebugBlocks block : DebugBlocks.values())
|
||||
{
|
||||
if (block.enabled && block.clazz != null && block.name != null)
|
||||
{
|
||||
list.add(new Pair<String, Class<? extends TileEntity>>(block.name, block.clazz));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,7 +127,6 @@ public class BlockDebug extends BlockRI implements IBlockInfo
|
|||
public Icon icon;
|
||||
public String name;
|
||||
public String texture;
|
||||
public boolean enabled;
|
||||
Class<? extends TileEntity> clazz;
|
||||
|
||||
private DebugBlocks(String name, Class<? extends TileEntity> clazz)
|
||||
|
|
|
@ -16,6 +16,11 @@ item.resonantinduction\:oreDust.name=%v Dust
|
|||
item.resonantinduction\:oreRefinedDust.name=%v Refined Dust
|
||||
item.resonantinduction\:oreRubble.name=%v Rubble
|
||||
|
||||
tile.resonantinduction\:DebugBlock.0.name=Infinite Power
|
||||
tile.resonantinduction\:DebugBlock.1.name=Infinite Fluid
|
||||
tile.resonantinduction\:DebugBlock.2.name=Fluid Void
|
||||
tile.resonantinduction\:DebugBlock.3.name=Power Void
|
||||
|
||||
### Archaic Module
|
||||
## Items
|
||||
item.resonantinduction\:imprint.name=Imprint
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 231 B |
Binary file not shown.
After Width: | Height: | Size: 222 B |
Binary file not shown.
After Width: | Height: | Size: 227 B |
Binary file not shown.
After Width: | Height: | Size: 226 B |
Loading…
Reference in a new issue