Auto format code
This commit is contained in:
parent
c0aab7f37a
commit
774fec221e
65 changed files with 100 additions and 125 deletions
|
@ -34,7 +34,6 @@ import techreborn.client.TechRebornCreativeTab;
|
|||
|
||||
public class BlockComputerCube extends BlockMachineBase {
|
||||
|
||||
|
||||
public BlockComputerCube(final Material material) {
|
||||
super();
|
||||
this.setUnlocalizedName("techreborn.computercube");
|
||||
|
|
|
@ -27,10 +27,7 @@ package techreborn.blocks;
|
|||
import net.minecraft.block.BlockFence;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.material.Material;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class BlockRefinedIronFence extends BlockFence {
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ public class BlockRubberLog extends Block {
|
|||
item.motionZ = rand.nextGaussian() * factor;
|
||||
worldIn.spawnEntity(item);
|
||||
}
|
||||
if(playerIn instanceof EntityPlayerMP){
|
||||
if (playerIn instanceof EntityPlayerMP) {
|
||||
TRRecipeHandler.unlockTRRecipes((EntityPlayerMP) playerIn);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
package techreborn.blocks.advanced_machine;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
package techreborn.blocks.advanced_machine;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
package techreborn.blocks.advanced_machine;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
package techreborn.blocks.tier1;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -29,7 +29,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.network.IGuiHandler;
|
||||
import techreborn.client.container.*;
|
||||
import techreborn.client.container.ContainerAESU;
|
||||
import techreborn.client.container.ContainerDestructoPack;
|
||||
import techreborn.client.container.ContainerLESU;
|
||||
import techreborn.client.container.IContainerProvider;
|
||||
import techreborn.client.gui.*;
|
||||
import techreborn.client.gui.autocrafting.GuiAutoCrafting;
|
||||
import techreborn.tiles.*;
|
||||
|
@ -38,9 +41,9 @@ import techreborn.tiles.generator.*;
|
|||
import techreborn.tiles.idsu.TileInterdimensionalSU;
|
||||
import techreborn.tiles.lesu.TileLapotronicSU;
|
||||
import techreborn.tiles.multiblock.*;
|
||||
import techreborn.tiles.storage.TileHighVoltageSU;
|
||||
import techreborn.tiles.storage.TileLowVoltageSU;
|
||||
import techreborn.tiles.storage.TileMediumVoltageSU;
|
||||
import techreborn.tiles.storage.TileHighVoltageSU;
|
||||
import techreborn.tiles.teir1.*;
|
||||
|
||||
public class GuiHandler implements IGuiHandler {
|
||||
|
|
|
@ -80,7 +80,7 @@ public class GuiAutoCrafting extends GuiBase {
|
|||
int mX = mouseX - getGuiLeft();
|
||||
int mY = mouseY - getGuiTop();
|
||||
|
||||
if(recipe != null && !tileAutoCraftingTable.customRecipe){
|
||||
if (recipe != null && !tileAutoCraftingTable.customRecipe) {
|
||||
if (builder.isInRect(91, 66, 23, 23, mX, mY)) {
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("Click to clear");
|
||||
|
@ -149,7 +149,7 @@ public class GuiAutoCrafting extends GuiBase {
|
|||
drawString("Inventory", 8, 82, 4210752, layer);
|
||||
|
||||
IRecipe recipe = tileAutoCraftingTable.getIRecipe();
|
||||
if (recipe != null && ! tileAutoCraftingTable.customRecipe) {
|
||||
if (recipe != null && !tileAutoCraftingTable.customRecipe) {
|
||||
renderRecipe(recipe, guiLeft + 91, 66 + guiTop);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ public class GuiAutoCraftingRecipeSlector extends GuiRecipeBook {
|
|||
|
||||
GuiAutoCrafting guiAutoCrafting;
|
||||
|
||||
|
||||
@Override
|
||||
public void initVisuals(boolean p_193014_1_, InventoryCrafting p_193014_2_) {
|
||||
super.initVisuals(p_193014_1_, p_193014_2_);
|
||||
|
|
|
@ -38,7 +38,6 @@ import net.minecraft.util.EnumFacing;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.*;
|
||||
import net.minecraftforge.common.model.IModelPart;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
@ -99,7 +98,6 @@ public class ModelDynamicCell implements IModel {
|
|||
return ImmutableList.of(baseTexture, emptyTexture);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
|
||||
|
||||
|
|
|
@ -62,12 +62,12 @@ public class CompatManager {
|
|||
public void registerCompact(Class<? extends ICompatModule> moduleClass, boolean config, Object... objs) {
|
||||
boolean shouldLoad = true;
|
||||
//TODO config
|
||||
// if (config) {
|
||||
// shouldLoad = ConfigTechReborn.config
|
||||
// .get(ConfigTechReborn.CATEGORY_INTEGRATION, "Compat:" + moduleClass.getSimpleName(), true,
|
||||
// "Should the " + moduleClass.getSimpleName() + " be loaded?")
|
||||
// .getBoolean(true);
|
||||
// }
|
||||
// if (config) {
|
||||
// shouldLoad = ConfigTechReborn.config
|
||||
// .get(ConfigTechReborn.CATEGORY_INTEGRATION, "Compat:" + moduleClass.getSimpleName(), true,
|
||||
// "Should the " + moduleClass.getSimpleName() + " be loaded?")
|
||||
// .getBoolean(true);
|
||||
// }
|
||||
for (Object obj : objs) {
|
||||
if (obj instanceof String) {
|
||||
String modid = (String) obj;
|
||||
|
|
|
@ -152,7 +152,6 @@ public class CTFusionReactor {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
return "Removing Fusion Reactor recipe";
|
||||
|
|
|
@ -118,7 +118,6 @@ public class CTGeneric {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
return "Removing " + name + " recipe";
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
package techreborn.events;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
|
@ -45,16 +44,16 @@ public class TRRecipeHandler {
|
|||
|
||||
private static List<IForgeRegistryEntry> hiddenEntrys = new ArrayList<>();
|
||||
|
||||
public static void hideEntry(IForgeRegistryEntry entry){
|
||||
public static void hideEntry(IForgeRegistryEntry entry) {
|
||||
hiddenEntrys.add(entry);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void pickupEvent(EntityItemPickupEvent entityItemPickupEvent){
|
||||
if(entityItemPickupEvent.getEntityPlayer() instanceof EntityPlayerMP){
|
||||
if(ItemUtils.isInputEqual("logWood", entityItemPickupEvent.getItem().getItem(), false, false, true)){
|
||||
for(IRecipe recipe : CraftingManager.REGISTRY){
|
||||
if(recipe.getRecipeOutput().getItem() == ModItems.TREE_TAP){
|
||||
public void pickupEvent(EntityItemPickupEvent entityItemPickupEvent) {
|
||||
if (entityItemPickupEvent.getEntityPlayer() instanceof EntityPlayerMP) {
|
||||
if (ItemUtils.isInputEqual("logWood", entityItemPickupEvent.getItem().getItem(), false, false, true)) {
|
||||
for (IRecipe recipe : CraftingManager.REGISTRY) {
|
||||
if (recipe.getRecipeOutput().getItem() == ModItems.TREE_TAP) {
|
||||
entityItemPickupEvent.getEntityPlayer().unlockRecipes(Collections.singletonList(recipe));
|
||||
}
|
||||
}
|
||||
|
@ -62,32 +61,32 @@ public class TRRecipeHandler {
|
|||
}
|
||||
}
|
||||
|
||||
public static void unlockTRRecipes(EntityPlayerMP playerMP){
|
||||
public static void unlockTRRecipes(EntityPlayerMP playerMP) {
|
||||
List<IRecipe> recipeList = new ArrayList<>();
|
||||
for(IRecipe recipe : CraftingManager.REGISTRY){
|
||||
if(isRecipeValid(recipe)){
|
||||
for (IRecipe recipe : CraftingManager.REGISTRY) {
|
||||
if (isRecipeValid(recipe)) {
|
||||
recipeList.add(recipe);
|
||||
}
|
||||
}
|
||||
playerMP.unlockRecipes(recipeList);
|
||||
}
|
||||
|
||||
private static boolean isRecipeValid(IRecipe recipe){
|
||||
if(recipe.getRegistryName() == null){
|
||||
private static boolean isRecipeValid(IRecipe recipe) {
|
||||
if (recipe.getRegistryName() == null) {
|
||||
return false;
|
||||
}
|
||||
if(!recipe.getRegistryName().getResourceDomain().equals(ModInfo.MOD_ID)){
|
||||
if (!recipe.getRegistryName().getResourceDomain().equals(ModInfo.MOD_ID)) {
|
||||
return false;
|
||||
}
|
||||
if(!recipe.getRecipeOutput().getItem().getRegistryName().getResourceDomain().equals(ModInfo.MOD_ID)){
|
||||
if (!recipe.getRecipeOutput().getItem().getRegistryName().getResourceDomain().equals(ModInfo.MOD_ID)) {
|
||||
return false;
|
||||
}
|
||||
if(hiddenEntrys.contains(recipe.getRecipeOutput().getItem())){
|
||||
if (hiddenEntrys.contains(recipe.getRecipeOutput().getItem())) {
|
||||
return false;
|
||||
}
|
||||
//Hide uu recipes
|
||||
for(Ingredient ingredient : recipe.getIngredients()){
|
||||
if(ingredient.apply(new ItemStack(ModItems.UU_MATTER))){
|
||||
for (Ingredient ingredient : recipe.getIngredients()) {
|
||||
if (ingredient.apply(new ItemStack(ModItems.UU_MATTER))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,5 +52,4 @@ public class TRTickHandler {
|
|||
previouslyWearing = chestslot;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -65,8 +65,6 @@ import techreborn.tiles.transformers.TileHVTransformer;
|
|||
import techreborn.tiles.transformers.TileLVTransformer;
|
||||
import techreborn.tiles.transformers.TileMVTransformer;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public class ModBlocks {
|
||||
|
||||
public static Block THERMAL_GENERATOR;
|
||||
|
@ -418,7 +416,7 @@ public class ModBlocks {
|
|||
public static void registerBlock(Block block, Class<? extends ItemBlock> itemclass, String name) {
|
||||
name = name.toLowerCase();
|
||||
block.setUnlocalizedName(ModInfo.MOD_ID + ":" + name);
|
||||
RebornRegistry.registerBlock(block, itemclass, new ResourceLocation(ModInfo.MOD_ID, name));
|
||||
RebornRegistry.registerBlock(block, itemclass, new ResourceLocation(ModInfo.MOD_ID, name));
|
||||
}
|
||||
|
||||
public static void registerOreDict() {
|
||||
|
|
|
@ -26,10 +26,8 @@ package techreborn.init;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import reborncore.RebornRegistry;
|
||||
import reborncore.api.fuel.FluidPowerManager;
|
||||
import techreborn.blocks.fluid.BlockFluidBase;
|
||||
|
|
|
@ -27,7 +27,6 @@ package techreborn.init;
|
|||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import reborncore.RebornRegistry;
|
||||
import reborncore.api.power.IEnergyInterfaceItem;
|
||||
|
|
|
@ -121,7 +121,7 @@ public class ModRecipes {
|
|||
2));
|
||||
|
||||
for (String ore : OreUtil.oreNames) {
|
||||
if(ore.equals("iridium")){
|
||||
if (ore.equals("iridium")) {
|
||||
continue;
|
||||
}
|
||||
if (OreUtil.doesOreExistAndValid("plate" + OreUtil.capitalizeFirstLetter(ore)) && OreUtil.doesOreExistAndValid("ingot" + OreUtil.capitalizeFirstLetter(ore))) {
|
||||
|
@ -901,9 +901,9 @@ public class ModRecipes {
|
|||
.addSmelting(ItemDusts.getDustByName("silver", 1), ItemIngots.getIngotByName("silver"),
|
||||
1F);
|
||||
|
||||
RebornCraftingHelper
|
||||
.addShapedOreRecipe((getOre("oreIridium")), "UUU", " U ", "UUU", 'U',
|
||||
ModItems.UU_MATTER);
|
||||
RebornCraftingHelper
|
||||
.addShapedOreRecipe((getOre("oreIridium")), "UUU", " U ", "UUU", 'U',
|
||||
ModItems.UU_MATTER);
|
||||
|
||||
// Chemical Reactor
|
||||
RecipeHandler.addRecipe(new ChemicalReactorRecipe(ItemDusts.getDustByName("calcite", 1), null,
|
||||
|
|
|
@ -26,7 +26,6 @@ package techreborn.init;
|
|||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.registries.GameData;
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,8 +43,6 @@ import techreborn.items.DynamicCell;
|
|||
import techreborn.items.ItemDustsSmall;
|
||||
import techreborn.items.ItemNuggets;
|
||||
|
||||
import java.security.InvalidParameterException;
|
||||
|
||||
/**
|
||||
* Created by Prospector
|
||||
*/
|
||||
|
@ -213,10 +211,10 @@ public class CraftingTableRecipes extends RecipeMethods {
|
|||
|
||||
static void registerCompressionRecipes() {
|
||||
for (String name : ArrayUtils.addAll(BlockStorage.types, BlockStorage2.types)) {
|
||||
if(OreUtil.hasIngot(name)){
|
||||
if (OreUtil.hasIngot(name)) {
|
||||
registerShaped(BlockStorage.getStorageBlockByName(name), "AAA", "AAA", "AAA", 'A',
|
||||
"ingot" + StringUtils.toFirstCapital(name));
|
||||
} else if (OreUtil.hasGem(name)){
|
||||
} else if (OreUtil.hasGem(name)) {
|
||||
registerShaped(BlockStorage.getStorageBlockByName(name), "AAA", "AAA", "AAA", 'A',
|
||||
"gem" + StringUtils.toFirstCapital(name));
|
||||
}
|
||||
|
@ -270,13 +268,13 @@ public class CraftingTableRecipes extends RecipeMethods {
|
|||
}
|
||||
|
||||
static void registerMixedMetal(String top, String middle, String bottom, int amount) {
|
||||
if(!OreDictionary.doesOreNameExist(top)){
|
||||
if (!OreDictionary.doesOreNameExist(top)) {
|
||||
return;
|
||||
}
|
||||
if(!OreDictionary.doesOreNameExist(middle)){
|
||||
if (!OreDictionary.doesOreNameExist(middle)) {
|
||||
return;
|
||||
}
|
||||
if(!OreDictionary.doesOreNameExist(bottom)){
|
||||
if (!OreDictionary.doesOreNameExist(bottom)) {
|
||||
return;
|
||||
}
|
||||
if (top.equals("ingotRefinedIron") && IC2Duplicates.deduplicate()) {
|
||||
|
|
|
@ -133,7 +133,7 @@ public class DynamicCell extends Item {
|
|||
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems) {
|
||||
if(!isInCreativeTab(tab)){
|
||||
if (!isInCreativeTab(tab)) {
|
||||
return;
|
||||
}
|
||||
subItems.add(getEmptyCell(1));
|
||||
|
|
|
@ -93,7 +93,7 @@ public class ItemDusts extends ItemTR {
|
|||
// Adds Dusts SubItems To Creative Tab
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||
if(!isInCreativeTab(creativeTabs)){
|
||||
if (!isInCreativeTab(creativeTabs)) {
|
||||
return;
|
||||
}
|
||||
for (int meta = 0; meta < types.length; ++meta) {
|
||||
|
|
|
@ -83,7 +83,7 @@ public class ItemDustsSmall extends ItemTR {
|
|||
// Adds Dusts SubItems To Creative Tab
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||
if(!isInCreativeTab(creativeTabs)){
|
||||
if (!isInCreativeTab(creativeTabs)) {
|
||||
return;
|
||||
}
|
||||
for (int meta = 0; meta < types.length; ++meta) {
|
||||
|
|
|
@ -73,7 +73,7 @@ public class ItemGems extends ItemTR {
|
|||
// Adds Dusts SubItems To Creative Tab
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||
if(!isInCreativeTab(creativeTabs)){
|
||||
if (!isInCreativeTab(creativeTabs)) {
|
||||
return;
|
||||
}
|
||||
for (int meta = 0; meta < types.length; ++meta) {
|
||||
|
|
|
@ -76,7 +76,7 @@ public class ItemNuggets extends ItemTR {
|
|||
// Adds Dusts SubItems To Creative Tab
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||
if(!isInCreativeTab(creativeTabs)){
|
||||
if (!isInCreativeTab(creativeTabs)) {
|
||||
return;
|
||||
}
|
||||
for (int meta = 0; meta < types.length; ++meta) {
|
||||
|
|
|
@ -96,7 +96,7 @@ public class ItemParts extends ItemTR {
|
|||
// Adds Dusts SubItems To Creative Tab
|
||||
@Override
|
||||
public void getSubItems(final CreativeTabs creativeTabs, final NonNullList list) {
|
||||
if(!isInCreativeTab(creativeTabs)){
|
||||
if (!isInCreativeTab(creativeTabs)) {
|
||||
return;
|
||||
}
|
||||
for (int meta = 0; meta < ItemParts.types.length; ++meta) {
|
||||
|
|
|
@ -94,7 +94,7 @@ public class ItemPlates extends ItemTR {
|
|||
// Adds Dusts SubItems To Creative Tab
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||
if(!isInCreativeTab(creativeTabs)){
|
||||
if (!isInCreativeTab(creativeTabs)) {
|
||||
return;
|
||||
}
|
||||
for (int meta = 0; meta < types.length; ++meta) {
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
public class ItemTR extends Item {
|
||||
|
|
|
@ -96,7 +96,7 @@ public class ItemUpgrades extends ItemTR implements IUpgrade {
|
|||
// Adds Dusts SubItems To Creative Tab
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||
if(!isInCreativeTab(creativeTabs)){
|
||||
if (!isInCreativeTab(creativeTabs)) {
|
||||
return;
|
||||
}
|
||||
for (int meta = 0; meta < types.length; ++meta) {
|
||||
|
|
|
@ -83,7 +83,7 @@ public class ItemLapotronPack extends ItemArmor implements IEnergyItemInfo {
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack uncharged = new ItemStack(ModItems.LAPOTRONIC_ORB_PACK);
|
||||
|
|
|
@ -101,7 +101,7 @@ public class ItemLithiumBatpack extends ItemArmor implements IEnergyItemInfo {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack uncharged = new ItemStack(ModItems.LITHIUM_BATTERY_PACK);
|
||||
|
|
|
@ -42,7 +42,7 @@ public class ItemEnergyCrystal extends ItemBattery {
|
|||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.ENERGY_CRYSTAL);
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ItemLapotronCrystal extends ItemBattery {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.LAPOTRONIC_CRYSTAL);
|
||||
|
|
|
@ -44,7 +44,7 @@ public class ItemLapotronicOrb extends ItemBattery {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.LAPOTRONIC_ORB);
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ItemLithiumBattery extends ItemBattery {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.LITHIUM_BATTERY);
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ItemReBattery extends ItemBattery {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.RE_BATTERY);
|
||||
|
|
|
@ -39,7 +39,7 @@ public class ItemAdvancedChainsaw extends ItemChainsaw {
|
|||
|
||||
public ItemAdvancedChainsaw() {
|
||||
super(ToolMaterial.DIAMOND, "techreborn.advancedChainsaw", ConfigTechReborn.AdvancedChainsawCharge,
|
||||
4.0F);
|
||||
4.0F);
|
||||
this.cost = 250;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class ItemAdvancedChainsaw extends ItemChainsaw {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.ADVANCED_CHAINSAW);
|
||||
|
|
|
@ -59,7 +59,7 @@ public class ItemAdvancedDrill extends ItemDrill {
|
|||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.ADVANCED_DRILL);
|
||||
|
@ -117,7 +117,7 @@ public class ItemAdvancedDrill extends ItemDrill {
|
|||
}
|
||||
IBlockState blockState = world.getBlockState(pos);
|
||||
Block block = blockState.getBlock();
|
||||
if(block.getBlockHardness(blockState, world, pos) == -1.0F){
|
||||
if (block.getBlockHardness(blockState, world, pos) == -1.0F) {
|
||||
return;
|
||||
}
|
||||
List<ItemStack> stuff = block.getDrops(world, pos, blockState, 0);
|
||||
|
|
|
@ -46,7 +46,7 @@ public class ItemAdvancedJackhammer extends ItemJackhammer {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.ADVANCED_JACKHAMMER);
|
||||
|
|
|
@ -108,7 +108,7 @@ public class ItemCloakingDevice extends ItemTR implements IEnergyItemInfo {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack uncharged = new ItemStack(ModItems.CLOAKING_DEVICE);
|
||||
|
|
|
@ -48,7 +48,7 @@ public class ItemDiamondChainsaw extends ItemChainsaw {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.DIAMOND_CHAINSAW);
|
||||
|
|
|
@ -39,7 +39,7 @@ public class ItemDiamondDrill extends ItemDrill {
|
|||
|
||||
public ItemDiamondDrill() {
|
||||
super(ToolMaterial.DIAMOND, "techreborn.diamondDrill", ConfigTechReborn.DiamondDrillCharge,
|
||||
0.5F, 15F);
|
||||
0.5F, 15F);
|
||||
this.cost = 250;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class ItemDiamondDrill extends ItemDrill {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.DIAMOND_DRILL);
|
||||
|
|
|
@ -45,7 +45,7 @@ public class ItemDiamondJackhammer extends ItemJackhammer {
|
|||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.DIAMOND_JACKHAMMER);
|
||||
|
|
|
@ -96,7 +96,7 @@ public class ItemElectricTreetap extends ItemTR implements IEnergyItemInfo {
|
|||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack uncharged = new ItemStack(ModItems.ELECTRIC_TREE_TAP);
|
||||
|
|
|
@ -120,7 +120,7 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo {
|
|||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack itemStack = new ItemStack(this, 1);
|
||||
|
|
|
@ -113,7 +113,7 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack inactiveUncharged = new ItemStack(ModItems.NANOSABER);
|
||||
|
|
|
@ -139,7 +139,7 @@ public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack uncharged = new ItemStack(ModItems.OMNI_TOOL);
|
||||
|
|
|
@ -131,13 +131,12 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo {
|
|||
return 200;
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack uncharged = new ItemStack(ModItems.ROCK_CUTTER);
|
||||
|
|
|
@ -39,7 +39,7 @@ public class ItemSteelChainsaw extends ItemChainsaw {
|
|||
|
||||
public ItemSteelChainsaw() {
|
||||
super(ToolMaterial.IRON, "techreborn.ironChainsaw", ConfigTechReborn.IronChainsawCharge,
|
||||
2.0F);
|
||||
2.0F);
|
||||
this.cost = 50;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class ItemSteelChainsaw extends ItemChainsaw {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.STEEL_CHAINSAW);
|
||||
|
|
|
@ -48,7 +48,7 @@ public class ItemSteelDrill extends ItemDrill {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.STEEL_DRILL);
|
||||
|
|
|
@ -46,7 +46,7 @@ public class ItemSteelJackhammer extends ItemJackhammer {
|
|||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
if(!isInCreativeTab(par2CreativeTabs)){
|
||||
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(ModItems.STEEL_JACKHAMMER);
|
||||
|
|
|
@ -55,10 +55,10 @@ public class ItemTreeTap extends ItemTR {
|
|||
Block block = state.getBlock();
|
||||
if (CompatManager.isIC2Loaded && block == Block.getBlockFromName("ic2:rubber_wood")) {
|
||||
ItemTreetap.attemptExtract(playerIn, worldIn, pos, side, state, null);
|
||||
if (!worldIn.isRemote){
|
||||
if (!worldIn.isRemote) {
|
||||
playerIn.getHeldItem(hand).damageItem(1, playerIn);
|
||||
}
|
||||
if(playerIn instanceof EntityPlayerMP){
|
||||
if (playerIn instanceof EntityPlayerMP) {
|
||||
TRRecipeHandler.unlockTRRecipes((EntityPlayerMP) playerIn);
|
||||
}
|
||||
return EnumActionResult.SUCCESS;
|
||||
|
|
|
@ -22,7 +22,7 @@ public class PacketSetRecipe implements INetworkPacket<PacketSetRecipe> {
|
|||
|
||||
public PacketSetRecipe(TileAutoCraftingTable tile, IRecipe recipe, boolean custom) {
|
||||
this.pos = tile.getPos();
|
||||
if(recipe == null){
|
||||
if (recipe == null) {
|
||||
this.recipe = new ResourceLocation("");
|
||||
} else {
|
||||
this.recipe = recipe.getRegistryName();
|
||||
|
@ -51,8 +51,9 @@ public class PacketSetRecipe implements INetworkPacket<PacketSetRecipe> {
|
|||
|
||||
@Override
|
||||
public void processData(PacketSetRecipe message, MessageContext context) {
|
||||
TileEntity tileEntity = context.getServerHandler().player.world.getTileEntity(message.pos);;
|
||||
if(tileEntity instanceof TileAutoCraftingTable){
|
||||
TileEntity tileEntity = context.getServerHandler().player.world.getTileEntity(message.pos);
|
||||
;
|
||||
if (tileEntity instanceof TileAutoCraftingTable) {
|
||||
((TileAutoCraftingTable) tileEntity).setCurrentRecipe(message.recipe, message.custom);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -48,8 +48,7 @@ public class IDSUSaveManger extends WorldSavedData implements IDataIDSU {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isDirty()
|
||||
{
|
||||
public boolean isDirty() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -55,13 +55,13 @@ public class OilLakeGenerator implements IWorldGenerator {
|
|||
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) {
|
||||
if(!enable){
|
||||
if (!enable) {
|
||||
return;
|
||||
}
|
||||
if(!world.provider.isSurfaceWorld()){
|
||||
if (!world.provider.isSurfaceWorld()) {
|
||||
return;
|
||||
}
|
||||
if(random.nextInt(rareity) != 0){
|
||||
if (random.nextInt(rareity) != 0) {
|
||||
return;
|
||||
}
|
||||
int y = random.nextInt(maxHeight);
|
||||
|
|
Loading…
Add table
Reference in a new issue