rename classes
This commit is contained in:
@@ -9,25 +9,25 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import storagecraft.SC;
|
||||
import storagecraft.tile.TileSC;
|
||||
import storagecraft.StorageCraft;
|
||||
import storagecraft.tile.TileBase;
|
||||
import storagecraft.util.InventoryUtils;
|
||||
|
||||
public class BlockSC extends Block {
|
||||
public class BlockBase extends Block {
|
||||
private String name;
|
||||
|
||||
public BlockSC(String name) {
|
||||
public BlockBase(String name) {
|
||||
super(Material.rock);
|
||||
|
||||
this.name = name;
|
||||
|
||||
setCreativeTab(SC.TAB);
|
||||
setCreativeTab(StorageCraft.TAB);
|
||||
setBlockTextureName("storagecraft:" + name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "block." + SC.ID + ":" + name;
|
||||
return "block." + StorageCraft.ID + ":" + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -36,8 +36,8 @@ public class BlockSC extends Block {
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if (tile instanceof TileSC) {
|
||||
((TileSC) tile).setDirection(ForgeDirection.getOrientation(BlockPistonBase.determineOrientation(world, x, y, z, entityLiving)));
|
||||
if (tile instanceof TileBase) {
|
||||
((TileBase) tile).setDirection(ForgeDirection.getOrientation(BlockPistonBase.determineOrientation(world, x, y, z, entityLiving)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import storagecraft.tile.TileCable;
|
||||
|
||||
public class BlockCable extends BlockSC implements ITileEntityProvider {
|
||||
public class BlockCable extends BlockBase implements ITileEntityProvider {
|
||||
public BlockCable() {
|
||||
super("cable");
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import storagecraft.SC;
|
||||
import storagecraft.StorageCraft;
|
||||
import storagecraft.tile.TileController;
|
||||
|
||||
public class BlockController extends BlockSC implements ITileEntityProvider {
|
||||
public class BlockController extends BlockBase implements ITileEntityProvider {
|
||||
private IIcon sideIcon;
|
||||
private IIcon[] icons = new IIcon[6];
|
||||
|
||||
@@ -26,7 +26,7 @@ public class BlockController extends BlockSC implements ITileEntityProvider {
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!world.isRemote) {
|
||||
player.openGui(SC.INSTANCE, SC.GUI.CONTROLLER, world, x, y, z);
|
||||
player.openGui(StorageCraft.INSTANCE, StorageCraft.GUI.CONTROLLER, world, x, y, z);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -7,10 +7,10 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import storagecraft.SC;
|
||||
import storagecraft.StorageCraft;
|
||||
import storagecraft.tile.TileDrive;
|
||||
|
||||
public class BlockDrive extends BlockSC implements ITileEntityProvider {
|
||||
public class BlockDrive extends BlockBase implements ITileEntityProvider {
|
||||
private IIcon frontIcon;
|
||||
private IIcon sideIcon;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class BlockDrive extends BlockSC implements ITileEntityProvider {
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!world.isRemote) {
|
||||
player.openGui(SC.INSTANCE, SC.GUI.DRIVE, world, x, y, z);
|
||||
player.openGui(StorageCraft.INSTANCE, StorageCraft.GUI.DRIVE, world, x, y, z);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -7,10 +7,10 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import storagecraft.SC;
|
||||
import storagecraft.StorageCraft;
|
||||
import storagecraft.tile.TileGrid;
|
||||
|
||||
public class BlockGrid extends BlockSC implements ITileEntityProvider {
|
||||
public class BlockGrid extends BlockBase implements ITileEntityProvider {
|
||||
private IIcon sideIcon;
|
||||
private IIcon connectedIcon;
|
||||
private IIcon disconnectedIcon;
|
||||
@@ -27,7 +27,7 @@ public class BlockGrid extends BlockSC implements ITileEntityProvider {
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!world.isRemote) {
|
||||
player.openGui(SC.INSTANCE, SC.GUI.GRID, world, x, y, z);
|
||||
player.openGui(StorageCraft.INSTANCE, StorageCraft.GUI.GRID, world, x, y, z);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -7,10 +7,10 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import storagecraft.SC;
|
||||
import storagecraft.StorageCraft;
|
||||
import storagecraft.tile.TileImporter;
|
||||
|
||||
public class BlockImporter extends BlockSC implements ITileEntityProvider {
|
||||
public class BlockImporter extends BlockBase implements ITileEntityProvider {
|
||||
private IIcon frontIcon;
|
||||
private IIcon sideIcon;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class BlockImporter extends BlockSC implements ITileEntityProvider {
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!world.isRemote) {
|
||||
player.openGui(SC.INSTANCE, SC.GUI.IMPORTER, world, x, y, z);
|
||||
player.openGui(StorageCraft.INSTANCE, StorageCraft.GUI.IMPORTER, world, x, y, z);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import storagecraft.tile.TileStorageProxy;
|
||||
|
||||
public class BlockStorageProxy extends BlockSC implements ITileEntityProvider {
|
||||
public class BlockStorageProxy extends BlockBase implements ITileEntityProvider {
|
||||
private IIcon frontIcon;
|
||||
private IIcon sideIcon;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user