Continue the "Great refactor of 2017". Massive variable name refactoring and start splitting crafting table recipes to their own class.

This commit is contained in:
Prospector 2016-12-31 23:29:32 -08:00
parent 6d931b232d
commit 6a70424252
133 changed files with 1579 additions and 1622 deletions

View file

@ -31,7 +31,7 @@ public class BlockMachineFrame extends BaseBlock {
public static ItemStack getFrameByName(String name, int count) {
for (int i = 0; i < types.length; i++) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModBlocks.machineframe, count, i);
return new ItemStack(ModBlocks.MACHINE_FRAMES, count, i);
}
}
throw new InvalidParameterException("The part " + name + " could not be found.");

View file

@ -56,7 +56,7 @@ public class BlockOre extends Block implements IOreNameProvider {
public static ItemStack getOreByName(String name, int count) {
for (int i = 0; i < ores.length; i++) {
if (ores[i].equalsIgnoreCase(name)) {
return new ItemStack(ModBlocks.ore, count, i);
return new ItemStack(ModBlocks.ORE, count, i);
}
}
return BlockOre2.getOreByName(name, count);
@ -75,7 +75,7 @@ public class BlockOre extends Block implements IOreNameProvider {
}
}
if (index == -1) {
return ModBlocks.ore2.getBlockStateFromName(name);
return ModBlocks.ORE2.getBlockStateFromName(name);
}
return getStateFromMeta(index);
}

View file

@ -43,7 +43,7 @@ public class BlockOre2 extends Block implements IOreNameProvider {
public static ItemStack getOreByName(String name, int count) {
for (int i = 0; i < ores.length; i++) {
if (ores[i].equalsIgnoreCase(name)) {
return new ItemStack(ModBlocks.ore2, count, i);
return new ItemStack(ModBlocks.ORE2, count, i);
}
}
throw new InvalidParameterException("The ore block " + name + " could not be found.");

View file

@ -123,6 +123,6 @@ public class BlockRubberLeaves extends BlockLeaves implements ITexturedBlock, IO
@Override
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
return Item.getItemFromBlock(ModBlocks.rubberSapling);
return Item.getItemFromBlock(ModBlocks.RUBBER_SAPLING);
}
}

View file

@ -157,7 +157,7 @@ public class BlockRubberLog extends Block implements ITexturedBlock {
worldIn.setBlockState(pos,
state.withProperty(HAS_SAP, false).withProperty(SAP_SIDE, EnumFacing.getHorizontal(0)));
worldIn.playSound(null, pos.getX(), pos.getY(),
pos.getZ(), ModSounds.extract,
pos.getZ(), ModSounds.SAP_EXTRACT,
SoundCategory.BLOCKS, 0.6F, 1F);
if (!worldIn.isRemote) {
if (stack.getItem() instanceof ItemElectricTreetap) {

View file

@ -35,7 +35,7 @@ public class BlockStorage extends BaseBlock implements ITexturedBlock {
public static ItemStack getStorageBlockByName(String name, int count) {
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
return new ItemStack(ModBlocks.storage, count, i);
return new ItemStack(ModBlocks.STORAGE, count, i);
}
}
return BlockStorage2.getStorageBlockByName(name, count);

View file

@ -37,7 +37,7 @@ public class BlockStorage2 extends BaseBlock implements ITexturedBlock {
public static ItemStack getStorageBlockByName(String name, int count) {
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
return new ItemStack(ModBlocks.storage2, count, i);
return new ItemStack(ModBlocks.STORAGE2, count, i);
}
}
throw new InvalidParameterException("The storage block " + name + " could not be found.");

View file

@ -26,7 +26,7 @@ public class BlockAESU extends BlockEnergyStorage {
@Override
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
ArrayList<ItemStack> list = new ArrayList<>();
list.add(new ItemStack(ModBlocks.machineframe, 1, 2));
list.add(new ItemStack(ModBlocks.MACHINE_FRAMES, 1, 2));
return list;
}
}

View file

@ -29,7 +29,7 @@ public class BlockMFE extends BlockEnergyStorage {
@Override
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
ArrayList<ItemStack> list = new ArrayList<>();
list.add(new ItemStack(ModBlocks.machineframe, 1, 1));
list.add(new ItemStack(ModBlocks.MACHINE_FRAMES, 1, 1));
return list;
}
}

View file

@ -30,7 +30,7 @@ public class BlockMFSU extends BlockEnergyStorage {
@Override
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
ArrayList<ItemStack> list = new ArrayList<>();
list.add(new ItemStack(ModBlocks.machineframe, 1, 1));
list.add(new ItemStack(ModBlocks.MACHINE_FRAMES, 1, 1));
return list;
}
}

View file

@ -29,7 +29,7 @@ public class BlockHVTransformer extends BlockTransformer {
@Override
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
ArrayList<ItemStack> list = new ArrayList<>();
list.add(new ItemStack(ModBlocks.machineframe, 1, 1));
list.add(new ItemStack(ModBlocks.MACHINE_FRAMES, 1, 1));
return list;
}

View file

@ -29,7 +29,7 @@ public class BlockMVTransformer extends BlockTransformer {
@Override
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
ArrayList<ItemStack> list = new ArrayList<>();
list.add(new ItemStack(ModBlocks.machineframe, 1, 0));
list.add(new ItemStack(ModBlocks.MACHINE_FRAMES, 1, 0));
return list;
}
}