From 2b0f5bfdf4b248eb697a905ed52d134d9b775e72 Mon Sep 17 00:00:00 2001 From: Nedelosk Date: Sat, 2 Sep 2017 17:28:13 +0200 Subject: [PATCH] Clean Up --- .../java/forestry/core/circuits/Circuits.java | 8 ++--- .../java/forestry/core/config/Constants.java | 2 +- .../forestry/farming/DummyFarmRegistry.java | 5 +++ .../forestry/greenhouse/PluginGreenhouse.java | 20 ++++++------ .../api/climate/IClimateContainer.java | 18 +++++------ .../climate/IClimateContainerListener.java | 2 +- .../api/climate/IClimateFactory.java | 3 +- .../api/climate/IClimateModifier.java | 18 +++++------ .../api/climate/IClimateSource.java | 17 +++++----- .../api/climate/IClimateSourceContainer.java | 11 +++---- .../api/climate/IClimateSourceOwner.java | 6 ++-- .../api/greenhouse/IBlankBlock.java | 16 +++++----- .../api/greenhouse/IGreenhouseBlock.java | 14 ++++----- .../greenhouse/IGreenhouseBlockHandler.java | 6 ++-- .../greenhouse/IGreenhouseBlockManager.java | 31 +++++++++---------- .../api/greenhouse/IGreenhouseChunk.java | 10 +++--- .../api/greenhouse/IGreenhouseHelper.java | 12 +++---- .../api/greenhouse/IGreenhouseProvider.java | 29 +++++++++-------- .../IGreenhouseProviderListener.java | 4 +-- .../greenhouse/api/greenhouse/IWallBlock.java | 12 +++---- .../greenhouse/blocks/BlockGreenhouse.java | 4 +-- .../blocks/BlockGreenhouseWindow.java | 2 +- .../circuits/CircuitClimateSource.java | 2 +- .../climate/ClimateSourceCircuitable.java | 4 +-- .../climate/ClimateSourceWorldManager.java | 10 +++--- .../climate/GreenhouseClimateManager.java | 18 +++++------ .../modifiers/ClimateSourceModifier.java | 2 +- .../climate/modifiers/TimeModifier.java | 2 +- .../greenhouse/gui/GuiGreenhouse.java | 4 +-- .../gui/widgets/WidgetClimateBar.java | 2 +- .../gui/widgets/WidgetClimatePanel.java | 12 +++---- .../items/ItemGreenhouseScreen.java | 2 +- .../models/ModelCamouflageSprayCan.java | 4 ++- .../models/ModelGreenhouseWindow.java | 2 +- .../multiblock/GreenhouseController.java | 2 +- .../multiblock/GreenhouseLimits.java | 2 +- .../IGreenhouseControllerInternal.java | 1 + .../blocks/GreenhouseBlockCache.java | 2 +- .../blocks/blank/BlankBlockHandler.java | 6 ++-- .../storage/GreenhouseBlockStorage.java | 4 +-- .../storage/GreenhouseProviderServer.java | 6 ++-- .../multiblock/blocks/wall/WallBlock.java | 6 ++-- .../multiblock/blocks/world/ChunkThread.java | 2 +- .../blocks/world/GreenhouseBlockManager.java | 2 +- .../proxy/ProxyGreenhouseClient.java | 4 +-- .../greenhouse/tiles/TileClimatiser.java | 4 +-- .../tiles/TileGreenhouseControl.java | 2 +- .../tiles/TileGreenhouseWindow.java | 4 +-- .../blocks/BlockButterflyNursery.java | 5 --- 49 files changed, 182 insertions(+), 184 deletions(-) delete mode 100644 src/main/java/forestry/lepidopterology/blocks/BlockButterflyNursery.java diff --git a/src/main/java/forestry/core/circuits/Circuits.java b/src/main/java/forestry/core/circuits/Circuits.java index a1756dc70..cecbb5c96 100644 --- a/src/main/java/forestry/core/circuits/Circuits.java +++ b/src/main/java/forestry/core/circuits/Circuits.java @@ -33,8 +33,8 @@ public class Circuits { public static ICircuit machineSpeedUpgrade1; public static ICircuit machineSpeedUpgrade2; public static ICircuit machineEfficiencyUpgrade1; - public static ICircuit greenhouseClimatiserTemperature1; - public static ICircuit greenhouseClimatiserTemperature2; - public static ICircuit greenhouseClimatiserHumidity1; - public static ICircuit greenhouseClimatiserHumidity2; + public static ICircuit climatiserTemperature1; + public static ICircuit climatiserTemperature2; + public static ICircuit climatiserHumidity1; + public static ICircuit climatiserHumidity2; } diff --git a/src/main/java/forestry/core/config/Constants.java b/src/main/java/forestry/core/config/Constants.java index 5c12f0a75..2847e9305 100644 --- a/src/main/java/forestry/core/config/Constants.java +++ b/src/main/java/forestry/core/config/Constants.java @@ -22,7 +22,7 @@ public class Constants implements IForestryConstants { public static final String MOD_ID = "forestry"; public static final String URL = "http://forestry.sengir.net/"; - public static final String VERSION = "@VERSION@"; + public static final String VERSION = "5.0.0.0";//"@VERSION@" public static final String BUILD_NUMBER = "@BUILD_NUMBER@"; public static final String RF_MOD_ID = "CoFHAPI|energy"; diff --git a/src/main/java/forestry/farming/DummyFarmRegistry.java b/src/main/java/forestry/farming/DummyFarmRegistry.java index 52b4930da..9dec62bc0 100644 --- a/src/main/java/forestry/farming/DummyFarmRegistry.java +++ b/src/main/java/forestry/farming/DummyFarmRegistry.java @@ -12,6 +12,11 @@ import forestry.api.farming.ISimpleFarmLogic; public class DummyFarmRegistry implements IFarmRegistry { + @Override + public void registerFarmLogic(String identifier, IFarmLogic logic) { + + } + @Override public void registerFarmables(String identifier, IFarmable... farmable) { } diff --git a/src/main/java/forestry/greenhouse/PluginGreenhouse.java b/src/main/java/forestry/greenhouse/PluginGreenhouse.java index a98a36077..3c21e3748 100644 --- a/src/main/java/forestry/greenhouse/PluginGreenhouse.java +++ b/src/main/java/forestry/greenhouse/PluginGreenhouse.java @@ -111,7 +111,7 @@ public class PluginGreenhouse extends BlankForestryPlugin { GreenhouseManager.climateManager = GreenhouseClimateManager.getInstance(); CamouflageManager.camouflageAccess = new CamouflageAccess(); } - + @Override public void registerItemsAndBlocks() { blocks = new BlockRegistryGreenhouse(); @@ -128,7 +128,7 @@ public class PluginGreenhouse extends BlankForestryPlugin { ICircuitLayout layoutManaged = new CircuitLayout("greenhouse.climatiser", CircuitSocketType.GREENHOUSE_CLIMATISER); ChipsetManager.circuitRegistry.registerLayout(layoutManaged); } - + @Override public void doInit() { super.doInit(); @@ -156,10 +156,10 @@ public class PluginGreenhouse extends BlankForestryPlugin { climateSourceManager.registerModifier(new AltitudeModifier()); climateSourceManager.registerModifier(new ClimateSourceModifier()); - Circuits.greenhouseClimatiserTemperature1 = new CircuitClimateSource("climatiser.temperature.1", ClimateType.TEMPERATURE, 0.125F, 0.125F); - Circuits.greenhouseClimatiserTemperature2 = new CircuitClimateSource("climatiser.temperature.2", ClimateType.TEMPERATURE, 0.25F, 0.25F); - Circuits.greenhouseClimatiserHumidity1 = new CircuitClimateSource("climatiser.humidity.1", ClimateType.HUMIDITY, 0.125F, 0.125F); - Circuits.greenhouseClimatiserHumidity2 = new CircuitClimateSource("climatiser.humidity.2", ClimateType.HUMIDITY, 0.25F, 0.25F); + Circuits.climatiserTemperature1 = new CircuitClimateSource("climatiser.temperature.1", ClimateType.TEMPERATURE, 0.125F, 0.125F); + Circuits.climatiserTemperature2 = new CircuitClimateSource("climatiser.temperature.2", ClimateType.TEMPERATURE, 0.25F, 0.25F); + Circuits.climatiserHumidity1 = new CircuitClimateSource("climatiser.humidity.1", ClimateType.HUMIDITY, 0.125F, 0.125F); + Circuits.climatiserHumidity2 = new CircuitClimateSource("climatiser.humidity.2", ClimateType.HUMIDITY, 0.25F, 0.25F); proxy.inti(); } @@ -257,10 +257,10 @@ public class PluginGreenhouse extends BlankForestryPlugin { } ICircuitLayout layout = ChipsetManager.circuitRegistry.getLayout("forestry.greenhouse.climatiser"); - ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.GOLD, 1), Circuits.greenhouseClimatiserTemperature1); - ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.BLAZE, 1), Circuits.greenhouseClimatiserTemperature2); - ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.LAPIS, 1), Circuits.greenhouseClimatiserHumidity1); - ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.OBSIDIAN, 1), Circuits.greenhouseClimatiserHumidity2); + ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.GOLD, 1), Circuits.climatiserTemperature1); + ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.BLAZE, 1), Circuits.climatiserTemperature2); + ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.LAPIS, 1), Circuits.climatiserHumidity1); + ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.OBSIDIAN, 1), Circuits.climatiserHumidity2); } @Override diff --git a/src/main/java/forestry/greenhouse/api/climate/IClimateContainer.java b/src/main/java/forestry/greenhouse/api/climate/IClimateContainer.java index dac3e252b..ac6bd6581 100644 --- a/src/main/java/forestry/greenhouse/api/climate/IClimateContainer.java +++ b/src/main/java/forestry/greenhouse/api/climate/IClimateContainer.java @@ -18,44 +18,44 @@ import forestry.api.core.INbtWritable; import forestry.api.greenhouse.IClimateHousing; public interface IClimateContainer extends INbtReadable, INbtWritable, IClimateSourceContainer { - + /** * @return The parent of this container. */ IClimateHousing getParent(); - + /** * @return The current climate state. */ IClimateState getState(); - + World getWorld(); - + /** * Update the climate in a region. */ void updateClimate(int ticks); - + /** * Add a listener to this container. */ void addListener(IClimateContainerListener listener); - + /** * Remove a listener to this container. */ void removeListener(IClimateContainerListener listener); - + /** * All listeners of this container. */ Collection getListeners(); - + /** * @return only not present if the controller never was assembled. */ IClimateState getTargetedState(); - + void setTargetedState(IClimateState state); @SideOnly(Side.CLIENT) diff --git a/src/main/java/forestry/greenhouse/api/climate/IClimateContainerListener.java b/src/main/java/forestry/greenhouse/api/climate/IClimateContainerListener.java index a2bbb0e18..aa0e62d26 100644 --- a/src/main/java/forestry/greenhouse/api/climate/IClimateContainerListener.java +++ b/src/main/java/forestry/greenhouse/api/climate/IClimateContainerListener.java @@ -11,5 +11,5 @@ public interface IClimateContainerListener { * Test if the container is closed. */ boolean isClosed(IClimateContainer container); - + } diff --git a/src/main/java/forestry/greenhouse/api/climate/IClimateFactory.java b/src/main/java/forestry/greenhouse/api/climate/IClimateFactory.java index a11ebc809..80deae6a6 100644 --- a/src/main/java/forestry/greenhouse/api/climate/IClimateFactory.java +++ b/src/main/java/forestry/greenhouse/api/climate/IClimateFactory.java @@ -11,9 +11,8 @@ public interface IClimateFactory { /** * @param climatedRegion - * * @return Creates a climate container. */ IClimateContainer createContainer(IClimateHousing climatedRegion); - + } diff --git a/src/main/java/forestry/greenhouse/api/climate/IClimateModifier.java b/src/main/java/forestry/greenhouse/api/climate/IClimateModifier.java index 54198611c..8f79f4661 100644 --- a/src/main/java/forestry/greenhouse/api/climate/IClimateModifier.java +++ b/src/main/java/forestry/greenhouse/api/climate/IClimateModifier.java @@ -16,29 +16,29 @@ import forestry.api.climate.IClimateState; * This modifier is used by {@link IClimateContainer}s. */ public interface IClimateModifier { - + /** * Is called every 20 ticks by the {@link IClimateContainer} to change its climate state. - * + * * @param container the climate container - * @param newState the new climate state - * @param oldState the climate static of the previous modification. - * @param data A {@link NBTTagCompound} that can be used to save custom data or to send it to the client to add it to the {@link IClimateData}. + * @param newState the new climate state + * @param oldState the climate static of the previous modification. + * @param data A {@link NBTTagCompound} that can be used to save custom data or to send it to the client to add it to the {@link IClimateData}. * @return a modify newState or the newState. */ - default IClimateState modifyTarget(IClimateContainer container, IClimateState newState, IClimateState oldState, NBTTagCompound data){ + default IClimateState modifyTarget(IClimateContainer container, IClimateState newState, IClimateState oldState, NBTTagCompound data) { return newState; } @SideOnly(Side.CLIENT) - default void addData(IClimateContainer container, IClimateState climateState, NBTTagCompound nbtData, IClimateData data){ + default void addData(IClimateContainer container, IClimateState climateState, NBTTagCompound nbtData, IClimateData data) { } - + /** * @return The priority of this modifier. The modifier with the highest priority is called first and the modifier with the lowest at last. */ default int getPriority() { return 0; } - + } diff --git a/src/main/java/forestry/greenhouse/api/climate/IClimateSource.java b/src/main/java/forestry/greenhouse/api/climate/IClimateSource.java index 27ee508c7..fac8557ee 100644 --- a/src/main/java/forestry/greenhouse/api/climate/IClimateSource.java +++ b/src/main/java/forestry/greenhouse/api/climate/IClimateSource.java @@ -17,40 +17,39 @@ import forestry.api.climate.IClimateState; * In forestry it is used in a part of a {@link IClimateModifier}. */ public interface IClimateSource { - + /** * The owner of this source. */ @Nullable IClimateSourceOwner getOwner(); - + /** * The range of this source. */ float getBoundaryModifier(ClimateType type, boolean boundaryUp); - + /** * @return true if this source affects this sourceType of climate. */ boolean affectClimateType(ClimateType type); - + /** - * @param state the {@link IClimateState} that the source has to work on. + * @param state the {@link IClimateState} that the source has to work on. * @param target the by the {@link IClimateContainer} targeted {@link IClimateState}. - * */ IClimateState work(IClimateState state, IClimateState target); - + /** * @return true if source has changed the climate at the last work cicle. */ boolean isActive(); - + /** * Called if the source is added to a {@link IClimateContainer}. */ void onAdded(IClimateContainer container); - + /** * Called if the source is removed form a {@link IClimateContainer}. */ diff --git a/src/main/java/forestry/greenhouse/api/climate/IClimateSourceContainer.java b/src/main/java/forestry/greenhouse/api/climate/IClimateSourceContainer.java index 452c2c478..10aa5b1e2 100644 --- a/src/main/java/forestry/greenhouse/api/climate/IClimateSourceContainer.java +++ b/src/main/java/forestry/greenhouse/api/climate/IClimateSourceContainer.java @@ -11,7 +11,6 @@ import forestry.api.climate.IClimateState; /** * @since 5.3.4 - * */ public interface IClimateSourceContainer { @@ -24,25 +23,25 @@ public interface IClimateSourceContainer { * Remove a climate source from this container. */ void removeClimateSource(IClimateSource source); - + /** * @return All climate sources of this container. */ Collection getClimateSources(); - + /** * The climate of the {@link IClimateContainer} that results out of the {@link IClimateState} modifications of the {@link IClimateSource}s can not be higher than this bound. */ IClimateState getBoundaryUp(); - + /** * The climate of the {@link IClimateContainer} that results out of the {@link IClimateState} modifications of the {@link IClimateSource}s can not be lower than this bound. */ IClimateState getBoundaryDown(); - + /** * Has to be called if any range of a {@link IClimateSource} changes. It calculates the range of all {@link IClimateSource}s together. */ void recalculateBoundaries(double sizeModifier); - + } diff --git a/src/main/java/forestry/greenhouse/api/climate/IClimateSourceOwner.java b/src/main/java/forestry/greenhouse/api/climate/IClimateSourceOwner.java index 3e85aaa91..04e267c4b 100644 --- a/src/main/java/forestry/greenhouse/api/climate/IClimateSourceOwner.java +++ b/src/main/java/forestry/greenhouse/api/climate/IClimateSourceOwner.java @@ -15,12 +15,12 @@ import forestry.api.core.ILocatable; public interface IClimateSourceOwner extends ILocatable { IClimateSource getClimateSource(); - + @SideOnly(Side.CLIENT) ItemStack getItemStack(); - + boolean isActive(); - + /** * @return true if this climate source owner can hold a {@link ICircuit} */ diff --git a/src/main/java/forestry/greenhouse/api/greenhouse/IBlankBlock.java b/src/main/java/forestry/greenhouse/api/greenhouse/IBlankBlock.java index f2bfb3efb..0ba95af84 100644 --- a/src/main/java/forestry/greenhouse/api/greenhouse/IBlankBlock.java +++ b/src/main/java/forestry/greenhouse/api/greenhouse/IBlankBlock.java @@ -10,35 +10,35 @@ import javax.annotation.Nullable; import net.minecraft.util.EnumFacing; public interface IBlankBlock extends IGreenhouseBlock { - + @Override @Nullable IBlankBlock getRoot(); - + /** * @return test if a face was already tested, false if not. */ boolean isFaceTested(EnumFacing facing); - + void setFaceTested(EnumFacing facing, boolean isTested); - + /** * @return if this block has a {@link IWallBlock} next to him. */ boolean isNearWall(); - + void setNearWall(boolean nearWall); - + /** * Called after the block is created. */ void validate(); - + /** * Called before the block will be removed. */ void invalidate(boolean chunkUnloading); - + boolean isValid(); } diff --git a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseBlock.java b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseBlock.java index b9a9a8dcf..a223e17a0 100644 --- a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseBlock.java +++ b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseBlock.java @@ -12,34 +12,34 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; public interface IGreenhouseBlock { - + /** * @return the position of this block. */ BlockPos getPos(); - + /** * @return the root block of this block. */ @Nullable IGreenhouseBlock getRoot(); - + /** * @return the side of this block that shows to the root block. */ @Nullable EnumFacing getRootFace(); - + /** * @return the manager of this block. */ IGreenhouseProvider getProvider(); - + /** * Called if a neighbor block of this block is removed. */ void onNeighborRemoved(IBlankBlock changedBlock, EnumFacing facing, boolean forcedRemove, Set blocksToCheck); - + IGreenhouseBlockHandler getHandler(); - + } diff --git a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseBlockHandler.java b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseBlockHandler.java index 5c9e0a922..16b88b593 100644 --- a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseBlockHandler.java +++ b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseBlockHandler.java @@ -14,7 +14,7 @@ import net.minecraft.util.math.BlockPos; import forestry.api.core.IErrorState; public interface IGreenhouseBlockHandler { - + void onRemoveBlock(IGreenhouseBlockStorage storage, B blockToRemove); B createBlock(IGreenhouseBlockStorage storage, @Nullable R root, @Nullable EnumFacing rootFacing, @Nullable BlockPos position); @@ -23,8 +23,8 @@ public interface IGreenhouseBlockHandler newBlocksToCheck); - + boolean onCheckPosition(IGreenhouseBlockStorage storage, R rootBlock, BlockPos position, EnumFacing facing, IGreenhouseBlock block, List newBlocksToCheck); - + Class getBlockClass(); } diff --git a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseBlockManager.java b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseBlockManager.java index 571b97774..587c2f265 100644 --- a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseBlockManager.java +++ b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseBlockManager.java @@ -13,17 +13,17 @@ import net.minecraft.util.math.ChunkPos; import net.minecraft.world.World; public interface IGreenhouseBlockManager { - + /** * @return the {@link IGreenhouseBlockHandler} that is used to handle blank blocks in the {@link IGreenhouseProvider} */ IGreenhouseBlockHandler getBlankBlockHandler(); - + /** * @return the {@link IGreenhouseBlockHandler} that is used to handle wall blocks in the {@link IGreenhouseProvider} */ IGreenhouseBlockHandler getWallBlockHandler(); - + /** * Tries to get a {@link IGreenhouseBlock} from all managers that are located at the chunk of the pos. * @@ -31,42 +31,41 @@ public interface IGreenhouseBlockManager { */ @Nullable IGreenhouseBlock getBlock(World world, BlockPos pos); - + /** - * * @return the chunk that is at this position. */ @Nullable IGreenhouseChunk getChunk(World world, long chunkPos); - + /** * @return the chunk that is at this position or if there is no it creates one. */ IGreenhouseChunk getOrCreateChunk(World world, long chunkPos); - + /** * @return creates a chunk and add it at this position */ IGreenhouseChunk createChunk(World world, long chunkPos); - - default IGreenhouseChunk getChunk(World world, int xPos, int yPos){ + + default IGreenhouseChunk getChunk(World world, int xPos, int yPos) { return getChunk(world, ChunkPos.asLong(xPos, yPos)); } - - default IGreenhouseChunk getOrCreateChunk(World world, int xPos, int yPos){ + + default IGreenhouseChunk getOrCreateChunk(World world, int xPos, int yPos) { return getOrCreateChunk(world, ChunkPos.asLong(xPos, yPos)); } - - default IGreenhouseChunk createChunk(World world, int xPos, int yPos){ + + default IGreenhouseChunk createChunk(World world, int xPos, int yPos) { return createChunk(world, ChunkPos.asLong(xPos, yPos)); } - + @Nullable void markChunkDirty(World world, long pos); - + @Nullable List getDirtyChunks(World world); - + @Nullable void markBlockDirty(World world, BlockPos pos); diff --git a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseChunk.java b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseChunk.java index d519fd5d3..d23af5a7d 100644 --- a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseChunk.java +++ b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseChunk.java @@ -18,17 +18,17 @@ public interface IGreenhouseChunk { * @return a {@link Collection} with all greenhouse managers of the greenhouses that are located in the world chunk on this chunk position. */ Collection getProviders(); - + /** * Marks the manager, that has a {@link IGreenhouseBlock} on this position, as dirty. */ void markProviderDirty(BlockPos pos); - + /** * @return A {@link java.util.Collection} with all managers that were modified in the last tick. */ Collection getDirtyProviders(); - + /** * Tries to get a {@link IGreenhouseBlock} from all managers that are located in this chunk. * @@ -36,12 +36,12 @@ public interface IGreenhouseChunk { */ @Nullable IGreenhouseBlock get(BlockPos pos); - + /** * Adds a manager to this chunk. */ void add(IGreenhouseProvider manager); - + /** * Removed a manager from this chunk. */ diff --git a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseHelper.java b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseHelper.java index 46381a8a0..fb5456cdc 100644 --- a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseHelper.java +++ b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseHelper.java @@ -14,17 +14,17 @@ import forestry.api.greenhouse.IGreenhouseLogicFactory; import forestry.api.multiblock.IGreenhouseController; public interface IGreenhouseHelper { - + void registerWindowGlass(String name, ItemStack item, String texture); - + ItemStack getGlassItem(String name); - + String getGlassTexture(String name); - + Collection getWindowGlasses(); - + void registerLogic(IGreenhouseLogicFactory logicFactory); - + Collection createLogics(IGreenhouseController controller); } diff --git a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseProvider.java b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseProvider.java index 792046265..24425aa0d 100644 --- a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseProvider.java +++ b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseProvider.java @@ -18,21 +18,20 @@ import forestry.greenhouse.api.climate.IClimateContainer; /** * Can be used to test if a space is closed. Is used by the greenhouse. - * */ -public interface IGreenhouseProvider extends IErrorLogicSource { - +public interface IGreenhouseProvider extends IErrorLogicSource { + /** * @return the climate container of this provider. */ @Nullable IClimateContainer getClimateContainer(); - + /** * Adds a listener to this provider. */ void addListener(IGreenhouseProviderListener listener); - + /** * @return All listeners that this provider has. */ @@ -42,26 +41,26 @@ public interface IGreenhouseProvider extends IErrorLogicSource { * @param centerPos The position at that the provider starts to test. */ void init(BlockPos centerPos, IGreenhouseLimits limits); - + /** * Invalidate and delete all {@link IGreenhouseBlock}s of this provider. */ void clear(boolean chunkUnloading); - + /** * Called from the thread if a {@link IGreenhouseBlock} was modified by the player. */ void recreate(); - + void onUnloadChunk(long chunkPos); - + void onLoadChunk(long chunkPos); - + /** * @return True if the provider waits for a chunk to be loaded, before he can test if it is closed. */ boolean hasUnloadedChunks(); - + /** * @return The position from that the provider tests if it is closed. */ @@ -82,21 +81,21 @@ public interface IGreenhouseProvider extends IErrorLogicSource { IGreenhouseLimits getUsedLimits(); GreenhouseState getState(); - + World getWorld(); - + /** * @return true if the space is closed. */ boolean isClosed(); - + /** * Test if the provider is closed. */ IErrorState checkPosition(BlockPos position); int getSize(); - + /** * @return All {@link IGreenhouseBlockHandler}s that this provider uses. */ diff --git a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseProviderListener.java b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseProviderListener.java index 686da54db..22e073a9f 100644 --- a/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseProviderListener.java +++ b/src/main/java/forestry/greenhouse/api/greenhouse/IGreenhouseProviderListener.java @@ -8,7 +8,7 @@ package forestry.greenhouse.api.greenhouse; import net.minecraft.util.math.BlockPos; public interface IGreenhouseProviderListener { - + void onCheckPosition(BlockPos pos); - + } diff --git a/src/main/java/forestry/greenhouse/api/greenhouse/IWallBlock.java b/src/main/java/forestry/greenhouse/api/greenhouse/IWallBlock.java index 794503c47..9253f1bec 100644 --- a/src/main/java/forestry/greenhouse/api/greenhouse/IWallBlock.java +++ b/src/main/java/forestry/greenhouse/api/greenhouse/IWallBlock.java @@ -10,15 +10,15 @@ import net.minecraft.util.EnumFacing; import forestry.greenhouse.api.climate.IClimateSource; public interface IWallBlock extends IGreenhouseBlock { - + void setRoot(IBlankBlock parent); - + void setRootFace(EnumFacing facing); - + void onCreate(); - + void onRemove(); - + void add(IClimateSource source); - + } diff --git a/src/main/java/forestry/greenhouse/blocks/BlockGreenhouse.java b/src/main/java/forestry/greenhouse/blocks/BlockGreenhouse.java index bec10f0eb..83fb5dfac 100755 --- a/src/main/java/forestry/greenhouse/blocks/BlockGreenhouse.java +++ b/src/main/java/forestry/greenhouse/blocks/BlockGreenhouse.java @@ -49,7 +49,6 @@ import net.minecraftforge.common.property.IUnlistedProperty; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.greenhouse.api.climate.IClimateContainer; import forestry.api.climate.IClimateState; import forestry.api.core.EnumTemperature; import forestry.api.core.ICamouflageHandler; @@ -57,7 +56,6 @@ import forestry.api.core.ICamouflagedTile; import forestry.api.core.IModelManager; import forestry.api.core.ISpriteRegister; import forestry.api.core.ITextureManager; -import forestry.greenhouse.api.greenhouse.IGreenhouseProvider; import forestry.api.multiblock.IGreenhouseComponent; import forestry.api.multiblock.IMultiblockComponent; import forestry.api.multiblock.IMultiblockController; @@ -74,6 +72,8 @@ import forestry.core.utils.ItemStackUtil; import forestry.core.utils.ItemTooltipUtil; import forestry.core.utils.Translator; import forestry.greenhouse.PluginGreenhouse; +import forestry.greenhouse.api.climate.IClimateContainer; +import forestry.greenhouse.api.greenhouse.IGreenhouseProvider; import forestry.greenhouse.models.ModelCamouflaged; import forestry.greenhouse.multiblock.IGreenhouseControllerInternal; import forestry.greenhouse.tiles.TileGreenhouseControl; diff --git a/src/main/java/forestry/greenhouse/blocks/BlockGreenhouseWindow.java b/src/main/java/forestry/greenhouse/blocks/BlockGreenhouseWindow.java index efcde6195..bbe20d0bb 100644 --- a/src/main/java/forestry/greenhouse/blocks/BlockGreenhouseWindow.java +++ b/src/main/java/forestry/greenhouse/blocks/BlockGreenhouseWindow.java @@ -49,7 +49,6 @@ import net.minecraftforge.fml.relauncher.SideOnly; import forestry.api.core.IItemModelRegister; import forestry.api.core.IModelManager; -import forestry.greenhouse.api.greenhouse.GreenhouseManager; import forestry.core.blocks.IBlockRotatable; import forestry.core.blocks.properties.UnlistedBlockAccess; import forestry.core.blocks.properties.UnlistedBlockPos; @@ -57,6 +56,7 @@ import forestry.core.tiles.IActivatable; import forestry.core.tiles.TileUtil; import forestry.core.utils.Log; import forestry.greenhouse.PluginGreenhouse; +import forestry.greenhouse.api.greenhouse.GreenhouseManager; import forestry.greenhouse.tiles.TileGreenhouseWindow; import forestry.greenhouse.tiles.TileGreenhouseWindow.WindowMode; diff --git a/src/main/java/forestry/greenhouse/circuits/CircuitClimateSource.java b/src/main/java/forestry/greenhouse/circuits/CircuitClimateSource.java index 23ae76c1d..24a6549f1 100644 --- a/src/main/java/forestry/greenhouse/circuits/CircuitClimateSource.java +++ b/src/main/java/forestry/greenhouse/circuits/CircuitClimateSource.java @@ -13,10 +13,10 @@ package forestry.greenhouse.circuits; import javax.annotation.Nullable; import forestry.api.climate.ClimateType; +import forestry.core.circuits.Circuit; import forestry.greenhouse.api.climate.IClimateSource; import forestry.greenhouse.api.climate.IClimateSourceCircuitable; import forestry.greenhouse.api.climate.IClimateSourceOwner; -import forestry.core.circuits.Circuit; public class CircuitClimateSource extends Circuit { private ClimateType type; diff --git a/src/main/java/forestry/greenhouse/climate/ClimateSourceCircuitable.java b/src/main/java/forestry/greenhouse/climate/ClimateSourceCircuitable.java index 2e53144ed..f872c51cf 100644 --- a/src/main/java/forestry/greenhouse/climate/ClimateSourceCircuitable.java +++ b/src/main/java/forestry/greenhouse/climate/ClimateSourceCircuitable.java @@ -11,10 +11,10 @@ package forestry.greenhouse.climate; import forestry.api.climate.ClimateType; -import forestry.greenhouse.api.climate.IClimateSourceCircuitable; -import forestry.greenhouse.api.climate.IClimateSourceOwner; import forestry.core.climate.ClimateSource; import forestry.core.climate.ClimateSourceType; +import forestry.greenhouse.api.climate.IClimateSourceCircuitable; +import forestry.greenhouse.api.climate.IClimateSourceOwner; public abstract class ClimateSourceCircuitable extends ClimateSource implements IClimateSourceCircuitable { protected float changeMultiplierTemperature = 1.0f; diff --git a/src/main/java/forestry/greenhouse/climate/ClimateSourceWorldManager.java b/src/main/java/forestry/greenhouse/climate/ClimateSourceWorldManager.java index 2c9678b38..e22a93114 100644 --- a/src/main/java/forestry/greenhouse/climate/ClimateSourceWorldManager.java +++ b/src/main/java/forestry/greenhouse/climate/ClimateSourceWorldManager.java @@ -7,10 +7,10 @@ import java.util.Map; import net.minecraft.util.math.BlockPos; -import forestry.greenhouse.api.greenhouse.Position2D; import forestry.greenhouse.api.climate.IClimateSourceOwner; +import forestry.greenhouse.api.greenhouse.Position2D; -public class ClimateSourceWorldManager{ +public class ClimateSourceWorldManager { private final Map> owners; @@ -18,14 +18,14 @@ public class ClimateSourceWorldManager{ this.owners = new HashMap<>(); } - public void addSource(IClimateSourceOwner owner){ + public void addSource(IClimateSourceOwner owner) { BlockPos pos = owner.getCoordinates(); Position2D position = new Position2D(pos); Map positionedOwners = owners.computeIfAbsent(position, k -> new HashMap<>()); positionedOwners.put(pos.getY(), owner); } - public void removeSource(IClimateSourceOwner owner){ + public void removeSource(IClimateSourceOwner owner) { BlockPos pos = owner.getCoordinates(); Position2D position = new Position2D(pos); Map positionedOwners = owners.computeIfAbsent(position, k -> new HashMap<>()); @@ -34,7 +34,7 @@ public class ClimateSourceWorldManager{ public Collection getSources(Position2D position) { Map positionedOwners = owners.get(position); - if(positionedOwners == null){ + if (positionedOwners == null) { return Collections.emptyList(); } return positionedOwners.values(); diff --git a/src/main/java/forestry/greenhouse/climate/GreenhouseClimateManager.java b/src/main/java/forestry/greenhouse/climate/GreenhouseClimateManager.java index 6a58a1ff1..fd5a8f7ed 100644 --- a/src/main/java/forestry/greenhouse/climate/GreenhouseClimateManager.java +++ b/src/main/java/forestry/greenhouse/climate/GreenhouseClimateManager.java @@ -26,20 +26,20 @@ public class GreenhouseClimateManager implements IGreenhouseClimateManager { private final Set modifiers; private GreenhouseClimateManager() { - managers = new World2ObjectMap(world->new ClimateSourceWorldManager()); + managers = new World2ObjectMap(world -> new ClimateSourceWorldManager()); modifiers = new TreeSet((firstModifier, secondModifier) -> firstModifier.getPriority() > secondModifier.getPriority() ? 1 : -1); } - public static GreenhouseClimateManager getInstance(){ + public static GreenhouseClimateManager getInstance() { return INSTANCE; } @Override public IClimateContainer getContainer(World world, BlockPos pos) { IGreenhouseBlock logicBlock = GreenhouseBlockManager.getInstance().getBlock(world, pos); - if(logicBlock != null){ + if (logicBlock != null) { IGreenhouseProvider provider = logicBlock.getProvider(); - if(!provider.isClosed()) { + if (!provider.isClosed()) { return null; } return provider.getClimateContainer(); @@ -48,20 +48,20 @@ public class GreenhouseClimateManager implements IGreenhouseClimateManager { } @Override - public void addSource(IClimateSourceOwner owner){ + public void addSource(IClimateSourceOwner owner) { World world = owner.getWorldObj(); ClimateSourceWorldManager manager = managers.get(world); - if(manager == null){ + if (manager == null) { return; } manager.addSource(owner); } @Override - public void removeSource(IClimateSourceOwner owner){ + public void removeSource(IClimateSourceOwner owner) { World world = owner.getWorldObj(); ClimateSourceWorldManager manager = managers.get(world); - if(manager == null){ + if (manager == null) { return; } manager.removeSource(owner); @@ -70,7 +70,7 @@ public class GreenhouseClimateManager implements IGreenhouseClimateManager { @Override public Collection getSources(World world, Position2D position) { ClimateSourceWorldManager manager = managers.get(world); - if(manager == null){ + if (manager == null) { return Collections.emptyList(); } return manager.getSources(position); diff --git a/src/main/java/forestry/greenhouse/climate/modifiers/ClimateSourceModifier.java b/src/main/java/forestry/greenhouse/climate/modifiers/ClimateSourceModifier.java index 16262523a..965a78e91 100644 --- a/src/main/java/forestry/greenhouse/climate/modifiers/ClimateSourceModifier.java +++ b/src/main/java/forestry/greenhouse/climate/modifiers/ClimateSourceModifier.java @@ -54,7 +54,7 @@ public class ClimateSourceModifier implements IClimateModifier { data.setTag("rangeDown", boundaryDown.writeToNBT(new NBTTagCompound())); IClimateState targetedState = container.getTargetedState(); - if(!targetedState.isPresent()){ + if (!targetedState.isPresent()) { return newState; } int workedSources = 0; diff --git a/src/main/java/forestry/greenhouse/climate/modifiers/TimeModifier.java b/src/main/java/forestry/greenhouse/climate/modifiers/TimeModifier.java index 3a5cffb05..3f69259c6 100644 --- a/src/main/java/forestry/greenhouse/climate/modifiers/TimeModifier.java +++ b/src/main/java/forestry/greenhouse/climate/modifiers/TimeModifier.java @@ -33,7 +33,7 @@ public class TimeModifier implements IClimateModifier { int lightValue = EnumSkyBlock.SKY.defaultLightValue - world.getSkylightSubtracted(); float sunAngle = world.getCelestialAngleRadians(1.0F); - if(!world.isDaytime()){ + if (!world.isDaytime()) { lightValue = EnumSkyBlock.SKY.defaultLightValue - lightValue; } diff --git a/src/main/java/forestry/greenhouse/gui/GuiGreenhouse.java b/src/main/java/forestry/greenhouse/gui/GuiGreenhouse.java index f4419d11e..a59c5368f 100755 --- a/src/main/java/forestry/greenhouse/gui/GuiGreenhouse.java +++ b/src/main/java/forestry/greenhouse/gui/GuiGreenhouse.java @@ -52,7 +52,7 @@ public class GuiGreenhouse extends GuiForestryTitled { //Add the camouflage tab widgetManager.add(new WidgetCamouflageTab(widgetManager, xSize / 4 - WidgetCamouflageTab.WIDTH / 2, -WidgetCamouflageTab.HEIGHT, controller, tile)); - if(container.getTargetedState().isPresent()) { + if (container.getTargetedState().isPresent()) { widgetManager.add(new WidgetClimateBar(widgetManager, xSize / 3 + WidgetClimateBar.WIDTH / 3, -WidgetClimateBar.HEIGHT)); } widgetManager.add(temperaturePanel = new WidgetClimatePanel(widgetManager, this, 9, 18, ClimateType.TEMPERATURE)); @@ -61,7 +61,7 @@ public class GuiGreenhouse extends GuiForestryTitled { public void sendNetworkUpdate() { IClimateState climateState = container.getTargetedState(); - if(climateState.isPresent()) { + if (climateState.isPresent()) { BlockPos pos = controller.getCoordinates(); float temp = temperaturePanel.parseValue(); float hum = humidityPanel.parseValue(); diff --git a/src/main/java/forestry/greenhouse/gui/widgets/WidgetClimateBar.java b/src/main/java/forestry/greenhouse/gui/widgets/WidgetClimateBar.java index a784c3509..c58270ef6 100644 --- a/src/main/java/forestry/greenhouse/gui/widgets/WidgetClimateBar.java +++ b/src/main/java/forestry/greenhouse/gui/widgets/WidgetClimateBar.java @@ -44,7 +44,7 @@ public class WidgetClimateBar extends Widget { super(manager, xPos, yPos); this.width = WIDTH; this.height = HEIGHT; - for(EnumClimate climate : EnumClimate.values()){ + for (EnumClimate climate : EnumClimate.values()) { buttons.add(new ClimateButton(this, climate, xPos + 5 + climate.ordinal() * 16, yPos + 5)); } } diff --git a/src/main/java/forestry/greenhouse/gui/widgets/WidgetClimatePanel.java b/src/main/java/forestry/greenhouse/gui/widgets/WidgetClimatePanel.java index 492d70192..12859cbdc 100644 --- a/src/main/java/forestry/greenhouse/gui/widgets/WidgetClimatePanel.java +++ b/src/main/java/forestry/greenhouse/gui/widgets/WidgetClimatePanel.java @@ -68,9 +68,9 @@ public class WidgetClimatePanel extends Widget { textField.setValidator(NUMBER_FILTER); textField.setEnableBackgroundDrawing(false); IClimateState climateState = gui.container.getTargetedState(); - if(climateState.isPresent()) { + if (climateState.isPresent()) { textField.setText(Float.toString(climateState.get(type))); - }else{ + } else { textField.setVisible(false); textField.setEnabled(false); } @@ -97,8 +97,8 @@ public class WidgetClimatePanel extends Widget { private int updateTimer = 0; - private void updateData(){ - if(updateTimer > 0){ + private void updateData() { + if (updateTimer > 0) { updateTimer--; return; } @@ -107,8 +107,8 @@ public class WidgetClimatePanel extends Widget { IClimateData data = gui.container.getData(); for (Map.Entry entry : data.getData(type).entrySet()) { float value = entry.getValue(); - int percent = (int)(value * 100); - if(percent != 0) { + int percent = (int) (value * 100); + if (percent != 0) { table.addValueEntry(entry.getKey(), percent + " %"); } } diff --git a/src/main/java/forestry/greenhouse/items/ItemGreenhouseScreen.java b/src/main/java/forestry/greenhouse/items/ItemGreenhouseScreen.java index 799a61f0c..117bf5b2e 100644 --- a/src/main/java/forestry/greenhouse/items/ItemGreenhouseScreen.java +++ b/src/main/java/forestry/greenhouse/items/ItemGreenhouseScreen.java @@ -121,7 +121,7 @@ public class ItemGreenhouseScreen extends ItemForestry implements IColoredItem { return handleSneaking(world, pos, player, itemStack, itemPos); } - private EnumActionResult handleSneaking(World world, BlockPos pos,EntityPlayer player, ItemStack itemStack, BlockPos itemPos){ + private EnumActionResult handleSneaking(World world, BlockPos pos, EntityPlayer player, ItemStack itemStack, BlockPos itemPos) { IGreenhouseComponent component = MultiblockUtil.getComponent(world, pos, IGreenhouseComponent.class); if (component != null) { IGreenhouseController controller = component.getMultiblockLogic().getController(); diff --git a/src/main/java/forestry/greenhouse/models/ModelCamouflageSprayCan.java b/src/main/java/forestry/greenhouse/models/ModelCamouflageSprayCan.java index 206b72d28..2a6727e67 100755 --- a/src/main/java/forestry/greenhouse/models/ModelCamouflageSprayCan.java +++ b/src/main/java/forestry/greenhouse/models/ModelCamouflageSprayCan.java @@ -103,7 +103,9 @@ public class ModelCamouflageSprayCan extends BlankModel { return PerspectiveMapWrapper.handlePerspective(originalModel, state, cameraTransformType); } - } @Override + } + + @Override protected ItemOverrideList createOverrides() { return new SprayCanOverrideList(); } diff --git a/src/main/java/forestry/greenhouse/models/ModelGreenhouseWindow.java b/src/main/java/forestry/greenhouse/models/ModelGreenhouseWindow.java index 843c12694..8c9196952 100644 --- a/src/main/java/forestry/greenhouse/models/ModelGreenhouseWindow.java +++ b/src/main/java/forestry/greenhouse/models/ModelGreenhouseWindow.java @@ -25,13 +25,13 @@ import net.minecraftforge.common.property.IExtendedBlockState; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.greenhouse.api.greenhouse.GreenhouseManager; import forestry.core.blocks.properties.UnlistedBlockAccess; import forestry.core.blocks.properties.UnlistedBlockPos; import forestry.core.models.DefaultTextureGetter; import forestry.core.models.ModelBlockCustomCached; import forestry.core.tiles.TileUtil; import forestry.core.utils.ModelUtil; +import forestry.greenhouse.api.greenhouse.GreenhouseManager; import forestry.greenhouse.blocks.BlockGreenhouseWindow; import forestry.greenhouse.blocks.State; import forestry.greenhouse.tiles.TileGreenhouseWindow; diff --git a/src/main/java/forestry/greenhouse/multiblock/GreenhouseController.java b/src/main/java/forestry/greenhouse/multiblock/GreenhouseController.java index 186681ef2..87f429cee 100644 --- a/src/main/java/forestry/greenhouse/multiblock/GreenhouseController.java +++ b/src/main/java/forestry/greenhouse/multiblock/GreenhouseController.java @@ -399,7 +399,7 @@ public class GreenhouseController extends RectangularMultiblockControllerBase im createDefaultState(); limits = createLimits(); - if(!climateContainer.getTargetedState().isPresent()) { + if (!climateContainer.getTargetedState().isPresent()) { IClimateState defaultClimate = getDefaultClimate(); climateContainer.setState(defaultClimate.toState(ClimateStateType.MUTABLE)); climateContainer.setTargetedState(defaultClimate); diff --git a/src/main/java/forestry/greenhouse/multiblock/GreenhouseLimits.java b/src/main/java/forestry/greenhouse/multiblock/GreenhouseLimits.java index c73dd30d3..a2c5814d2 100644 --- a/src/main/java/forestry/greenhouse/multiblock/GreenhouseLimits.java +++ b/src/main/java/forestry/greenhouse/multiblock/GreenhouseLimits.java @@ -14,9 +14,9 @@ import java.io.IOException; import net.minecraft.nbt.NBTTagCompound; +import forestry.core.network.PacketBufferForestry; import forestry.greenhouse.api.greenhouse.IGreenhouseLimits; import forestry.greenhouse.api.greenhouse.Position2D; -import forestry.core.network.PacketBufferForestry; public class GreenhouseLimits implements IGreenhouseLimits { private final Position2D maximumCoordinates; diff --git a/src/main/java/forestry/greenhouse/multiblock/IGreenhouseControllerInternal.java b/src/main/java/forestry/greenhouse/multiblock/IGreenhouseControllerInternal.java index cd34aadac..bc4c64bae 100644 --- a/src/main/java/forestry/greenhouse/multiblock/IGreenhouseControllerInternal.java +++ b/src/main/java/forestry/greenhouse/multiblock/IGreenhouseControllerInternal.java @@ -50,6 +50,7 @@ public interface IGreenhouseControllerInternal extends IGreenhouseController, IM IClimateContainer getClimateContainer(); /* IGreenhouseHousing */ + /** * @return the manager of this housing. */ diff --git a/src/main/java/forestry/greenhouse/multiblock/blocks/GreenhouseBlockCache.java b/src/main/java/forestry/greenhouse/multiblock/blocks/GreenhouseBlockCache.java index ba241ae08..5018b284b 100644 --- a/src/main/java/forestry/greenhouse/multiblock/blocks/GreenhouseBlockCache.java +++ b/src/main/java/forestry/greenhouse/multiblock/blocks/GreenhouseBlockCache.java @@ -18,9 +18,9 @@ import java.util.Set; import net.minecraft.util.math.BlockPos; -import forestry.greenhouse.api.greenhouse.IGreenhouseProvider; import forestry.core.network.IStreamable; import forestry.core.network.PacketBufferForestry; +import forestry.greenhouse.api.greenhouse.IGreenhouseProvider; import forestry.greenhouse.network.packets.PacketGreenhouseData; /** diff --git a/src/main/java/forestry/greenhouse/multiblock/blocks/blank/BlankBlockHandler.java b/src/main/java/forestry/greenhouse/multiblock/blocks/blank/BlankBlockHandler.java index 165f3f903..117854bb3 100644 --- a/src/main/java/forestry/greenhouse/multiblock/blocks/blank/BlankBlockHandler.java +++ b/src/main/java/forestry/greenhouse/multiblock/blocks/blank/BlankBlockHandler.java @@ -58,7 +58,7 @@ public class BlankBlockHandler implements IGreenhouseBlockHandler newBlocksToCheck = new LinkedList<>(); IErrorState errorState = handler.checkNeighborBlocks(storage, blockToCheck, newBlocksToCheck); - if(errorState != null){ + if (errorState != null) { errorLogic.setCondition(true, errorState); } blocksToCheck.addAll(newBlocksToCheck); @@ -255,9 +255,9 @@ public class GreenhouseProviderServer extends GreenhouseProvider { errorLogic.setCondition(true, EnumErrorCode.NOT_LOADED); return GreenhouseState.UNLOADED_CHUNK; } - if(errorLogic.hasErrors()){ + if (errorLogic.hasErrors()) { //Remove the state NOT_CLOSED if the logic has the state TOO_LARGE because the state NOT_CLOSED can be caused by the TOO_LARGE state - if(errorLogic.getErrorStates().contains(EnumErrorCode.TOO_LARGE)){ + if (errorLogic.getErrorStates().contains(EnumErrorCode.TOO_LARGE)) { errorLogic.setCondition(false, EnumErrorCode.NOT_CLOSED); } return GreenhouseState.OPEN; diff --git a/src/main/java/forestry/greenhouse/multiblock/blocks/wall/WallBlock.java b/src/main/java/forestry/greenhouse/multiblock/blocks/wall/WallBlock.java index 2e0d7e77d..4a2d072b2 100644 --- a/src/main/java/forestry/greenhouse/multiblock/blocks/wall/WallBlock.java +++ b/src/main/java/forestry/greenhouse/multiblock/blocks/wall/WallBlock.java @@ -16,15 +16,15 @@ import java.util.List; import net.minecraft.util.math.BlockPos; +import forestry.greenhouse.api.climate.IClimateContainer; +import forestry.greenhouse.api.climate.IClimateSource; +import forestry.greenhouse.api.climate.IClimateSourceOwner; import forestry.greenhouse.api.greenhouse.GreenhouseManager; import forestry.greenhouse.api.greenhouse.IBlankBlock; import forestry.greenhouse.api.greenhouse.IGreenhouseBlockHandler; import forestry.greenhouse.api.greenhouse.IGreenhouseProvider; import forestry.greenhouse.api.greenhouse.IWallBlock; import forestry.greenhouse.api.greenhouse.Position2D; -import forestry.greenhouse.api.climate.IClimateContainer; -import forestry.greenhouse.api.climate.IClimateSource; -import forestry.greenhouse.api.climate.IClimateSourceOwner; import forestry.greenhouse.multiblock.blocks.GreenhouseBlock; public class WallBlock extends GreenhouseBlock implements IWallBlock { diff --git a/src/main/java/forestry/greenhouse/multiblock/blocks/world/ChunkThread.java b/src/main/java/forestry/greenhouse/multiblock/blocks/world/ChunkThread.java index 1fe3836de..efb66980a 100644 --- a/src/main/java/forestry/greenhouse/multiblock/blocks/world/ChunkThread.java +++ b/src/main/java/forestry/greenhouse/multiblock/blocks/world/ChunkThread.java @@ -24,8 +24,8 @@ import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.greenhouse.api.greenhouse.IGreenhouseProvider; import forestry.core.utils.Log; +import forestry.greenhouse.api.greenhouse.IGreenhouseProvider; import forestry.greenhouse.multiblock.blocks.storage.GreenhouseChunk; public class ChunkThread implements Runnable { diff --git a/src/main/java/forestry/greenhouse/multiblock/blocks/world/GreenhouseBlockManager.java b/src/main/java/forestry/greenhouse/multiblock/blocks/world/GreenhouseBlockManager.java index 0258e0966..0bc416269 100644 --- a/src/main/java/forestry/greenhouse/multiblock/blocks/world/GreenhouseBlockManager.java +++ b/src/main/java/forestry/greenhouse/multiblock/blocks/world/GreenhouseBlockManager.java @@ -18,11 +18,11 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.ChunkPos; import net.minecraft.world.World; +import forestry.core.utils.World2ObjectMap; import forestry.greenhouse.api.greenhouse.IGreenhouseBlock; import forestry.greenhouse.api.greenhouse.IGreenhouseBlockManager; import forestry.greenhouse.api.greenhouse.IGreenhouseChunk; import forestry.greenhouse.api.greenhouse.IGreenhouseProvider; -import forestry.core.utils.World2ObjectMap; import forestry.greenhouse.multiblock.blocks.blank.BlankBlockHandler; import forestry.greenhouse.multiblock.blocks.storage.GreenhouseChunk; import forestry.greenhouse.multiblock.blocks.wall.WallBlockHandler; diff --git a/src/main/java/forestry/greenhouse/proxy/ProxyGreenhouseClient.java b/src/main/java/forestry/greenhouse/proxy/ProxyGreenhouseClient.java index 1ad570238..399a145a4 100644 --- a/src/main/java/forestry/greenhouse/proxy/ProxyGreenhouseClient.java +++ b/src/main/java/forestry/greenhouse/proxy/ProxyGreenhouseClient.java @@ -28,14 +28,14 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.greenhouse.api.climate.IClimateContainer; import forestry.api.climate.IClimateState; -import forestry.greenhouse.api.greenhouse.IGreenhouseBlock; import forestry.core.models.BlockModelEntry; import forestry.core.models.ModelEntry; import forestry.core.models.ModelManager; import forestry.greenhouse.GreenhouseEventHandler; import forestry.greenhouse.PluginGreenhouse; +import forestry.greenhouse.api.climate.IClimateContainer; +import forestry.greenhouse.api.greenhouse.IGreenhouseBlock; import forestry.greenhouse.blocks.BlockClimatiser; import forestry.greenhouse.blocks.BlockGreenhouse; import forestry.greenhouse.blocks.BlockRegistryGreenhouse; diff --git a/src/main/java/forestry/greenhouse/tiles/TileClimatiser.java b/src/main/java/forestry/greenhouse/tiles/TileClimatiser.java index ff60f0fe8..88b5d120a 100644 --- a/src/main/java/forestry/greenhouse/tiles/TileClimatiser.java +++ b/src/main/java/forestry/greenhouse/tiles/TileClimatiser.java @@ -27,8 +27,6 @@ import forestry.api.circuits.CircuitSocketType; import forestry.api.circuits.ICircuitBoard; import forestry.api.circuits.ICircuitSocketType; import forestry.api.climate.ClimateType; -import forestry.greenhouse.api.climate.IClimateSource; -import forestry.greenhouse.api.climate.IClimateSourceOwner; import forestry.api.core.ICamouflageHandler; import forestry.api.core.ICamouflagedTile; import forestry.apiculture.network.packets.PacketActiveUpdate; @@ -42,6 +40,8 @@ import forestry.core.tiles.IActivatable; import forestry.core.tiles.TileForestry; import forestry.core.utils.ItemStackUtil; import forestry.core.utils.NetworkUtil; +import forestry.greenhouse.api.climate.IClimateSource; +import forestry.greenhouse.api.climate.IClimateSourceOwner; import forestry.greenhouse.blocks.BlockClimatiser; import forestry.greenhouse.camouflage.CamouflageHandlerType; import forestry.greenhouse.climate.ClimateSourceClimatiser; diff --git a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseControl.java b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseControl.java index fdbafa28f..6ba44db01 100644 --- a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseControl.java +++ b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseControl.java @@ -14,10 +14,10 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import forestry.greenhouse.api.greenhouse.DefaultGreenhouseListener; import forestry.api.greenhouse.IGreenhouseListener; import forestry.api.multiblock.IGreenhouseComponent; import forestry.api.multiblock.IGreenhouseController; +import forestry.greenhouse.api.greenhouse.DefaultGreenhouseListener; public class TileGreenhouseControl extends TileGreenhouse implements IGreenhouseComponent.Listener { diff --git a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseWindow.java b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseWindow.java index df7886caf..3aaf797fc 100644 --- a/src/main/java/forestry/greenhouse/tiles/TileGreenhouseWindow.java +++ b/src/main/java/forestry/greenhouse/tiles/TileGreenhouseWindow.java @@ -23,11 +23,11 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import forestry.greenhouse.api.climate.IClimateSource; -import forestry.greenhouse.api.climate.IClimateSourceOwner; import forestry.apiculture.network.packets.PacketActiveUpdate; import forestry.core.tiles.IActivatable; import forestry.core.utils.NetworkUtil; +import forestry.greenhouse.api.climate.IClimateSource; +import forestry.greenhouse.api.climate.IClimateSourceOwner; import forestry.greenhouse.blocks.BlockGreenhouseWindow; import forestry.greenhouse.climate.ClimateSourceWindow; diff --git a/src/main/java/forestry/lepidopterology/blocks/BlockButterflyNursery.java b/src/main/java/forestry/lepidopterology/blocks/BlockButterflyNursery.java deleted file mode 100644 index be7baa1f7..000000000 --- a/src/main/java/forestry/lepidopterology/blocks/BlockButterflyNursery.java +++ /dev/null @@ -1,5 +0,0 @@ -package forestry.lepidopterology.blocks; - -public class BlockButterflyNursery { - -}