From ecb6eddc06fcf610c8cc283ca624eefef1c27e64 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 12 Sep 2016 20:45:29 +0200 Subject: [PATCH] Grab the broom and sweep~ --- .../api/ActuallyAdditionsAPI.java | 1 + .../api/booklet/BookletPage.java | 2 +- .../api/laser/IConnectionPair.java | 3 +- .../api/recipe/CrusherRecipe.java | 5 - .../mod/ActuallyAdditions.java | 2 +- .../mod/achievement/InitAchievements.java | 5 - .../mod/achievement/TheAchievements.java | 1 - .../mod/blocks/BlockAtomicReconstructor.java | 1 - .../mod/blocks/BlockCoalGenerator.java | 1 - .../mod/blocks/BlockEmpowerer.java | 1 - .../mod/blocks/BlockFurnaceDouble.java | 1 - .../mod/blocks/BlockGrinder.java | 1 - .../mod/blocks/BlockItemViewer.java | 1 - .../mod/blocks/BlockOilGenerator.java | 1 - .../mod/blocks/BlockTinyTorch.java | 1 - .../mod/blocks/BlockXPSolidifier.java | 3 - .../mod/blocks/base/BlockContainerBase.java | 1 - .../mod/blocks/render/RenderEmpowerer.java | 1 - .../mod/blocks/render/RenderSmileyCloud.java | 1 - .../mod/booklet/GuiBooklet.java | 3 - .../mod/booklet/page/PageCoffeeRecipe.java | 1 - .../mod/booklet/page/PageCrafting.java | 1 - .../mod/booklet/page/PageCrusherRecipe.java | 2 - .../mod/booklet/page/PageEmpowerer.java | 11 +- .../mod/booklet/page/PageFurnace.java | 1 - .../mod/booklet/page/PageReconstructor.java | 1 - .../actuallyadditions/mod/data/WorldData.java | 1 - .../mod/entity/EntityWorm.java | 28 ++-- .../mod/entity/RenderWorm.java | 3 +- .../mod/event/CommonEvents.java | 2 +- .../mod/inventory/ContainerBag.java | 4 +- .../mod/inventory/gui/EnergyDisplay.java | 2 - .../mod/inventory/gui/GuiBag.java | 3 +- .../mod/inventory/gui/GuiCoffeeMachine.java | 4 - .../mod/inventory/gui/GuiFurnaceDouble.java | 1 - .../mod/inventory/gui/GuiGiantChest.java | 4 - .../gui/GuiLaserRelayItemWhitelist.java | 4 - .../mod/inventory/gui/GuiMiner.java | 4 - .../mod/inventory/gui/GuiPhantomPlacer.java | 5 - .../mod/inventory/gui/GuiRangedCollector.java | 4 - .../mod/inventory/gui/GuiXPSolidifier.java | 3 - .../mod/items/ItemBooklet.java | 1 - .../mod/items/ItemChestToCrateUpgrade.java | 5 - .../mod/items/ItemLaserWrench.java | 4 - .../mod/items/ItemPhantomConnector.java | 1 - .../mod/jei/booklet/BookletRecipeWrapper.java | 1 - .../coffee/CoffeeMachineRecipeWrapper.java | 1 - .../mod/jei/crusher/CrusherRecipeWrapper.java | 1 - .../empowerer/EmpowererRecipeCategory.java | 2 - .../jei/empowerer/EmpowererRecipeWrapper.java | 3 - .../ReconstructorRecipeWrapper.java | 1 - .../mod/misc/LaserRelayConnectionHandler.java | 24 ++-- .../mod/network/PacketHandler.java | 5 +- .../mod/proxy/ClientProxy.java | 5 +- .../mod/tile/FilterSettings.java | 125 +++++++++--------- .../mod/tile/TileEntityCoalGenerator.java | 1 - .../mod/tile/TileEntityDistributorItem.java | 2 +- .../mod/tile/TileEntityEmpowerer.java | 22 +-- .../mod/tile/TileEntityEnervator.java | 1 - .../mod/tile/TileEntityFurnaceDouble.java | 65 +++++---- .../mod/tile/TileEntityFurnaceSolar.java | 1 - .../mod/tile/TileEntityGrinder.java | 3 +- .../mod/tile/TileEntityHeatCollector.java | 1 - .../mod/tile/TileEntityInputter.java | 4 +- .../mod/tile/TileEntityLaserRelay.java | 2 +- .../mod/tile/TileEntityLaserRelayEnergy.java | 4 +- .../mod/tile/TileEntityLaserRelayItem.java | 1 - .../TileEntityLaserRelayItemWhitelist.java | 6 +- .../mod/tile/TileEntityLeafGenerator.java | 1 - .../mod/tile/TileEntityXPSolidifier.java | 7 +- .../mod/util/RecipeUtil.java | 2 - .../mod/util/compat/ItemTeslaWrapper.java | 2 - 72 files changed, 158 insertions(+), 271 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java index cddce04aa..5a217a8c8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java @@ -150,6 +150,7 @@ public final class ActuallyAdditionsAPI{ /** * Adds a Recipe to the Oil generator + * * @param fluidName The name of the fluid to be consumed * @param genAmount The amount of energy generated per operation */ diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/booklet/BookletPage.java b/src/main/java/de/ellpeck/actuallyadditions/api/booklet/BookletPage.java index d7a1a0966..ba566d3c8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/booklet/BookletPage.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/booklet/BookletPage.java @@ -20,9 +20,9 @@ import java.util.HashMap; public abstract class BookletPage{ + protected final HashMap textReplacements = new HashMap(); public boolean arePageStacksWildcard; protected IBookletChapter chapter; - protected final HashMap textReplacements = new HashMap(); protected boolean hasNoText; public void onOpened(IBookletGui gui){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/laser/IConnectionPair.java b/src/main/java/de/ellpeck/actuallyadditions/api/laser/IConnectionPair.java index e9fd9354d..2788b30f2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/laser/IConnectionPair.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/laser/IConnectionPair.java @@ -27,6 +27,7 @@ public interface IConnectionPair{ boolean contains(BlockPos pos); - @Deprecated //TODO Remove this once removing the temporary type fixer + @Deprecated + //TODO Remove this once removing the temporary type fixer void setType(LaserType type); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CrusherRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CrusherRecipe.java index 6eaeb1a2f..f5cedd3dd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CrusherRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CrusherRecipe.java @@ -11,11 +11,6 @@ package de.ellpeck.actuallyadditions.api.recipe; import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; public class CrusherRecipe{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java index e1c8d4b19..cce318417 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java @@ -82,7 +82,7 @@ public class ActuallyAdditions{ if(Loader.isModLoaded("tesla")){ ModUtil.LOGGER.info("Tesla loaded... Activating Tesla Power System integration..."); - ActuallyAdditions.teslaLoaded = true; + teslaLoaded = true; } else{ ModUtil.LOGGER.info("Tesla not found! Skipping Tesla Power System integration."); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/achievement/InitAchievements.java b/src/main/java/de/ellpeck/actuallyadditions/mod/achievement/InitAchievements.java index 1b7a7db70..077190796 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/achievement/InitAchievements.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/achievement/InitAchievements.java @@ -12,12 +12,7 @@ package de.ellpeck.actuallyadditions.mod.achievement; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.stats.Achievement; -import net.minecraft.stats.AchievementList; -import net.minecraft.stats.StatisticsManager; -import net.minecraft.util.JsonSerializableSet; import net.minecraftforge.common.AchievementPage; import java.util.ArrayList; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/achievement/TheAchievements.java b/src/main/java/de/ellpeck/actuallyadditions/mod/achievement/TheAchievements.java index 90d469d51..a7bd59ce1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/achievement/TheAchievements.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/achievement/TheAchievements.java @@ -20,7 +20,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; -import net.minecraft.stats.AchievementList; import net.minecraft.stats.StatisticsManager; import net.minecraft.util.JsonSerializableSet; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index 92b60960a..f71e1c418 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.api.lens.ILensItem; -import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java index c8261064d..7cffafe6f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java @@ -14,7 +14,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEmpowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEmpowerer.java index cddbeb3ad..3793c398b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEmpowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEmpowerer.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityDisplayStand; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEmpowerer; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import net.minecraft.block.SoundType; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java index ee4289184..54631bb4e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFurnaceDouble.java @@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceDouble; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java index 7e9158b65..126fa437d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGrinder.java @@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinderDouble; import net.minecraft.block.SoundType; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemViewer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemViewer.java index 1fec33a8d..883a2b3dd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemViewer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemViewer.java @@ -17,7 +17,6 @@ import net.minecraft.block.material.Material; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class BlockItemViewer extends BlockContainerBase{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java index 1c99bc8c9..60517feda 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java @@ -14,7 +14,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java index 80880be69..227d1cafd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java @@ -26,7 +26,6 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import javax.annotation.Nullable; import java.util.Random; //Copied from BlockTorch. diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java index 8f0b17a83..380b24071 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java @@ -14,15 +14,12 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; -import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; -import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index 9a23558fb..9afba5263 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityInventoryBase; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.block.Block; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderEmpowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderEmpowerer.java index d7a77490e..05b3f8635 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderEmpowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderEmpowerer.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityDisplayStand; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEmpowerer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java index 769109b59..c4b2acc43 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderSmileyCloud.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; import de.ellpeck.actuallyadditions.mod.misc.cloud.ISmileyCloudEasterEgg; import de.ellpeck.actuallyadditions.mod.misc.cloud.SmileyCloudEasterEggs; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.block.state.IBlockState; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java index 84f94675b..9a542cea4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/GuiBooklet.java @@ -24,10 +24,7 @@ import de.ellpeck.actuallyadditions.mod.config.GuiConfiguration; import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.mod.items.ItemBooklet; import de.ellpeck.actuallyadditions.mod.misc.SoundHandler; -import de.ellpeck.actuallyadditions.mod.network.PacketClientToServer; -import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.update.UpdateChecker; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java index 9ba1be034..83d670b9e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCoffeeRecipe.java @@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.Util; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java index 3a29947d0..4102fbc3f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrafting.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; import de.ellpeck.actuallyadditions.api.internal.IBookletGui; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java index b5a592cd4..5c85e7ae8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageCrusherRecipe.java @@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; import de.ellpeck.actuallyadditions.api.internal.IBookletGui; import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.util.*; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; @@ -21,7 +20,6 @@ import net.minecraft.util.text.TextFormatting; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageEmpowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageEmpowerer.java index cc8b9a10e..8c49e66b2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageEmpowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageEmpowerer.java @@ -12,11 +12,11 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; import de.ellpeck.actuallyadditions.api.internal.IBookletGui; import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe; -import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe; -import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; -import de.ellpeck.actuallyadditions.mod.util.*; +import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; +import de.ellpeck.actuallyadditions.mod.util.StringUtil; +import de.ellpeck.actuallyadditions.mod.util.Util; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraft.util.text.TextFormatting; @@ -24,7 +24,6 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import java.util.ArrayList; -import java.util.List; public class PageEmpowerer extends BookletPageAA{ @@ -76,7 +75,7 @@ public class PageEmpowerer extends BookletPageAA{ switch(count){ case 0: stack = recipe.input; - x =21; + x = 21; y = 21; break; case 1: diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java index 4a441462c..92d51efe7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageFurnace.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; import de.ellpeck.actuallyadditions.api.internal.IBookletGui; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java index d45521025..85b3f437c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PageReconstructor.java @@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.api.internal.IBookletGui; import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.util.*; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/data/WorldData.java b/src/main/java/de/ellpeck/actuallyadditions/mod/data/WorldData.java index 5017a9c85..cb2dd1160 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/data/WorldData.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/data/WorldData.java @@ -28,7 +28,6 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.ArrayList; -import java.util.List; import java.util.concurrent.ConcurrentHashMap; public class WorldData{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java index 55ad69fa1..1eea582a2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java @@ -30,6 +30,20 @@ public class EntityWorm extends Entity{ this.setEntityBoundingBox(null); } + public static boolean canWormify(World world, BlockPos pos, IBlockState state){ + Block block = state.getBlock(); + boolean rightBlock = block instanceof BlockFarmland || block == Blocks.GRASS || block == Blocks.GRASS_PATH || (block == Blocks.DIRT && state.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT); + if(rightBlock){ + BlockPos posUp = pos.up(); + IBlockState stateUp = world.getBlockState(posUp); + Block blockUp = stateUp.getBlock(); + return blockUp instanceof IPlantable || blockUp instanceof BlockBush || blockUp.isReplaceable(world, posUp); + } + else{ + return false; + } + } + @Override protected void entityInit(){ @@ -107,18 +121,4 @@ public class EntityWorm extends Entity{ } } } - - public static boolean canWormify(World world, BlockPos pos, IBlockState state){ - Block block = state.getBlock(); - boolean rightBlock = block instanceof BlockFarmland || block == Blocks.GRASS || block == Blocks.GRASS_PATH || (block == Blocks.DIRT && state.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT); - if(rightBlock){ - BlockPos posUp = pos.up(); - IBlockState stateUp = world.getBlockState(posUp); - Block blockUp = stateUp.getBlock(); - return blockUp instanceof IPlantable || blockUp instanceof BlockBush || blockUp.isReplaceable(world, posUp); - } - else{ - return false; - } - } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/RenderWorm.java b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/RenderWorm.java index 4b72561c1..6576cde6f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/RenderWorm.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/RenderWorm.java @@ -26,14 +26,13 @@ import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class RenderWorm extends Render{ - private static final ItemStack STACK = new ItemStack(InitItems.itemWorm); - public static final IRenderFactory FACTORY = new IRenderFactory(){ @Override public Render createRenderFor(RenderManager manager){ return new RenderWorm(manager); } }; + private static final ItemStack STACK = new ItemStack(InitItems.itemWorm); protected RenderWorm(RenderManager renderManager){ super(renderManager); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java index f62b891ec..67e6d2d71 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.event; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; -import de.ellpeck.actuallyadditions.mod.misc.ConnectionPair; import de.ellpeck.actuallyadditions.api.laser.LaserType; import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements; import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; @@ -19,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.mod.data.WorldData; import de.ellpeck.actuallyadditions.mod.items.InitItems; +import de.ellpeck.actuallyadditions.mod.misc.ConnectionPair; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBag.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBag.java index b7fdc75e4..9dda29273 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBag.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBag.java @@ -27,13 +27,11 @@ import net.minecraft.util.text.TextComponentTranslation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import javax.annotation.Nullable; - public class ContainerBag extends Container implements IButtonReactor{ - private final InventoryBag bagInventory; public final FilterSettings filter = new FilterSettings(0, 4, false, true, false, 0, -1000); + private final InventoryBag bagInventory; private final InventoryPlayer inventory; private final boolean isVoid; public boolean autoInsert; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java index 91106ddcc..f97e7a8a3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java @@ -12,8 +12,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import cofh.api.energy.EnergyStorage; import de.ellpeck.actuallyadditions.mod.data.PlayerData; -import de.ellpeck.actuallyadditions.mod.network.PacketClientToServer; -import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBag.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBag.java index 6ba73a7ed..db1ab557d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBag.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBag.java @@ -29,7 +29,6 @@ import net.minecraftforge.fml.relauncher.SideOnly; import java.io.IOException; import java.util.ArrayList; -import java.util.Collections; import java.util.List; @SideOnly(Side.CLIENT) @@ -39,8 +38,8 @@ public class GuiBag extends GuiContainer{ private static final ResourceLocation RES_LOC_VOID = AssetUtil.getGuiLocation("guiVoidBag"); private final ContainerBag container; - private FilterSettingsGui filter; private final boolean isVoid; + private FilterSettingsGui filter; private GuiButton buttonAutoInsert; public GuiBag(InventoryPlayer inventory, boolean isVoid){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java index 212e1a0f4..249bd9baf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java @@ -11,20 +11,16 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCoffeeMachine; -import de.ellpeck.actuallyadditions.mod.network.PacketClientToServer; -import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java index a4b8a0d7a..8608c09e9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFurnaceDouble; -import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceDouble; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java index f433da4ef..d03efb097 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java @@ -11,20 +11,16 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import de.ellpeck.actuallyadditions.mod.inventory.ContainerGiantChest; -import de.ellpeck.actuallyadditions.mod.network.PacketClientToServer; -import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestLarge; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestMedium; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiLaserRelayItemWhitelist.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiLaserRelayItemWhitelist.java index 4240bf1b4..9414165d5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiLaserRelayItemWhitelist.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiLaserRelayItemWhitelist.java @@ -12,20 +12,16 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import de.ellpeck.actuallyadditions.mod.inventory.ContainerLaserRelayItemWhitelist; import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiInputter.SmallerButton; -import de.ellpeck.actuallyadditions.mod.network.PacketClientToServer; -import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItemWhitelist; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; import net.minecraft.util.text.TextFormatting; import net.minecraftforge.fml.relauncher.Side; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java index 8de798e65..e078d9c28 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiMiner.java @@ -11,19 +11,15 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import de.ellpeck.actuallyadditions.mod.inventory.ContainerMiner; -import de.ellpeck.actuallyadditions.mod.network.PacketClientToServer; -import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityMiner; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java index c92a311c7..bc67a9aa5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java @@ -11,22 +11,17 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import de.ellpeck.actuallyadditions.mod.inventory.ContainerPhantomPlacer; -import de.ellpeck.actuallyadditions.mod.network.PacketClientToServer; -import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.TextFormatting; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java index 5ea765795..e715aed73 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java @@ -11,18 +11,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import de.ellpeck.actuallyadditions.mod.inventory.ContainerRangedCollector; -import de.ellpeck.actuallyadditions.mod.network.PacketClientToServer; -import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java index e7f24555e..93b309668 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java @@ -11,8 +11,6 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import de.ellpeck.actuallyadditions.mod.inventory.ContainerXPSolidifier; -import de.ellpeck.actuallyadditions.mod.network.PacketClientToServer; -import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; @@ -23,7 +21,6 @@ import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java index 490d980e1..643aa6c0d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java @@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements; import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; import de.ellpeck.actuallyadditions.mod.blocks.IHudDisplay; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java index 440cf20d9..87046dcf1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java @@ -10,20 +10,15 @@ package de.ellpeck.actuallyadditions.mod.items; -import de.ellpeck.actuallyadditions.mod.blocks.BlockGiantChest; -import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest; import net.minecraft.block.Block; -import net.minecraft.block.BlockChest; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityChest; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java index 164534d1a..cf9199d40 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java @@ -13,18 +13,14 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; -import de.ellpeck.actuallyadditions.mod.network.PacketServerToClient; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ActionResult; import net.minecraft.util.EnumActionResult; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java index ca63ea232..7af581e86 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java @@ -15,7 +15,6 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java index b45d5cd10..d58019dcc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/booklet/BookletRecipeWrapper.java @@ -21,7 +21,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.util.text.TextFormatting; import net.minecraftforge.fluids.FluidStack; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeWrapper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeWrapper.java index 5e5423585..3cb2f1e11 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeWrapper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/coffee/CoffeeMachineRecipeWrapper.java @@ -25,7 +25,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/crusher/CrusherRecipeWrapper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/crusher/CrusherRecipeWrapper.java index d8fd288e2..dd9cc1592 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/crusher/CrusherRecipeWrapper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/crusher/CrusherRecipeWrapper.java @@ -22,7 +22,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/empowerer/EmpowererRecipeCategory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/empowerer/EmpowererRecipeCategory.java index 0ea6a1e8d..f70b4bb4b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/empowerer/EmpowererRecipeCategory.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/empowerer/EmpowererRecipeCategory.java @@ -10,9 +10,7 @@ package de.ellpeck.actuallyadditions.mod.jei.empowerer; -import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import de.ellpeck.actuallyadditions.mod.util.RecipeUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/empowerer/EmpowererRecipeWrapper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/empowerer/EmpowererRecipeWrapper.java index 59016e017..f5b439284 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/empowerer/EmpowererRecipeWrapper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/empowerer/EmpowererRecipeWrapper.java @@ -12,17 +12,14 @@ package de.ellpeck.actuallyadditions.mod.jei.empowerer; import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe; -import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.jei.RecipeWrapperWithButton; -import de.ellpeck.actuallyadditions.mod.util.RecipeUtil; import mezz.jei.api.recipe.IRecipeWrapper; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/reconstructor/ReconstructorRecipeWrapper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/reconstructor/ReconstructorRecipeWrapper.java index c66b4e9b3..b40904cfa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/reconstructor/ReconstructorRecipeWrapper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/reconstructor/ReconstructorRecipeWrapper.java @@ -21,7 +21,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/LaserRelayConnectionHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/LaserRelayConnectionHandler.java index 27ed87bff..568408b64 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/LaserRelayConnectionHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/LaserRelayConnectionHandler.java @@ -46,6 +46,18 @@ public final class LaserRelayConnectionHandler implements ILaserRelayConnectionH return network; } + /** + * Merges two laserRelayNetworks together + * (Actually puts everything from the second network into the first one and removes the second one) + */ + private static void mergeNetworks(Network firstNetwork, Network secondNetwork, World world){ + for(IConnectionPair secondPair : secondNetwork.connections){ + firstNetwork.connections.add(secondPair); + } + WorldData.getDataForWorld(world).laserRelayNetworks.remove(secondNetwork); + //System.out.println("Merged Two Networks!"); + } + /** * Gets all Connections for a Relay */ @@ -152,16 +164,4 @@ public final class LaserRelayConnectionHandler implements ILaserRelayConnectionH return true; } - /** - * Merges two laserRelayNetworks together - * (Actually puts everything from the second network into the first one and removes the second one) - */ - private static void mergeNetworks(Network firstNetwork, Network secondNetwork, World world){ - for(IConnectionPair secondPair : secondNetwork.connections){ - firstNetwork.connections.add(secondPair); - } - WorldData.getDataForWorld(world).laserRelayNetworks.remove(secondNetwork); - //System.out.println("Merged Two Networks!"); - } - } \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java index 401b84918..cf030a152 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.network; -import de.ellpeck.actuallyadditions.mod.booklet.entry.EntrySet; import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; import de.ellpeck.actuallyadditions.mod.network.gui.INumberReactor; @@ -20,7 +19,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBookletStand; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -41,9 +39,7 @@ import java.util.UUID; public final class PacketHandler{ - public static SimpleNetworkWrapper theNetwork; public static final List DATA_HANDLERS = new ArrayList(); - public static final IDataHandler PARTICLE_HANDLER = new IDataHandler(){ @Override @SideOnly(Side.CLIENT) @@ -128,6 +124,7 @@ public final class PacketHandler{ } } }; + public static SimpleNetworkWrapper theNetwork; public static final IDataHandler BOOKLET_STAND_BUTTON_HANDLER = new IDataHandler(){ @Override public void handleData(NBTTagCompound compound){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index b427a74e6..1cc5b7ce4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -45,7 +45,10 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; public class ClientProxy implements IProxy{ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/FilterSettings.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/FilterSettings.java index 479199c22..7ecc8ae02 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/FilterSettings.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/FilterSettings.java @@ -22,23 +22,18 @@ public class FilterSettings{ public final int startSlot; public final int endSlot; - - public boolean isWhitelist; - private boolean lastWhitelist; - - public boolean respectMeta; - private boolean lastRespectMeta; - - public boolean respectNBT; - private boolean lastRespectNBT; - - public int respectOredict; - private int lastRecpectOredict; - public final int whitelistButtonId; public final int metaButtonId; public final int nbtButtonId; public final int oredictButtonId; + public boolean isWhitelist; + public boolean respectMeta; + public boolean respectNBT; + public int respectOredict; + private boolean lastWhitelist; + private boolean lastRespectMeta; + private boolean lastRespectNBT; + private int lastRecpectOredict; public FilterSettings(int startSlot, int endSlot, boolean defaultWhitelist, boolean defaultRespectMeta, boolean defaultRespectNBT, int defaultRespectOredict, int buttonIdStart){ this.startSlot = startSlot; @@ -55,58 +50,6 @@ public class FilterSettings{ this.oredictButtonId = buttonIdStart+3; } - public void writeToNBT(NBTTagCompound tag, String name){ - NBTTagCompound compound = new NBTTagCompound(); - compound.setBoolean("Whitelist", this.isWhitelist); - compound.setBoolean("Meta", this.respectMeta); - compound.setBoolean("NBT", this.respectNBT); - compound.setInteger("Oredict", this.respectOredict); - tag.setTag(name, compound); - } - - public void readFromNBT(NBTTagCompound tag, String name){ - NBTTagCompound compound = tag.getCompoundTag(name); - this.isWhitelist = compound.getBoolean("Whitelist"); - this.respectMeta = compound.getBoolean("Meta"); - this.respectNBT = compound.getBoolean("NBT"); - this.respectOredict = compound.getInteger("Oredict"); - } - - public boolean needsUpdateSend(){ - return this.lastWhitelist != this.isWhitelist || this.lastRespectMeta != this.respectMeta || this.lastRespectNBT != this.respectNBT || this.lastRecpectOredict != this.respectOredict; - } - - public void updateLasts(){ - this.lastWhitelist = this.isWhitelist; - this.lastRespectMeta = this.respectMeta; - this.lastRespectNBT = this.respectNBT; - this.lastRecpectOredict = this.respectOredict; - } - - public void onButtonPressed(int id){ - if(id == this.whitelistButtonId){ - this.isWhitelist = !this.isWhitelist; - } - else if(id == this.metaButtonId){ - this.respectMeta = !this.respectMeta; - } - else if(id == this.nbtButtonId){ - this.respectNBT = !this.respectNBT; - } - else if(id == this.oredictButtonId){ - if(this.respectOredict+1 > 2){ - this.respectOredict = 0; - } - else{ - this.respectOredict++; - } - } - } - - public boolean check(ItemStack stack, ItemStack[] slots){ - return check(stack, slots, this.startSlot, this.endSlot, this.isWhitelist, this.respectMeta, this.respectNBT, this.respectOredict); - } - public static boolean check(ItemStack stack, ItemStack[] slots, int startSlot, int endSlot, boolean whitelist, boolean meta, boolean nbt, int oredict){ if(stack != null){ for(int i = startSlot; i < endSlot; i++){ @@ -181,4 +124,56 @@ public class FilterSettings{ } } } + + public void writeToNBT(NBTTagCompound tag, String name){ + NBTTagCompound compound = new NBTTagCompound(); + compound.setBoolean("Whitelist", this.isWhitelist); + compound.setBoolean("Meta", this.respectMeta); + compound.setBoolean("NBT", this.respectNBT); + compound.setInteger("Oredict", this.respectOredict); + tag.setTag(name, compound); + } + + public void readFromNBT(NBTTagCompound tag, String name){ + NBTTagCompound compound = tag.getCompoundTag(name); + this.isWhitelist = compound.getBoolean("Whitelist"); + this.respectMeta = compound.getBoolean("Meta"); + this.respectNBT = compound.getBoolean("NBT"); + this.respectOredict = compound.getInteger("Oredict"); + } + + public boolean needsUpdateSend(){ + return this.lastWhitelist != this.isWhitelist || this.lastRespectMeta != this.respectMeta || this.lastRespectNBT != this.respectNBT || this.lastRecpectOredict != this.respectOredict; + } + + public void updateLasts(){ + this.lastWhitelist = this.isWhitelist; + this.lastRespectMeta = this.respectMeta; + this.lastRespectNBT = this.respectNBT; + this.lastRecpectOredict = this.respectOredict; + } + + public void onButtonPressed(int id){ + if(id == this.whitelistButtonId){ + this.isWhitelist = !this.isWhitelist; + } + else if(id == this.metaButtonId){ + this.respectMeta = !this.respectMeta; + } + else if(id == this.nbtButtonId){ + this.respectNBT = !this.respectNBT; + } + else if(id == this.oredictButtonId){ + if(this.respectOredict+1 > 2){ + this.respectOredict = 0; + } + else{ + this.respectOredict++; + } + } + } + + public boolean check(ItemStack stack, ItemStack[] slots){ + return check(stack, slots, this.startSlot, this.endSlot, this.isWhitelist, this.respectMeta, this.respectNBT, this.respectOredict); + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java index 95a17f341..2463cff59 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; -import cofh.api.energy.IEnergyProvider; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntityFurnace; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDistributorItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDistributorItem.java index f1aeabd93..565637658 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDistributorItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDistributorItem.java @@ -23,8 +23,8 @@ import java.util.Map; public class TileEntityDistributorItem extends TileEntityInventoryBase{ - private int putSide; private final Map handlersAround = new HashMap(); + private int putSide; public TileEntityDistributorItem(){ super(1, "distributorItem"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEmpowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEmpowerer.java index df6321cea..72a755ee4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEmpowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEmpowerer.java @@ -35,6 +35,17 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase{ super(1, "empowerer"); } + public static EmpowererRecipe getRecipeForInput(ItemStack input){ + if(input != null){ + for(EmpowererRecipe recipe : ActuallyAdditionsAPI.EMPOWERER_RECIPES){ + if(recipe.input != null && recipe.input.isItemEqual(input)){ + return recipe; + } + } + } + return null; + } + @Override public void updateEntity(){ super.updateEntity(); @@ -128,17 +139,6 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase{ } } - public static EmpowererRecipe getRecipeForInput(ItemStack input){ - if(input != null){ - for(EmpowererRecipe recipe : ActuallyAdditionsAPI.EMPOWERER_RECIPES){ - if(recipe.input != null && recipe.input.isItemEqual(input)){ - return recipe; - } - } - } - return null; - } - @Override public boolean shouldSyncSlots(){ return true; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java index 7d077e4c9..5066f5046 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; import cofh.api.energy.IEnergyContainerItem; -import cofh.api.energy.IEnergyProvider; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.util.compat.TeslaUtil; import net.darkhax.tesla.api.ITeslaHolder; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java index 705fcb703..8e43e6325 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceDouble.java @@ -34,17 +34,47 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements public final EnergyStorage storage = new EnergyStorage(30000); public int firstSmeltTime; public int secondSmeltTime; + public boolean isAutoSplit; private int lastEnergy; private int lastFirstSmelt; private int lastSecondSmelt; - - public boolean isAutoSplit; private boolean lastAutoSplit; public TileEntityFurnaceDouble(){ super(4, "furnaceDouble"); } + public static void autoSplit(ItemStack[] slots, int slot1, int slot2){ + ItemStack first = slots[slot1]; + ItemStack second = slots[slot2]; + + if(first != null || second != null){ + ItemStack toSplit = null; + if(first == null && second != null){ + toSplit = second; + } + else if(second == null && first != null){ + toSplit = first; + } + else if(ItemUtil.canBeStacked(first, second)){ + if(first.stackSize < first.getMaxStackSize() || second.stackSize < second.getMaxStackSize()){ + if(!((first.stackSize <= second.stackSize+1 && first.stackSize >= second.stackSize-1) || (second.stackSize <= first.stackSize+1 && second.stackSize >= first.stackSize-1))){ + toSplit = first; + toSplit.stackSize += second.stackSize; + } + } + } + + if(toSplit != null && toSplit.stackSize > 1){ + ItemStack splitFirst = toSplit.copy(); + ItemStack secondSplit = splitFirst.splitStack(splitFirst.stackSize/2); + + slots[slot1] = splitFirst; + slots[slot2] = secondSplit; + } + } + } + @Override public void writeSyncableNBT(NBTTagCompound compound, NBTType type){ super.writeSyncableNBT(compound, type); @@ -132,37 +162,6 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements } } - public static void autoSplit(ItemStack[] slots, int slot1, int slot2){ - ItemStack first = slots[slot1]; - ItemStack second = slots[slot2]; - - if(first != null || second != null){ - ItemStack toSplit = null; - if(first == null && second != null){ - toSplit = second; - } - else if(second == null && first != null){ - toSplit = first; - } - else if(ItemUtil.canBeStacked(first, second)){ - if(first.stackSize < first.getMaxStackSize() || second.stackSize < second.getMaxStackSize()){ - if(!((first.stackSize <= second.stackSize+1 && first.stackSize >= second.stackSize-1) || (second.stackSize <= first.stackSize+1 && second.stackSize >= first.stackSize-1))){ - toSplit = first; - toSplit.stackSize += second.stackSize; - } - } - } - - if(toSplit != null && toSplit.stackSize > 1){ - ItemStack splitFirst = toSplit.copy(); - ItemStack secondSplit = splitFirst.splitStack(splitFirst.stackSize/2); - - slots[slot1] = splitFirst; - slots[slot2] = secondSplit; - } - } - } - @Override public boolean isItemValidForSlot(int i, ItemStack stack){ return (i == SLOT_INPUT_1 || i == SLOT_INPUT_2) && FurnaceRecipes.instance().getSmeltingResult(stack) != null; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java index a9ed71f15..b23068153 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFurnaceSolar.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; -import cofh.api.energy.IEnergyProvider; import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java index 128facca7..6e3541f52 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityGrinder.java @@ -42,11 +42,10 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements ICusto public int firstCrushTime; public int secondCrushTime; public boolean isDouble; + public boolean isAutoSplit; private int lastEnergy; private int lastFirstCrush; private int lastSecondCrush; - - public boolean isAutoSplit; private boolean lastAutoSplit; public TileEntityGrinder(int slots, String name){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java index 56fd823ab..772b92591 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; -import cofh.api.energy.IEnergyProvider; import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java index 0f4313a6c..cc3f5390d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInputter.java @@ -39,14 +39,14 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt public int slotToPullEnd; public TileEntity placeToPull; public boolean isAdvanced; + public FilterSettings leftFilter = new FilterSettings(PULL_FILTER_START, PULL_FILTER_START+12, true, true, false, 0, -1000); + public FilterSettings rightFilter = new FilterSettings(PUT_FILTER_START, PUT_FILTER_START+12, true, true, false, 0, -2000); private int lastPutSide; private int lastPutStart; private int lastPutEnd; private int lastPullSide; private int lastPullStart; private int lastPullEnd; - public FilterSettings leftFilter = new FilterSettings(PULL_FILTER_START, PULL_FILTER_START+12, true, true, false, 0, -1000); - public FilterSettings rightFilter = new FilterSettings(PUT_FILTER_START, PUT_FILTER_START+12, true, true, false, 0, -2000); public TileEntityInputter(int slots, String name){ super(slots, name); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java index 514a0fc8c..16c4ad504 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java @@ -12,13 +12,13 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.laser.IConnectionPair; -import de.ellpeck.actuallyadditions.mod.misc.ConnectionPair; import de.ellpeck.actuallyadditions.api.laser.LaserType; import de.ellpeck.actuallyadditions.api.laser.Network; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.mod.items.ItemLaserWrench; import de.ellpeck.actuallyadditions.mod.items.ItemLaserWrench.WrenchMode; +import de.ellpeck.actuallyadditions.mod.misc.ConnectionPair; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.Util; import io.netty.util.internal.ConcurrentSet; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java index 949c4d0f6..ecd80be17 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java @@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.IEnergyReceiver; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.laser.IConnectionPair; -import de.ellpeck.actuallyadditions.mod.misc.ConnectionPair; import de.ellpeck.actuallyadditions.api.laser.LaserType; import de.ellpeck.actuallyadditions.api.laser.Network; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; @@ -32,9 +31,8 @@ import java.util.concurrent.ConcurrentHashMap; public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements ICustomEnergyReceiver{ - public final ConcurrentHashMap receiversAround = new ConcurrentHashMap(); - public static final int CAP = 1000; + public final ConcurrentHashMap receiversAround = new ConcurrentHashMap(); public TileEntityLaserRelayEnergy(String name){ super(name, LaserType.ENERGY); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java index 814879125..4b427bb5a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.api.laser.IConnectionPair; -import de.ellpeck.actuallyadditions.mod.misc.ConnectionPair; import de.ellpeck.actuallyadditions.api.laser.LaserType; import de.ellpeck.actuallyadditions.api.laser.Network; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewer.GenericItemHandlerInfo; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemWhitelist.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemWhitelist.java index 743d425dd..eab1b8b0c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemWhitelist.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemWhitelist.java @@ -18,20 +18,16 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentTranslation; import net.minecraftforge.items.IItemHandler; -import java.util.List; -import java.util.Map; - public class TileEntityLaserRelayItemWhitelist extends TileEntityLaserRelayItem implements IButtonReactor{ public final IInventory filterInventory; - private ItemStack[] slots = new ItemStack[24]; public FilterSettings leftFilter = new FilterSettings(0, 12, true, true, false, 0, -1000); public FilterSettings rightFilter = new FilterSettings(12, 24, true, true, false, 0, -2000); + private ItemStack[] slots = new ItemStack[24]; public TileEntityLaserRelayItemWhitelist(){ super("laserRelayItemWhitelist"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java index 3b1e145d7..8479beada 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import cofh.api.energy.EnergyStorage; -import cofh.api.energy.IEnergyProvider; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.block.Block; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java index 4d3d4063f..7728de9df 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java @@ -21,7 +21,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.AxisAlignedBB; -import java.util.ArrayList; import java.util.List; public class TileEntityXPSolidifier extends TileEntityInventoryBase implements IButtonReactor{ @@ -141,7 +140,7 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I if(orbs != null && !orbs.isEmpty()){ for(EntityXPOrb orb : orbs){ if(orb != null && !orb.isDead){ - this.singlePointAmount+=orb.getXpValue(); + this.singlePointAmount += orb.getXpValue(); orb.setDead(); if(this.singlePointAmount >= ItemSolidifiedExperience.SOLID_XP_AMOUNT){ @@ -152,9 +151,9 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I } } } - + if(this.slots[1] != null && this.slots[1].getItem() instanceof ItemSolidifiedExperience){ - this.amount+=this.slots[1].stackSize; + this.amount += this.slots[1].stackSize; this.slots[1] = null; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/RecipeUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/RecipeUtil.java index 51b63e1e7..4089ccf40 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/RecipeUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/RecipeUtil.java @@ -11,11 +11,9 @@ package de.ellpeck.actuallyadditions.mod.util; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; -import de.ellpeck.actuallyadditions.api.lens.LensConversion; import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe; import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe; import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/compat/ItemTeslaWrapper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/compat/ItemTeslaWrapper.java index c8af2fb88..a8a1c783a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/compat/ItemTeslaWrapper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/compat/ItemTeslaWrapper.java @@ -19,8 +19,6 @@ import net.minecraft.util.EnumFacing; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilityProvider; -import javax.annotation.Nullable; - public class ItemTeslaWrapper implements ITeslaProducer, ITeslaHolder, ITeslaConsumer, ICapabilityProvider{ private final ItemStack stack;