linkedhashmap = Maps.newLinkedHashMap(state.getProperties());
String modID = tree.getModID();
- if(modID == null){
+ if (modID == null) {
modID = "forestry";
}
String s = String.format("%s:%s", modID, "germlings");
diff --git a/src/main/java/forestry/arboriculture/render/TextureLeaves.java b/src/main/java/forestry/arboriculture/render/TextureLeaves.java
index 945b80798..bb3cb38de 100644
--- a/src/main/java/forestry/arboriculture/render/TextureLeaves.java
+++ b/src/main/java/forestry/arboriculture/render/TextureLeaves.java
@@ -15,6 +15,7 @@ import java.util.Locale;
import java.util.Map;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
+
import forestry.api.arboriculture.EnumLeafType;
import forestry.core.render.TextureManager;
diff --git a/src/main/java/forestry/arboriculture/tiles/TileLeaves.java b/src/main/java/forestry/arboriculture/tiles/TileLeaves.java
index 5369fc5f7..b46de9356 100644
--- a/src/main/java/forestry/arboriculture/tiles/TileLeaves.java
+++ b/src/main/java/forestry/arboriculture/tiles/TileLeaves.java
@@ -29,6 +29,7 @@ import com.mojang.authlib.GameProfile;
import net.minecraftforge.common.EnumPlantType;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.arboriculture.EnumTreeChromosome;
import forestry.api.arboriculture.IAlleleTreeSpecies;
import forestry.api.arboriculture.IFruitProvider;
diff --git a/src/main/java/forestry/arboriculture/tiles/TileTreeContainer.java b/src/main/java/forestry/arboriculture/tiles/TileTreeContainer.java
index 120ed5833..9e80016f9 100644
--- a/src/main/java/forestry/arboriculture/tiles/TileTreeContainer.java
+++ b/src/main/java/forestry/arboriculture/tiles/TileTreeContainer.java
@@ -135,6 +135,7 @@ public abstract class TileTreeContainer extends TileEntity implements IStreamabl
}
/* UPDATING */
+
/**
* Leaves and saplings will implement their logic here.
*/
diff --git a/src/main/java/forestry/arboriculture/tiles/TileWood.java b/src/main/java/forestry/arboriculture/tiles/TileWood.java
index 6624e8277..d85a5bbd2 100644
--- a/src/main/java/forestry/arboriculture/tiles/TileWood.java
+++ b/src/main/java/forestry/arboriculture/tiles/TileWood.java
@@ -20,6 +20,7 @@ import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.IBlockAccess;
+
import forestry.api.arboriculture.EnumWoodType;
import forestry.arboriculture.IWoodTyped;
import forestry.arboriculture.blocks.BlockSlab;
diff --git a/src/main/java/forestry/arboriculture/worldgen/BlockTypeVanillaStairs.java b/src/main/java/forestry/arboriculture/worldgen/BlockTypeVanillaStairs.java
index 8aa3f0445..26b678c4e 100644
--- a/src/main/java/forestry/arboriculture/worldgen/BlockTypeVanillaStairs.java
+++ b/src/main/java/forestry/arboriculture/worldgen/BlockTypeVanillaStairs.java
@@ -12,6 +12,7 @@ package forestry.arboriculture.worldgen;
import net.minecraft.init.Blocks;
import net.minecraft.util.EnumFacing;
+
import forestry.core.worldgen.BlockType;
public class BlockTypeVanillaStairs extends BlockType {
diff --git a/src/main/java/forestry/arboriculture/worldgen/WorldGenArboriculture.java b/src/main/java/forestry/arboriculture/worldgen/WorldGenArboriculture.java
index bc0f6d75a..e483832d4 100755
--- a/src/main/java/forestry/arboriculture/worldgen/WorldGenArboriculture.java
+++ b/src/main/java/forestry/arboriculture/worldgen/WorldGenArboriculture.java
@@ -134,7 +134,7 @@ public abstract class WorldGenArboriculture extends WorldGenBase {
int offsetX = 0;
int offsetZ = 0;
- if(leanDirection != null){
+ if (leanDirection != null) {
offsetX = leanDirection.getFrontOffsetX();
offsetZ = leanDirection.getFrontOffsetZ();
}
@@ -254,7 +254,7 @@ public abstract class WorldGenArboriculture extends WorldGenBase {
int offsetX = 0;
int offsetZ = 0;
- if(branchDirection != null){
+ if (branchDirection != null) {
offsetX = branchDirection.getFrontOffsetX();
offsetZ = branchDirection.getFrontOffsetZ();
}
diff --git a/src/main/java/forestry/core/EventHandlerCore.java b/src/main/java/forestry/core/EventHandlerCore.java
index e8d191127..61cb3ddfe 100755
--- a/src/main/java/forestry/core/EventHandlerCore.java
+++ b/src/main/java/forestry/core/EventHandlerCore.java
@@ -22,6 +22,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IBreedingTracker;
import forestry.api.genetics.ISpeciesRoot;
diff --git a/src/main/java/forestry/core/TickHandlerCoreClient.java b/src/main/java/forestry/core/TickHandlerCoreClient.java
index 884e97404..6db551dc3 100755
--- a/src/main/java/forestry/core/TickHandlerCoreClient.java
+++ b/src/main/java/forestry/core/TickHandlerCoreClient.java
@@ -13,9 +13,11 @@ package forestry.core;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderGlobal;
import net.minecraft.entity.player.EntityPlayer;
+
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.Phase;
+
import forestry.core.utils.GeneticsUtil;
public class TickHandlerCoreClient {
diff --git a/src/main/java/forestry/core/TickHandlerCoreServer.java b/src/main/java/forestry/core/TickHandlerCoreServer.java
index 76c8a2ba7..adedbad5d 100755
--- a/src/main/java/forestry/core/TickHandlerCoreServer.java
+++ b/src/main/java/forestry/core/TickHandlerCoreServer.java
@@ -24,6 +24,7 @@ import net.minecraftforge.event.world.ChunkDataEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.Phase;
import net.minecraftforge.fml.common.gameevent.TickEvent.WorldTickEvent;
+
import forestry.core.config.Config;
import forestry.core.config.Constants;
import forestry.core.worldgen.WorldGenerator;
diff --git a/src/main/java/forestry/core/access/EnumAccess.java b/src/main/java/forestry/core/access/EnumAccess.java
index 62b4cf33b..c2c0608c9 100644
--- a/src/main/java/forestry/core/access/EnumAccess.java
+++ b/src/main/java/forestry/core/access/EnumAccess.java
@@ -11,6 +11,7 @@
package forestry.core.access;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
diff --git a/src/main/java/forestry/core/blocks/BlockBase.java b/src/main/java/forestry/core/blocks/BlockBase.java
index 105b02e8f..eed36b2fd 100644
--- a/src/main/java/forestry/core/blocks/BlockBase.java
+++ b/src/main/java/forestry/core/blocks/BlockBase.java
@@ -65,7 +65,7 @@ public class BlockBase & IBlockType & IStringSerializable> ext
private final PropertyEnum
TYPE;
private final PropertyEnum FACE;
- protected final BlockState blockState;
+ protected final BlockState blockState;
private boolean isReady = false;
@@ -85,7 +85,7 @@ public class BlockBase & IBlockType & IStringSerializable> ext
TYPE = PropertyEnum.create("type", machinePropertiesClass);
FACE = PropertyEnum.create("face", EnumFacing.class);
- this.blockState = this.createBlockState();
+ this.blockState = this.createBlockState();
IBlockState state = this.blockState.getBaseState().withProperty(FACE, EnumFacing.NORTH);
this.setDefaultState(state);
}
@@ -275,8 +275,9 @@ public class BlockBase
& IBlockType & IStringSerializable> ext
@Override
protected BlockState createBlockState() {
- if(!isReady)
+ if (!isReady) {
return super.createBlockState();
+ }
return new BlockState(this, TYPE, FACE);
}
@@ -289,9 +290,9 @@ public class BlockBase
& IBlockType & IStringSerializable> ext
@Override
public IBlockState getStateFromMeta(int meta) {
- for(Map.Entry
entry : properties.entrySet()){
+ for (Map.Entry
entry : properties.entrySet()) {
IMachineProperties> machineProperties = entry.getValue();
- if (machineProperties.getMeta() == meta){
+ if (machineProperties.getMeta() == meta) {
P blockType = entry.getKey();
return getDefaultState().withProperty(this.TYPE, blockType);
}
@@ -309,17 +310,16 @@ public class BlockBase
& IBlockType & IStringSerializable> ext
@Override
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) {
TileForestry tile = TileUtil.getTile(world, pos, TileForestry.class);
- if (tile != null ) {
+ if (tile != null) {
state = state.withProperty(FACE, tile.getOrientation());
}
return super.getActualState(state, world, pos);
}
- @Override
- public BlockState getBlockState()
- {
- return this.blockState;
- }
+ @Override
+ public BlockState getBlockState() {
+ return this.blockState;
+ }
@Override
public boolean getUseNeighborBrightness() {
diff --git a/src/main/java/forestry/core/blocks/BlockRegistry.java b/src/main/java/forestry/core/blocks/BlockRegistry.java
index 7fd880c0b..b8752ae09 100644
--- a/src/main/java/forestry/core/blocks/BlockRegistry.java
+++ b/src/main/java/forestry/core/blocks/BlockRegistry.java
@@ -13,6 +13,7 @@ package forestry.core.blocks;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
+
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
diff --git a/src/main/java/forestry/core/blocks/BlockResourceOre.java b/src/main/java/forestry/core/blocks/BlockResourceOre.java
index 8d7d2ebd4..2f7b2079c 100644
--- a/src/main/java/forestry/core/blocks/BlockResourceOre.java
+++ b/src/main/java/forestry/core/blocks/BlockResourceOre.java
@@ -28,10 +28,12 @@ import net.minecraft.util.IStringSerializable;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
-import forestry.api.core.IModelManager;
+
import forestry.api.core.IItemModelRegister;
+import forestry.api.core.IModelManager;
import forestry.core.CreativeTabForestry;
import forestry.plugins.PluginCore;
@@ -71,7 +73,7 @@ public class BlockResourceOre extends Block implements IItemModelRegister {
@Override
protected BlockState createBlockState() {
- return new BlockState(this, new IProperty[] { RESOURCE });
+ return new BlockState(this, new IProperty[]{RESOURCE});
}
@Override
diff --git a/src/main/java/forestry/core/blocks/BlockResourceStorage.java b/src/main/java/forestry/core/blocks/BlockResourceStorage.java
index 404a8bf9d..6a088c47c 100644
--- a/src/main/java/forestry/core/blocks/BlockResourceStorage.java
+++ b/src/main/java/forestry/core/blocks/BlockResourceStorage.java
@@ -13,16 +13,18 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IStringSerializable;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
-import forestry.api.core.IModelManager;
+
import forestry.api.core.IItemModelRegister;
+import forestry.api.core.IModelManager;
import forestry.core.CreativeTabForestry;
public class BlockResourceStorage extends Block implements IItemModelRegister {
public static final PropertyEnum RESOURCE = PropertyEnum.create("resource", ResourceType.class);
- public enum ResourceType implements IStringSerializable{
+ public enum ResourceType implements IStringSerializable {
APATITE,
COPPER,
TIN,
@@ -46,7 +48,7 @@ public class BlockResourceStorage extends Block implements IItemModelRegister {
@Override
protected BlockState createBlockState() {
- return new BlockState(this, new IProperty[] { RESOURCE });
+ return new BlockState(this, new IProperty[]{RESOURCE});
}
@Override
diff --git a/src/main/java/forestry/core/blocks/BlockSoil.java b/src/main/java/forestry/core/blocks/BlockSoil.java
index 1f71b2e45..932ae49a5 100644
--- a/src/main/java/forestry/core/blocks/BlockSoil.java
+++ b/src/main/java/forestry/core/blocks/BlockSoil.java
@@ -82,7 +82,7 @@ public class BlockSoil extends Block implements IItemTyped, IItemModelRegister {
@Override
protected BlockState createBlockState() {
- return new BlockState(this, new IProperty[] { SOIL });
+ return new BlockState(this, new IProperty[]{SOIL});
}
@Override
diff --git a/src/main/java/forestry/core/blocks/BlockStructure.java b/src/main/java/forestry/core/blocks/BlockStructure.java
index 540351ce1..2c7a2168b 100644
--- a/src/main/java/forestry/core/blocks/BlockStructure.java
+++ b/src/main/java/forestry/core/blocks/BlockStructure.java
@@ -62,7 +62,7 @@ public abstract class BlockStructure extends BlockForestry {
// If the player's hands are empty and they right-click on a multiblock, they get a
// multiblock-debugging message if the machine is not assembled.
- if(player.getCurrentEquippedItem() == null){
+ if (player.getCurrentEquippedItem() == null) {
if (controller != null) {
if (!controller.isAssembled()) {
String validationError = controller.getLastValidationError();
diff --git a/src/main/java/forestry/core/blocks/IMachineProperties.java b/src/main/java/forestry/core/blocks/IMachineProperties.java
index a06da2609..404672113 100644
--- a/src/main/java/forestry/core/blocks/IMachineProperties.java
+++ b/src/main/java/forestry/core/blocks/IMachineProperties.java
@@ -11,12 +11,8 @@
package forestry.core.blocks;
import javax.annotation.Nonnull;
-
import java.util.List;
-import forestry.api.core.IModelManager;
-import forestry.core.tiles.TileForestry;
-
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
@@ -32,7 +28,10 @@ import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
-public interface IMachineProperties extends IStringSerializable{
+import forestry.api.core.IModelManager;
+import forestry.core.tiles.TileForestry;
+
+public interface IMachineProperties extends IStringSerializable {
int getMeta();
@Nonnull
diff --git a/src/main/java/forestry/core/blocks/MachineProperties.java b/src/main/java/forestry/core/blocks/MachineProperties.java
index 16be46d38..e64ce6557 100644
--- a/src/main/java/forestry/core/blocks/MachineProperties.java
+++ b/src/main/java/forestry/core/blocks/MachineProperties.java
@@ -2,7 +2,6 @@ package forestry.core.blocks;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-
import java.util.List;
import net.minecraft.block.Block;
diff --git a/src/main/java/forestry/core/blocks/propertys/PropertyAllele.java b/src/main/java/forestry/core/blocks/propertys/PropertyAllele.java
index cc2da41b8..cc386a031 100644
--- a/src/main/java/forestry/core/blocks/propertys/PropertyAllele.java
+++ b/src/main/java/forestry/core/blocks/propertys/PropertyAllele.java
@@ -16,34 +16,27 @@ import forestry.api.genetics.IAllele;
public abstract class PropertyAllele> implements IProperty {
- protected final String name;
+ protected final String name;
- public PropertyAllele(String name){
- this.name = name;
- }
+ public PropertyAllele(String name) {
+ this.name = name;
+ }
- @Override
- public String getName()
- {
- return this.name;
- }
+ @Override
+ public String getName() {
+ return this.name;
+ }
- @Override
- public boolean equals(Object object)
- {
- if (this == object)
- {
- return true;
- }
- else if (object != null && this.getClass() == object.getClass())
- {
- PropertyAllele propertyAllele = (PropertyAllele)object;
- return name.equals(propertyAllele.name);
- }
- else
- {
- return false;
- }
- }
+ @Override
+ public boolean equals(Object object) {
+ if (this == object) {
+ return true;
+ } else if (object != null && this.getClass() == object.getClass()) {
+ PropertyAllele propertyAllele = (PropertyAllele) object;
+ return name.equals(propertyAllele.name);
+ } else {
+ return false;
+ }
+ }
}
diff --git a/src/main/java/forestry/core/blocks/propertys/UnlistedBlockAccess.java b/src/main/java/forestry/core/blocks/propertys/UnlistedBlockAccess.java
index 89aefe1b8..52a408c37 100644
--- a/src/main/java/forestry/core/blocks/propertys/UnlistedBlockAccess.java
+++ b/src/main/java/forestry/core/blocks/propertys/UnlistedBlockAccess.java
@@ -11,6 +11,7 @@
package forestry.core.blocks.propertys;
import net.minecraft.world.IBlockAccess;
+
import net.minecraftforge.common.property.IUnlistedProperty;
public final class UnlistedBlockAccess implements IUnlistedProperty {
diff --git a/src/main/java/forestry/core/blocks/propertys/UnlistedBlockPos.java b/src/main/java/forestry/core/blocks/propertys/UnlistedBlockPos.java
index 613be7c3c..7e2eb46df 100644
--- a/src/main/java/forestry/core/blocks/propertys/UnlistedBlockPos.java
+++ b/src/main/java/forestry/core/blocks/propertys/UnlistedBlockPos.java
@@ -11,6 +11,7 @@
package forestry.core.blocks.propertys;
import net.minecraft.util.BlockPos;
+
import net.minecraftforge.common.property.IUnlistedProperty;
public final class UnlistedBlockPos implements IUnlistedProperty {
diff --git a/src/main/java/forestry/core/circuits/ItemCircuitBoard.java b/src/main/java/forestry/core/circuits/ItemCircuitBoard.java
index a4ffdc9ac..e5b2e3900 100755
--- a/src/main/java/forestry/core/circuits/ItemCircuitBoard.java
+++ b/src/main/java/forestry/core/circuits/ItemCircuitBoard.java
@@ -50,7 +50,7 @@ public class ItemCircuitBoard extends ItemForestry {
@SideOnly(Side.CLIENT)
@Override
public void registerModel(Item item, IModelManager manager) {
- for(int i = 0;i < 4;i++){
+ for (int i = 0; i < 4; i++) {
manager.registerItemModel(item, i, "chipsets");
}
}
diff --git a/src/main/java/forestry/core/config/ForestryGuiConfigFactory.java b/src/main/java/forestry/core/config/ForestryGuiConfigFactory.java
index d6f8ef336..0b417f32e 100644
--- a/src/main/java/forestry/core/config/ForestryGuiConfigFactory.java
+++ b/src/main/java/forestry/core/config/ForestryGuiConfigFactory.java
@@ -14,6 +14,7 @@ import java.util.Set;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
+
import net.minecraftforge.fml.client.IModGuiFactory;
public class ForestryGuiConfigFactory implements IModGuiFactory {
diff --git a/src/main/java/forestry/core/config/Version.java b/src/main/java/forestry/core/config/Version.java
index ba1a39fa1..b7d6437b6 100755
--- a/src/main/java/forestry/core/config/Version.java
+++ b/src/main/java/forestry/core/config/Version.java
@@ -21,6 +21,7 @@ import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion;
+
import forestry.Forestry;
import forestry.core.proxy.Proxies;
import forestry.core.utils.Log;
diff --git a/src/main/java/forestry/core/entities/EntityFXColoredDropParticle.java b/src/main/java/forestry/core/entities/EntityFXColoredDropParticle.java
index b6264773d..80065776e 100644
--- a/src/main/java/forestry/core/entities/EntityFXColoredDropParticle.java
+++ b/src/main/java/forestry/core/entities/EntityFXColoredDropParticle.java
@@ -76,7 +76,7 @@ public class EntityFXColoredDropParticle extends EntityFX {
IBlockState state = this.worldObj.getBlockState(new BlockPos(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)));
Material material = state.getBlock().getMaterial();
-
+
if (material.isLiquid() || material.isSolid()) {
double d0 = MathHelper.floor_double(this.posY) + 1 - BlockLiquid.getLiquidHeightPercent(state.getBlock().getMetaFromState(state));
diff --git a/src/main/java/forestry/core/entities/EntityFXIgnition.java b/src/main/java/forestry/core/entities/EntityFXIgnition.java
index 57d2d1107..789063b83 100644
--- a/src/main/java/forestry/core/entities/EntityFXIgnition.java
+++ b/src/main/java/forestry/core/entities/EntityFXIgnition.java
@@ -15,8 +15,9 @@ import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.world.World;
-import net.minecraftforge.fml.relauncher.SideOnly;
+
import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class EntityFXIgnition extends EntityFX {
diff --git a/src/main/java/forestry/core/entities/EntityFXSnow.java b/src/main/java/forestry/core/entities/EntityFXSnow.java
index 60a20e60c..6a4705dd8 100644
--- a/src/main/java/forestry/core/entities/EntityFXSnow.java
+++ b/src/main/java/forestry/core/entities/EntityFXSnow.java
@@ -63,9 +63,9 @@ public class EntityFXSnow extends EntityFX {
}
private void renderParticle(WorldRenderer worldRenderer, double x, double y, double z, float rotationX, float rotationXZ, float rotationZ, float rotationYZ, float rotationXY, float minU, float maxU, float minV, float maxV, float scale, float timeStep) {
- int i = this.getBrightnessForRender(timeStep);
- int j = i >> 16 & 65535;
- int k = i & 65535;
+ int i = this.getBrightnessForRender(timeStep);
+ int j = i >> 16 & 65535;
+ int k = i & 65535;
worldRenderer.pos((x - rotationX * scale - rotationYZ * scale), (y - rotationXZ * scale), (z - rotationZ * scale - rotationXY * scale)).tex(maxU, maxV).color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha).lightmap(j, k).endVertex();
worldRenderer.pos((x - rotationX * scale + rotationYZ * scale), (y + rotationXZ * scale), (z - rotationZ * scale + rotationXY * scale)).tex(maxU, minV).color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha).lightmap(j, k).endVertex();
worldRenderer.pos((x + rotationX * scale + rotationYZ * scale), (y + rotationXZ * scale), (z + rotationZ * scale + rotationXY * scale)).tex(minU, minV).color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha).lightmap(j, k).endVertex();
diff --git a/src/main/java/forestry/core/entities/EntitySelector.java b/src/main/java/forestry/core/entities/EntitySelector.java
index 1e085ffdd..4eab6e1dd 100644
--- a/src/main/java/forestry/core/entities/EntitySelector.java
+++ b/src/main/java/forestry/core/entities/EntitySelector.java
@@ -27,8 +27,9 @@ public abstract class EntitySelector implements Predicate {
@Override
public boolean apply(Entity entity) {
- if(entity == null)
+ if (entity == null) {
return false;
+ }
T castEntity = entityClass.cast(entity);
return isEntityApplicableTyped(castEntity);
}
diff --git a/src/main/java/forestry/core/errors/EnumErrorCode.java b/src/main/java/forestry/core/errors/EnumErrorCode.java
index 12bbf8197..8150a4f57 100644
--- a/src/main/java/forestry/core/errors/EnumErrorCode.java
+++ b/src/main/java/forestry/core/errors/EnumErrorCode.java
@@ -5,13 +5,15 @@
******************************************************************************/
package forestry.core.errors;
+import net.minecraft.client.renderer.texture.TextureAtlasSprite;
+
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.ForestryAPI;
import forestry.api.core.IErrorState;
import forestry.core.config.Constants;
import forestry.core.render.TextureManager;
-import net.minecraft.client.renderer.texture.TextureAtlasSprite;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
public enum EnumErrorCode implements IErrorState {
diff --git a/src/main/java/forestry/core/errors/ErrorStateRegistry.java b/src/main/java/forestry/core/errors/ErrorStateRegistry.java
index 4567a628e..aaaae4a13 100644
--- a/src/main/java/forestry/core/errors/ErrorStateRegistry.java
+++ b/src/main/java/forestry/core/errors/ErrorStateRegistry.java
@@ -18,11 +18,12 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Set;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IErrorLogic;
import forestry.api.core.IErrorState;
import forestry.api.core.IErrorStateRegistry;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
/**
*
diff --git a/src/main/java/forestry/core/fluids/BlockForestryFluid.java b/src/main/java/forestry/core/fluids/BlockForestryFluid.java
index 016f16df4..bd871efb9 100644
--- a/src/main/java/forestry/core/fluids/BlockForestryFluid.java
+++ b/src/main/java/forestry/core/fluids/BlockForestryFluid.java
@@ -31,6 +31,7 @@ import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IItemModelRegister;
import forestry.api.core.IModelManager;
import forestry.core.entities.EntityFXColoredDropParticle;
diff --git a/src/main/java/forestry/core/fluids/FakeTankManager.java b/src/main/java/forestry/core/fluids/FakeTankManager.java
index bbd1ebee5..328b7744e 100644
--- a/src/main/java/forestry/core/fluids/FakeTankManager.java
+++ b/src/main/java/forestry/core/fluids/FakeTankManager.java
@@ -15,6 +15,7 @@ import java.util.List;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
diff --git a/src/main/java/forestry/core/fluids/FluidHelper.java b/src/main/java/forestry/core/fluids/FluidHelper.java
index 00688712a..263646596 100644
--- a/src/main/java/forestry/core/fluids/FluidHelper.java
+++ b/src/main/java/forestry/core/fluids/FluidHelper.java
@@ -18,6 +18,7 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
diff --git a/src/main/java/forestry/core/fluids/Fluids.java b/src/main/java/forestry/core/fluids/Fluids.java
index 736bc502f..414612060 100644
--- a/src/main/java/forestry/core/fluids/Fluids.java
+++ b/src/main/java/forestry/core/fluids/Fluids.java
@@ -26,11 +26,13 @@ import net.minecraft.client.resources.IResourceManager;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
+
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.core.config.Constants;
import forestry.core.items.EnumContainerType;
import forestry.core.items.ItemLiquidContainer;
diff --git a/src/main/java/forestry/core/fluids/TankManager.java b/src/main/java/forestry/core/fluids/TankManager.java
index a5fb8d00f..df2edfa68 100644
--- a/src/main/java/forestry/core/fluids/TankManager.java
+++ b/src/main/java/forestry/core/fluids/TankManager.java
@@ -27,6 +27,7 @@ import net.minecraft.inventory.ICrafting;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
@@ -176,8 +177,9 @@ public class TankManager implements ITankManager, ITankUpdateHandler, IStreamabl
FluidStack fluid = tank.getFluid();
IForestryPacketClient packet = new PacketTankLevelUpdate(tile, tankIndex, fluid);
for (ICrafting crafter : crafters) {
- if(crafter instanceof EntityPlayerMP)
+ if (crafter instanceof EntityPlayerMP) {
Proxies.net.sendToPlayer(packet, (EntityPlayerMP) crafter);
+ }
}
if (fluid == null) {
diff --git a/src/main/java/forestry/core/genetics/ItemGE.java b/src/main/java/forestry/core/genetics/ItemGE.java
index da77c293b..c855c8d9f 100755
--- a/src/main/java/forestry/core/genetics/ItemGE.java
+++ b/src/main/java/forestry/core/genetics/ItemGE.java
@@ -17,8 +17,10 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IModelManager;
import forestry.api.genetics.IAlleleSpecies;
import forestry.api.genetics.IIndividual;
diff --git a/src/main/java/forestry/core/genetics/alleles/AlleleSpecies.java b/src/main/java/forestry/core/genetics/alleles/AlleleSpecies.java
index 33812a294..516a0ed8e 100644
--- a/src/main/java/forestry/core/genetics/alleles/AlleleSpecies.java
+++ b/src/main/java/forestry/core/genetics/alleles/AlleleSpecies.java
@@ -17,11 +17,12 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
import com.mojang.authlib.GameProfile;
+import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.api.core.IModelProvider;
diff --git a/src/main/java/forestry/core/gui/GuiHandler.java b/src/main/java/forestry/core/gui/GuiHandler.java
index 2bd31ed83..b75956bee 100644
--- a/src/main/java/forestry/core/gui/GuiHandler.java
+++ b/src/main/java/forestry/core/gui/GuiHandler.java
@@ -17,7 +17,9 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.common.network.IGuiHandler;
+
import forestry.api.core.ForestryAPI;
public class GuiHandler implements IGuiHandler {
diff --git a/src/main/java/forestry/core/gui/buttons/GuiBetterButton.java b/src/main/java/forestry/core/gui/buttons/GuiBetterButton.java
index a9b50405f..1471fb211 100755
--- a/src/main/java/forestry/core/gui/buttons/GuiBetterButton.java
+++ b/src/main/java/forestry/core/gui/buttons/GuiBetterButton.java
@@ -14,8 +14,9 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.fml.relauncher.SideOnly;
+
import net.minecraftforge.fml.relauncher.Side;
+import net.minecraftforge.fml.relauncher.SideOnly;
import org.lwjgl.opengl.GL11;
diff --git a/src/main/java/forestry/core/gui/ledgers/OwnerLedger.java b/src/main/java/forestry/core/gui/ledgers/OwnerLedger.java
index 94e949122..c758daa11 100644
--- a/src/main/java/forestry/core/gui/ledgers/OwnerLedger.java
+++ b/src/main/java/forestry/core/gui/ledgers/OwnerLedger.java
@@ -15,6 +15,7 @@ import java.util.Locale;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.player.EntityPlayer;
+
import com.mojang.authlib.GameProfile;
import forestry.core.access.EnumAccess;
diff --git a/src/main/java/forestry/core/gui/slots/SlotCrafter.java b/src/main/java/forestry/core/gui/slots/SlotCrafter.java
index a4457ada5..6f66ae489 100755
--- a/src/main/java/forestry/core/gui/slots/SlotCrafter.java
+++ b/src/main/java/forestry/core/gui/slots/SlotCrafter.java
@@ -21,19 +21,21 @@ import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.stats.AchievementList;
+
import net.minecraftforge.fml.common.FMLCommonHandler;
+
import forestry.factory.tiles.ICrafterWorktable;
public class SlotCrafter extends Slot {
- /** The craft matrix inventory linked to this result slot. */
+ /** The craft matrix inventory linked to this result slot. */
private final IInventory craftMatrix;
private final ICrafterWorktable crafter;
- /** The player that is using the GUI where this slot resides. */
- private final EntityPlayer thePlayer;
- /** The number of items that have been crafted so far. Gets passed to ItemStack.onCrafting before being reset. */
- private int amountCrafted;
+ /** The player that is using the GUI where this slot resides. */
+ private final EntityPlayer thePlayer;
+ /** The number of items that have been crafted so far. Gets passed to ItemStack.onCrafting before being reset. */
+ private int amountCrafted;
public SlotCrafter(EntityPlayer player, IInventory craftMatrix, ICrafterWorktable crafter, int slot, int xPos, int yPos) {
super(craftMatrix, slot, xPos, yPos);
@@ -42,94 +44,79 @@ public class SlotCrafter extends Slot {
this.thePlayer = player;
}
- /**
- * Check if the stack is a valid item for this slot. Always true beside for the armor slots.
- */
- @Override
- public boolean isItemValid(ItemStack stack)
- {
- return false;
- }
+ /**
+ * Check if the stack is a valid item for this slot. Always true beside for the armor slots.
+ */
+ @Override
+ public boolean isItemValid(ItemStack stack) {
+ return false;
+ }
- /**
- * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. Typically increases an
- * internal count then calls onCrafting(item).
- */
- @Override
- protected void onCrafting(ItemStack stack, int amount)
- {
- this.amountCrafted += amount;
- this.onCrafting(stack);
- }
+ /**
+ * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. Typically increases an
+ * internal count then calls onCrafting(item).
+ */
+ @Override
+ protected void onCrafting(ItemStack stack, int amount) {
+ this.amountCrafted += amount;
+ this.onCrafting(stack);
+ }
- /**
- * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood.
- */
- @Override
- protected void onCrafting(ItemStack stack)
- {
- if (this.amountCrafted > 0)
- {
- stack.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.amountCrafted);
- }
+ /**
+ * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood.
+ */
+ @Override
+ protected void onCrafting(ItemStack stack) {
+ if (this.amountCrafted > 0) {
+ stack.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.amountCrafted);
+ }
- this.amountCrafted = 0;
+ this.amountCrafted = 0;
- if (stack.getItem() == Item.getItemFromBlock(Blocks.crafting_table))
- {
- this.thePlayer.triggerAchievement(AchievementList.buildWorkBench);
- }
+ if (stack.getItem() == Item.getItemFromBlock(Blocks.crafting_table)) {
+ this.thePlayer.triggerAchievement(AchievementList.buildWorkBench);
+ }
- if (stack.getItem() instanceof ItemPickaxe)
- {
- this.thePlayer.triggerAchievement(AchievementList.buildPickaxe);
- }
+ if (stack.getItem() instanceof ItemPickaxe) {
+ this.thePlayer.triggerAchievement(AchievementList.buildPickaxe);
+ }
- if (stack.getItem() == Item.getItemFromBlock(Blocks.furnace))
- {
- this.thePlayer.triggerAchievement(AchievementList.buildFurnace);
- }
+ if (stack.getItem() == Item.getItemFromBlock(Blocks.furnace)) {
+ this.thePlayer.triggerAchievement(AchievementList.buildFurnace);
+ }
- if (stack.getItem() instanceof ItemHoe)
- {
- this.thePlayer.triggerAchievement(AchievementList.buildHoe);
- }
+ if (stack.getItem() instanceof ItemHoe) {
+ this.thePlayer.triggerAchievement(AchievementList.buildHoe);
+ }
- if (stack.getItem() == Items.bread)
- {
- this.thePlayer.triggerAchievement(AchievementList.makeBread);
- }
+ if (stack.getItem() == Items.bread) {
+ this.thePlayer.triggerAchievement(AchievementList.makeBread);
+ }
- if (stack.getItem() == Items.cake)
- {
- this.thePlayer.triggerAchievement(AchievementList.bakeCake);
- }
+ if (stack.getItem() == Items.cake) {
+ this.thePlayer.triggerAchievement(AchievementList.bakeCake);
+ }
- if (stack.getItem() instanceof ItemPickaxe && ((ItemPickaxe)stack.getItem()).getToolMaterial() != Item.ToolMaterial.WOOD)
- {
- this.thePlayer.triggerAchievement(AchievementList.buildBetterPickaxe);
- }
+ if (stack.getItem() instanceof ItemPickaxe && ((ItemPickaxe) stack.getItem()).getToolMaterial() != Item.ToolMaterial.WOOD) {
+ this.thePlayer.triggerAchievement(AchievementList.buildBetterPickaxe);
+ }
- if (stack.getItem() instanceof ItemSword)
- {
- this.thePlayer.triggerAchievement(AchievementList.buildSword);
- }
+ if (stack.getItem() instanceof ItemSword) {
+ this.thePlayer.triggerAchievement(AchievementList.buildSword);
+ }
- if (stack.getItem() == Item.getItemFromBlock(Blocks.enchanting_table))
- {
- this.thePlayer.triggerAchievement(AchievementList.enchantments);
- }
+ if (stack.getItem() == Item.getItemFromBlock(Blocks.enchanting_table)) {
+ this.thePlayer.triggerAchievement(AchievementList.enchantments);
+ }
- if (stack.getItem() == Item.getItemFromBlock(Blocks.bookshelf))
- {
- this.thePlayer.triggerAchievement(AchievementList.bookcase);
- }
+ if (stack.getItem() == Item.getItemFromBlock(Blocks.bookshelf)) {
+ this.thePlayer.triggerAchievement(AchievementList.bookcase);
+ }
- if (stack.getItem() == Items.golden_apple && stack.getMetadata() == 1)
- {
- this.thePlayer.triggerAchievement(AchievementList.overpowered);
- }
- }
+ if (stack.getItem() == Items.golden_apple && stack.getMetadata() == 1) {
+ this.thePlayer.triggerAchievement(AchievementList.overpowered);
+ }
+ }
@Override
public ItemStack decrStackSize(int amount) {
diff --git a/src/main/java/forestry/core/gui/slots/SlotFiltered.java b/src/main/java/forestry/core/gui/slots/SlotFiltered.java
index d229faba0..83f171b44 100644
--- a/src/main/java/forestry/core/gui/slots/SlotFiltered.java
+++ b/src/main/java/forestry/core/gui/slots/SlotFiltered.java
@@ -13,8 +13,10 @@ package forestry.core.gui.slots;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.core.render.TextureManager;
import forestry.core.tiles.IFilterSlotDelegate;
diff --git a/src/main/java/forestry/core/gui/slots/SlotOutput.java b/src/main/java/forestry/core/gui/slots/SlotOutput.java
index ca6d59e56..917d948c5 100755
--- a/src/main/java/forestry/core/gui/slots/SlotOutput.java
+++ b/src/main/java/forestry/core/gui/slots/SlotOutput.java
@@ -13,6 +13,7 @@ package forestry.core.gui.slots;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
diff --git a/src/main/java/forestry/core/gui/widgets/GameTokenWidget.java b/src/main/java/forestry/core/gui/widgets/GameTokenWidget.java
index 551598184..8f1cf6c15 100644
--- a/src/main/java/forestry/core/gui/widgets/GameTokenWidget.java
+++ b/src/main/java/forestry/core/gui/widgets/GameTokenWidget.java
@@ -16,6 +16,7 @@ import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
+
import org.lwjgl.opengl.GL11;
import forestry.core.gui.GuiUtil;
diff --git a/src/main/java/forestry/core/gui/widgets/TankWidget.java b/src/main/java/forestry/core/gui/widgets/TankWidget.java
index 85d97240f..cb046907b 100755
--- a/src/main/java/forestry/core/gui/widgets/TankWidget.java
+++ b/src/main/java/forestry/core/gui/widgets/TankWidget.java
@@ -14,6 +14,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidTank;
diff --git a/src/main/java/forestry/core/inventory/AdjacentInventoryCache.java b/src/main/java/forestry/core/inventory/AdjacentInventoryCache.java
index 092ad8a5a..42d3d9252 100644
--- a/src/main/java/forestry/core/inventory/AdjacentInventoryCache.java
+++ b/src/main/java/forestry/core/inventory/AdjacentInventoryCache.java
@@ -20,6 +20,7 @@ import java.util.List;
import net.minecraft.inventory.IInventory;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import forestry.core.tiles.AdjacentTileCache;
import forestry.core.tiles.TileUtil;
diff --git a/src/main/java/forestry/core/inventory/FakeInventoryAdapter.java b/src/main/java/forestry/core/inventory/FakeInventoryAdapter.java
index f19af3304..2c42cda93 100644
--- a/src/main/java/forestry/core/inventory/FakeInventoryAdapter.java
+++ b/src/main/java/forestry/core/inventory/FakeInventoryAdapter.java
@@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.IChatComponent;
+
import forestry.core.config.Constants;
public class FakeInventoryAdapter implements IInventoryAdapter {
diff --git a/src/main/java/forestry/core/inventory/InventoryAdapter.java b/src/main/java/forestry/core/inventory/InventoryAdapter.java
index b0b3ff7da..71e5fb01f 100755
--- a/src/main/java/forestry/core/inventory/InventoryAdapter.java
+++ b/src/main/java/forestry/core/inventory/InventoryAdapter.java
@@ -18,6 +18,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.IChatComponent;
+
import forestry.core.config.Constants;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
diff --git a/src/main/java/forestry/core/inventory/InventoryAdapterRestricted.java b/src/main/java/forestry/core/inventory/InventoryAdapterRestricted.java
index 32cb06f19..e94cd5bda 100644
--- a/src/main/java/forestry/core/inventory/InventoryAdapterRestricted.java
+++ b/src/main/java/forestry/core/inventory/InventoryAdapterRestricted.java
@@ -13,6 +13,7 @@ package forestry.core.inventory;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import forestry.core.access.IAccessHandler;
import forestry.core.config.Constants;
diff --git a/src/main/java/forestry/core/inventory/InventoryAdapterTile.java b/src/main/java/forestry/core/inventory/InventoryAdapterTile.java
index 999dc336e..c7ffcfcc7 100644
--- a/src/main/java/forestry/core/inventory/InventoryAdapterTile.java
+++ b/src/main/java/forestry/core/inventory/InventoryAdapterTile.java
@@ -13,6 +13,7 @@ package forestry.core.inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import forestry.core.access.IRestrictedAccess;
public class InventoryAdapterTile extends InventoryAdapterRestricted {
diff --git a/src/main/java/forestry/core/inventory/InventoryEscritoire.java b/src/main/java/forestry/core/inventory/InventoryEscritoire.java
index ee90d5b68..3d100542a 100644
--- a/src/main/java/forestry/core/inventory/InventoryEscritoire.java
+++ b/src/main/java/forestry/core/inventory/InventoryEscritoire.java
@@ -12,6 +12,7 @@ package forestry.core.inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IIndividual;
import forestry.core.tiles.TileEscritoire;
diff --git a/src/main/java/forestry/core/inventory/InventoryNaturalistChest.java b/src/main/java/forestry/core/inventory/InventoryNaturalistChest.java
index 3c2002641..8fb5b515f 100644
--- a/src/main/java/forestry/core/inventory/InventoryNaturalistChest.java
+++ b/src/main/java/forestry/core/inventory/InventoryNaturalistChest.java
@@ -12,6 +12,7 @@ package forestry.core.inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import forestry.api.genetics.ISpeciesRoot;
import forestry.core.tiles.TileNaturalistChest;
diff --git a/src/main/java/forestry/core/inventory/InventoryPlain.java b/src/main/java/forestry/core/inventory/InventoryPlain.java
index bc446ba98..9272a1b04 100644
--- a/src/main/java/forestry/core/inventory/InventoryPlain.java
+++ b/src/main/java/forestry/core/inventory/InventoryPlain.java
@@ -16,6 +16,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.IChatComponent;
+
import forestry.api.core.INBTTagable;
import forestry.core.utils.InventoryUtil;
diff --git a/src/main/java/forestry/core/inventory/ItemInventory.java b/src/main/java/forestry/core/inventory/ItemInventory.java
index c60c8a295..09b581d3e 100755
--- a/src/main/java/forestry/core/inventory/ItemInventory.java
+++ b/src/main/java/forestry/core/inventory/ItemInventory.java
@@ -19,6 +19,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.IChatComponent;
+
import forestry.core.tiles.IFilterSlotDelegate;
public abstract class ItemInventory implements IInventory, IFilterSlotDelegate {
diff --git a/src/main/java/forestry/core/inventory/wrappers/ChestWrapper.java b/src/main/java/forestry/core/inventory/wrappers/ChestWrapper.java
index aa087b531..daa49cfdf 100755
--- a/src/main/java/forestry/core/inventory/wrappers/ChestWrapper.java
+++ b/src/main/java/forestry/core/inventory/wrappers/ChestWrapper.java
@@ -207,7 +207,7 @@ public class ChestWrapper implements IInventory {
}
@Override
- public void setField(int id, int value) {
+ public void setField(int id, int value) {
}
@Override
@@ -216,7 +216,7 @@ public class ChestWrapper implements IInventory {
}
@Override
- public void clear() {
+ public void clear() {
}
}
diff --git a/src/main/java/forestry/core/inventory/wrappers/InventoryCopy.java b/src/main/java/forestry/core/inventory/wrappers/InventoryCopy.java
index 17ac6f583..7d40e2be1 100755
--- a/src/main/java/forestry/core/inventory/wrappers/InventoryCopy.java
+++ b/src/main/java/forestry/core/inventory/wrappers/InventoryCopy.java
@@ -14,6 +14,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IChatComponent;
+
import forestry.core.utils.InventoryUtil;
/**
diff --git a/src/main/java/forestry/core/items/ItemArmorNaturalist.java b/src/main/java/forestry/core/items/ItemArmorNaturalist.java
index bbce516c9..74ddd08d0 100755
--- a/src/main/java/forestry/core/items/ItemArmorNaturalist.java
+++ b/src/main/java/forestry/core/items/ItemArmorNaturalist.java
@@ -15,11 +15,13 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IArmorNaturalist;
-import forestry.api.core.IModelManager;
import forestry.api.core.IItemModelRegister;
+import forestry.api.core.IModelManager;
import forestry.core.CreativeTabForestry;
import forestry.core.config.Constants;
diff --git a/src/main/java/forestry/core/items/ItemCraftingMaterial.java b/src/main/java/forestry/core/items/ItemCraftingMaterial.java
index 58527d88d..5d93c796e 100644
--- a/src/main/java/forestry/core/items/ItemCraftingMaterial.java
+++ b/src/main/java/forestry/core/items/ItemCraftingMaterial.java
@@ -15,8 +15,10 @@ import java.util.List;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IModelManager;
public class ItemCraftingMaterial extends ItemForestry {
diff --git a/src/main/java/forestry/core/items/ItemCrated.java b/src/main/java/forestry/core/items/ItemCrated.java
index 0e8edade5..37cf3dd9e 100755
--- a/src/main/java/forestry/core/items/ItemCrated.java
+++ b/src/main/java/forestry/core/items/ItemCrated.java
@@ -17,9 +17,11 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
+
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IModelManager;
import forestry.core.proxy.Proxies;
import forestry.core.utils.ItemStackUtil;
@@ -72,11 +74,11 @@ public class ItemCrated extends ItemForestry {
@SideOnly(Side.CLIENT)
@Override
public void registerModel(Item item, IModelManager manager) {
- if(contained == null){
+ if (contained == null) {
manager.registerItemModel(item, 0, false);
manager.registerItemModel(item, 1, "crate-filled");
- }else{
- ModelResourceLocation modelLocation = new ModelResourceLocation("forestry:crate-filled", StringUtil.cleanItemName(item));
+ } else {
+ ModelResourceLocation modelLocation = new ModelResourceLocation("forestry:crate-filled", StringUtil.cleanItemName(item));
ModelLoader.setCustomModelResourceLocation(item, 0, modelLocation);
ModelBakery.registerItemVariants(item, modelLocation);
}
@@ -84,8 +86,9 @@ public class ItemCrated extends ItemForestry {
@Override
public int getColorFromItemStack(ItemStack stack, int renderPass) {
- if(getContained() == null || renderPass == 100)
+ if (getContained() == null || renderPass == 100) {
return super.getColorFromItemStack(stack, renderPass);
+ }
return getContained().getItem().getColorFromItemStack(getContained(), renderPass);
}
diff --git a/src/main/java/forestry/core/items/ItemForestry.java b/src/main/java/forestry/core/items/ItemForestry.java
index 3bacc3828..4b91a6c41 100755
--- a/src/main/java/forestry/core/items/ItemForestry.java
+++ b/src/main/java/forestry/core/items/ItemForestry.java
@@ -13,11 +13,13 @@ package forestry.core.items;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.oredict.OreDictionary;
-import forestry.api.core.IModelManager;
+
import forestry.api.core.IItemModelRegister;
+import forestry.api.core.IModelManager;
import forestry.core.CreativeTabForestry;
public class ItemForestry extends Item implements IItemModelRegister {
diff --git a/src/main/java/forestry/core/items/ItemForestryFood.java b/src/main/java/forestry/core/items/ItemForestryFood.java
index 221bba92d..414e7c10a 100755
--- a/src/main/java/forestry/core/items/ItemForestryFood.java
+++ b/src/main/java/forestry/core/items/ItemForestryFood.java
@@ -14,13 +14,15 @@ import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
-import forestry.api.core.IModelManager;
+
import forestry.api.core.IItemModelRegister;
+import forestry.api.core.IModelManager;
import forestry.core.CreativeTabForestry;
-public class ItemForestryFood extends ItemFood implements IItemModelRegister{
+public class ItemForestryFood extends ItemFood implements IItemModelRegister {
private boolean isDrink = false;
diff --git a/src/main/java/forestry/core/items/ItemForestryTool.java b/src/main/java/forestry/core/items/ItemForestryTool.java
index 63fff8e5a..ddd7809cf 100755
--- a/src/main/java/forestry/core/items/ItemForestryTool.java
+++ b/src/main/java/forestry/core/items/ItemForestryTool.java
@@ -21,6 +21,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+
import forestry.core.utils.ItemStackUtil;
public class ItemForestryTool extends ItemForestry {
@@ -44,8 +45,9 @@ public class ItemForestryTool extends ItemForestry {
@Override
public float getDigSpeed(ItemStack itemstack, IBlockState state) {
for (String type : getToolClasses(itemstack)) {
- if (state.getBlock().isToolEffective(type, state))
+ if (state.getBlock().isToolEffective(type, state)) {
return efficiencyOnProperMaterial;
+ }
}
return super.getDigSpeed(itemstack, state);
}
diff --git a/src/main/java/forestry/core/items/ItemFruit.java b/src/main/java/forestry/core/items/ItemFruit.java
index 06009159b..57c9096da 100755
--- a/src/main/java/forestry/core/items/ItemFruit.java
+++ b/src/main/java/forestry/core/items/ItemFruit.java
@@ -16,8 +16,10 @@ import java.util.Locale;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IModelManager;
import forestry.plugins.PluginCore;
diff --git a/src/main/java/forestry/core/items/ItemLiquidContainer.java b/src/main/java/forestry/core/items/ItemLiquidContainer.java
index c17e80529..4f22d8a71 100755
--- a/src/main/java/forestry/core/items/ItemLiquidContainer.java
+++ b/src/main/java/forestry/core/items/ItemLiquidContainer.java
@@ -30,11 +30,13 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
import net.minecraft.world.World;
import net.minecraft.world.WorldProviderHell;
+
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IModelManager;
import forestry.core.CreativeTabForestry;
import forestry.core.fluids.BlockForestryFluid;
diff --git a/src/main/java/forestry/core/items/ItemOverlay.java b/src/main/java/forestry/core/items/ItemOverlay.java
index c4f4ce9f5..399266d92 100755
--- a/src/main/java/forestry/core/items/ItemOverlay.java
+++ b/src/main/java/forestry/core/items/ItemOverlay.java
@@ -15,8 +15,10 @@ import java.util.List;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IModelManager;
import forestry.core.config.Config;
diff --git a/src/main/java/forestry/core/items/ItemRegistry.java b/src/main/java/forestry/core/items/ItemRegistry.java
index 3169e1dbf..78138d05e 100644
--- a/src/main/java/forestry/core/items/ItemRegistry.java
+++ b/src/main/java/forestry/core/items/ItemRegistry.java
@@ -11,7 +11,9 @@
package forestry.core.items;
import net.minecraft.item.Item;
+
import net.minecraftforge.fml.common.registry.GameRegistry;
+
import forestry.core.utils.StringUtil;
import forestry.plugins.PluginManager;
diff --git a/src/main/java/forestry/core/items/ItemWrench.java b/src/main/java/forestry/core/items/ItemWrench.java
index 2d9e7a6b4..1a6141cf6 100755
--- a/src/main/java/forestry/core/items/ItemWrench.java
+++ b/src/main/java/forestry/core/items/ItemWrench.java
@@ -46,7 +46,8 @@ public class ItemWrench extends ItemForestry implements IToolWrench {
}
@Override
- public void wrenchUsed(EntityPlayer player, BlockPos pos) {}
+ public void wrenchUsed(EntityPlayer player, BlockPos pos) {
+ }
@Override
public boolean canWrench(EntityPlayer entityPlayer, Entity entity) {
@@ -54,5 +55,6 @@ public class ItemWrench extends ItemForestry implements IToolWrench {
}
@Override
- public void wrenchUsed(EntityPlayer entityPlayer, Entity entity) {}
+ public void wrenchUsed(EntityPlayer entityPlayer, Entity entity) {
+ }
}
diff --git a/src/main/java/forestry/core/models/ModelBlockOverlay.java b/src/main/java/forestry/core/models/ModelBlockOverlay.java
index 980b7fa57..a044a06e6 100644
--- a/src/main/java/forestry/core/models/ModelBlockOverlay.java
+++ b/src/main/java/forestry/core/models/ModelBlockOverlay.java
@@ -167,9 +167,9 @@ public abstract class ModelBlockOverlay implements ISmartItemMo
B bBlock = blockClass.cast(block);
baker.setRenderBoundsFromBlock(block);
- try{
+ try {
renderInWorld(bBlock, world, pos, baker);
- }catch(Exception e){
+ } catch (Exception e) {
return null;
}
@@ -187,9 +187,9 @@ public abstract class ModelBlockOverlay implements ISmartItemMo
block.setBlockBoundsForItemRender();
baker.setRenderBoundsFromBlock(block);
- try{
+ try {
renderInventory(bBlock, stack, baker);
- }catch(Exception e){
+ } catch (Exception e) {
return null;
}
diff --git a/src/main/java/forestry/core/models/ModelCrate.java b/src/main/java/forestry/core/models/ModelCrate.java
index 1ccd4ae8f..12bd30b25 100644
--- a/src/main/java/forestry/core/models/ModelCrate.java
+++ b/src/main/java/forestry/core/models/ModelCrate.java
@@ -70,155 +70,132 @@ public class ModelCrate implements ISmartItemModel {
textureGetter = new CrateTextureGetter();
}
- /**
- * To bake the contained model
- */
- private ImmutableMap bakeModels(ItemCrated crated){
- ImmutableMap.Builder pb = ImmutableMap.builder();
+ /**
+ * To bake the contained model
+ */
+ private ImmutableMap bakeModels(ItemCrated crated) {
+ ImmutableMap.Builder pb = ImmutableMap.builder();
- IFlexibleBakedModel flexModel = getModel(crated.getContained());
-
- IdentityHashMap- > modelResourceLocations = ObfuscationReflectionHelper.getPrivateValue(ItemModelMesherForge.class, (ItemModelMesherForge)Minecraft.getMinecraft().getRenderItem().getItemModelMesher(), 0);
-
- ModelResourceLocation modelResource = modelResourceLocations.get(crated.getContained().getItem()).get(crated.getContained().getItemDamage());
- ResourceLocation location = getItemLocation(modelResource);
-
- if(hasItemModel(location)){
- pb.put(String.valueOf(0), new TRSRBakedModel(flexModel, -0.0625F, 0, 0.0625F, 0.5F));
- pb.put(String.valueOf(1), new TRSRBakedModel(flexModel, -0.0625F, 0, -0.0625F, 0.5F));
- }else{
- pb.put(String.valueOf(0), new TRSRBakedModel(flexModel, -0.0625F, 0, 0, 0.5F));
- }
- return pb.build();
- }
-
- /**
- * @return The item model {@link ResourceLocation} from the {@link ModelResourceLocation}
- */
- private ResourceLocation getItemLocation(ModelResourceLocation modelResource){
- ResourceLocation resourcelocation = new ResourceLocation(modelResource.toString().replaceAll("#.*", ""));
- return new ResourceLocation(resourcelocation.getResourceDomain(), "item/" + resourcelocation.getResourcePath());
- }
-
- /**
- * @return Return true, when the model from the {@link ResourceLocation} a item model is
- */
- private boolean hasItemModel(ResourceLocation location){
- try{
- ModelBlock p_177581_1_ = loadModel(location);
- if (p_177581_1_ == null){
- return false;
- }else{
- ModelBlock modelblock = p_177581_1_.getRootModel();
- return modelblock == MODEL_GENERATED || modelblock == MODEL_COMPASS || modelblock == MODEL_CLOCK;
- }
- }catch(Exception e){
- return false;
- }
- }
-
- protected ModelBlock loadModel(ResourceLocation p_177594_1_) throws IOException
- {
- String s = p_177594_1_.getResourcePath();
+ IFlexibleBakedModel flexModel = getModel(crated.getContained());
- if ("builtin/generated".equals(s))
- {
- return MODEL_GENERATED;
- }
- else if ("builtin/compass".equals(s))
- {
- return MODEL_COMPASS;
- }
- else if ("builtin/clock".equals(s))
- {
- return MODEL_CLOCK;
- }
- else
- {
- Reader reader;
+ IdentityHashMap
- > modelResourceLocations = ObfuscationReflectionHelper.getPrivateValue(ItemModelMesherForge.class, (ItemModelMesherForge) Minecraft.getMinecraft().getRenderItem().getItemModelMesher(), 0);
- if (s.startsWith("builtin/"))
- {
- String s1 = s.substring("builtin/".length());
- if(s1.equals("missing")){
- reader = new StringReader("{ \"textures\": { \"particle\": \"missingno\", \"missingno\": \"missingno\"}, \"elements\": [ { \"from\": [ 0, 0, 0 ], \"to\": [ 16, 16, 16 ], \"faces\": { \"down\": { \"uv\": [ 0, 0, 16, 16 ], \"cullface\": \"down\", \"texture\": \"#missingno\" }, \"up\": { \"uv\": [ 0, 0, 16, 16 ], \"cullface\": \"up\", \"texture\": \"#missingno\" }, \"north\": { \"uv\": [ 0, 0, 16, 16 ], \"cullface\": \"north\", \"texture\": \"#missingno\" }, \"south\": { \"uv\": [ 0, 0, 16, 16 ], \"cullface\": \"south\", \"texture\": \"#missingno\" }, \"west\": { \"uv\": [ 0, 0, 16, 16 ], \"cullface\": \"west\", \"texture\": \"#missingno\" }, \"east\": { \"uv\": [ 0, 0, 16, 16 ], \"cullface\": \"east\", \"texture\": \"#missingno\" } }}]}");
- }
- else{
- throw new FileNotFoundException(p_177594_1_.toString());
- }
- }
- else
- {
- IResource iresource = Minecraft.getMinecraft().getResourceManager().getResource(this.getModelLocation(p_177594_1_));
- reader = new InputStreamReader(iresource.getInputStream(), Charsets.UTF_8);
- }
+ ModelResourceLocation modelResource = modelResourceLocations.get(crated.getContained().getItem()).get(crated.getContained().getItemDamage());
+ ResourceLocation location = getItemLocation(modelResource);
- ModelBlock model;
+ if (hasItemModel(location)) {
+ pb.put(String.valueOf(0), new TRSRBakedModel(flexModel, -0.0625F, 0, 0.0625F, 0.5F));
+ pb.put(String.valueOf(1), new TRSRBakedModel(flexModel, -0.0625F, 0, -0.0625F, 0.5F));
+ } else {
+ pb.put(String.valueOf(0), new TRSRBakedModel(flexModel, -0.0625F, 0, 0, 0.5F));
+ }
+ return pb.build();
+ }
- try
- {
- ModelBlock modelblock = ModelBlock.deserialize(reader);
- modelblock.name = p_177594_1_.toString();
- model = modelblock;
- }
- finally
- {
- reader.close();
- }
-
- if(model != null && model.getParentLocation() != null){
- if(model.getParentLocation().getResourcePath().equals("builtin/generated"))
- {
- model.parent = MODEL_GENERATED;
- }
- else
- {
- try{
- model.parent = loadModel(model.getParentLocation());
- }catch (IOException e){
- }
- }
- }
+ /**
+ * @return The item model {@link ResourceLocation} from the {@link ModelResourceLocation}
+ */
+ private ResourceLocation getItemLocation(ModelResourceLocation modelResource) {
+ ResourceLocation resourcelocation = new ResourceLocation(modelResource.toString().replaceAll("#.*", ""));
+ return new ResourceLocation(resourcelocation.getResourceDomain(), "item/" + resourcelocation.getResourcePath());
+ }
- return model;
- }
- }
-
- protected ResourceLocation getModelLocation(ResourceLocation p_177580_1_)
- {
- return new ResourceLocation(p_177580_1_.getResourceDomain(), "models/" + p_177580_1_.getResourcePath() + ".json");
- }
-
- /**
- * @return The baked model from the filled crate
- */
- private IFlexibleBakedModel getModel(ItemStack stack){
- IBakedModel model = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getItemModel(stack);
- if(model == null) {
- return null;
- }
- else if(model instanceof IFlexibleBakedModel) {
- return (IFlexibleBakedModel) model;
- }
- else {
- return new IFlexibleBakedModel.Wrapper(model, DefaultVertexFormats.ITEM);
- }
- }
-
- private IFlexibleBakedModel getModelCrate(){
- IFlexibleBakedModel flexModel;
- IBakedModel model = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getItemModel(new ItemStack(PluginStorage.items.crate, 1, 1));
- if(model == null) {
- return null;
- }
- else if(model instanceof IFlexibleBakedModel) {
- flexModel = (IFlexibleBakedModel) model;
- }
- else {
- flexModel = new IFlexibleBakedModel.Wrapper(model, DefaultVertexFormats.ITEM);
- }
- return crateModel.bake(crateModel.getDefaultState(), flexModel.getFormat(), textureGetter);
- }
+ /**
+ * @return Return true, when the model from the {@link ResourceLocation} a item model is
+ */
+ private boolean hasItemModel(ResourceLocation location) {
+ try {
+ ModelBlock p_177581_1_ = loadModel(location);
+ if (p_177581_1_ == null) {
+ return false;
+ } else {
+ ModelBlock modelblock = p_177581_1_.getRootModel();
+ return modelblock == MODEL_GENERATED || modelblock == MODEL_COMPASS || modelblock == MODEL_CLOCK;
+ }
+ } catch (Exception e) {
+ return false;
+ }
+ }
+
+ protected ModelBlock loadModel(ResourceLocation p_177594_1_) throws IOException {
+ String s = p_177594_1_.getResourcePath();
+
+ if ("builtin/generated".equals(s)) {
+ return MODEL_GENERATED;
+ } else if ("builtin/compass".equals(s)) {
+ return MODEL_COMPASS;
+ } else if ("builtin/clock".equals(s)) {
+ return MODEL_CLOCK;
+ } else {
+ Reader reader;
+
+ if (s.startsWith("builtin/")) {
+ String s1 = s.substring("builtin/".length());
+ if (s1.equals("missing")) {
+ reader = new StringReader("{ \"textures\": { \"particle\": \"missingno\", \"missingno\": \"missingno\"}, \"elements\": [ { \"from\": [ 0, 0, 0 ], \"to\": [ 16, 16, 16 ], \"faces\": { \"down\": { \"uv\": [ 0, 0, 16, 16 ], \"cullface\": \"down\", \"texture\": \"#missingno\" }, \"up\": { \"uv\": [ 0, 0, 16, 16 ], \"cullface\": \"up\", \"texture\": \"#missingno\" }, \"north\": { \"uv\": [ 0, 0, 16, 16 ], \"cullface\": \"north\", \"texture\": \"#missingno\" }, \"south\": { \"uv\": [ 0, 0, 16, 16 ], \"cullface\": \"south\", \"texture\": \"#missingno\" }, \"west\": { \"uv\": [ 0, 0, 16, 16 ], \"cullface\": \"west\", \"texture\": \"#missingno\" }, \"east\": { \"uv\": [ 0, 0, 16, 16 ], \"cullface\": \"east\", \"texture\": \"#missingno\" } }}]}");
+ } else {
+ throw new FileNotFoundException(p_177594_1_.toString());
+ }
+ } else {
+ IResource iresource = Minecraft.getMinecraft().getResourceManager().getResource(this.getModelLocation(p_177594_1_));
+ reader = new InputStreamReader(iresource.getInputStream(), Charsets.UTF_8);
+ }
+
+ ModelBlock model;
+
+ try {
+ ModelBlock modelblock = ModelBlock.deserialize(reader);
+ modelblock.name = p_177594_1_.toString();
+ model = modelblock;
+ } finally {
+ reader.close();
+ }
+
+ if (model != null && model.getParentLocation() != null) {
+ if (model.getParentLocation().getResourcePath().equals("builtin/generated")) {
+ model.parent = MODEL_GENERATED;
+ } else {
+ try {
+ model.parent = loadModel(model.getParentLocation());
+ } catch (IOException e) {
+ }
+ }
+ }
+
+ return model;
+ }
+ }
+
+ protected ResourceLocation getModelLocation(ResourceLocation p_177580_1_) {
+ return new ResourceLocation(p_177580_1_.getResourceDomain(), "models/" + p_177580_1_.getResourcePath() + ".json");
+ }
+
+ /**
+ * @return The baked model from the filled crate
+ */
+ private IFlexibleBakedModel getModel(ItemStack stack) {
+ IBakedModel model = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getItemModel(stack);
+ if (model == null) {
+ return null;
+ } else if (model instanceof IFlexibleBakedModel) {
+ return (IFlexibleBakedModel) model;
+ } else {
+ return new IFlexibleBakedModel.Wrapper(model, DefaultVertexFormats.ITEM);
+ }
+ }
+
+ private IFlexibleBakedModel getModelCrate() {
+ IFlexibleBakedModel flexModel;
+ IBakedModel model = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getItemModel(new ItemStack(PluginStorage.items.crate, 1, 1));
+ if (model == null) {
+ return null;
+ } else if (model instanceof IFlexibleBakedModel) {
+ flexModel = (IFlexibleBakedModel) model;
+ } else {
+ flexModel = new IFlexibleBakedModel.Wrapper(model, DefaultVertexFormats.ITEM);
+ }
+ return crateModel.bake(crateModel.getDefaultState(), flexModel.getFormat(), textureGetter);
+ }
@Override
public List getFaceQuads(EnumFacing facing) {
@@ -262,14 +239,14 @@ public class ModelCrate implements ISmartItemModel {
public IBakedModel handleItemState(ItemStack stack) {
ItemCrated crated = (ItemCrated) stack.getItem();
String crateUID = StringUtil.cleanItemName(crated);
- if(crates.get(crateUID) == null){
- IFlexibleBakedModel baseBaked = getModelCrate();
-
- //Set the crate color index to 100
- for(BakedQuad quad : baseBaked.getGeneralQuads()){
- ObfuscationReflectionHelper.setPrivateValue(BakedQuad.class, quad, 100, 1);
- }
- crates.put(crateUID, new MultiModel.Baked(baseBaked, bakeModels(crated)));
+ if (crates.get(crateUID) == null) {
+ IFlexibleBakedModel baseBaked = getModelCrate();
+
+ //Set the crate color index to 100
+ for (BakedQuad quad : baseBaked.getGeneralQuads()) {
+ ObfuscationReflectionHelper.setPrivateValue(BakedQuad.class, quad, 100, 1);
+ }
+ crates.put(crateUID, new MultiModel.Baked(baseBaked, bakeModels(crated)));
}
return crates.get(crateUID);
}
diff --git a/src/main/java/forestry/core/models/ModelManager.java b/src/main/java/forestry/core/models/ModelManager.java
index 3b8beb3c6..b01a5c604 100644
--- a/src/main/java/forestry/core/models/ModelManager.java
+++ b/src/main/java/forestry/core/models/ModelManager.java
@@ -10,6 +10,9 @@
******************************************************************************/
package forestry.core.models;
+import javax.annotation.Nonnull;
+import java.util.ArrayList;
+
import net.minecraft.block.Block;
import net.minecraft.client.renderer.ItemMeshDefinition;
import net.minecraft.client.resources.model.ModelBakery;
@@ -18,15 +21,13 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IRegistry;
import net.minecraft.util.ResourceLocation;
+
import net.minecraftforge.client.event.ModelBakeEvent;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameData;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
-import java.util.ArrayList;
-import javax.annotation.Nonnull;
-
import forestry.api.core.ForestryAPI;
import forestry.api.core.IItemModelRegister;
import forestry.api.core.IModelManager;
@@ -62,9 +63,9 @@ public class ModelManager implements IModelManager {
@Override
public void registerItemModel(Item item, int meta, boolean withMeta) {
- if(withMeta){
+ if (withMeta) {
ModelLoader.setCustomModelResourceLocation(item, meta, getModelLocation(item, meta));
- }else{
+ } else {
ModelLoader.setCustomModelResourceLocation(item, meta, getModelLocation(item));
}
}
@@ -132,11 +133,11 @@ public class ModelManager implements IModelManager {
}
}
- public static void registerCustomBlockModel(@Nonnull BlockModelIndex index){
+ public static void registerCustomBlockModel(@Nonnull BlockModelIndex index) {
customBlockModels.add(index);
}
- public static void registerCustomModel(@Nonnull ModelIndex index){
+ public static void registerCustomModel(@Nonnull ModelIndex index) {
customModels.add(index);
}
diff --git a/src/main/java/forestry/core/models/TRSRBakedModel.java b/src/main/java/forestry/core/models/TRSRBakedModel.java
index 47fefbf96..1d1add8ec 100644
--- a/src/main/java/forestry/core/models/TRSRBakedModel.java
+++ b/src/main/java/forestry/core/models/TRSRBakedModel.java
@@ -1,13 +1,13 @@
/*******************************************************************************
* The MIT License (MIT)
* Copyright (c) 2013-2014 Slime Knights (mDiyo, fuj1n, Sunstrike, progwml6, pillbox, alexbegt)
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
* Any alternate licenses are noted where appropriate.
******************************************************************************/
package forestry.core.models;
@@ -16,163 +16,162 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
+import javax.vecmath.Matrix3f;
+import javax.vecmath.Matrix4f;
+import javax.vecmath.Vector3f;
+import javax.vecmath.Vector4f;
+import java.util.EnumMap;
+import java.util.List;
+
import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.renderer.vertex.VertexFormatElement;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.client.model.IFlexibleBakedModel;
import net.minecraftforge.client.model.TRSRTransformation;
import net.minecraftforge.client.model.pipeline.UnpackedBakedQuad;
import net.minecraftforge.client.model.pipeline.VertexTransformer;
-import java.util.EnumMap;
-import java.util.List;
-
-import javax.vecmath.Matrix3f;
-import javax.vecmath.Matrix4f;
-import javax.vecmath.Vector3f;
-import javax.vecmath.Vector4f;
-
// for those wondering TRSR stands for Translation Rotation Scale Rotation
public class TRSRBakedModel implements IFlexibleBakedModel {
- protected final ImmutableList general;
- protected final ImmutableMap> faces;
- protected final IFlexibleBakedModel original;
+ protected final ImmutableList general;
+ protected final ImmutableMap> faces;
+ protected final IFlexibleBakedModel original;
- public TRSRBakedModel(IFlexibleBakedModel original, float x, float y, float z, float scale) {
- this(original, x, y, z, 0, 0, 0, scale, scale, scale);
- }
+ public TRSRBakedModel(IFlexibleBakedModel original, float x, float y, float z, float scale) {
+ this(original, x, y, z, 0, 0, 0, scale, scale, scale);
+ }
- public TRSRBakedModel(IFlexibleBakedModel original, float x, float y, float z, float rotX, float rotY, float rotZ, float scale) {
- this(original, x, y, z, rotX, rotY, rotZ, scale, scale, scale);
- }
+ public TRSRBakedModel(IFlexibleBakedModel original, float x, float y, float z, float rotX, float rotY, float rotZ, float scale) {
+ this(original, x, y, z, rotX, rotY, rotZ, scale, scale, scale);
+ }
- public TRSRBakedModel(IFlexibleBakedModel original, float x, float y, float z, float rotX, float rotY, float rotZ, float scaleX, float scaleY, float scaleZ) {
- this(original, new TRSRTransformation(new Vector3f(x, y, z),
- null,
- new Vector3f(scaleX, scaleY, scaleZ),
- TRSRTransformation.quatFromYXZ(rotY, rotX, rotZ)));
- }
+ public TRSRBakedModel(IFlexibleBakedModel original, float x, float y, float z, float rotX, float rotY, float rotZ, float scaleX, float scaleY, float scaleZ) {
+ this(original, new TRSRTransformation(new Vector3f(x, y, z),
+ null,
+ new Vector3f(scaleX, scaleY, scaleZ),
+ TRSRTransformation.quatFromYXZ(rotY, rotX, rotZ)));
+ }
- public TRSRBakedModel(IFlexibleBakedModel original, TRSRTransformation transform) {
- this.original = original;
+ public TRSRBakedModel(IFlexibleBakedModel original, TRSRTransformation transform) {
+ this.original = original;
- ImmutableList.Builder builder;
- builder = ImmutableList.builder();
+ ImmutableList.Builder builder;
+ builder = ImmutableList.builder();
- transform = TRSRTransformation.blockCenterToCorner(transform);
+ transform = TRSRTransformation.blockCenterToCorner(transform);
- // face quads
- EnumMap> faces = Maps.newEnumMap(EnumFacing.class);
- for(EnumFacing face : EnumFacing.values()) {
- if(!original.isBuiltInRenderer()) {
- for(BakedQuad quad : original.getFaceQuads(face)) {
- Transformer transformer = new Transformer(transform, original.getFormat());
- quad.pipe(transformer);
- builder.add(transformer.build());
- }
- }
- //faces.put(face, builder.build());
- faces.put(face, ImmutableList.of());
- }
+ // face quads
+ EnumMap> faces = Maps.newEnumMap(EnumFacing.class);
+ for (EnumFacing face : EnumFacing.values()) {
+ if (!original.isBuiltInRenderer()) {
+ for (BakedQuad quad : original.getFaceQuads(face)) {
+ Transformer transformer = new Transformer(transform, original.getFormat());
+ quad.pipe(transformer);
+ builder.add(transformer.build());
+ }
+ }
+ //faces.put(face, builder.build());
+ faces.put(face, ImmutableList.of());
+ }
- // general quads
- //builder = ImmutableList.builder();
- if(!original.isBuiltInRenderer()) {
- for(BakedQuad quad : original.getGeneralQuads()) {
- Transformer transformer = new Transformer(transform, original.getFormat());
- quad.pipe(transformer);
- builder.add(transformer.build());
- }
- }
+ // general quads
+ //builder = ImmutableList.builder();
+ if (!original.isBuiltInRenderer()) {
+ for (BakedQuad quad : original.getGeneralQuads()) {
+ Transformer transformer = new Transformer(transform, original.getFormat());
+ quad.pipe(transformer);
+ builder.add(transformer.build());
+ }
+ }
- this.general = builder.build();
- this.faces = Maps.immutableEnumMap(faces);
- }
+ this.general = builder.build();
+ this.faces = Maps.immutableEnumMap(faces);
+ }
- @Override
- public List getFaceQuads(EnumFacing side) {
- return faces.get(side);
- }
+ @Override
+ public List getFaceQuads(EnumFacing side) {
+ return faces.get(side);
+ }
- @Override
- public List getGeneralQuads() {
- return general;
- }
+ @Override
+ public List getGeneralQuads() {
+ return general;
+ }
- @Override
- public boolean isAmbientOcclusion() {
- return false;
- }
+ @Override
+ public boolean isAmbientOcclusion() {
+ return false;
+ }
- @Override
- public boolean isGui3d() {
- return original.isGui3d();
- }
+ @Override
+ public boolean isGui3d() {
+ return original.isGui3d();
+ }
- @Override
- public boolean isBuiltInRenderer() {
- return original.isBuiltInRenderer();
- }
+ @Override
+ public boolean isBuiltInRenderer() {
+ return original.isBuiltInRenderer();
+ }
- @Override
- public TextureAtlasSprite getParticleTexture() {
- return original.getParticleTexture();
- }
+ @Override
+ public TextureAtlasSprite getParticleTexture() {
+ return original.getParticleTexture();
+ }
- @Override
- public ItemCameraTransforms getItemCameraTransforms() {
- return original.getItemCameraTransforms();
- }
+ @Override
+ public ItemCameraTransforms getItemCameraTransforms() {
+ return original.getItemCameraTransforms();
+ }
- @Override
- public VertexFormat getFormat() {
- return original.getFormat();
- }
+ @Override
+ public VertexFormat getFormat() {
+ return original.getFormat();
+ }
- public static class Transformer extends VertexTransformer {
+ public static class Transformer extends VertexTransformer {
- protected Matrix4f transformation;
- protected Matrix3f normalTransformation;
+ protected Matrix4f transformation;
+ protected Matrix3f normalTransformation;
- public Transformer(TRSRTransformation transformation, VertexFormat format) {
- super(new UnpackedBakedQuad.Builder(format));
- // position transform
- this.transformation = transformation.getMatrix();
- // normal transform
- this.normalTransformation = new Matrix3f();
- this.transformation.getRotationScale(this.normalTransformation);
- this.normalTransformation.invert();
- this.normalTransformation.transpose();
- }
+ public Transformer(TRSRTransformation transformation, VertexFormat format) {
+ super(new UnpackedBakedQuad.Builder(format));
+ // position transform
+ this.transformation = transformation.getMatrix();
+ // normal transform
+ this.normalTransformation = new Matrix3f();
+ this.transformation.getRotationScale(this.normalTransformation);
+ this.normalTransformation.invert();
+ this.normalTransformation.transpose();
+ }
- @Override
- public void put(int element, float... data) {
- VertexFormatElement.EnumUsage usage = parent.getVertexFormat().getElement(element).getUsage();
+ @Override
+ public void put(int element, float... data) {
+ VertexFormatElement.EnumUsage usage = parent.getVertexFormat().getElement(element).getUsage();
- // transform normals and position
- if(usage == VertexFormatElement.EnumUsage.POSITION && data.length >= 3) {
- Vector4f vec = new Vector4f(data);
- vec.setW(1.0f);
- transformation.transform(vec);
- data = new float[4];
- vec.get(data);
- }
- else if(usage == VertexFormatElement.EnumUsage.NORMAL && data.length >= 3) {
- Vector3f vec = new Vector3f(data);
- normalTransformation.transform(vec);
- vec.normalize();
- data = new float[4];
- vec.get(data);
- }
- super.put(element, data);
- }
+ // transform normals and position
+ if (usage == VertexFormatElement.EnumUsage.POSITION && data.length >= 3) {
+ Vector4f vec = new Vector4f(data);
+ vec.setW(1.0f);
+ transformation.transform(vec);
+ data = new float[4];
+ vec.get(data);
+ } else if (usage == VertexFormatElement.EnumUsage.NORMAL && data.length >= 3) {
+ Vector3f vec = new Vector3f(data);
+ normalTransformation.transform(vec);
+ vec.normalize();
+ data = new float[4];
+ vec.get(data);
+ }
+ super.put(element, data);
+ }
- public UnpackedBakedQuad build() {
- return ((UnpackedBakedQuad.Builder)parent).build();
- }
- }
+ public UnpackedBakedQuad build() {
+ return ((UnpackedBakedQuad.Builder) parent).build();
+ }
+ }
}
\ No newline at end of file
diff --git a/src/main/java/forestry/core/models/baker/ModelBaker.java b/src/main/java/forestry/core/models/baker/ModelBaker.java
index caccd0300..e54f41360 100644
--- a/src/main/java/forestry/core/models/baker/ModelBaker.java
+++ b/src/main/java/forestry/core/models/baker/ModelBaker.java
@@ -63,12 +63,13 @@ public class ModelBaker implements IModelBaker {
protected final FaceBakery faceBakery = new FaceBakery();
- protected final float[] defUVs = new float[] { 0, 0, 1, 1 };
+ protected final float[] defUVs = new float[]{0, 0, 1, 1};
@Override
public void setRenderBoundsFromBlock(Block block) {
- if (block == null)
+ if (block == null) {
return;
+ }
renderMinX = block.getBlockBoundsMinX();
renderMinY = block.getBlockBoundsMinY();
@@ -127,7 +128,7 @@ public class ModelBaker implements IModelBaker {
return false;
}
- private final float quadsUV[] = new float[] { 0, 0, 1, 1, 0, 0, 1, 1 };
+ private final float quadsUV[] = new float[]{0, 0, 1, 1, 0, 0, 1, 1};
protected EnumSet renderFaces = EnumSet.allOf(EnumFacing.class);
private List faces = new ArrayList<>();
@@ -138,43 +139,43 @@ public class ModelBaker implements IModelBaker {
float to_b = 0;
switch (face) {
- case UP:
- from_a = from_16.x / 16.0f;
- from_b = from_16.z / 16.0f;
- to_a = to_16.x / 16.0f;
- to_b = to_16.z / 16.0f;
- break;
- case DOWN:
- from_a = from_16.x / 16.0f;
- from_b = from_16.z / 16.0f;
- to_a = to_16.x / 16.0f;
- to_b = to_16.z / 16.0f;
- break;
- case SOUTH:
- from_a = from_16.x / 16.0f;
- from_b = from_16.y / 16.0f;
- to_a = to_16.x / 16.0f;
- to_b = to_16.y / 16.0f;
- break;
- case NORTH:
- from_a = from_16.x / 16.0f;
- from_b = from_16.y / 16.0f;
- to_a = to_16.x / 16.0f;
- to_b = to_16.y / 16.0f;
- break;
- case EAST:
- from_a = from_16.y / 16.0f;
- from_b = from_16.z / 16.0f;
- to_a = to_16.y / 16.0f;
- to_b = to_16.z / 16.0f;
- break;
- case WEST:
- from_a = from_16.y / 16.0f;
- from_b = from_16.z / 16.0f;
- to_a = to_16.y / 16.0f;
- to_b = to_16.z / 16.0f;
- break;
- default:
+ case UP:
+ from_a = from_16.x / 16.0f;
+ from_b = from_16.z / 16.0f;
+ to_a = to_16.x / 16.0f;
+ to_b = to_16.z / 16.0f;
+ break;
+ case DOWN:
+ from_a = from_16.x / 16.0f;
+ from_b = from_16.z / 16.0f;
+ to_a = to_16.x / 16.0f;
+ to_b = to_16.z / 16.0f;
+ break;
+ case SOUTH:
+ from_a = from_16.x / 16.0f;
+ from_b = from_16.y / 16.0f;
+ to_a = to_16.x / 16.0f;
+ to_b = to_16.y / 16.0f;
+ break;
+ case NORTH:
+ from_a = from_16.x / 16.0f;
+ from_b = from_16.y / 16.0f;
+ to_a = to_16.x / 16.0f;
+ to_b = to_16.y / 16.0f;
+ break;
+ case EAST:
+ from_a = from_16.y / 16.0f;
+ from_b = from_16.z / 16.0f;
+ to_a = to_16.y / 16.0f;
+ to_b = to_16.z / 16.0f;
+ break;
+ case WEST:
+ from_a = from_16.y / 16.0f;
+ from_b = from_16.z / 16.0f;
+ to_a = to_16.y / 16.0f;
+ to_b = to_16.z / 16.0f;
+ break;
+ default:
}
from_a = 1.0f - from_a;
@@ -182,7 +183,7 @@ public class ModelBaker implements IModelBaker {
to_a = 1.0f - to_a;
to_b = 1.0f - to_b;
- final float[] afloat = new float[] { // :P
+ final float[] afloat = new float[]{ // :P
16.0f * (quadsUV[0] + quadsUV[2] * from_a + quadsUV[4] * from_b), // 0
16.0f * (quadsUV[1] + quadsUV[3] * from_a + quadsUV[5] * from_b), // 1
@@ -267,8 +268,9 @@ public class ModelBaker implements IModelBaker {
public IBakedModel bakeModel(boolean flip) {
ModelRotation mr = ModelRotation.X0_Y0;
- if (flip)
+ if (flip) {
mr = ModelRotation.X0_Y180;
+ }
for (ModelBakerFace face : faces) {
final EnumFacing myFace = face.face;
@@ -280,10 +282,11 @@ public class ModelBaker implements IModelBaker {
BakedQuad bf = faceBakery.makeBakedQuad(face.to, face.from, bpf, face.spite, myFace, mr, null, true, true);
bf = new IColoredBakedQuad.ColoredBakedQuad(bf.getVertexData(), face.colorIndex, bf.getFace());
- if (face.isEdge)
+ if (face.isEdge) {
this.generatedModel.getFaceQuads(myFace).add(bf);
- else
+ } else {
this.generatedModel.getGeneralQuads().add(bf);
+ }
}
return clearBaker();
}
diff --git a/src/main/java/forestry/core/models/baker/ModelBakerFace.java b/src/main/java/forestry/core/models/baker/ModelBakerFace.java
index 256e3da4b..70100b49e 100644
--- a/src/main/java/forestry/core/models/baker/ModelBakerFace.java
+++ b/src/main/java/forestry/core/models/baker/ModelBakerFace.java
@@ -10,13 +10,15 @@
******************************************************************************/
package forestry.core.models.baker;
-import org.lwjgl.util.vector.Vector3f;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+import org.lwjgl.util.vector.Vector3f;
+
/**
* A face of a baked model
*/
diff --git a/src/main/java/forestry/core/models/baker/ModelBakerModel.java b/src/main/java/forestry/core/models/baker/ModelBakerModel.java
index 93a6882bf..2c26b867b 100644
--- a/src/main/java/forestry/core/models/baker/ModelBakerModel.java
+++ b/src/main/java/forestry/core/models/baker/ModelBakerModel.java
@@ -87,15 +87,15 @@ public class ModelBakerModel implements IBakedModel {
}
protected static float[] getRotation() {
- return new float[] { -80, -45, 170 };
+ return new float[]{-80, -45, 170};
}
protected static float[] getTranslation() {
- return new float[] { 0, 1.5F, -2.75F };
+ return new float[]{0, 1.5F, -2.75F};
}
protected static float[] getScale() {
- return new float[] { 0.375F, 0.375F, 0.375F };
+ return new float[]{0.375F, 0.375F, 0.375F};
}
@Override
diff --git a/src/main/java/forestry/core/multiblock/MultiblockClientTickHandler.java b/src/main/java/forestry/core/multiblock/MultiblockClientTickHandler.java
index cfb4de1a3..5ad7da197 100644
--- a/src/main/java/forestry/core/multiblock/MultiblockClientTickHandler.java
+++ b/src/main/java/forestry/core/multiblock/MultiblockClientTickHandler.java
@@ -1,6 +1,7 @@
package forestry.core.multiblock;
import net.minecraft.client.Minecraft;
+
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
diff --git a/src/main/java/forestry/core/network/DataInputStreamForestry.java b/src/main/java/forestry/core/network/DataInputStreamForestry.java
index 44036c356..b3a08f7a6 100644
--- a/src/main/java/forestry/core/network/DataInputStreamForestry.java
+++ b/src/main/java/forestry/core/network/DataInputStreamForestry.java
@@ -7,7 +7,6 @@ import java.io.InvalidObjectException;
import java.util.Collection;
import java.util.List;
-import forestry.core.utils.ItemStackUtil;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -19,6 +18,8 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
+import forestry.core.utils.ItemStackUtil;
+
public class DataInputStreamForestry extends DataInputStream {
public DataInputStreamForestry(InputStream in) {
@@ -139,13 +140,13 @@ public class DataInputStreamForestry extends DataInputStream {
public FluidStack readFluidStack() throws IOException {
int amount = readVarInt();
- if(amount > 0){
+ if (amount > 0) {
String fluidName = readUTF();
Fluid fluid = FluidRegistry.getFluid(fluidName);
if (fluid == null) {
return null;
}
-
+
return new FluidStack(fluid, amount);
}
return null;
diff --git a/src/main/java/forestry/core/network/DataOutputStreamForestry.java b/src/main/java/forestry/core/network/DataOutputStreamForestry.java
index 51421fd17..e78a2c465 100644
--- a/src/main/java/forestry/core/network/DataOutputStreamForestry.java
+++ b/src/main/java/forestry/core/network/DataOutputStreamForestry.java
@@ -6,7 +6,6 @@ import java.io.OutputStream;
import java.util.Collection;
import java.util.List;
-import forestry.core.utils.ItemStackUtil;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompressedStreamTools;
@@ -14,6 +13,8 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fluids.FluidStack;
+import forestry.core.utils.ItemStackUtil;
+
public class DataOutputStreamForestry extends DataOutputStream {
public DataOutputStreamForestry(OutputStream out) {
diff --git a/src/main/java/forestry/core/network/ForestryPacket.java b/src/main/java/forestry/core/network/ForestryPacket.java
index 460b99f1f..e7c9a8e1d 100755
--- a/src/main/java/forestry/core/network/ForestryPacket.java
+++ b/src/main/java/forestry/core/network/ForestryPacket.java
@@ -12,10 +12,12 @@ package forestry.core.network;
import java.io.IOException;
+import net.minecraft.network.PacketBuffer;
+
+import net.minecraftforge.fml.common.network.internal.FMLProxyPacket;
+
import io.netty.buffer.ByteBufOutputStream;
import io.netty.buffer.Unpooled;
-import net.minecraft.network.PacketBuffer;
-import net.minecraftforge.fml.common.network.internal.FMLProxyPacket;
public abstract class ForestryPacket implements IForestryPacket {
private final IPacketId id = getPacketId();
diff --git a/src/main/java/forestry/core/network/PacketHandler.java b/src/main/java/forestry/core/network/PacketHandler.java
index 34d5ae8c8..7cd602102 100644
--- a/src/main/java/forestry/core/network/PacketHandler.java
+++ b/src/main/java/forestry/core/network/PacketHandler.java
@@ -15,12 +15,14 @@ import java.io.InputStream;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.NetHandlerPlayServer;
+
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.network.FMLEventChannel;
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientCustomPacketEvent;
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ServerCustomPacketEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.internal.FMLProxyPacket;
+
import forestry.core.proxy.Proxies;
import io.netty.buffer.ByteBufInputStream;
diff --git a/src/main/java/forestry/core/network/packets/PacketDummy.java b/src/main/java/forestry/core/network/packets/PacketDummy.java
index 5397ce9f7..71f47fa4e 100644
--- a/src/main/java/forestry/core/network/packets/PacketDummy.java
+++ b/src/main/java/forestry/core/network/packets/PacketDummy.java
@@ -12,9 +12,10 @@ package forestry.core.network.packets;
import java.io.IOException;
+import net.minecraftforge.fml.common.network.internal.FMLProxyPacket;
+
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.IForestryPacket;
-import net.minecraftforge.fml.common.network.internal.FMLProxyPacket;
public abstract class PacketDummy implements IForestryPacket {
protected PacketDummy() {
diff --git a/src/main/java/forestry/core/network/packets/PacketFXSignal.java b/src/main/java/forestry/core/network/packets/PacketFXSignal.java
index 258081018..691eedd5d 100644
--- a/src/main/java/forestry/core/network/packets/PacketFXSignal.java
+++ b/src/main/java/forestry/core/network/packets/PacketFXSignal.java
@@ -15,6 +15,7 @@ import java.io.IOException;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.BlockPos;
+
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
import forestry.core.network.IForestryPacketClient;
diff --git a/src/main/java/forestry/core/proxy/ProxyRender.java b/src/main/java/forestry/core/proxy/ProxyRender.java
index e6716968f..139faeb1a 100644
--- a/src/main/java/forestry/core/proxy/ProxyRender.java
+++ b/src/main/java/forestry/core/proxy/ProxyRender.java
@@ -94,7 +94,7 @@ public class ProxyRender {
public void registerModels() {
}
- public void registerLoaders(){
+ public void registerLoaders() {
}
/* FX */
diff --git a/src/main/java/forestry/core/proxy/ProxyRenderClient.java b/src/main/java/forestry/core/proxy/ProxyRenderClient.java
index 7915441e1..5269b5c9a 100644
--- a/src/main/java/forestry/core/proxy/ProxyRenderClient.java
+++ b/src/main/java/forestry/core/proxy/ProxyRenderClient.java
@@ -148,7 +148,7 @@ public class ProxyRenderClient extends ProxyRender {
}
@Override
- public void registerLoaders(){
+ public void registerLoaders() {
B3DLoader.instance.addDomain(Constants.ID);
OBJLoader.instance.addDomain(Constants.ID);
}
diff --git a/src/main/java/forestry/core/recipes/jei/ForestryTooltipCallback.java b/src/main/java/forestry/core/recipes/jei/ForestryTooltipCallback.java
index 3ddbd8377..4ea379620 100644
--- a/src/main/java/forestry/core/recipes/jei/ForestryTooltipCallback.java
+++ b/src/main/java/forestry/core/recipes/jei/ForestryTooltipCallback.java
@@ -29,7 +29,7 @@ public class ForestryTooltipCallback implements ITooltipCallback {
@Override
public void onTooltip(int index, boolean input, ItemStack ingredient, List tooltip) {
List tip = tooltips.get(index);
- if(!tip.isEmpty()){
+ if (!tip.isEmpty()) {
tooltip.addAll(tip);
}
}
diff --git a/src/main/java/forestry/core/render/MachineStateMapper.java b/src/main/java/forestry/core/render/MachineStateMapper.java
index 3111cb75a..0256efba4 100644
--- a/src/main/java/forestry/core/render/MachineStateMapper.java
+++ b/src/main/java/forestry/core/render/MachineStateMapper.java
@@ -36,11 +36,13 @@ public class MachineStateMapper & IBlockType & IStringSerializ
@Override
public Map putStateModelLocations(Block block) {
for (T type : machinePropertiesClass.getEnumConstants()) {
- if (type.getMachineProperties() instanceof IMachinePropertiesTesr)
+ if (type.getMachineProperties() instanceof IMachinePropertiesTesr) {
continue;
+ }
for (EnumFacing facing : EnumFacing.values()) {
- if (facing == EnumFacing.DOWN || facing == EnumFacing.UP)
+ if (facing == EnumFacing.DOWN || facing == EnumFacing.UP) {
continue;
+ }
IBlockState state = block.getDefaultState().withProperty(META, type).withProperty(FACE, facing);
LinkedHashMap linkedhashmap = Maps.newLinkedHashMap(state.getProperties());
ResourceLocation blockLocation = Block.blockRegistry.getNameForObject(block);
diff --git a/src/main/java/forestry/core/render/ParticleHelper.java b/src/main/java/forestry/core/render/ParticleHelper.java
index 1364f5352..3cb867244 100644
--- a/src/main/java/forestry/core/render/ParticleHelper.java
+++ b/src/main/java/forestry/core/render/ParticleHelper.java
@@ -12,7 +12,6 @@ package forestry.core.render;
import java.util.Random;
-import forestry.core.proxy.Proxies;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.particle.EffectRenderer;
@@ -22,9 +21,12 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+import forestry.core.proxy.Proxies;
+
/**
* @author CovertJaguar
*/
diff --git a/src/main/java/forestry/core/render/RenderAnalyzer.java b/src/main/java/forestry/core/render/RenderAnalyzer.java
index 97f7c0f3e..2df2be52f 100755
--- a/src/main/java/forestry/core/render/RenderAnalyzer.java
+++ b/src/main/java/forestry/core/render/RenderAnalyzer.java
@@ -38,9 +38,9 @@ public class RenderAnalyzer extends TileEntitySpecialRenderer {
*/
@Override
public void renderTileEntityAt(TileAnalyzer analyzer, double x, double y, double z, float partialTicks, int destroyStage) {
- if(analyzer != null){
+ if (analyzer != null) {
render(analyzer.getIndividualOnDisplay(), analyzer.getWorld(), analyzer.getOrientation(), x, y, z);
- }else{
+ } else {
render(null, null, EnumFacing.WEST, x, y, z);
}
}
diff --git a/src/main/java/forestry/core/render/RenderEscritoire.java b/src/main/java/forestry/core/render/RenderEscritoire.java
index 56219425b..9e3dcba8a 100755
--- a/src/main/java/forestry/core/render/RenderEscritoire.java
+++ b/src/main/java/forestry/core/render/RenderEscritoire.java
@@ -38,9 +38,9 @@ public class RenderEscritoire extends TileEntitySpecialRenderer
*/
@Override
public void renderTileEntityAt(TileEscritoire escritoire, double x, double y, double z, float partialTicks, int destroyStage) {
- if(escritoire != null){
+ if (escritoire != null) {
render(escritoire.getStackInSlot(InventoryEscritoire.SLOT_ANALYZE), escritoire.getOrientation(), x, y, z);
- }else{
+ } else {
render(null, EnumFacing.EAST, x, y, z);
}
}
diff --git a/src/main/java/forestry/core/render/RenderMachine.java b/src/main/java/forestry/core/render/RenderMachine.java
index 297d06bc6..f1a621e27 100755
--- a/src/main/java/forestry/core/render/RenderMachine.java
+++ b/src/main/java/forestry/core/render/RenderMachine.java
@@ -88,10 +88,10 @@ public class RenderMachine extends TileEntitySpecialRenderer {
*/
@Override
public void renderTileEntityAt(TileBase tile, double x, double y, double z, float partialTicks, int destroyStage) {
- if(tile != null){
+ if (tile != null) {
IRenderableTile generator = (IRenderableTile) tile;
render(generator.getResourceTankInfo(), generator.getProductTankInfo(), generator.getOrientation(), x, y, z);
- }else{
+ } else {
render(TankRenderInfo.EMPTY, TankRenderInfo.EMPTY, EnumFacing.SOUTH, x, y, z);
}
}
diff --git a/src/main/java/forestry/core/render/RenderMill.java b/src/main/java/forestry/core/render/RenderMill.java
index 7cb5643ad..8ae616edd 100755
--- a/src/main/java/forestry/core/render/RenderMill.java
+++ b/src/main/java/forestry/core/render/RenderMill.java
@@ -92,9 +92,9 @@ public class RenderMill extends TileEntitySpecialRenderer {
*/
@Override
public void renderTileEntityAt(TileMill mill, double x, double y, double z, float partialTicks, int destroyStage) {
- if(mill != null){
+ if (mill != null) {
render(mill.progress, mill.charge, EnumFacing.WEST, x, y, z);
- }else{
+ } else {
byte charge = 0;
render(0.0f, charge, EnumFacing.WEST, x, y, z);
}
diff --git a/src/main/java/forestry/core/render/RenderNaturalistChest.java b/src/main/java/forestry/core/render/RenderNaturalistChest.java
index 2432baa38..2275aaffb 100644
--- a/src/main/java/forestry/core/render/RenderNaturalistChest.java
+++ b/src/main/java/forestry/core/render/RenderNaturalistChest.java
@@ -34,9 +34,9 @@ public class RenderNaturalistChest extends TileEntitySpecialRenderer itemRegistry = GameData.getItemRegistry();
@@ -71,10 +72,10 @@ public abstract class ItemStackUtil {
}
/**
- *
+ *
* @return The registry name of the item as {@link String}
*/
- public static String getItemNameFromRegistryAsSting(Item item){
+ public static String getItemNameFromRegistryAsSting(Item item) {
return getItemNameFromRegistry(item).toString();
}
@@ -82,7 +83,7 @@ public abstract class ItemStackUtil {
* @return The item from the item registry
* @param itemName The registry name from the item as {@link String}
*/
- public static Item getItemFromRegistry(String itemName){
+ public static Item getItemFromRegistry(String itemName) {
return getItemFromRegistry(new ResourceLocation(itemName));
}
@@ -90,24 +91,24 @@ public abstract class ItemStackUtil {
* @return The item from the item registry
* @param itemName The registry name from the item as {@link ResourceLocation}
*/
- public static Item getItemFromRegistry(ResourceLocation itemName){
- if(itemName == null){
+ public static Item getItemFromRegistry(ResourceLocation itemName) {
+ if (itemName == null) {
return null;
}
FMLControlledNamespacedRegistry
- itemRegistry = GameData.getItemRegistry();
int registryID = itemRegistry.getId(itemName);
- if(registryID == -1){
+ if (registryID == -1) {
return null;
}
return itemRegistry.getRaw(registryID);
}
/**
- *
+ *
* @return The registry name of the block as {@link ResourceLocation}
*/
- public static ResourceLocation getBlockNameFromRegistry(Block block){
- if(block == null){
+ public static ResourceLocation getBlockNameFromRegistry(Block block) {
+ if (block == null) {
return null;
}
FMLControlledNamespacedRegistry blockRegistry = GameData.getBlockRegistry();
@@ -115,10 +116,10 @@ public abstract class ItemStackUtil {
}
/**
- *
+ *
* @return The registry name of the block as {@link String}
*/
- public static String getBlockNameFromRegistryAsSting(Block block){
+ public static String getBlockNameFromRegistryAsSting(Block block) {
return getBlockNameFromRegistry(block).toString();
}
@@ -126,7 +127,7 @@ public abstract class ItemStackUtil {
* @return The block from the block registry
* @param itemName The registry name from the block as {@link String}
*/
- public static Block getBlockFromRegistry(String itemName){
+ public static Block getBlockFromRegistry(String itemName) {
return getBlockFromRegistry(new ResourceLocation(itemName));
}
@@ -134,13 +135,13 @@ public abstract class ItemStackUtil {
* @return The block from the block registry
* @param itemName The registry name from the block as {@link ResourceLocation}
*/
- public static Block getBlockFromRegistry(ResourceLocation itemName){
- if(itemName == null){
+ public static Block getBlockFromRegistry(ResourceLocation itemName) {
+ if (itemName == null) {
return null;
}
FMLControlledNamespacedRegistry blockRegistry = GameData.getBlockRegistry();
int registryID = blockRegistry.getId(itemName);
- if(registryID == -1){
+ if (registryID == -1) {
return null;
}
return blockRegistry.getRaw(registryID);
diff --git a/src/main/java/forestry/core/utils/NBTUtil.java b/src/main/java/forestry/core/utils/NBTUtil.java
index 37e2d36b3..2e398e1e4 100644
--- a/src/main/java/forestry/core/utils/NBTUtil.java
+++ b/src/main/java/forestry/core/utils/NBTUtil.java
@@ -28,6 +28,7 @@ import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.NBTTagLong;
import net.minecraft.nbt.NBTTagShort;
import net.minecraft.nbt.NBTTagString;
+
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
/**
diff --git a/src/main/java/forestry/core/utils/Stack.java b/src/main/java/forestry/core/utils/Stack.java
index 5cc41719c..a3b0ba9a8 100644
--- a/src/main/java/forestry/core/utils/Stack.java
+++ b/src/main/java/forestry/core/utils/Stack.java
@@ -17,6 +17,7 @@ import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
+
import net.minecraftforge.oredict.OreDictionary;
public class Stack {
diff --git a/src/main/java/forestry/core/utils/vect/IVect.java b/src/main/java/forestry/core/utils/vect/IVect.java
index ec2350b8f..3bd844409 100644
--- a/src/main/java/forestry/core/utils/vect/IVect.java
+++ b/src/main/java/forestry/core/utils/vect/IVect.java
@@ -10,11 +10,12 @@
******************************************************************************/
package forestry.core.utils.vect;
-import forestry.api.farming.FarmDirection;
import net.minecraft.entity.Entity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
+import forestry.api.farming.FarmDirection;
+
/**
* Represents a position or dimensions.
*/
diff --git a/src/main/java/forestry/core/utils/vect/MutableVect.java b/src/main/java/forestry/core/utils/vect/MutableVect.java
index ee3aa7713..2b74266d2 100644
--- a/src/main/java/forestry/core/utils/vect/MutableVect.java
+++ b/src/main/java/forestry/core/utils/vect/MutableVect.java
@@ -10,10 +10,11 @@
******************************************************************************/
package forestry.core.utils.vect;
-import forestry.api.farming.FarmDirection;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
+import forestry.api.farming.FarmDirection;
+
/**
* Represents changeable positions or dimensions.
*/
diff --git a/src/main/java/forestry/core/worldgen/WorldGenerator.java b/src/main/java/forestry/core/worldgen/WorldGenerator.java
index 46626d4b2..eb35b94c1 100644
--- a/src/main/java/forestry/core/worldgen/WorldGenerator.java
+++ b/src/main/java/forestry/core/worldgen/WorldGenerator.java
@@ -20,6 +20,7 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.terraingen.PopulateChunkEvent;
import net.minecraftforge.fml.common.IWorldGenerator;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+
import forestry.core.blocks.BlockResourceOre;
import forestry.core.config.Config;
import forestry.plugins.PluginCore;
diff --git a/src/main/java/forestry/energy/EnergyManager.java b/src/main/java/forestry/energy/EnergyManager.java
index 91db8f799..55713afc7 100644
--- a/src/main/java/forestry/energy/EnergyManager.java
+++ b/src/main/java/forestry/energy/EnergyManager.java
@@ -5,6 +5,7 @@ import java.io.IOException;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import forestry.api.core.ForestryAPI;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
diff --git a/src/main/java/forestry/energy/inventory/InventoryEnginePeat.java b/src/main/java/forestry/energy/inventory/InventoryEnginePeat.java
index 3982755d2..7b6d3bb11 100644
--- a/src/main/java/forestry/energy/inventory/InventoryEnginePeat.java
+++ b/src/main/java/forestry/energy/inventory/InventoryEnginePeat.java
@@ -12,6 +12,7 @@ package forestry.energy.inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import forestry.api.fuels.FuelManager;
import forestry.core.inventory.InventoryAdapterTile;
import forestry.core.utils.SlotUtil;
diff --git a/src/main/java/forestry/energy/proxy/ProxyEnergy.java b/src/main/java/forestry/energy/proxy/ProxyEnergy.java
index 219bd0bfb..8512a296d 100755
--- a/src/main/java/forestry/energy/proxy/ProxyEnergy.java
+++ b/src/main/java/forestry/energy/proxy/ProxyEnergy.java
@@ -10,9 +10,10 @@
******************************************************************************/
package forestry.energy.proxy;
-import forestry.core.tiles.TileEngine;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import forestry.core.tiles.TileEngine;
+
public class ProxyEnergy {
public TileEntitySpecialRenderer getRenderDefaultEngine(String gfxBase) {
return null;
diff --git a/src/main/java/forestry/energy/proxy/ProxyEnergyClient.java b/src/main/java/forestry/energy/proxy/ProxyEnergyClient.java
index 7aa25601d..be1950c4f 100644
--- a/src/main/java/forestry/energy/proxy/ProxyEnergyClient.java
+++ b/src/main/java/forestry/energy/proxy/ProxyEnergyClient.java
@@ -10,9 +10,10 @@
******************************************************************************/
package forestry.energy.proxy;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+
import forestry.core.tiles.TileEngine;
import forestry.energy.render.RenderEngine;
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
public class ProxyEnergyClient extends ProxyEnergy {
diff --git a/src/main/java/forestry/energy/render/RenderEngine.java b/src/main/java/forestry/energy/render/RenderEngine.java
index 6fd381c91..647cc813c 100755
--- a/src/main/java/forestry/energy/render/RenderEngine.java
+++ b/src/main/java/forestry/energy/render/RenderEngine.java
@@ -92,14 +92,14 @@ public class RenderEngine extends TileEntitySpecialRenderer {
@Override
public void renderTileEntityAt(TileEngine engine, double x, double y, double z, float partialTicks, int destroyStage) {
- if(engine != null){
+ if (engine != null) {
if (engine instanceof TileEngine) {
TileEngine tileEngine = engine;
render(tileEngine.getTemperatureState(), tileEngine.progress, tileEngine.getOrientation(), x, y, z);
} else {
Log.severe("Tried to render a tile entity that is not an engine: " + engine);
}
- }else{
+ } else {
render(TemperatureState.COOL, 0.25F, EnumFacing.UP, x, y, z);
}
}
diff --git a/src/main/java/forestry/energy/tiles/TileEngineBiogas.java b/src/main/java/forestry/energy/tiles/TileEngineBiogas.java
index 7362d87fc..6cdb4b25f 100644
--- a/src/main/java/forestry/energy/tiles/TileEngineBiogas.java
+++ b/src/main/java/forestry/energy/tiles/TileEngineBiogas.java
@@ -18,6 +18,7 @@ import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
diff --git a/src/main/java/forestry/energy/tiles/TileEnginePeat.java b/src/main/java/forestry/energy/tiles/TileEnginePeat.java
index 96cabf3a4..d4fffbd3a 100644
--- a/src/main/java/forestry/energy/tiles/TileEnginePeat.java
+++ b/src/main/java/forestry/energy/tiles/TileEnginePeat.java
@@ -23,7 +23,9 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fml.common.Optional;
+
import forestry.api.fuels.FuelManager;
import forestry.core.config.Constants;
import forestry.core.errors.EnumErrorCode;
@@ -287,7 +289,7 @@ public class TileEnginePeat extends TileEngine implements ISidedInventory {
super.writeToNBT(nbttagcompound);
if (fuelItem != null) {
- nbttagcompound.setString("EngineFuelItem", ItemStackUtil.getItemNameFromRegistryAsSting(fuelItem));
+ nbttagcompound.setString("EngineFuelItem", ItemStackUtil.getItemNameFromRegistryAsSting(fuelItem));
}
nbttagcompound.setInteger("EngineFuelMeta", fuelItemMeta);
diff --git a/src/main/java/forestry/factory/gui/widgets/MemorizedRecipeSlot.java b/src/main/java/forestry/factory/gui/widgets/MemorizedRecipeSlot.java
index 1b909c869..021191f40 100644
--- a/src/main/java/forestry/factory/gui/widgets/MemorizedRecipeSlot.java
+++ b/src/main/java/forestry/factory/gui/widgets/MemorizedRecipeSlot.java
@@ -13,6 +13,7 @@ package forestry.factory.gui.widgets;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.item.ItemStack;
+
import org.lwjgl.opengl.GL11;
import forestry.core.gui.widgets.ItemStackWidgetBase;
diff --git a/src/main/java/forestry/factory/inventory/InventoryBottler.java b/src/main/java/forestry/factory/inventory/InventoryBottler.java
index c0941370f..1765d5490 100644
--- a/src/main/java/forestry/factory/inventory/InventoryBottler.java
+++ b/src/main/java/forestry/factory/inventory/InventoryBottler.java
@@ -12,6 +12,7 @@ package forestry.factory.inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
diff --git a/src/main/java/forestry/factory/inventory/InventoryCarpenter.java b/src/main/java/forestry/factory/inventory/InventoryCarpenter.java
index 35caecf60..64381d0a6 100644
--- a/src/main/java/forestry/factory/inventory/InventoryCarpenter.java
+++ b/src/main/java/forestry/factory/inventory/InventoryCarpenter.java
@@ -12,6 +12,7 @@ package forestry.factory.inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import forestry.core.fluids.FluidHelper;
diff --git a/src/main/java/forestry/factory/inventory/InventoryCentrifuge.java b/src/main/java/forestry/factory/inventory/InventoryCentrifuge.java
index ed551e742..6343090dc 100644
--- a/src/main/java/forestry/factory/inventory/InventoryCentrifuge.java
+++ b/src/main/java/forestry/factory/inventory/InventoryCentrifuge.java
@@ -12,6 +12,7 @@ package forestry.factory.inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import forestry.core.inventory.InventoryAdapterTile;
import forestry.core.utils.SlotUtil;
import forestry.factory.recipes.CentrifugeRecipeManager;
diff --git a/src/main/java/forestry/factory/inventory/InventoryFabricator.java b/src/main/java/forestry/factory/inventory/InventoryFabricator.java
index fe3d987a0..2be7ce298 100644
--- a/src/main/java/forestry/factory/inventory/InventoryFabricator.java
+++ b/src/main/java/forestry/factory/inventory/InventoryFabricator.java
@@ -12,6 +12,7 @@ package forestry.factory.inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import forestry.core.inventory.InventoryAdapterTile;
import forestry.core.utils.SlotUtil;
import forestry.factory.recipes.FabricatorRecipeManager;
diff --git a/src/main/java/forestry/factory/inventory/InventoryFermenter.java b/src/main/java/forestry/factory/inventory/InventoryFermenter.java
index 37886acf1..138ea7b67 100644
--- a/src/main/java/forestry/factory/inventory/InventoryFermenter.java
+++ b/src/main/java/forestry/factory/inventory/InventoryFermenter.java
@@ -12,6 +12,7 @@ package forestry.factory.inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import forestry.api.fuels.FuelManager;
diff --git a/src/main/java/forestry/factory/inventory/InventoryMoistener.java b/src/main/java/forestry/factory/inventory/InventoryMoistener.java
index f2ae3c607..20d9924d9 100644
--- a/src/main/java/forestry/factory/inventory/InventoryMoistener.java
+++ b/src/main/java/forestry/factory/inventory/InventoryMoistener.java
@@ -12,6 +12,7 @@ package forestry.factory.inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import forestry.api.fuels.FuelManager;
diff --git a/src/main/java/forestry/factory/inventory/InventoryRaintank.java b/src/main/java/forestry/factory/inventory/InventoryRaintank.java
index 4a201c872..ed129b2bd 100644
--- a/src/main/java/forestry/factory/inventory/InventoryRaintank.java
+++ b/src/main/java/forestry/factory/inventory/InventoryRaintank.java
@@ -12,6 +12,7 @@ package forestry.factory.inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import forestry.core.fluids.FluidHelper;
import forestry.core.fluids.Fluids;
import forestry.core.inventory.InventoryAdapterTile;
diff --git a/src/main/java/forestry/factory/inventory/InventorySqueezer.java b/src/main/java/forestry/factory/inventory/InventorySqueezer.java
index 6be3c7949..bc453531a 100644
--- a/src/main/java/forestry/factory/inventory/InventorySqueezer.java
+++ b/src/main/java/forestry/factory/inventory/InventorySqueezer.java
@@ -14,6 +14,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.FluidStack;
import forestry.core.fluids.FluidHelper;
diff --git a/src/main/java/forestry/factory/inventory/InventoryStill.java b/src/main/java/forestry/factory/inventory/InventoryStill.java
index 223f593b4..133075deb 100644
--- a/src/main/java/forestry/factory/inventory/InventoryStill.java
+++ b/src/main/java/forestry/factory/inventory/InventoryStill.java
@@ -12,6 +12,7 @@ package forestry.factory.inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import forestry.core.fluids.FluidHelper;
diff --git a/src/main/java/forestry/factory/recipes/jei/FactoryJeiPlugin.java b/src/main/java/forestry/factory/recipes/jei/FactoryJeiPlugin.java
index 5d2408819..2b2269228 100644
--- a/src/main/java/forestry/factory/recipes/jei/FactoryJeiPlugin.java
+++ b/src/main/java/forestry/factory/recipes/jei/FactoryJeiPlugin.java
@@ -96,7 +96,7 @@ public class FactoryJeiPlugin extends BlankModPlugin {
@Nullable
@Override
public List getGuiExtraAreas(GuiForestry guiContainer) {
- GuiForestry,?> guiForestry = guiContainer;
+ GuiForestry, ?> guiForestry = (GuiForestry, ?>) guiContainer;
return guiForestry.getExtraGuiAreas();
}
}
diff --git a/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeCategory.java b/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeCategory.java
index c004e8ff2..ab8f75897 100644
--- a/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeCategory.java
+++ b/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeCategory.java
@@ -17,7 +17,7 @@ import mezz.jei.api.gui.IGuiItemStackGroup;
import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.recipe.IRecipeWrapper;
-public class BottlerRecipeCategory extends ForestryRecipeCategory{
+public class BottlerRecipeCategory extends ForestryRecipeCategory {
private static final int emptySlot = 0;
private static final int outputSlot = 1;
diff --git a/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeHandler.java b/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeHandler.java
index 65e887d70..c2ffd91e1 100644
--- a/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeHandler.java
+++ b/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeHandler.java
@@ -31,10 +31,10 @@ public class BottlerRecipeHandler implements IRecipeHandler 0;
diff --git a/src/main/java/forestry/factory/recipes/jei/carpenter/CarpenterRecipeMaker.java b/src/main/java/forestry/factory/recipes/jei/carpenter/CarpenterRecipeMaker.java
index 8b709535d..27d9581bc 100644
--- a/src/main/java/forestry/factory/recipes/jei/carpenter/CarpenterRecipeMaker.java
+++ b/src/main/java/forestry/factory/recipes/jei/carpenter/CarpenterRecipeMaker.java
@@ -13,8 +13,9 @@ public class CarpenterRecipeMaker {
public static List getCarpenterRecipes() {
List recipes = new ArrayList<>();
- for(ICarpenterRecipe recipe : RecipeManagers.carpenterManager.recipes())
+ for (ICarpenterRecipe recipe : RecipeManagers.carpenterManager.recipes()) {
recipes.add(new CarpenterRecipeWrapper(recipe));
+ }
return recipes;
}
diff --git a/src/main/java/forestry/factory/recipes/jei/carpenter/CarpenterRecipeWrapper.java b/src/main/java/forestry/factory/recipes/jei/carpenter/CarpenterRecipeWrapper.java
index 6fb206a17..fddfaaed9 100644
--- a/src/main/java/forestry/factory/recipes/jei/carpenter/CarpenterRecipeWrapper.java
+++ b/src/main/java/forestry/factory/recipes/jei/carpenter/CarpenterRecipeWrapper.java
@@ -12,7 +12,7 @@ import net.minecraftforge.fluids.FluidStack;
import forestry.api.recipes.ICarpenterRecipe;
import forestry.core.recipes.jei.ForestryRecipeWrapper;
-public class CarpenterRecipeWrapper extends ForestryRecipeWrapper{
+public class CarpenterRecipeWrapper extends ForestryRecipeWrapper {
public CarpenterRecipeWrapper(@Nonnull ICarpenterRecipe recipe) {
super(recipe);
diff --git a/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeHandler.java b/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeHandler.java
index 2839c0546..9e68f5d4c 100644
--- a/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeHandler.java
+++ b/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeHandler.java
@@ -33,14 +33,14 @@ public class CentrifugeRecipeHandler implements IRecipeHandler 0;
diff --git a/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeMaker.java b/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeMaker.java
index ac7a27f44..31303ae83 100644
--- a/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeMaker.java
+++ b/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeMaker.java
@@ -13,8 +13,9 @@ public class CentrifugeRecipeMaker {
public static List getCentrifugeRecipe() {
List recipes = new ArrayList<>();
- for(ICentrifugeRecipe recipe : RecipeManagers.centrifugeManager.recipes())
+ for (ICentrifugeRecipe recipe : RecipeManagers.centrifugeManager.recipes()) {
recipes.add(new CentrifugeRecipeWrapper(recipe));
+ }
return recipes;
}
diff --git a/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeWrapper.java b/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeWrapper.java
index d8dd43962..9ad07cadb 100644
--- a/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeWrapper.java
+++ b/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeWrapper.java
@@ -7,7 +7,7 @@ import java.util.List;
import forestry.api.recipes.ICentrifugeRecipe;
import forestry.core.recipes.jei.ForestryRecipeWrapper;
-public class CentrifugeRecipeWrapper extends ForestryRecipeWrapper{
+public class CentrifugeRecipeWrapper extends ForestryRecipeWrapper {
public CentrifugeRecipeWrapper(@Nonnull ICentrifugeRecipe recipe) {
super(recipe);
diff --git a/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeHandler.java b/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeHandler.java
index 2427d7101..4c0e87661 100644
--- a/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeHandler.java
+++ b/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeHandler.java
@@ -31,17 +31,17 @@ public class FabricatorRecipeHandler implements IRecipeHandler 0;
diff --git a/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeMaker.java b/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeMaker.java
index 6515a8b11..b6fee042d 100644
--- a/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeMaker.java
+++ b/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeMaker.java
@@ -13,8 +13,9 @@ public class FabricatorRecipeMaker {
public static List getFabricatorRecipes() {
List recipes = new ArrayList<>();
- for(IFabricatorRecipe recipe : RecipeManagers.fabricatorManager.recipes())
+ for (IFabricatorRecipe recipe : RecipeManagers.fabricatorManager.recipes()) {
recipes.add(new FabricatorRecipeWrapper(recipe));
+ }
return recipes;
}
diff --git a/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeWrapper.java b/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeWrapper.java
index 619ff8ee0..0576ab440 100644
--- a/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeWrapper.java
+++ b/src/main/java/forestry/factory/recipes/jei/fabricator/FabricatorRecipeWrapper.java
@@ -12,7 +12,7 @@ import net.minecraftforge.fluids.FluidStack;
import forestry.api.recipes.IFabricatorRecipe;
import forestry.core.recipes.jei.ForestryRecipeWrapper;
-public class FabricatorRecipeWrapper extends ForestryRecipeWrapper{
+public class FabricatorRecipeWrapper extends ForestryRecipeWrapper {
public FabricatorRecipeWrapper(@Nonnull IFabricatorRecipe recipe) {
super(recipe);
diff --git a/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeHandler.java b/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeHandler.java
index 1604a62fc..b4dab17d8 100644
--- a/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeHandler.java
+++ b/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeHandler.java
@@ -31,16 +31,16 @@ public class FermenterRecipeHandler implements IRecipeHandler getFermenterRecipes() {
List recipes = new ArrayList<>();
- for(IFermenterRecipe recipe : RecipeManagers.fermenterManager.recipes()){
+ for (IFermenterRecipe recipe : RecipeManagers.fermenterManager.recipes()) {
if (recipe.getResource() != null && recipe.getResource().getItem() instanceof IVariableFermentable) {
for (ItemStack stack : JEIUtils.getItemVariations(recipe.getResource())) {
recipes.add(new FermenterRecipeWrapper(recipe, stack));
}
- }else{
+ } else {
recipes.add(new FermenterRecipeWrapper(recipe, recipe.getResource()));
}
}
diff --git a/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeWrapper.java b/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeWrapper.java
index add436843..2ddb26e75 100644
--- a/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeWrapper.java
+++ b/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeWrapper.java
@@ -15,7 +15,7 @@ import forestry.api.recipes.IFermenterRecipe;
import forestry.api.recipes.IVariableFermentable;
import forestry.core.recipes.jei.ForestryRecipeWrapper;
-public class FermenterRecipeWrapper extends ForestryRecipeWrapper{
+public class FermenterRecipeWrapper extends ForestryRecipeWrapper {
@Nonnull
private final ItemStack fermentable;
diff --git a/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeHandler.java b/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeHandler.java
index 13e142e6e..64af058b0 100644
--- a/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeHandler.java
+++ b/src/main/java/forestry/factory/recipes/jei/moistener/MoistenerRecipeHandler.java
@@ -31,16 +31,16 @@ public class MoistenerRecipeHandler implements IRecipeHandler{
+public class MoistenerRecipeWrapper extends ForestryRecipeWrapper {
@Nonnull
private final MoistenerFuel fuel;
@@ -25,8 +25,9 @@ public class MoistenerRecipeWrapper extends ForestryRecipeWrapper getInputs() {
List inputs = new ArrayList<>();
inputs.add(getRecipe().getResource());
- if(fuel.item != null)
+ if (fuel.item != null) {
inputs.add(fuel.item);
+ }
return inputs;
}
@@ -35,8 +36,9 @@ public class MoistenerRecipeWrapper extends ForestryRecipeWrapper getOutputs() {
List outputs = new ArrayList<>();
outputs.add(getRecipe().getProduct());
- if(fuel.product != null)
+ if (fuel.product != null) {
outputs.add(fuel.product);
+ }
return outputs;
}
diff --git a/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeHandler.java b/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeHandler.java
index 25735293a..01931cabf 100644
--- a/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeHandler.java
+++ b/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeHandler.java
@@ -41,19 +41,19 @@ public class SqueezerRecipeHandler implements I
@Override
public boolean isRecipeValid(@Nonnull R wrapper) {
- if(wrapper.getFluidOutputs() == null || wrapper.getFluidOutputs().isEmpty()){
+ if (wrapper.getFluidOutputs() == null || wrapper.getFluidOutputs().isEmpty()) {
return false;
}
- if(wrapper.getInputs() == null || wrapper.getInputs().isEmpty()){
+ if (wrapper.getInputs() == null || wrapper.getInputs().isEmpty()) {
return false;
}
- if(wrapper.getOutputs() == null || wrapper.getOutputs().isEmpty()){
+ if (wrapper.getOutputs() == null || wrapper.getOutputs().isEmpty()) {
return false;
}
- if(wrapper.getRecipe() instanceof ISqueezerContainerRecipe){
+ if (wrapper.getRecipe() instanceof ISqueezerContainerRecipe) {
ISqueezerContainerRecipe recipe = (ISqueezerContainerRecipe) wrapper.getRecipe();
return recipe.getProcessingTime() > 0 && recipe.getRemnantsChance() > 0;
- }else{
+ } else {
ISqueezerRecipe recipe = (ISqueezerRecipe) wrapper.getRecipe();
return recipe.getProcessingTime() > 0 && recipe.getRemnantsChance() > 0;
}
diff --git a/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeMaker.java b/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeMaker.java
index 06def2215..07d3dbecf 100644
--- a/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeMaker.java
+++ b/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeMaker.java
@@ -3,12 +3,13 @@ package forestry.factory.recipes.jei.squeezer;
import java.util.ArrayList;
import java.util.List;
+import net.minecraftforge.fluids.FluidContainerRegistry;
+import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
+
import forestry.api.recipes.ISqueezerRecipe;
import forestry.api.recipes.RecipeManagers;
import forestry.factory.recipes.ISqueezerContainerRecipe;
import forestry.factory.recipes.SqueezerRecipeManager;
-import net.minecraftforge.fluids.FluidContainerRegistry;
-import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
public class SqueezerRecipeMaker {
@@ -17,7 +18,7 @@ public class SqueezerRecipeMaker {
public static List getSqueezerRecipes() {
List recipes = new ArrayList<>();
- for(ISqueezerRecipe recipe : RecipeManagers.squeezerManager.recipes()){
+ for (ISqueezerRecipe recipe : RecipeManagers.squeezerManager.recipes()) {
recipes.add(new SqueezerRecipeWrapper(recipe));
}
return recipes;
@@ -25,7 +26,7 @@ public class SqueezerRecipeMaker {
public static List getSqueezerContainerRecipes() {
List recipes = new ArrayList<>();
- for(FluidContainerData data : FluidContainerRegistry.getRegisteredFluidContainerData()){
+ for (FluidContainerData data : FluidContainerRegistry.getRegisteredFluidContainerData()) {
ISqueezerContainerRecipe containerRecipe = SqueezerRecipeManager.findMatchingContainerRecipe(data.filledContainer);
if (containerRecipe != null) {
recipes.add(new SqueezerContainerRecipeWrapper(containerRecipe, data.filledContainer));
diff --git a/src/main/java/forestry/factory/recipes/jei/still/StillRecipeHandler.java b/src/main/java/forestry/factory/recipes/jei/still/StillRecipeHandler.java
index 372422ed1..7d8aa7caa 100644
--- a/src/main/java/forestry/factory/recipes/jei/still/StillRecipeHandler.java
+++ b/src/main/java/forestry/factory/recipes/jei/still/StillRecipeHandler.java
@@ -31,10 +31,10 @@ public class StillRecipeHandler implements IRecipeHandler {
@Override
public boolean isRecipeValid(@Nonnull StillRecipeWrapper wrapper) {
IStillRecipe recipe = wrapper.getRecipe();
- if(recipe.getInput() == null){
+ if (recipe.getInput() == null) {
return false;
}
- if(recipe.getOutput() == null){
+ if (recipe.getOutput() == null) {
return false;
}
return true;
diff --git a/src/main/java/forestry/factory/recipes/jei/still/StillRecipeMaker.java b/src/main/java/forestry/factory/recipes/jei/still/StillRecipeMaker.java
index 7072b0823..ea617e09e 100644
--- a/src/main/java/forestry/factory/recipes/jei/still/StillRecipeMaker.java
+++ b/src/main/java/forestry/factory/recipes/jei/still/StillRecipeMaker.java
@@ -13,8 +13,9 @@ public class StillRecipeMaker {
public static List getStillRecipes() {
List recipes = new ArrayList<>();
- for(IStillRecipe recipe : RecipeManagers.stillManager.recipes())
+ for (IStillRecipe recipe : RecipeManagers.stillManager.recipes()) {
recipes.add(new StillRecipeWrapper(recipe));
+ }
return recipes;
}
diff --git a/src/main/java/forestry/factory/recipes/jei/still/StillRecipeWrapper.java b/src/main/java/forestry/factory/recipes/jei/still/StillRecipeWrapper.java
index a37853ed6..cef8730ac 100644
--- a/src/main/java/forestry/factory/recipes/jei/still/StillRecipeWrapper.java
+++ b/src/main/java/forestry/factory/recipes/jei/still/StillRecipeWrapper.java
@@ -9,7 +9,7 @@ import net.minecraftforge.fluids.FluidStack;
import forestry.api.recipes.IStillRecipe;
import forestry.core.recipes.jei.ForestryRecipeWrapper;
-public class StillRecipeWrapper extends ForestryRecipeWrapper{
+public class StillRecipeWrapper extends ForestryRecipeWrapper {
public StillRecipeWrapper(@Nonnull IStillRecipe recipe) {
super(recipe);
diff --git a/src/main/java/forestry/factory/tiles/TileBottler.java b/src/main/java/forestry/factory/tiles/TileBottler.java
index 08280cf19..7ca70f612 100644
--- a/src/main/java/forestry/factory/tiles/TileBottler.java
+++ b/src/main/java/forestry/factory/tiles/TileBottler.java
@@ -20,6 +20,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
diff --git a/src/main/java/forestry/factory/tiles/TileCarpenter.java b/src/main/java/forestry/factory/tiles/TileCarpenter.java
index 4f5ccf4c5..06befe4e3 100644
--- a/src/main/java/forestry/factory/tiles/TileCarpenter.java
+++ b/src/main/java/forestry/factory/tiles/TileCarpenter.java
@@ -20,6 +20,7 @@ import net.minecraft.inventory.InventoryCraftResult;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
diff --git a/src/main/java/forestry/factory/tiles/TileFabricator.java b/src/main/java/forestry/factory/tiles/TileFabricator.java
index 050812873..81445d209 100644
--- a/src/main/java/forestry/factory/tiles/TileFabricator.java
+++ b/src/main/java/forestry/factory/tiles/TileFabricator.java
@@ -21,6 +21,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
diff --git a/src/main/java/forestry/factory/tiles/TileFermenter.java b/src/main/java/forestry/factory/tiles/TileFermenter.java
index c521bbb7f..a9e494591 100644
--- a/src/main/java/forestry/factory/tiles/TileFermenter.java
+++ b/src/main/java/forestry/factory/tiles/TileFermenter.java
@@ -22,6 +22,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
diff --git a/src/main/java/forestry/factory/tiles/TileMoistener.java b/src/main/java/forestry/factory/tiles/TileMoistener.java
index d5db7a081..eece3a865 100644
--- a/src/main/java/forestry/factory/tiles/TileMoistener.java
+++ b/src/main/java/forestry/factory/tiles/TileMoistener.java
@@ -20,6 +20,7 @@ import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
diff --git a/src/main/java/forestry/factory/tiles/TileStill.java b/src/main/java/forestry/factory/tiles/TileStill.java
index 4b186cedd..98a3257b9 100644
--- a/src/main/java/forestry/factory/tiles/TileStill.java
+++ b/src/main/java/forestry/factory/tiles/TileStill.java
@@ -16,10 +16,12 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
+
import forestry.api.core.IErrorLogic;
import forestry.api.recipes.IStillRecipe;
import forestry.core.config.Constants;
diff --git a/src/main/java/forestry/factory/triggers/TriggerLowFuel.java b/src/main/java/forestry/factory/triggers/TriggerLowFuel.java
index f42408649..43e37ada5 100644
--- a/src/main/java/forestry/factory/triggers/TriggerLowFuel.java
+++ b/src/main/java/forestry/factory/triggers/TriggerLowFuel.java
@@ -12,6 +12,7 @@ package forestry.factory.triggers;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import forestry.core.tiles.TileEngine;
import forestry.core.tiles.TilePowered;
import forestry.core.triggers.Trigger;
diff --git a/src/main/java/forestry/factory/triggers/TriggerLowResource.java b/src/main/java/forestry/factory/triggers/TriggerLowResource.java
index 9a213a8b0..5ff5d57cc 100644
--- a/src/main/java/forestry/factory/triggers/TriggerLowResource.java
+++ b/src/main/java/forestry/factory/triggers/TriggerLowResource.java
@@ -12,6 +12,7 @@ package forestry.factory.triggers;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import forestry.core.tiles.TilePowered;
import forestry.core.triggers.Trigger;
diff --git a/src/main/java/forestry/farming/blocks/BlockFarm.java b/src/main/java/forestry/farming/blocks/BlockFarm.java
index de4d42b85..1cf1ae89a 100644
--- a/src/main/java/forestry/farming/blocks/BlockFarm.java
+++ b/src/main/java/forestry/farming/blocks/BlockFarm.java
@@ -92,8 +92,8 @@ public class BlockFarm extends BlockStructure {
@Override
protected BlockState createBlockState() {
- return new ExtendedBlockState(this, new IProperty[] { META },
- new IUnlistedProperty[] { UnlistedBlockPos.POS, UnlistedBlockAccess.BLOCKACCESS });
+ return new ExtendedBlockState(this, new IProperty[]{META},
+ new IUnlistedProperty[]{UnlistedBlockPos.POS, UnlistedBlockAccess.BLOCKACCESS});
}
@Override
diff --git a/src/main/java/forestry/farming/blocks/BlockMushroom.java b/src/main/java/forestry/farming/blocks/BlockMushroom.java
index 9646962fb..138d5cdf1 100644
--- a/src/main/java/forestry/farming/blocks/BlockMushroom.java
+++ b/src/main/java/forestry/farming/blocks/BlockMushroom.java
@@ -31,10 +31,12 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenBigMushroom;
import net.minecraft.world.gen.feature.WorldGenerator;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
-import forestry.api.core.IModelManager;
+
import forestry.api.core.IItemModelRegister;
+import forestry.api.core.IModelManager;
import forestry.core.blocks.IItemTyped;
import forestry.core.config.Constants;
import forestry.core.utils.BlockUtil;
@@ -67,7 +69,7 @@ public class BlockMushroom extends BlockBush implements IItemTyped, IItemModelRe
@Override
protected BlockState createBlockState() {
- return new BlockState(this, new IProperty[] { MUSHROOM });
+ return new BlockState(this, new IProperty[]{MUSHROOM});
}
@Override
diff --git a/src/main/java/forestry/farming/blocks/EnumFarmBlockType.java b/src/main/java/forestry/farming/blocks/EnumFarmBlockType.java
index 8c0611c3f..ba49f8fb8 100644
--- a/src/main/java/forestry/farming/blocks/EnumFarmBlockType.java
+++ b/src/main/java/forestry/farming/blocks/EnumFarmBlockType.java
@@ -4,12 +4,14 @@ import java.util.Arrays;
import java.util.List;
import java.util.Locale;
-import forestry.core.render.TextureManager;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.IStringSerializable;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+import forestry.core.render.TextureManager;
+
public enum EnumFarmBlockType implements IStringSerializable {
PLAIN,
BAND,
diff --git a/src/main/java/forestry/farming/gui/FarmLedger.java b/src/main/java/forestry/farming/gui/FarmLedger.java
index cf1489985..254adb27f 100644
--- a/src/main/java/forestry/farming/gui/FarmLedger.java
+++ b/src/main/java/forestry/farming/gui/FarmLedger.java
@@ -14,6 +14,7 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
+
import forestry.core.gui.ledgers.Ledger;
import forestry.core.gui.ledgers.LedgerManager;
import forestry.core.proxy.Proxies;
diff --git a/src/main/java/forestry/farming/gui/widgets/FarmLogicSlot.java b/src/main/java/forestry/farming/gui/widgets/FarmLogicSlot.java
index eb6d25ae7..da36ff0fe 100644
--- a/src/main/java/forestry/farming/gui/widgets/FarmLogicSlot.java
+++ b/src/main/java/forestry/farming/gui/widgets/FarmLogicSlot.java
@@ -10,6 +10,9 @@
******************************************************************************/
package forestry.farming.gui.widgets;
+import net.minecraft.client.renderer.entity.RenderItem;
+import net.minecraft.item.ItemStack;
+
import forestry.api.farming.FarmDirection;
import forestry.api.farming.IFarmLogic;
import forestry.core.gui.tooltips.ToolTip;
@@ -17,8 +20,6 @@ import forestry.core.gui.widgets.Widget;
import forestry.core.gui.widgets.WidgetManager;
import forestry.core.proxy.Proxies;
import forestry.farming.multiblock.IFarmControllerInternal;
-import net.minecraft.client.renderer.entity.RenderItem;
-import net.minecraft.item.ItemStack;
public class FarmLogicSlot extends Widget {
diff --git a/src/main/java/forestry/farming/items/ItemBlockFarm.java b/src/main/java/forestry/farming/items/ItemBlockFarm.java
index f0c6254a2..f1344fc04 100644
--- a/src/main/java/forestry/farming/items/ItemBlockFarm.java
+++ b/src/main/java/forestry/farming/items/ItemBlockFarm.java
@@ -12,12 +12,13 @@ package forestry.farming.items;
import java.util.List;
-import forestry.farming.models.EnumFarmBlockTexture;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
+import forestry.farming.models.EnumFarmBlockTexture;
+
public class ItemBlockFarm extends ItemBlock {
public ItemBlockFarm(Block block) {
diff --git a/src/main/java/forestry/farming/logic/FarmLogic.java b/src/main/java/forestry/farming/logic/FarmLogic.java
index 4a779cdd2..a399bc6c6 100755
--- a/src/main/java/forestry/farming/logic/FarmLogic.java
+++ b/src/main/java/forestry/farming/logic/FarmLogic.java
@@ -24,8 +24,10 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.farming.FarmDirection;
import forestry.api.farming.IFarmHousing;
import forestry.api.farming.IFarmLogic;
diff --git a/src/main/java/forestry/farming/logic/FarmLogicArboreal.java b/src/main/java/forestry/farming/logic/FarmLogicArboreal.java
index e7587b864..9e41a40b7 100755
--- a/src/main/java/forestry/farming/logic/FarmLogicArboreal.java
+++ b/src/main/java/forestry/farming/logic/FarmLogicArboreal.java
@@ -24,8 +24,10 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.farming.FarmDirection;
import forestry.api.farming.Farmables;
import forestry.api.farming.ICrop;
diff --git a/src/main/java/forestry/farming/logic/FarmLogicCereal.java b/src/main/java/forestry/farming/logic/FarmLogicCereal.java
index aa862e31a..fc63cc1cb 100755
--- a/src/main/java/forestry/farming/logic/FarmLogicCereal.java
+++ b/src/main/java/forestry/farming/logic/FarmLogicCereal.java
@@ -12,8 +12,10 @@ package forestry.farming.logic;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.farming.Farmables;
import forestry.api.farming.IFarmHousing;
diff --git a/src/main/java/forestry/farming/logic/FarmLogicCocoa.java b/src/main/java/forestry/farming/logic/FarmLogicCocoa.java
index bb27664ae..7bf50f5d0 100755
--- a/src/main/java/forestry/farming/logic/FarmLogicCocoa.java
+++ b/src/main/java/forestry/farming/logic/FarmLogicCocoa.java
@@ -25,8 +25,10 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.farming.FarmDirection;
import forestry.api.farming.ICrop;
import forestry.api.farming.IFarmHousing;
diff --git a/src/main/java/forestry/farming/logic/FarmLogicEnder.java b/src/main/java/forestry/farming/logic/FarmLogicEnder.java
index bff10dd5d..dc9d3f8ec 100644
--- a/src/main/java/forestry/farming/logic/FarmLogicEnder.java
+++ b/src/main/java/forestry/farming/logic/FarmLogicEnder.java
@@ -19,8 +19,10 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.farming.FarmDirection;
import forestry.api.farming.Farmables;
import forestry.api.farming.ICrop;
diff --git a/src/main/java/forestry/farming/logic/FarmLogicGourd.java b/src/main/java/forestry/farming/logic/FarmLogicGourd.java
index edbf55e43..0718bd2db 100755
--- a/src/main/java/forestry/farming/logic/FarmLogicGourd.java
+++ b/src/main/java/forestry/farming/logic/FarmLogicGourd.java
@@ -18,8 +18,10 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.farming.FarmDirection;
import forestry.api.farming.Farmables;
import forestry.api.farming.ICrop;
diff --git a/src/main/java/forestry/farming/logic/FarmLogicInfernal.java b/src/main/java/forestry/farming/logic/FarmLogicInfernal.java
index 970e1d7ba..657dc8dbe 100755
--- a/src/main/java/forestry/farming/logic/FarmLogicInfernal.java
+++ b/src/main/java/forestry/farming/logic/FarmLogicInfernal.java
@@ -19,8 +19,10 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.farming.FarmDirection;
import forestry.api.farming.Farmables;
import forestry.api.farming.ICrop;
diff --git a/src/main/java/forestry/farming/logic/FarmLogicOrchard.java b/src/main/java/forestry/farming/logic/FarmLogicOrchard.java
index e73c13bf5..a44fd8e20 100644
--- a/src/main/java/forestry/farming/logic/FarmLogicOrchard.java
+++ b/src/main/java/forestry/farming/logic/FarmLogicOrchard.java
@@ -26,8 +26,10 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.farming.FarmDirection;
import forestry.api.farming.Farmables;
import forestry.api.farming.ICrop;
@@ -49,22 +51,22 @@ public class FarmLogicOrchard extends FarmLogic {
this.farmables = Farmables.farmables.get("farmOrchard");
ImmutableList.Builder traversalBlocksBuilder = ImmutableList.builder();
-// if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.AGRICRAFT) || ForestryAPI.enabledPlugins.contains(ForestryPluginUids.INDUSTRIALCRAFT)) {
-// traversalBlocksBuilder.add(Blocks.farmland);
-// }
-// if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.INDUSTRIALCRAFT)) {
-// traversalBlocksBuilder.add(Blocks.dirt);
-// }
-// if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.PLANTMEGAPACK)) {
-// traversalBlocksBuilder.add(Blocks.water);
-// }
-//
-// {
-// Block grapeVine = GameRegistry.findBlock("Growthcraft|Grapes", "grc.grapeVine1");
-// if (grapeVine != null) {
-// traversalBlocksBuilder.add(grapeVine);
-// }
-// }
+ // if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.AGRICRAFT) || ForestryAPI.enabledPlugins.contains(ForestryPluginUids.INDUSTRIALCRAFT)) {
+ // traversalBlocksBuilder.add(Blocks.farmland);
+ // }
+ // if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.INDUSTRIALCRAFT)) {
+ // traversalBlocksBuilder.add(Blocks.dirt);
+ // }
+ // if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.PLANTMEGAPACK)) {
+ // traversalBlocksBuilder.add(Blocks.water);
+ // }
+ //
+ // {
+ // Block grapeVine = GameRegistry.findBlock("Growthcraft|Grapes", "grc.grapeVine1");
+ // if (grapeVine != null) {
+ // traversalBlocksBuilder.add(grapeVine);
+ // }
+ // }
traversalBlocksBuilder.build();
this.traversalBlocks = traversalBlocksBuilder.build();
diff --git a/src/main/java/forestry/farming/logic/FarmLogicPeat.java b/src/main/java/forestry/farming/logic/FarmLogicPeat.java
index 2f37cece1..a0ad81627 100755
--- a/src/main/java/forestry/farming/logic/FarmLogicPeat.java
+++ b/src/main/java/forestry/farming/logic/FarmLogicPeat.java
@@ -18,8 +18,10 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.farming.FarmDirection;
import forestry.api.farming.ICrop;
import forestry.api.farming.IFarmHousing;
diff --git a/src/main/java/forestry/farming/logic/FarmLogicReeds.java b/src/main/java/forestry/farming/logic/FarmLogicReeds.java
index fc49dbdd8..04439a3b5 100644
--- a/src/main/java/forestry/farming/logic/FarmLogicReeds.java
+++ b/src/main/java/forestry/farming/logic/FarmLogicReeds.java
@@ -19,8 +19,10 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.farming.FarmDirection;
import forestry.api.farming.Farmables;
import forestry.api.farming.ICrop;
diff --git a/src/main/java/forestry/farming/logic/FarmLogicShroom.java b/src/main/java/forestry/farming/logic/FarmLogicShroom.java
index c02c46508..1e5b286db 100755
--- a/src/main/java/forestry/farming/logic/FarmLogicShroom.java
+++ b/src/main/java/forestry/farming/logic/FarmLogicShroom.java
@@ -16,8 +16,10 @@ import java.util.Collection;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.farming.Farmables;
import forestry.api.farming.IFarmHousing;
diff --git a/src/main/java/forestry/farming/logic/FarmLogicSucculent.java b/src/main/java/forestry/farming/logic/FarmLogicSucculent.java
index b3328562a..ed6af9b7a 100755
--- a/src/main/java/forestry/farming/logic/FarmLogicSucculent.java
+++ b/src/main/java/forestry/farming/logic/FarmLogicSucculent.java
@@ -19,8 +19,10 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.farming.FarmDirection;
import forestry.api.farming.Farmables;
import forestry.api.farming.ICrop;
diff --git a/src/main/java/forestry/farming/logic/FarmLogicVegetable.java b/src/main/java/forestry/farming/logic/FarmLogicVegetable.java
index ad4a3fd7b..c4a3d708a 100755
--- a/src/main/java/forestry/farming/logic/FarmLogicVegetable.java
+++ b/src/main/java/forestry/farming/logic/FarmLogicVegetable.java
@@ -12,8 +12,10 @@ package forestry.farming.logic;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.farming.Farmables;
import forestry.api.farming.IFarmHousing;
diff --git a/src/main/java/forestry/farming/logic/FarmableGenericSapling.java b/src/main/java/forestry/farming/logic/FarmableGenericSapling.java
index 095b467b5..616e46714 100755
--- a/src/main/java/forestry/farming/logic/FarmableGenericSapling.java
+++ b/src/main/java/forestry/farming/logic/FarmableGenericSapling.java
@@ -57,7 +57,7 @@ public class FarmableGenericSapling implements IFarmable {
@Override
public ICrop getCropAt(World world, BlockPos pos) {
Block block = BlockUtil.getBlock(world, pos);
- if (!block.isWood(world,pos)) {
+ if (!block.isWood(world, pos)) {
return null;
}
diff --git a/src/main/java/forestry/farming/models/EnumFarmBlockTexture.java b/src/main/java/forestry/farming/models/EnumFarmBlockTexture.java
index 2ed54a063..aa68233e3 100644
--- a/src/main/java/forestry/farming/models/EnumFarmBlockTexture.java
+++ b/src/main/java/forestry/farming/models/EnumFarmBlockTexture.java
@@ -14,8 +14,10 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.core.render.TextureManager;
public enum EnumFarmBlockTexture {
@@ -44,46 +46,51 @@ public enum EnumFarmBlockTexture {
public static TextureAtlasSprite getSprite(EnumFarmBlockTexture texture, int side) {
TextureManager manager = TextureManager.getInstance();
switch (texture) {
- case BRICK:
- return manager.getSprite("minecraft", "blocks/brick");
- case BRICK_STONE:
- return manager.getSprite("minecraft", "blocks/stonebrick");
- case BRICK_CHISELED:
- return manager.getSprite("minecraft", "blocks/stonebrick_carved");
- case BRICK_CRACKED:
- return manager.getSprite("minecraft", "blocks/stonebrick_cracked");
- case BRICK_MOSSY:
- return manager.getSprite("minecraft", "blocks/stonebrick_mossy");
- case BRICK_NETHER:
- return manager.getSprite("minecraft", "blocks/nether_brick");
- case SANDSTONE_CHISELED:
- if (side == 0)
- return manager.getSprite("minecraft", "blocks/sandstone_bottom");
- else if (side == 1)
- return manager.getSprite("minecraft", "blocks/sandstone_top");
- return manager.getSprite("minecraft", "blocks/sandstone_carved");
- case SANDSTONE_SMOOTH:
- if (side == 0)
- return manager.getSprite("minecraft", "blocks/sandstone_bottom");
- else if (side == 1)
- return manager.getSprite("minecraft", "blocks/sandstone_top");
- return manager.getSprite("minecraft", "blocks/sandstone_smooth");
- case QUARTZ:
- if (side == 0)
- return manager.getSprite("minecraft", "blocks/quartz_block_bottom");
- else if (side == 1)
- return manager.getSprite("minecraft", "blocks/quartz_block_top");
- return manager.getSprite("minecraft", "blocks/quartz_block_side");
- case QUARTZ_CHISELED:
- if (side == 0 || side == 1)
- return manager.getSprite("minecraft", "blocks/quartz_block_chiseled_top");
- return manager.getSprite("minecraft", "blocks/quartz_block_chiseled");
- case QUARTZ_LINES:
- if (side == 0 || side == 1)
- return manager.getSprite("minecraft", "blocks/quartz_block_lines_top");
- return manager.getSprite("minecraft", "blocks/quartz_block_lines");
- default:
- return null;
+ case BRICK:
+ return manager.getSprite("minecraft", "blocks/brick");
+ case BRICK_STONE:
+ return manager.getSprite("minecraft", "blocks/stonebrick");
+ case BRICK_CHISELED:
+ return manager.getSprite("minecraft", "blocks/stonebrick_carved");
+ case BRICK_CRACKED:
+ return manager.getSprite("minecraft", "blocks/stonebrick_cracked");
+ case BRICK_MOSSY:
+ return manager.getSprite("minecraft", "blocks/stonebrick_mossy");
+ case BRICK_NETHER:
+ return manager.getSprite("minecraft", "blocks/nether_brick");
+ case SANDSTONE_CHISELED:
+ if (side == 0) {
+ return manager.getSprite("minecraft", "blocks/sandstone_bottom");
+ } else if (side == 1) {
+ return manager.getSprite("minecraft", "blocks/sandstone_top");
+ }
+ return manager.getSprite("minecraft", "blocks/sandstone_carved");
+ case SANDSTONE_SMOOTH:
+ if (side == 0) {
+ return manager.getSprite("minecraft", "blocks/sandstone_bottom");
+ } else if (side == 1) {
+ return manager.getSprite("minecraft", "blocks/sandstone_top");
+ }
+ return manager.getSprite("minecraft", "blocks/sandstone_smooth");
+ case QUARTZ:
+ if (side == 0) {
+ return manager.getSprite("minecraft", "blocks/quartz_block_bottom");
+ } else if (side == 1) {
+ return manager.getSprite("minecraft", "blocks/quartz_block_top");
+ }
+ return manager.getSprite("minecraft", "blocks/quartz_block_side");
+ case QUARTZ_CHISELED:
+ if (side == 0 || side == 1) {
+ return manager.getSprite("minecraft", "blocks/quartz_block_chiseled_top");
+ }
+ return manager.getSprite("minecraft", "blocks/quartz_block_chiseled");
+ case QUARTZ_LINES:
+ if (side == 0 || side == 1) {
+ return manager.getSprite("minecraft", "blocks/quartz_block_lines_top");
+ }
+ return manager.getSprite("minecraft", "blocks/quartz_block_lines");
+ default:
+ return null;
}
}
diff --git a/src/main/java/forestry/farming/multiblock/InventoryFarm.java b/src/main/java/forestry/farming/multiblock/InventoryFarm.java
index 1ed6895e0..505757c01 100644
--- a/src/main/java/forestry/farming/multiblock/InventoryFarm.java
+++ b/src/main/java/forestry/farming/multiblock/InventoryFarm.java
@@ -18,6 +18,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import forestry.api.farming.FarmDirection;
diff --git a/src/main/java/forestry/farming/proxy/ProxyFarmingClient.java b/src/main/java/forestry/farming/proxy/ProxyFarmingClient.java
index b080dd8cf..387a62b29 100644
--- a/src/main/java/forestry/farming/proxy/ProxyFarmingClient.java
+++ b/src/main/java/forestry/farming/proxy/ProxyFarmingClient.java
@@ -11,6 +11,7 @@
package forestry.farming.proxy;
import net.minecraft.client.resources.model.ModelResourceLocation;
+
import forestry.core.models.BlockModelIndex;
import forestry.core.proxy.Proxies;
import forestry.farming.models.ModelFarmBlock;
diff --git a/src/main/java/forestry/farming/tiles/TileFarm.java b/src/main/java/forestry/farming/tiles/TileFarm.java
index e7a3dd0c4..b0126f9d2 100644
--- a/src/main/java/forestry/farming/tiles/TileFarm.java
+++ b/src/main/java/forestry/farming/tiles/TileFarm.java
@@ -17,6 +17,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
+
import forestry.api.circuits.ICircuitSocketType;
import forestry.api.core.IErrorLogic;
import forestry.api.core.IErrorLogicSource;
diff --git a/src/main/java/forestry/farming/tiles/TileFarmControl.java b/src/main/java/forestry/farming/tiles/TileFarmControl.java
index 34b46f86d..611ea7549 100644
--- a/src/main/java/forestry/farming/tiles/TileFarmControl.java
+++ b/src/main/java/forestry/farming/tiles/TileFarmControl.java
@@ -50,7 +50,7 @@ public class TileFarmControl extends TileFarm implements IFarmComponent.Listener
EnumFacing dir = direction.getOpposite();
World world = tile.getWorld();
- return world.getRedstonePower(side, dir) > 0 || world.getStrongPower(side,dir) > 0;
+ return world.getRedstonePower(side, dir) > 0 || world.getStrongPower(side, dir) > 0;
}
}
diff --git a/src/main/java/forestry/farming/tiles/TileFarmHatch.java b/src/main/java/forestry/farming/tiles/TileFarmHatch.java
index 02c31c2d4..ccdaab558 100644
--- a/src/main/java/forestry/farming/tiles/TileFarmHatch.java
+++ b/src/main/java/forestry/farming/tiles/TileFarmHatch.java
@@ -17,7 +17,9 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fml.common.Optional;
+
import forestry.api.multiblock.IFarmComponent;
import forestry.core.inventory.AdjacentInventoryCache;
import forestry.core.tiles.AdjacentTileCache;
diff --git a/src/main/java/forestry/farming/tiles/TileFarmPlain.java b/src/main/java/forestry/farming/tiles/TileFarmPlain.java
index b9a7e2962..f99d5b7b6 100644
--- a/src/main/java/forestry/farming/tiles/TileFarmPlain.java
+++ b/src/main/java/forestry/farming/tiles/TileFarmPlain.java
@@ -10,9 +10,10 @@
******************************************************************************/
package forestry.farming.tiles;
-import forestry.api.multiblock.IMultiblockController;
import net.minecraft.util.BlockPos;
+import forestry.api.multiblock.IMultiblockController;
+
public class TileFarmPlain extends TileFarm {
@Override
public void onMachineAssembled(IMultiblockController multiblockController, BlockPos minCoord, BlockPos maxCoord) {
diff --git a/src/main/java/forestry/farming/tiles/TileFarmValve.java b/src/main/java/forestry/farming/tiles/TileFarmValve.java
index ced1c1a44..53760313e 100644
--- a/src/main/java/forestry/farming/tiles/TileFarmValve.java
+++ b/src/main/java/forestry/farming/tiles/TileFarmValve.java
@@ -11,6 +11,7 @@
package forestry.farming.tiles;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
diff --git a/src/main/java/forestry/farming/triggers/TriggerLowFertilizer.java b/src/main/java/forestry/farming/triggers/TriggerLowFertilizer.java
index 6a44a3973..fe1075090 100755
--- a/src/main/java/forestry/farming/triggers/TriggerLowFertilizer.java
+++ b/src/main/java/forestry/farming/triggers/TriggerLowFertilizer.java
@@ -13,6 +13,7 @@ package forestry.farming.triggers;
import net.minecraft.inventory.IInventory;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import forestry.core.triggers.Trigger;
import forestry.core.utils.InventoryUtil;
import forestry.farming.tiles.TileFarmHatch;
diff --git a/src/main/java/forestry/farming/triggers/TriggerLowGermlings.java b/src/main/java/forestry/farming/triggers/TriggerLowGermlings.java
index 3dd406802..b18d3622f 100644
--- a/src/main/java/forestry/farming/triggers/TriggerLowGermlings.java
+++ b/src/main/java/forestry/farming/triggers/TriggerLowGermlings.java
@@ -13,6 +13,7 @@ package forestry.farming.triggers;
import net.minecraft.inventory.IInventory;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import forestry.core.triggers.Trigger;
import forestry.core.utils.InventoryUtil;
import forestry.farming.tiles.TileFarmHatch;
diff --git a/src/main/java/forestry/farming/triggers/TriggerLowLiquid.java b/src/main/java/forestry/farming/triggers/TriggerLowLiquid.java
index 0d3e48df8..c726a1f23 100755
--- a/src/main/java/forestry/farming/triggers/TriggerLowLiquid.java
+++ b/src/main/java/forestry/farming/triggers/TriggerLowLiquid.java
@@ -12,6 +12,7 @@ package forestry.farming.triggers;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import net.minecraftforge.fluids.IFluidTank;
import forestry.core.fluids.ITankManager;
diff --git a/src/main/java/forestry/farming/triggers/TriggerLowSoil.java b/src/main/java/forestry/farming/triggers/TriggerLowSoil.java
index 18699eb53..c269944d3 100755
--- a/src/main/java/forestry/farming/triggers/TriggerLowSoil.java
+++ b/src/main/java/forestry/farming/triggers/TriggerLowSoil.java
@@ -14,6 +14,7 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import forestry.api.farming.IFarmInventory;
import forestry.api.multiblock.IFarmController;
import forestry.core.triggers.Trigger;
diff --git a/src/main/java/forestry/food/items/EnumBeverage.java b/src/main/java/forestry/food/items/EnumBeverage.java
index 214134bf7..5ba17cd9c 100644
--- a/src/main/java/forestry/food/items/EnumBeverage.java
+++ b/src/main/java/forestry/food/items/EnumBeverage.java
@@ -12,11 +12,13 @@ package forestry.food.items;
import java.awt.Color;
-import forestry.api.core.IModelManager;
import net.minecraft.item.Item;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+import forestry.api.core.IModelManager;
+
public enum EnumBeverage implements ItemBeverage.IBeverageInfo {
MEAD_SHORT("meadShort", "glass", new Color(0xec9a19), new Color(0xffffff), 1, 0.2f, true),
MEAD_CURATIVE("meadCurative", "glass", new Color(0xc5feff), new Color(0xffffff), 1, 0.2f, true);
diff --git a/src/main/java/forestry/food/items/ItemBeverage.java b/src/main/java/forestry/food/items/ItemBeverage.java
index 13b2ddcc4..79e3a6a9d 100755
--- a/src/main/java/forestry/food/items/ItemBeverage.java
+++ b/src/main/java/forestry/food/items/ItemBeverage.java
@@ -18,8 +18,10 @@ import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IModelManager;
import forestry.api.food.IBeverageEffect;
import forestry.core.config.Config;
diff --git a/src/main/java/forestry/lepidopterology/entities/AIButterflyRest.java b/src/main/java/forestry/lepidopterology/entities/AIButterflyRest.java
index 41cc0d180..dc3274cf1 100755
--- a/src/main/java/forestry/lepidopterology/entities/AIButterflyRest.java
+++ b/src/main/java/forestry/lepidopterology/entities/AIButterflyRest.java
@@ -17,6 +17,7 @@ import net.minecraft.block.BlockWall;
import net.minecraft.block.IGrowable;
import net.minecraft.block.material.Material;
import net.minecraft.util.BlockPos;
+
import net.minecraftforge.common.IPlantable;
public class AIButterflyRest extends AIButterflyBase {
diff --git a/src/main/java/forestry/lepidopterology/entities/EntityButterfly.java b/src/main/java/forestry/lepidopterology/entities/EntityButterfly.java
index e71eb43cf..d5d546a78 100755
--- a/src/main/java/forestry/lepidopterology/entities/EntityButterfly.java
+++ b/src/main/java/forestry/lepidopterology/entities/EntityButterfly.java
@@ -36,6 +36,7 @@ import net.minecraft.world.chunk.Chunk;
import net.minecraftforge.common.IPlantable;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.arboriculture.EnumGermlingType;
import forestry.api.arboriculture.TreeManager;
import forestry.api.core.IToolScoop;
diff --git a/src/main/java/forestry/lepidopterology/genetics/AlleleButterflySpecies.java b/src/main/java/forestry/lepidopterology/genetics/AlleleButterflySpecies.java
index d7ffffb44..6d45d005a 100755
--- a/src/main/java/forestry/lepidopterology/genetics/AlleleButterflySpecies.java
+++ b/src/main/java/forestry/lepidopterology/genetics/AlleleButterflySpecies.java
@@ -24,6 +24,7 @@ import net.minecraft.world.World;
import com.mojang.authlib.GameProfile;
import net.minecraftforge.common.BiomeDictionary;
+
import forestry.api.core.IModelProvider;
import forestry.api.core.ISpriteProvider;
import forestry.api.genetics.IClassification;
diff --git a/src/main/java/forestry/lepidopterology/items/ItemButterflyGE.java b/src/main/java/forestry/lepidopterology/items/ItemButterflyGE.java
index 35f40b59d..aa4d4ebb0 100755
--- a/src/main/java/forestry/lepidopterology/items/ItemButterflyGE.java
+++ b/src/main/java/forestry/lepidopterology/items/ItemButterflyGE.java
@@ -22,8 +22,10 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IModelManager;
import forestry.api.core.Tabs;
import forestry.api.genetics.AlleleManager;
@@ -169,14 +171,14 @@ public class ItemButterflyGE extends ItemGE {
@Override
public void registerModel(Item item, IModelManager manager) {
switch (this.type) {
- case CATERPILLAR:
- manager.registerItemModel(item, 0, "caterpillar");
- break;
- case BUTTERFLY:
- manager.registerItemModel(item, 0, "butterflyGE");
- break;
- default:
- manager.registerItemModel(item, 0, "liquids/jar");
+ case CATERPILLAR:
+ manager.registerItemModel(item, 0, "caterpillar");
+ break;
+ case BUTTERFLY:
+ manager.registerItemModel(item, 0, "butterflyGE");
+ break;
+ default:
+ manager.registerItemModel(item, 0, "liquids/jar");
}
}
diff --git a/src/main/java/forestry/lepidopterology/recipes/MatingRecipe.java b/src/main/java/forestry/lepidopterology/recipes/MatingRecipe.java
index e5552790d..4fcaec44e 100644
--- a/src/main/java/forestry/lepidopterology/recipes/MatingRecipe.java
+++ b/src/main/java/forestry/lepidopterology/recipes/MatingRecipe.java
@@ -84,14 +84,13 @@ public class MatingRecipe implements IRecipe {
@Override
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
- ItemStack[] aitemstack = new ItemStack[inv.getSizeInventory()];
+ ItemStack[] aitemstack = new ItemStack[inv.getSizeInventory()];
- for (int i = 0; i < aitemstack.length; ++i)
- {
- ItemStack itemstack = inv.getStackInSlot(i);
- aitemstack[i] = net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack);
- }
- return aitemstack;
+ for (int i = 0; i < aitemstack.length; ++i) {
+ ItemStack itemstack = inv.getStackInSlot(i);
+ aitemstack[i] = net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack);
+ }
+ return aitemstack;
}
}
diff --git a/src/main/java/forestry/lepidopterology/render/ModelButterflyItem.java b/src/main/java/forestry/lepidopterology/render/ModelButterflyItem.java
index b4b78ef1e..84a4ff5ed 100644
--- a/src/main/java/forestry/lepidopterology/render/ModelButterflyItem.java
+++ b/src/main/java/forestry/lepidopterology/render/ModelButterflyItem.java
@@ -83,7 +83,7 @@ public class ModelButterflyItem implements ISmartItemModel {
@Override
public IBakedModel handleItemState(ItemStack item) {
- if(modelButterfly == null){
+ if (modelButterfly == null) {
try {
modelButterfly = (IRetexturableModel) ModelLoaderRegistry.getModel(location);
} catch (IOException e) {
@@ -107,7 +107,7 @@ public class ModelButterflyItem implements ISmartItemModel {
textures.put("#ButterflyGE", butterfly.getGenome().getSecondary().getEntityTexture().replace(".png", "").replace("textures/", ""));
textures.put("Butterfly2texture", butterfly.getGenome().getSecondary().getEntityTexture().replace(".png", "").replace("textures/", ""));
modelButterfly = (IRetexturableModel) modelButterfly.retexture(textures.build());
- return new TRSRBakedModel(modelButterfly.bake(ModelRotation.X0_Y0, DefaultVertexFormats.ITEM, textureGetter), -0.5F, -1.5F, 1.5F, 0, (float)Math.PI * 2, 0, 1F);
+ return new TRSRBakedModel(modelButterfly.bake(ModelRotation.X0_Y0, DefaultVertexFormats.ITEM, textureGetter), -0.5F, -1.5F, 1.5F, 0, (float) Math.PI * 2, 0, 1F);
}
public static float getIrregularWingYaw(long flapping, float flap) {
diff --git a/src/main/java/forestry/lepidopterology/render/TextureAtlasButterfly.java b/src/main/java/forestry/lepidopterology/render/TextureAtlasButterfly.java
index 9d07e9907..c36fba434 100644
--- a/src/main/java/forestry/lepidopterology/render/TextureAtlasButterfly.java
+++ b/src/main/java/forestry/lepidopterology/render/TextureAtlasButterfly.java
@@ -10,14 +10,15 @@
******************************************************************************/
package forestry.lepidopterology.render;
+import com.google.common.collect.Lists;
+
import java.awt.image.BufferedImage;
import java.io.IOException;
-import com.google.common.collect.Lists;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.resources.data.AnimationMetadataSection;
-public class TextureAtlasButterfly extends TextureAtlasSprite{
+public class TextureAtlasButterfly extends TextureAtlasSprite {
public TextureAtlasButterfly(String spriteName) {
super(spriteName);
@@ -25,41 +26,37 @@ public class TextureAtlasButterfly extends TextureAtlasSprite{
@Override
public void loadSprite(BufferedImage[] images, AnimationMetadataSection meta) throws IOException {
- this.resetSprite();
- int i = images[0].getWidth();
- int j = images[0].getHeight();
- this.width = i;
- this.height = j;
- int[][] aint = new int[images.length][];
+ this.resetSprite();
+ int i = images[0].getWidth();
+ int j = images[0].getHeight();
+ this.width = i;
+ this.height = j;
+ int[][] aint = new int[images.length][];
- for (int k = 0; k < images.length; ++k)
- {
- BufferedImage bufferedimage = images[k];
+ for (int k = 0; k < images.length; ++k) {
+ BufferedImage bufferedimage = images[k];
- if (bufferedimage != null)
- {
- if (k > 0 && (bufferedimage.getWidth() != i >> k || bufferedimage.getHeight() != j >> k))
- {
- throw new RuntimeException(String.format("Unable to load miplevel: %d, image is size: %dx%d, expected %dx%d", new Object[] {Integer.valueOf(k), Integer.valueOf(bufferedimage.getWidth()), Integer.valueOf(bufferedimage.getHeight()), Integer.valueOf(i >> k), Integer.valueOf(j >> k)}));
- }
+ if (bufferedimage != null) {
+ if (k > 0 && (bufferedimage.getWidth() != i >> k || bufferedimage.getHeight() != j >> k)) {
+ throw new RuntimeException(String.format("Unable to load miplevel: %d, image is size: %dx%d, expected %dx%d", new Object[]{Integer.valueOf(k), Integer.valueOf(bufferedimage.getWidth()), Integer.valueOf(bufferedimage.getHeight()), Integer.valueOf(i >> k), Integer.valueOf(j >> k)}));
+ }
- aint[k] = new int[bufferedimage.getWidth() * bufferedimage.getHeight()];
- bufferedimage.getRGB(0, 0, bufferedimage.getWidth(), bufferedimage.getHeight(), aint[k], 0, bufferedimage.getWidth());
- }
- }
- this.framesTextureData.add(aint);
+ aint[k] = new int[bufferedimage.getWidth() * bufferedimage.getHeight()];
+ bufferedimage.getRGB(0, 0, bufferedimage.getWidth(), bufferedimage.getHeight(), aint[k], 0, bufferedimage.getWidth());
+ }
+ }
+ this.framesTextureData.add(aint);
}
- private void resetSprite()
- {
- this.setFramesTextureData(Lists.newArrayList());
- this.frameCounter = 0;
- this.tickCounter = 0;
- }
-
- @Override
- public boolean hasAnimationMetadata() {
- return false;
- }
+ private void resetSprite() {
+ this.setFramesTextureData(Lists.newArrayList());
+ this.frameCounter = 0;
+ this.tickCounter = 0;
+ }
+
+ @Override
+ public boolean hasAnimationMetadata() {
+ return false;
+ }
}
diff --git a/src/main/java/forestry/mail/EventHandlerMailAlert.java b/src/main/java/forestry/mail/EventHandlerMailAlert.java
index 80d74c480..1144284fb 100644
--- a/src/main/java/forestry/mail/EventHandlerMailAlert.java
+++ b/src/main/java/forestry/mail/EventHandlerMailAlert.java
@@ -12,10 +12,12 @@ package forestry.mail;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
+
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.Phase;
+
import forestry.core.proxy.Proxies;
import forestry.mail.gui.GuiMailboxInfo;
import forestry.mail.network.packets.PacketPOBoxInfoUpdate;
diff --git a/src/main/java/forestry/mail/Letter.java b/src/main/java/forestry/mail/Letter.java
index 232655487..9f57f77d0 100755
--- a/src/main/java/forestry/mail/Letter.java
+++ b/src/main/java/forestry/mail/Letter.java
@@ -18,6 +18,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.IChatComponent;
+
import forestry.api.mail.ILetter;
import forestry.api.mail.IMailAddress;
import forestry.api.mail.IStamps;
diff --git a/src/main/java/forestry/mail/LetterProperties.java b/src/main/java/forestry/mail/LetterProperties.java
index b197a0536..484c39627 100644
--- a/src/main/java/forestry/mail/LetterProperties.java
+++ b/src/main/java/forestry/mail/LetterProperties.java
@@ -18,8 +18,10 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IModelManager;
import forestry.api.mail.ILetter;
import forestry.plugins.PluginMail;
diff --git a/src/main/java/forestry/mail/PostalCarrier.java b/src/main/java/forestry/mail/PostalCarrier.java
index fdb48374b..67023797f 100755
--- a/src/main/java/forestry/mail/PostalCarrier.java
+++ b/src/main/java/forestry/mail/PostalCarrier.java
@@ -15,8 +15,10 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.mail.EnumAddressee;
import forestry.api.mail.IMailAddress;
import forestry.api.mail.IPostOffice;
diff --git a/src/main/java/forestry/mail/inventory/InventoryTradeStation.java b/src/main/java/forestry/mail/inventory/InventoryTradeStation.java
index 95c0eb8dc..56d311960 100644
--- a/src/main/java/forestry/mail/inventory/InventoryTradeStation.java
+++ b/src/main/java/forestry/mail/inventory/InventoryTradeStation.java
@@ -16,6 +16,7 @@ import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
+
import forestry.api.mail.IStamps;
import forestry.core.inventory.InventoryAdapter;
import forestry.core.utils.ItemStackUtil;
diff --git a/src/main/java/forestry/mail/items/ItemLetter.java b/src/main/java/forestry/mail/items/ItemLetter.java
index 7faedf798..22b2796d8 100755
--- a/src/main/java/forestry/mail/items/ItemLetter.java
+++ b/src/main/java/forestry/mail/items/ItemLetter.java
@@ -19,8 +19,10 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.world.World;
+
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IModelManager;
import forestry.api.mail.ILetter;
import forestry.core.items.ItemWithGui;
diff --git a/src/main/java/forestry/mail/triggers/TriggerBuffer.java b/src/main/java/forestry/mail/triggers/TriggerBuffer.java
index 59d336bfd..6e149c5db 100755
--- a/src/main/java/forestry/mail/triggers/TriggerBuffer.java
+++ b/src/main/java/forestry/mail/triggers/TriggerBuffer.java
@@ -12,6 +12,7 @@ package forestry.mail.triggers;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import forestry.core.triggers.Trigger;
import forestry.mail.tiles.TileTrader;
diff --git a/src/main/java/forestry/mail/triggers/TriggerHasMail.java b/src/main/java/forestry/mail/triggers/TriggerHasMail.java
index f4b794874..c1e5186d1 100755
--- a/src/main/java/forestry/mail/triggers/TriggerHasMail.java
+++ b/src/main/java/forestry/mail/triggers/TriggerHasMail.java
@@ -12,6 +12,7 @@ package forestry.mail.triggers;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import forestry.core.triggers.Trigger;
import forestry.mail.tiles.IMailContainer;
diff --git a/src/main/java/forestry/mail/triggers/TriggerLowInput.java b/src/main/java/forestry/mail/triggers/TriggerLowInput.java
index 4f7a0290a..b185dea60 100755
--- a/src/main/java/forestry/mail/triggers/TriggerLowInput.java
+++ b/src/main/java/forestry/mail/triggers/TriggerLowInput.java
@@ -12,6 +12,7 @@ package forestry.mail.triggers;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import forestry.core.triggers.Trigger;
import forestry.mail.tiles.TileTrader;
diff --git a/src/main/java/forestry/mail/triggers/TriggerLowPaper.java b/src/main/java/forestry/mail/triggers/TriggerLowPaper.java
index 43e662496..665186949 100755
--- a/src/main/java/forestry/mail/triggers/TriggerLowPaper.java
+++ b/src/main/java/forestry/mail/triggers/TriggerLowPaper.java
@@ -12,6 +12,7 @@ package forestry.mail.triggers;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import forestry.core.triggers.Trigger;
import forestry.mail.tiles.TileTrader;
diff --git a/src/main/java/forestry/mail/triggers/TriggerLowStamps.java b/src/main/java/forestry/mail/triggers/TriggerLowStamps.java
index e59e9eca3..22c6b1bbf 100755
--- a/src/main/java/forestry/mail/triggers/TriggerLowStamps.java
+++ b/src/main/java/forestry/mail/triggers/TriggerLowStamps.java
@@ -12,6 +12,7 @@ package forestry.mail.triggers;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
+
import forestry.core.triggers.Trigger;
import forestry.mail.tiles.TileTrader;
diff --git a/src/main/java/forestry/plugins/PluginFactory.java b/src/main/java/forestry/plugins/PluginFactory.java
index 7fc6e8d24..f8c9f421e 100644
--- a/src/main/java/forestry/plugins/PluginFactory.java
+++ b/src/main/java/forestry/plugins/PluginFactory.java
@@ -287,10 +287,10 @@ public class PluginFactory extends BlankForestryPlugin {
RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.glass), Fluids.GLASS.getFluid(1000), 1000);
RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.glass_pane), Fluids.GLASS.getFluid(375), 1000);
RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sand), Fluids.GLASS.getFluid(1000), 3000);
- RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sand,1,1), Fluids.GLASS.getFluid(1000), 3000);
+ RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sand, 1, 1), Fluids.GLASS.getFluid(1000), 3000);
RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sandstone), Fluids.GLASS.getFluid(4000), 4800);
- RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sandstone,1,1), Fluids.GLASS.getFluid(4000), 4800);
- RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sandstone,1,2), Fluids.GLASS.getFluid(4000), 4800);
+ RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sandstone, 1, 1), Fluids.GLASS.getFluid(4000), 4800);
+ RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.sandstone, 1, 2), Fluids.GLASS.getFluid(4000), 4800);
// / CARPENTER
RecipeManagers.carpenterManager.addRecipe(50, Fluids.SEEDOIL.getFluid(250), null, PluginCore.items.impregnatedCasing.getItemStack(),
diff --git a/src/main/java/forestry/plugins/PluginFluids.java b/src/main/java/forestry/plugins/PluginFluids.java
index d0a7a6876..e057184db 100644
--- a/src/main/java/forestry/plugins/PluginFluids.java
+++ b/src/main/java/forestry/plugins/PluginFluids.java
@@ -56,7 +56,7 @@ public class PluginFluids extends BlankForestryPlugin {
if (forestryFluid.getFluid() == null && Config.isFluidEnabled(forestryFluid)) {
String fluidName = forestryFluid.getTag();
if (!FluidRegistry.isFluidRegistered(fluidName)) {
- Fluid fluid = new Fluid(fluidName,
+ Fluid fluid = new Fluid(fluidName,
forestryFluid.getResources()[0], forestryFluid.flowTextureExists() ? forestryFluid.getResources()[1]
: forestryFluid.getResources()[0]).setDensity(forestryFluid.getDensity()).setViscosity(forestryFluid.getViscosity()).setTemperature(forestryFluid.getTemperature());
FluidRegistry.registerFluid(fluid);
diff --git a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java
index c6b542007..966207468 100644
--- a/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java
+++ b/src/main/java/forestry/plugins/compat/PluginBiomesOPlenty.java
@@ -146,7 +146,7 @@ public class PluginBiomesOPlenty extends BlankForestryPlugin {
if (misc != null) {
ItemStack pinecone = new ItemStack(misc, 1, 13);
if (pinecone != null) {
- RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{pinecone}, Fluids.SEEDOIL.getFluid(3* amount));
+ RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{pinecone}, Fluids.SEEDOIL.getFluid(3 * amount));
}
}
@@ -162,35 +162,35 @@ public class PluginBiomesOPlenty extends BlankForestryPlugin {
private static void addFlowers() {
Block flowers = GameRegistry.findBlock(BoP, "flowers");
if (flowers != null) {
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 0, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //Clover
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 1, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow, FlowerManager.FlowerTypeMushrooms); //Swampflower
-// FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 2, 1.0, FlowerManager.FlowerTypeNether); //Deathbloom
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 3, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //GlowFlower
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 4, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //Blue Hydrangea
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 5, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow, FlowerManager.FlowerTypeJungle); //Orange Cosmos
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 6, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //Pink Daffodil
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 7, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //WildFlower
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 8, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //Violet
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 9, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); // White Anemone
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 10, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); // Waterlily
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 11, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //EnderLotus (does not actually spawn in the end)
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 12, 1.0, FlowerManager.FlowerTypeCacti); //Bromeliad
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 13, 1.0, FlowerManager.FlowerTypeNether); // EyeBulb
-// FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 14, 1.0, FlowerManager.FlowerTypeNether); // Unlisted top of the eyebulb
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 15, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); // Dandelion Puff
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 0, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //Clover
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 1, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow, FlowerManager.FlowerTypeMushrooms); //Swampflower
+ // FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 2, 1.0, FlowerManager.FlowerTypeNether); //Deathbloom
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 3, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //GlowFlower
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 4, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //Blue Hydrangea
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 5, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow, FlowerManager.FlowerTypeJungle); //Orange Cosmos
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 6, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //Pink Daffodil
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 7, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //WildFlower
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 8, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //Violet
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 9, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); // White Anemone
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 10, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); // Waterlily
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 11, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //EnderLotus (does not actually spawn in the end)
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 12, 1.0, FlowerManager.FlowerTypeCacti); //Bromeliad
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 13, 1.0, FlowerManager.FlowerTypeNether); // EyeBulb
+ // FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 14, 1.0, FlowerManager.FlowerTypeNether); // Unlisted top of the eyebulb
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers, 15, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); // Dandelion Puff
}
Block flowers2 = GameRegistry.findBlock(BoP, "flowers2");
if (flowers2 != null) {
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 0, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeJungle); //Pink Hibiscus
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 1, 1.0, FlowerManager.FlowerTypeVanilla); //Lily of the Valley
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 2, 1.0, FlowerManager.FlowerTypeNether); // Burning Blososm
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 3, 1.0, FlowerManager.FlowerTypeVanilla); // Lavender
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 4, 1.0, FlowerManager.FlowerTypeVanilla); // Goldenrod
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 5, 1.0, FlowerManager.FlowerTypeVanilla); //Bluebells
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 6, 1.0, FlowerManager.FlowerTypeVanilla); //Miner's delight
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 0, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeJungle); //Pink Hibiscus
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 1, 1.0, FlowerManager.FlowerTypeVanilla); //Lily of the Valley
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 2, 1.0, FlowerManager.FlowerTypeNether); // Burning Blososm
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 3, 1.0, FlowerManager.FlowerTypeVanilla); // Lavender
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 4, 1.0, FlowerManager.FlowerTypeVanilla); // Goldenrod
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 5, 1.0, FlowerManager.FlowerTypeVanilla); //Bluebells
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 6, 1.0, FlowerManager.FlowerTypeVanilla); //Miner's delight
FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 7, 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow); //Icy Iris
- FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 8, 1.0, FlowerManager.FlowerTypeVanilla); // Rose
+ FlowerManager.flowerRegistry.registerPlantableFlower(flowers2, 8, 1.0, FlowerManager.FlowerTypeVanilla); // Rose
}
// Toadstool 0 Portobello 1 Blue Milk cap 2 Glowshroom 3 flat mushroom 4 shadow shroom 5 'plants:12' tiny cactus
Block mushrooms = GameRegistry.findBlock(BoP, "mushrooms");
diff --git a/src/main/java/forestry/storage/CrateRegistry.java b/src/main/java/forestry/storage/CrateRegistry.java
index 733e521cf..c43a2676f 100644
--- a/src/main/java/forestry/storage/CrateRegistry.java
+++ b/src/main/java/forestry/storage/CrateRegistry.java
@@ -14,7 +14,9 @@ import net.minecraft.block.Block;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+
import net.minecraftforge.fml.common.registry.GameRegistry;
+
import forestry.api.storage.ICrateRegistry;
import forestry.core.items.ItemCrated;
import forestry.core.models.ModelCrate;
@@ -40,7 +42,7 @@ public class CrateRegistry implements ICrateRegistry {
ItemCrated crate = new ItemCrated(stack, useOreDict);
crate.setUnlocalizedName(uid);
GameRegistry.registerItem(crate, StringUtil.cleanItemName(crate));
- Proxies.render.registerModel(new ModelIndex(new ModelResourceLocation("forestry:crate-filled", StringUtil.cleanItemName(crate)), new ModelCrate()));
+ Proxies.render.registerModel(new ModelIndex(new ModelResourceLocation("forestry:crate-filled", StringUtil.cleanItemName(crate)), new ModelCrate()));
PluginStorage.registerCrate(crate);
}
diff --git a/src/main/java/forestry/storage/ResupplyHandler.java b/src/main/java/forestry/storage/ResupplyHandler.java
index da842d46f..420086e43 100755
--- a/src/main/java/forestry/storage/ResupplyHandler.java
+++ b/src/main/java/forestry/storage/ResupplyHandler.java
@@ -20,6 +20,7 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.Event;
+
import forestry.api.storage.BackpackResupplyEvent;
import forestry.core.IResupplyHandler;
import forestry.core.inventory.ItemInventory;
diff --git a/src/main/java/forestry/storage/items/ItemBackpack.java b/src/main/java/forestry/storage/items/ItemBackpack.java
index 0bad7f7b1..a490481bc 100755
--- a/src/main/java/forestry/storage/items/ItemBackpack.java
+++ b/src/main/java/forestry/storage/items/ItemBackpack.java
@@ -29,6 +29,7 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+
import forestry.api.core.IModelManager;
import forestry.api.storage.BackpackStowEvent;
import forestry.api.storage.EnumBackpackType;