Added code formatter

This commit is contained in:
modmuss50 2016-03-24 00:39:26 +00:00
parent 710f9c04e7
commit b9448d5d90
444 changed files with 32383 additions and 26254 deletions

View file

@ -6,27 +6,37 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
public class OreDictUtils {
public class OreDictUtils
{
public static boolean isOre(Block block, String oreName) {
public static boolean isOre(Block block, String oreName)
{
return isOre(new ItemStack(Item.getItemFromBlock(block)), oreName);
}
public static boolean isOre(IBlockState state, String oreName) {
return isOre(new ItemStack(Item.getItemFromBlock(state.getBlock()), 1, state.getBlock().getMetaFromState(state)), oreName);
public static boolean isOre(IBlockState state, String oreName)
{
return isOre(
new ItemStack(Item.getItemFromBlock(state.getBlock()), 1, state.getBlock().getMetaFromState(state)),
oreName);
}
public static boolean isOre(Item item, String oreName) {
public static boolean isOre(Item item, String oreName)
{
return isOre(new ItemStack(item), oreName);
}
public static boolean isOre(ItemStack stack, String oreName) {
if (stack != null && stack.getItem() != null && oreName != null) {
public static boolean isOre(ItemStack stack, String oreName)
{
if (stack != null && stack.getItem() != null && oreName != null)
{
int id = OreDictionary.getOreID(oreName);
int[] ids = OreDictionary.getOreIDs(stack);
for (int i : ids) {
if (id == i) {
for (int i : ids)
{
if (id == i)
{
return true;
}
}

View file

@ -3,15 +3,16 @@ package techreborn.utils;
import net.minecraft.item.ItemStack;
import techreborn.items.ItemCells;
public class RecipeUtils {
public static ItemStack getEmptyCell(int stackSize) { //TODO ic2
// if (Loader.isModLoaded("IC2")) {
// ItemStack cell = IC2Items.getItem("cell").copy();
// cell.stackSize = stackSize;
// return cell;
// } else {
return ItemCells.getCellByName("empty", stackSize);
// }
}
public class RecipeUtils
{
public static ItemStack getEmptyCell(int stackSize)
{ // TODO ic2
// if (Loader.isModLoaded("IC2")) {
// ItemStack cell = IC2Items.getItem("cell").copy();
// cell.stackSize = stackSize;
// return cell;
// } else {
return ItemCells.getCellByName("empty", stackSize);
// }
}
}

View file

@ -5,8 +5,10 @@ import net.minecraft.util.DamageSource;
/**
* Created by modmuss50 on 06/03/2016.
*/
public class ElectrialShockSource extends DamageSource {
public ElectrialShockSource() {
super("shock");
}
public class ElectrialShockSource extends DamageSource
{
public ElectrialShockSource()
{
super("shock");
}
}

View file

@ -5,8 +5,10 @@ import net.minecraft.util.DamageSource;
/**
* Created by modmuss50 on 05/03/2016.
*/
public class FusionDamageSource extends DamageSource {
public FusionDamageSource() {
super("fusion");
}
public class FusionDamageSource extends DamageSource
{
public FusionDamageSource()
{
super("fusion");
}
}