Auto format code

This commit is contained in:
modmuss50 2017-06-28 20:54:12 +01:00
parent c0aab7f37a
commit 774fec221e
No known key found for this signature in database
GPG key ID: 203A5ED4D3E48BEA
65 changed files with 100 additions and 125 deletions

View file

@ -43,7 +43,7 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
IRecipe lastCustomRecipe = null;
public void setCurrentRecipe(IRecipe recipe, boolean customRecipe) {
if(recipe != null){
if (recipe != null) {
currentRecipe = recipe.getRegistryName();
} else {
currentRecipe = null;
@ -61,10 +61,10 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
@Nullable
public IRecipe getIRecipe() {
if(customRecipe){
if (customRecipe) {
InventoryCrafting crafting = getCraftingInventory();
for(IRecipe testRecipe : CraftingManager.REGISTRY){
if(testRecipe.matches(crafting, world)){
for (IRecipe testRecipe : CraftingManager.REGISTRY) {
if (testRecipe.matches(crafting, world)) {
return testRecipe;
}
}
@ -84,8 +84,8 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
return cachedRecipe.getRight();
}
public InventoryCrafting getCraftingInventory(){
if(inventoryCrafting == null){
public InventoryCrafting getCraftingInventory() {
if (inventoryCrafting == null) {
inventoryCrafting = new InventoryCrafting(new Container() {
@Override
public boolean canInteractWith(EntityPlayer playerIn) {
@ -120,13 +120,13 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
}
}
}
if(recipe == null){
if (recipe == null) {
progress = 0;
}
}
public boolean canMake(IRecipe recipe) {
if(customRecipe){
if (customRecipe) {
recipe = getIRecipe();
}
if (recipe != null && recipe.canFit(3, 3)) {
@ -179,8 +179,8 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
public boolean make(IRecipe recipe) {
if (canMake(recipe)) {
if(recipe == null && customRecipe){
if(lastCustomRecipe == null){
if (recipe == null && customRecipe) {
if (lastCustomRecipe == null) {
return false;
}//Should be uptodate as we just set it in canMake
recipe = lastCustomRecipe;

View file

@ -76,7 +76,7 @@ public class TileLightningRod extends TilePowerAcceptor implements IWrenchable {
final float lightStrikeChance = (100F - chanceOfStrike) * 20F;
final float totalChance = lightStrikeChance * this.getLightningStrikeMultiplier() * (1.1F - weatherStrength);
if (this.world.rand.nextInt((int) Math.floor(totalChance)) == 0) {
if(world.getBlockState(pos.up()).getBlock() != ModBlocks.REFINED_IRON_FENCE){
if (world.getBlockState(pos.up()).getBlock() != ModBlocks.REFINED_IRON_FENCE) {
this.onStatusHoldTicks = 400;
return;
}

View file

@ -77,14 +77,14 @@ public class TileThermalGenerator extends TileBaseFluidGenerator implements ICon
this.getPos().getY() + direction.getFrontOffsetY(),
this.getPos().getZ() + direction.getFrontOffsetZ()))
.getBlock() == Blocks.LAVA) {
if (this.tryAddingEnergy(1)){
if (this.tryAddingEnergy(1)) {
this.lastOutput = this.world.getTotalWorldTime();
didRun = true;
}
}
}
if(didRun != isOn){
if (didRun != isOn) {
isOn = didRun;
world.setBlockState(pos, world.getBlockState(pos).withProperty(BlockThermalGenerator.ACTIVE, isOn));
}

View file

@ -29,7 +29,7 @@ import net.minecraft.world.storage.MapStorage;
import techreborn.lib.ModInfo;
public class IDSUManager {
public static IDataIDSU getData(World world){
public static IDataIDSU getData(World world) {
MapStorage storage = world.getMapStorage();
IDSUSaveManger instance = (IDSUSaveManger) storage.getOrLoadData(IDSUSaveManger.class, ModInfo.MOD_ID + "_IDSU");

View file

@ -48,8 +48,7 @@ public class IDSUSaveManger extends WorldSavedData implements IDataIDSU {
}
@Override
public boolean isDirty()
{
public boolean isDirty() {
return true;
}

View file

@ -56,8 +56,8 @@ public class TileTransformer extends TilePowerAcceptor implements IWrenchable, I
super();
this.wrenchDrop = wrenchDrop;
this.inputTier = tier;
if(tier != EnumPowerTier.MICRO){
ouputTier = EnumPowerTier.values()[tier.ordinal() -1];
if (tier != EnumPowerTier.MICRO) {
ouputTier = EnumPowerTier.values()[tier.ordinal() - 1];
} else {
ouputTier = EnumPowerTier.MICRO;
}