diff --git a/src/main/java/techreborn/Core.java b/src/main/java/techreborn/Core.java index 16fcafa26..80c4b375b 100644 --- a/src/main/java/techreborn/Core.java +++ b/src/main/java/techreborn/Core.java @@ -1,9 +1,5 @@ package techreborn; -import java.io.File; - -import org.apache.commons.lang3.time.StopWatch; - import net.minecraft.block.BlockDispenser; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.client.event.ConfigChangedEvent; @@ -16,7 +12,9 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.network.NetworkRegistry; +import net.minecraftforge.fml.common.registry.EntityRegistry; import net.minecraftforge.fml.common.registry.GameRegistry; +import org.apache.commons.lang3.time.StopWatch; import reborncore.common.multiblock.MultiblockEventHandler; import reborncore.common.multiblock.MultiblockServerTickHandler; import reborncore.common.packets.AddDiscriminatorEvent; @@ -32,16 +30,24 @@ import techreborn.compat.CompatManager; import techreborn.compat.ICompatModule; import techreborn.config.ConfigTechReborn; import techreborn.dispenser.BehaviorDispenseScrapbox; +import techreborn.entitys.EntityNukePrimed; import techreborn.events.OreUnifier; import techreborn.events.TRTickHandler; -import techreborn.init.*; +import techreborn.init.ModBlocks; +import techreborn.init.ModFluids; +import techreborn.init.ModItems; +import techreborn.init.ModLoot; +import techreborn.init.ModParts; +import techreborn.init.ModRecipes; +import techreborn.init.RecipeCompact; import techreborn.lib.ModInfo; import techreborn.packets.PacketAesu; import techreborn.packets.PacketIdsu; import techreborn.proxies.CommonProxy; import techreborn.tiles.idsu.IDSUManager; -import techreborn.world.TROreGen; -import techreborn.world.TreeGenerator; +import techreborn.world.TechRebornWorldGen; + +import java.io.File; @Mod(modid = ModInfo.MOD_ID, name = ModInfo.MOD_NAME, version = ModInfo.MOD_VERSION, dependencies = ModInfo.MOD_DEPENDENCUIES, guiFactory = ModInfo.GUI_FACTORY_CLASS, acceptedMinecraftVersions = "[1.8.8,1.8.9]") public class Core { @@ -60,6 +66,8 @@ public class Core { private static RecipeCompact recipeCompact; private static File configDir; + public static TechRebornWorldGen worldGen; + @Mod.EventHandler public void preinit(FMLPreInitializationEvent event) { event.getModMetadata().version = ModInfo.MOD_VERSION; @@ -67,10 +75,13 @@ public class Core { FMLCommonHandler.instance().bus().register(this); MinecraftForge.EVENT_BUS.register(this); - String path = event.getSuggestedConfigurationFile().getAbsolutePath().replace(ModInfo.MOD_ID, "TechReborn"); - - config = ConfigTechReborn.initialize(new File(path)); - configDir = event.getModConfigurationDirectory(); + configDir = new File(event.getModConfigurationDirectory(), "techreborn"); + if(!configDir.exists()){ + configDir.mkdir(); + } + config = ConfigTechReborn.initialize(new File(configDir, "main.cfg")); + worldGen = new TechRebornWorldGen(); + worldGen.configFile = (new File(configDir, "ores.json")); recipeCompact = new RecipeCompact(); TechRebornAPI.recipeCompact = recipeCompact; @@ -78,6 +89,9 @@ public class Core { for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules) { compatModule.preInit(event); } + //Entitys + EntityRegistry.registerModEntity(EntityNukePrimed.class, "nuke", 0, INSTANCE, 160, 5, true); + proxy.preInit(event); RecipeConfigManager.load(event.getModConfigurationDirectory()); versionChecker = new VersionChecker("TechReborn", new ModInfo()); @@ -109,10 +123,10 @@ public class Core { logHelper.all(watch + " : main recipes"); watch.stop(); // Client only init, needs to be done before parts system - proxy.init(); + proxy.init(event); // WorldGen - GameRegistry.registerWorldGenerator(new TROreGen(), 0); - GameRegistry.registerWorldGenerator(new TreeGenerator(), 0); + worldGen.load(); + GameRegistry.registerWorldGenerator(worldGen, 0); // DungeonLoot.init(); // Register Gui Handler NetworkRegistry.INSTANCE.registerGuiHandler(INSTANCE, new GuiHandler()); @@ -123,10 +137,13 @@ public class Core { MinecraftForge.EVENT_BUS.register(new MultiblockEventHandler()); // IDSU manager IDSUManager.INSTANCE = new IDSUManager(); + //Event busses MinecraftForge.EVENT_BUS.register(IDSUManager.INSTANCE); MinecraftForge.EVENT_BUS.register(new MultiblockServerTickHandler()); MinecraftForge.EVENT_BUS.register(new TRTickHandler()); MinecraftForge.EVENT_BUS.register(new OreUnifier()); + MinecraftForge.EVENT_BUS.register(worldGen.retroGen); + //Scrapbox if (config.scrapboxDispenser) { BlockDispenser.dispenseBehaviorRegistry.putObject(ModItems.scrapBox, new BehaviorDispenseScrapbox()); } @@ -139,6 +156,7 @@ public class Core { for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules) { compatModule.postInit(event); } + proxy.postInit(event); logHelper.info(RecipeHandler.recipeList.size() + " recipes loaded"); // RecipeHandler.scanForDupeRecipes(); diff --git a/src/main/java/techreborn/achievement/AchievementMod.java b/src/main/java/techreborn/achievement/AchievementMod.java index 1b6864748..4cc7e9f6b 100644 --- a/src/main/java/techreborn/achievement/AchievementMod.java +++ b/src/main/java/techreborn/achievement/AchievementMod.java @@ -1,13 +1,13 @@ package techreborn.achievement; -import java.util.ArrayList; -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; +import java.util.ArrayList; +import java.util.List; + public class AchievementMod extends Achievement { public static List achievements = new ArrayList(); diff --git a/src/main/java/techreborn/api/RollingMachineRecipe.java b/src/main/java/techreborn/api/RollingMachineRecipe.java index 50e840180..4ca34459b 100644 --- a/src/main/java/techreborn/api/RollingMachineRecipe.java +++ b/src/main/java/techreborn/api/RollingMachineRecipe.java @@ -1,9 +1,5 @@ package techreborn.api; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; @@ -15,6 +11,10 @@ import net.minecraft.world.World; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + public class RollingMachineRecipe { private final List recipes = new ArrayList(); diff --git a/src/main/java/techreborn/api/ScrapboxList.java b/src/main/java/techreborn/api/ScrapboxList.java index 88974e2c1..afe701939 100644 --- a/src/main/java/techreborn/api/ScrapboxList.java +++ b/src/main/java/techreborn/api/ScrapboxList.java @@ -1,10 +1,10 @@ package techreborn.api; +import net.minecraft.item.ItemStack; + import java.util.ArrayList; import java.util.List; -import net.minecraft.item.ItemStack; - public class ScrapboxList { public static List stacks = new ArrayList(); diff --git a/src/main/java/techreborn/api/recipe/BaseRecipe.java b/src/main/java/techreborn/api/recipe/BaseRecipe.java index 2a944013d..da81cd469 100644 --- a/src/main/java/techreborn/api/recipe/BaseRecipe.java +++ b/src/main/java/techreborn/api/recipe/BaseRecipe.java @@ -1,11 +1,11 @@ package techreborn.api.recipe; -import java.util.ArrayList; -import java.util.List; - import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import java.util.ArrayList; +import java.util.List; + /** * Extend this to add a recipe */ diff --git a/src/main/java/techreborn/api/recipe/IBaseRecipeType.java b/src/main/java/techreborn/api/recipe/IBaseRecipeType.java index ff7d014bf..cd47e0dfe 100644 --- a/src/main/java/techreborn/api/recipe/IBaseRecipeType.java +++ b/src/main/java/techreborn/api/recipe/IBaseRecipeType.java @@ -1,10 +1,10 @@ package techreborn.api.recipe; -import java.util.List; - import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import java.util.List; + /** * This is the base recipe class implement this to make a recipe handler */ diff --git a/src/main/java/techreborn/api/recipe/RecipeCrafter.java b/src/main/java/techreborn/api/recipe/RecipeCrafter.java index 9bbd4fa57..c4e41614c 100644 --- a/src/main/java/techreborn/api/recipe/RecipeCrafter.java +++ b/src/main/java/techreborn/api/recipe/RecipeCrafter.java @@ -1,7 +1,5 @@ package techreborn.api.recipe; -import java.util.ArrayList; - import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import reborncore.api.power.IEnergyInterfaceTile; @@ -10,6 +8,8 @@ import reborncore.common.tile.TileMachineBase; import reborncore.common.util.Inventory; import reborncore.common.util.ItemUtils; +import java.util.ArrayList; + /** * Use this in your tile entity to craft things */ diff --git a/src/main/java/techreborn/api/recipe/RecipeHandler.java b/src/main/java/techreborn/api/recipe/RecipeHandler.java index 1b16d70d8..c07097342 100644 --- a/src/main/java/techreborn/api/recipe/RecipeHandler.java +++ b/src/main/java/techreborn/api/recipe/RecipeHandler.java @@ -1,15 +1,14 @@ package techreborn.api.recipe; +import net.minecraft.item.ItemStack; +import org.apache.commons.lang3.time.StopWatch; +import reborncore.common.util.ItemUtils; +import techreborn.Core; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import org.apache.commons.lang3.time.StopWatch; - -import net.minecraft.item.ItemStack; -import reborncore.common.util.ItemUtils; -import techreborn.Core; - public class RecipeHandler { diff --git a/src/main/java/techreborn/api/recipe/RecyclerRecipe.java b/src/main/java/techreborn/api/recipe/RecyclerRecipe.java index 8cf4068d9..57ef4585e 100644 --- a/src/main/java/techreborn/api/recipe/RecyclerRecipe.java +++ b/src/main/java/techreborn/api/recipe/RecyclerRecipe.java @@ -1,9 +1,6 @@ package techreborn.api.recipe; -import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import techreborn.api.ScrapboxList; -import techreborn.init.ModItems; import techreborn.items.ItemParts; import techreborn.lib.Reference; //THIS is only here to trick JEI into showing recipes for the recycler diff --git a/src/main/java/techreborn/api/recipe/ScrapboxRecipe.java b/src/main/java/techreborn/api/recipe/ScrapboxRecipe.java index ab07b2be9..e35b6fcba 100644 --- a/src/main/java/techreborn/api/recipe/ScrapboxRecipe.java +++ b/src/main/java/techreborn/api/recipe/ScrapboxRecipe.java @@ -1,7 +1,6 @@ package techreborn.api.recipe; import net.minecraft.item.ItemStack; -import techreborn.api.ScrapboxList; import techreborn.init.ModItems; import techreborn.lib.Reference; diff --git a/src/main/java/techreborn/api/recipe/recipeConfig/RecipeConfigManager.java b/src/main/java/techreborn/api/recipe/recipeConfig/RecipeConfigManager.java index 224b3b154..cb5e9f505 100644 --- a/src/main/java/techreborn/api/recipe/recipeConfig/RecipeConfigManager.java +++ b/src/main/java/techreborn/api/recipe/recipeConfig/RecipeConfigManager.java @@ -1,16 +1,15 @@ package techreborn.api.recipe.recipeConfig; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import net.minecraft.item.ItemStack; +import techreborn.api.recipe.IBaseRecipeType; + import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - -import net.minecraft.item.ItemStack; -import techreborn.api.recipe.IBaseRecipeType; - public class RecipeConfigManager { public static ArrayList configs = new ArrayList(); diff --git a/src/main/java/techreborn/api/upgrade/UpgradeHandler.java b/src/main/java/techreborn/api/upgrade/UpgradeHandler.java index 210cc774c..575a18b26 100644 --- a/src/main/java/techreborn/api/upgrade/UpgradeHandler.java +++ b/src/main/java/techreborn/api/upgrade/UpgradeHandler.java @@ -1,11 +1,11 @@ package techreborn.api.upgrade; -import java.util.ArrayList; - import net.minecraft.item.ItemStack; import reborncore.common.util.Inventory; import techreborn.api.recipe.RecipeCrafter; +import java.util.ArrayList; + public class UpgradeHandler { RecipeCrafter crafter; diff --git a/src/main/java/techreborn/blocks/BlockIronFurnace.java b/src/main/java/techreborn/blocks/BlockIronFurnace.java index 99afa9be0..2cf3cee85 100644 --- a/src/main/java/techreborn/blocks/BlockIronFurnace.java +++ b/src/main/java/techreborn/blocks/BlockIronFurnace.java @@ -1,9 +1,5 @@ package techreborn.blocks; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -20,10 +16,12 @@ import reborncore.common.blocks.IRotationTexture; import techreborn.Core; import techreborn.client.GuiHandler; import techreborn.client.TechRebornCreativeTab; -import techreborn.init.ModBlocks; -import techreborn.tiles.TileAlloyFurnace; import techreborn.tiles.TileIronFurnace; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + public class BlockIronFurnace extends BlockMachineBase implements IRotationTexture { public BlockIronFurnace() { diff --git a/src/main/java/techreborn/blocks/BlockMachineCasing.java b/src/main/java/techreborn/blocks/BlockMachineCasing.java index b52bbd0b9..c50e31169 100644 --- a/src/main/java/techreborn/blocks/BlockMachineCasing.java +++ b/src/main/java/techreborn/blocks/BlockMachineCasing.java @@ -1,8 +1,5 @@ package techreborn.blocks; -import java.util.List; -import java.util.Random; - import me.modmuss50.jsonDestroyer.api.ITexturedBlock; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -23,6 +20,9 @@ import reborncore.common.multiblock.BlockMultiblockBase; import techreborn.client.TechRebornCreativeTab; import techreborn.tiles.TileMachineCasing; +import java.util.List; +import java.util.Random; + public class BlockMachineCasing extends BlockMultiblockBase implements ITexturedBlock { public static final String[] types = new String[] diff --git a/src/main/java/techreborn/blocks/BlockMachineFrame.java b/src/main/java/techreborn/blocks/BlockMachineFrame.java index a1ec2674e..e9116c603 100644 --- a/src/main/java/techreborn/blocks/BlockMachineFrame.java +++ b/src/main/java/techreborn/blocks/BlockMachineFrame.java @@ -1,8 +1,5 @@ package techreborn.blocks; -import java.security.InvalidParameterException; -import java.util.List; - import me.modmuss50.jsonDestroyer.api.ITexturedBlock; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; @@ -18,6 +15,9 @@ import reborncore.common.BaseBlock; import techreborn.client.TechRebornCreativeTab; import techreborn.init.ModBlocks; +import java.security.InvalidParameterException; +import java.util.List; + public class BlockMachineFrame extends BaseBlock implements ITexturedBlock { public PropertyInteger METADATA; diff --git a/src/main/java/techreborn/blocks/BlockNuke.java b/src/main/java/techreborn/blocks/BlockNuke.java new file mode 100644 index 000000000..383298545 --- /dev/null +++ b/src/main/java/techreborn/blocks/BlockNuke.java @@ -0,0 +1,61 @@ +package techreborn.blocks; + +import me.modmuss50.jsonDestroyer.api.ITexturedBlock; +import net.minecraft.block.BlockTNT; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.Explosion; +import net.minecraft.world.World; +import reborncore.RebornCore; +import techreborn.client.TechRebornCreativeTabMisc; +import techreborn.entitys.EntityNukePrimed; + +/** + * Created by Mark on 13/03/2016. + */ +public class BlockNuke extends BlockTNT implements ITexturedBlock { + + public BlockNuke() { + setUnlocalizedName("techreborn.nuke"); + setCreativeTab(TechRebornCreativeTabMisc.instance); + RebornCore.jsonDestroyer.registerObject(this); + } + + @Override + public void explode(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase igniter) { + if (!worldIn.isRemote) { + if (state.getValue(EXPLODE).booleanValue()) { + EntityNukePrimed entitynukeprimed = new EntityNukePrimed(worldIn, (double) ((float) pos.getX() + 0.5F), (double) pos.getY(), (double) ((float) pos.getZ() + 0.5F), igniter); + worldIn.spawnEntityInWorld(entitynukeprimed); + worldIn.playSoundAtEntity(entitynukeprimed, "game.tnt.primed", 1.0F, 1.0F); + } + } + } + + @Override + public void onBlockDestroyedByExplosion(World worldIn, BlockPos pos, Explosion explosionIn) { + if (!worldIn.isRemote) { + EntityNukePrimed entitynukeprimed = new EntityNukePrimed(worldIn, (double) ((float) pos.getX() + 0.5F), (double) pos.getY(), (double) ((float) pos.getZ() + 0.5F), explosionIn.getExplosivePlacedBy()); + entitynukeprimed.fuse = worldIn.rand.nextInt(entitynukeprimed.fuse / 4) + entitynukeprimed.fuse / 8; + worldIn.spawnEntityInWorld(entitynukeprimed); + } + } + + @Override + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ) { + return false; //No flint and steel + } + + @Override + public String getTextureNameFromState(IBlockState iBlockState, EnumFacing enumFacing) { + return "techreborn:blocks/machine/machine_bottom"; + } + + @Override + public int amountOfStates() { + return 1; + } +} diff --git a/src/main/java/techreborn/blocks/BlockOre.java b/src/main/java/techreborn/blocks/BlockOre.java index db89231dd..d1703bfc9 100644 --- a/src/main/java/techreborn/blocks/BlockOre.java +++ b/src/main/java/techreborn/blocks/BlockOre.java @@ -1,10 +1,5 @@ package techreborn.blocks; -import java.security.InvalidParameterException; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - import me.modmuss50.jsonDestroyer.api.ITexturedBlock; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; @@ -30,8 +25,14 @@ import techreborn.config.ConfigTechReborn; import techreborn.init.ModBlocks; import techreborn.items.ItemDusts; import techreborn.items.ItemGems; +import techreborn.world.config.IOreNameProvider; -public class BlockOre extends BaseBlock implements ITexturedBlock { +import java.security.InvalidParameterException; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +public class BlockOre extends BaseBlock implements ITexturedBlock, IOreNameProvider { public static ItemStack getOreByName(String name, int count) { for (int i = 0; i < types.length; i++) { @@ -39,7 +40,7 @@ public class BlockOre extends BaseBlock implements ITexturedBlock { return new ItemStack(ModBlocks.ore, count, i); } } - throw new InvalidParameterException("The storage block " + name + " could not be found."); + throw new InvalidParameterException("The ore block " + name + " could not be found."); } public static ItemStack getOreByName(String name) { @@ -49,11 +50,14 @@ public class BlockOre extends BaseBlock implements ITexturedBlock { public IBlockState getBlockStateFromName(String name){ int index = -1; for (int i = 0; i < types.length; i++) { - if (types[i].equals(name)) { + if (types[i].equalsIgnoreCase(name)) { index = i; break; } } + if(index == -1){ + return ModBlocks.ore2.getBlockStateFromName(name); + } return getStateFromMeta(index); } @@ -188,4 +192,8 @@ public class BlockOre extends BaseBlock implements ITexturedBlock { return new BlockState(this, METADATA); } + @Override + public String getUserLoclisedName(IBlockState state) { + return types[state.getValue(METADATA)]; + } } diff --git a/src/main/java/techreborn/blocks/BlockOre2.java b/src/main/java/techreborn/blocks/BlockOre2.java index 1e4267286..4de3c1d7d 100644 --- a/src/main/java/techreborn/blocks/BlockOre2.java +++ b/src/main/java/techreborn/blocks/BlockOre2.java @@ -1,8 +1,5 @@ package techreborn.blocks; -import java.security.InvalidParameterException; -import java.util.List; - import me.modmuss50.jsonDestroyer.api.ITexturedBlock; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; @@ -21,8 +18,12 @@ import net.minecraftforge.fml.relauncher.SideOnly; import reborncore.common.BaseBlock; import techreborn.client.TechRebornCreativeTabMisc; import techreborn.init.ModBlocks; +import techreborn.world.config.IOreNameProvider; -public class BlockOre2 extends BaseBlock implements ITexturedBlock { +import java.security.InvalidParameterException; +import java.util.List; + +public class BlockOre2 extends BaseBlock implements ITexturedBlock, IOreNameProvider { public static ItemStack getOreByName(String name, int count) { for (int i = 0; i < types.length; i++) { @@ -30,7 +31,7 @@ public class BlockOre2 extends BaseBlock implements ITexturedBlock { return new ItemStack(ModBlocks.ore2, count, i); } } - throw new InvalidParameterException("The storage block " + name + " could not be found."); + throw new InvalidParameterException("The ore block " + name + " could not be found."); } public static ItemStack getOreByName(String name) { @@ -45,6 +46,9 @@ public class BlockOre2 extends BaseBlock implements ITexturedBlock { break; } } + if(index == -1){ + throw new InvalidParameterException("The ore block " + name + " could not be found."); + } return getStateFromMeta(index); } @@ -112,4 +116,8 @@ public class BlockOre2 extends BaseBlock implements ITexturedBlock { return new BlockState(this, METADATA); } + @Override + public String getUserLoclisedName(IBlockState state) { + return types[state.getValue(METADATA)]; + } } diff --git a/src/main/java/techreborn/blocks/BlockPlayerDetector.java b/src/main/java/techreborn/blocks/BlockPlayerDetector.java index cf1e1c7bc..c66416bcf 100644 --- a/src/main/java/techreborn/blocks/BlockPlayerDetector.java +++ b/src/main/java/techreborn/blocks/BlockPlayerDetector.java @@ -1,9 +1,6 @@ package techreborn.blocks; -import java.util.List; -import java.util.Random; - import me.modmuss50.jsonDestroyer.api.ITexturedBlock; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; @@ -27,6 +24,9 @@ import reborncore.common.BaseTileBlock; import techreborn.client.TechRebornCreativeTab; import techreborn.tiles.TilePlayerDectector; +import java.util.List; +import java.util.Random; + public class BlockPlayerDetector extends BaseTileBlock implements ITexturedBlock { public PropertyInteger METADATA; diff --git a/src/main/java/techreborn/blocks/BlockReinforcedGlass.java b/src/main/java/techreborn/blocks/BlockReinforcedGlass.java index cfab89280..2de776796 100644 --- a/src/main/java/techreborn/blocks/BlockReinforcedGlass.java +++ b/src/main/java/techreborn/blocks/BlockReinforcedGlass.java @@ -47,4 +47,4 @@ public class BlockReinforcedGlass extends BaseBlock implements ITexturedBlock { return prefix + "reinforcedglass"; } -} \ No newline at end of file +} diff --git a/src/main/java/techreborn/blocks/BlockRubberLeaves.java b/src/main/java/techreborn/blocks/BlockRubberLeaves.java index 2e524b6fc..ca9dd3270 100644 --- a/src/main/java/techreborn/blocks/BlockRubberLeaves.java +++ b/src/main/java/techreborn/blocks/BlockRubberLeaves.java @@ -1,8 +1,5 @@ package techreborn.blocks; -import java.util.List; -import java.util.Random; - import me.modmuss50.jsonDestroyer.api.IOpaqueBlock; import me.modmuss50.jsonDestroyer.api.ITexturedBlock; import net.minecraft.block.BlockLeaves; @@ -23,6 +20,9 @@ import reborncore.RebornCore; import techreborn.client.TechRebornCreativeTabMisc; import techreborn.init.ModBlocks; +import java.util.List; +import java.util.Random; + /** * Created by modmuss50 on 20/02/2016. */ diff --git a/src/main/java/techreborn/blocks/BlockRubberLog.java b/src/main/java/techreborn/blocks/BlockRubberLog.java index 40e063015..b5abacd26 100644 --- a/src/main/java/techreborn/blocks/BlockRubberLog.java +++ b/src/main/java/techreborn/blocks/BlockRubberLog.java @@ -1,9 +1,5 @@ package techreborn.blocks; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - import me.modmuss50.jsonDestroyer.api.ITexturedBlock; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -23,6 +19,10 @@ import techreborn.client.TechRebornCreativeTabMisc; import techreborn.items.ItemParts; import techreborn.items.tools.ItemTreeTap; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + /** * Created by modmuss50 on 19/02/2016. */ diff --git a/src/main/java/techreborn/blocks/BlockRubberSapling.java b/src/main/java/techreborn/blocks/BlockRubberSapling.java index 585ce4b63..a016adfff 100644 --- a/src/main/java/techreborn/blocks/BlockRubberSapling.java +++ b/src/main/java/techreborn/blocks/BlockRubberSapling.java @@ -1,8 +1,5 @@ package techreborn.blocks; -import java.util.List; -import java.util.Random; - import net.minecraft.block.BlockSapling; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; @@ -13,6 +10,9 @@ import net.minecraft.world.World; import techreborn.client.TechRebornCreativeTabMisc; import techreborn.world.RubberTreeGenerator; +import java.util.List; +import java.util.Random; + /** * Created by modmuss50 on 20/02/2016. */ diff --git a/src/main/java/techreborn/blocks/BlockStorage.java b/src/main/java/techreborn/blocks/BlockStorage.java index 4eb24aacc..98a8ed1c0 100644 --- a/src/main/java/techreborn/blocks/BlockStorage.java +++ b/src/main/java/techreborn/blocks/BlockStorage.java @@ -1,8 +1,5 @@ package techreborn.blocks; -import java.util.List; -import java.util.Random; - import me.modmuss50.jsonDestroyer.api.ITexturedBlock; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; @@ -18,6 +15,9 @@ import reborncore.common.BaseBlock; import techreborn.client.TechRebornCreativeTabMisc; import techreborn.init.ModBlocks; +import java.util.List; +import java.util.Random; + public class BlockStorage extends BaseBlock implements ITexturedBlock { public static ItemStack getStorageBlockByName(String name, int count) { diff --git a/src/main/java/techreborn/blocks/BlockStorage2.java b/src/main/java/techreborn/blocks/BlockStorage2.java index fcbf1bae3..bb44dc083 100644 --- a/src/main/java/techreborn/blocks/BlockStorage2.java +++ b/src/main/java/techreborn/blocks/BlockStorage2.java @@ -1,9 +1,5 @@ package techreborn.blocks; -import java.security.InvalidParameterException; -import java.util.List; -import java.util.Random; - import me.modmuss50.jsonDestroyer.api.ITexturedBlock; import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyInteger; @@ -19,6 +15,10 @@ import reborncore.common.BaseBlock; import techreborn.client.TechRebornCreativeTabMisc; import techreborn.init.ModBlocks; +import java.security.InvalidParameterException; +import java.util.List; +import java.util.Random; + public class BlockStorage2 extends BaseBlock implements ITexturedBlock { public static ItemStack getStorageBlockByName(String name, int count) { diff --git a/src/main/java/techreborn/blocks/machine/BlockAlloyFurnace.java b/src/main/java/techreborn/blocks/machine/BlockAlloyFurnace.java index a3cf87dc5..fd5c05ec3 100644 --- a/src/main/java/techreborn/blocks/machine/BlockAlloyFurnace.java +++ b/src/main/java/techreborn/blocks/machine/BlockAlloyFurnace.java @@ -1,8 +1,5 @@ package techreborn.blocks.machine; -import java.util.ArrayList; -import java.util.List; - import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -18,6 +15,9 @@ import techreborn.client.GuiHandler; import techreborn.client.TechRebornCreativeTab; import techreborn.tiles.TileAlloyFurnace; +import java.util.ArrayList; +import java.util.List; + public class BlockAlloyFurnace extends BlockMachineBase implements IRotationTexture { public BlockAlloyFurnace(Material material) { diff --git a/src/main/java/techreborn/blocks/teir1/BlockRecycler.java b/src/main/java/techreborn/blocks/teir1/BlockRecycler.java index eb47f4f3e..e90c23f76 100644 --- a/src/main/java/techreborn/blocks/teir1/BlockRecycler.java +++ b/src/main/java/techreborn/blocks/teir1/BlockRecycler.java @@ -9,7 +9,6 @@ import reborncore.common.blocks.IRotationTexture; import techreborn.Core; import techreborn.client.GuiHandler; import techreborn.client.TechRebornCreativeTab; -import techreborn.tiles.teir1.TileCompressor; import techreborn.tiles.teir1.TileRecycler; public class BlockRecycler extends BlockMachineBase implements IRotationTexture{ diff --git a/src/main/java/techreborn/client/GuiHandler.java b/src/main/java/techreborn/client/GuiHandler.java index ad821cda2..991ff3942 100644 --- a/src/main/java/techreborn/client/GuiHandler.java +++ b/src/main/java/techreborn/client/GuiHandler.java @@ -73,9 +73,32 @@ import techreborn.client.gui.GuiSemifluidGenerator; import techreborn.client.gui.GuiThermalGenerator; import techreborn.client.gui.GuiVacuumFreezer; import techreborn.manual.GuiManual; -import techreborn.tiles.*; +import techreborn.tiles.TileAesu; +import techreborn.tiles.TileAlloyFurnace; +import techreborn.tiles.TileAlloySmelter; +import techreborn.tiles.TileAssemblingMachine; +import techreborn.tiles.TileBlastFurnace; +import techreborn.tiles.TileCentrifuge; +import techreborn.tiles.TileChargeBench; +import techreborn.tiles.TileChemicalReactor; +import techreborn.tiles.TileChunkLoader; +import techreborn.tiles.TileDigitalChest; +import techreborn.tiles.TileImplosionCompressor; +import techreborn.tiles.TileIndustrialElectrolyzer; +import techreborn.tiles.TileIndustrialGrinder; +import techreborn.tiles.TileIndustrialSawmill; +import techreborn.tiles.TileIronFurnace; +import techreborn.tiles.TileMatterFabricator; +import techreborn.tiles.TileQuantumChest; +import techreborn.tiles.TileQuantumTank; +import techreborn.tiles.TileRollingMachine; +import techreborn.tiles.TileVacuumFreezer; import techreborn.tiles.fusionReactor.TileEntityFusionController; -import techreborn.tiles.generator.*; +import techreborn.tiles.generator.TileDieselGenerator; +import techreborn.tiles.generator.TileGasTurbine; +import techreborn.tiles.generator.TileGenerator; +import techreborn.tiles.generator.TileSemifluidGenerator; +import techreborn.tiles.generator.TileThermalGenerator; import techreborn.tiles.idsu.TileIDSU; import techreborn.tiles.lesu.TileLesu; import techreborn.tiles.teir1.TileCompressor; diff --git a/src/main/java/techreborn/client/StackToolTipEvent.java b/src/main/java/techreborn/client/StackToolTipEvent.java index 9a3d01aa1..f5f810c71 100644 --- a/src/main/java/techreborn/client/StackToolTipEvent.java +++ b/src/main/java/techreborn/client/StackToolTipEvent.java @@ -1,15 +1,13 @@ package techreborn.client; -import org.lwjgl.input.Keyboard; - import com.mojang.realmsclient.gui.ChatFormatting; - import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.client.Minecraft; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.lwjgl.input.Keyboard; import reborncore.api.IListInfoProvider; import reborncore.api.power.IEnergyInterfaceItem; import reborncore.common.powerSystem.PowerSystem; diff --git a/src/main/java/techreborn/client/VersionCheckerClient.java b/src/main/java/techreborn/client/VersionCheckerClient.java index 7d2e1ffc0..839e69d4e 100644 --- a/src/main/java/techreborn/client/VersionCheckerClient.java +++ b/src/main/java/techreborn/client/VersionCheckerClient.java @@ -1,8 +1,5 @@ package techreborn.client; -import java.awt.Color; -import java.util.ArrayList; - import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.GuiScreenEvent; import net.minecraftforge.fml.client.GuiModList; @@ -10,6 +7,9 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import reborncore.client.gui.GuiUtil; import techreborn.Core; +import java.awt.*; +import java.util.ArrayList; + public class VersionCheckerClient { ResourceLocation texture; diff --git a/src/main/java/techreborn/client/container/ContainerRecycler.java b/src/main/java/techreborn/client/container/ContainerRecycler.java index dc10b668b..437c0ef4e 100644 --- a/src/main/java/techreborn/client/container/ContainerRecycler.java +++ b/src/main/java/techreborn/client/container/ContainerRecycler.java @@ -7,7 +7,6 @@ import net.minecraftforge.fml.relauncher.SideOnly; import reborncore.client.gui.SlotOutput; import reborncore.common.container.RebornContainer; import techreborn.api.SlotUpgrade; -import techreborn.tiles.teir1.TileCompressor; import techreborn.tiles.teir1.TileRecycler; public class ContainerRecycler extends RebornContainer { diff --git a/src/main/java/techreborn/client/gui/GuiAesu.java b/src/main/java/techreborn/client/gui/GuiAesu.java index 21d21c60a..024e4b1db 100644 --- a/src/main/java/techreborn/client/gui/GuiAesu.java +++ b/src/main/java/techreborn/client/gui/GuiAesu.java @@ -1,8 +1,5 @@ package techreborn.client.gui; -import java.awt.Color; -import java.io.IOException; - import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; @@ -15,6 +12,9 @@ import techreborn.client.container.ContainerAesu; import techreborn.packets.PacketAesu; import techreborn.tiles.TileAesu; +import java.awt.*; +import java.io.IOException; + public class GuiAesu extends GuiContainer { private static final ResourceLocation texture = new ResourceLocation( diff --git a/src/main/java/techreborn/client/gui/GuiBlastFurnace.java b/src/main/java/techreborn/client/gui/GuiBlastFurnace.java index 96f583dce..d3fde51de 100644 --- a/src/main/java/techreborn/client/gui/GuiBlastFurnace.java +++ b/src/main/java/techreborn/client/gui/GuiBlastFurnace.java @@ -1,7 +1,5 @@ package techreborn.client.gui; -import java.io.IOException; - import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; @@ -20,6 +18,8 @@ import techreborn.init.ModBlocks; import techreborn.proxies.ClientProxy; import techreborn.tiles.TileBlastFurnace; +import java.io.IOException; + public class GuiBlastFurnace extends GuiContainer { diff --git a/src/main/java/techreborn/client/gui/GuiCompressor.java b/src/main/java/techreborn/client/gui/GuiCompressor.java index 2d9dd1414..553973b31 100644 --- a/src/main/java/techreborn/client/gui/GuiCompressor.java +++ b/src/main/java/techreborn/client/gui/GuiCompressor.java @@ -1,7 +1,5 @@ package techreborn.client.gui; -import org.lwjgl.util.Color; - import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.resources.I18n; diff --git a/src/main/java/techreborn/client/gui/GuiFusionReactor.java b/src/main/java/techreborn/client/gui/GuiFusionReactor.java index 1d152583b..ac1f50e7e 100644 --- a/src/main/java/techreborn/client/gui/GuiFusionReactor.java +++ b/src/main/java/techreborn/client/gui/GuiFusionReactor.java @@ -1,24 +1,18 @@ package techreborn.client.gui; -import java.io.IOException; - import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import reborncore.client.multiblock.MultiblockSet; -import reborncore.common.misc.Location; -import reborncore.common.multiblock.CoordTriplet; import reborncore.common.powerSystem.PowerSystem; -import techreborn.client.ClientMultiBlocks; import techreborn.client.container.ContainerFusionReactor; -import techreborn.proxies.ClientProxy; import techreborn.tiles.fusionReactor.TileEntityFusionController; +import java.io.IOException; + public class GuiFusionReactor extends GuiContainer { diff --git a/src/main/java/techreborn/client/gui/GuiIDSU.java b/src/main/java/techreborn/client/gui/GuiIDSU.java index 94cbea00e..f96265a63 100644 --- a/src/main/java/techreborn/client/gui/GuiIDSU.java +++ b/src/main/java/techreborn/client/gui/GuiIDSU.java @@ -1,8 +1,5 @@ package techreborn.client.gui; -import java.awt.Color; -import java.io.IOException; - import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; @@ -15,6 +12,9 @@ import techreborn.client.container.ContainerIDSU; import techreborn.packets.PacketIdsu; import techreborn.tiles.idsu.TileIDSU; +import java.awt.*; +import java.io.IOException; + public class GuiIDSU extends GuiContainer { private static final ResourceLocation texture = new ResourceLocation( diff --git a/src/main/java/techreborn/client/gui/GuiIronFurnace.java b/src/main/java/techreborn/client/gui/GuiIronFurnace.java index dd2d22218..a00a289d8 100644 --- a/src/main/java/techreborn/client/gui/GuiIronFurnace.java +++ b/src/main/java/techreborn/client/gui/GuiIronFurnace.java @@ -6,10 +6,8 @@ import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import techreborn.client.container.ContainerElectricFurnace; import techreborn.client.container.ContainerIronFurnace; import techreborn.tiles.TileIronFurnace; -import techreborn.tiles.teir1.TileElectricFurnace; public class GuiIronFurnace extends GuiContainer { diff --git a/src/main/java/techreborn/client/gui/GuiLesu.java b/src/main/java/techreborn/client/gui/GuiLesu.java index c9b82e0b6..84c3f19ea 100644 --- a/src/main/java/techreborn/client/gui/GuiLesu.java +++ b/src/main/java/techreborn/client/gui/GuiLesu.java @@ -1,7 +1,5 @@ package techreborn.client.gui; -import java.awt.Color; - import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; @@ -11,6 +9,8 @@ import reborncore.common.powerSystem.PowerSystem; import techreborn.client.container.ContainerLesu; import techreborn.tiles.lesu.TileLesu; +import java.awt.*; + public class GuiLesu extends GuiContainer { private static final ResourceLocation texture = new ResourceLocation( diff --git a/src/main/java/techreborn/client/gui/GuiRecycler.java b/src/main/java/techreborn/client/gui/GuiRecycler.java index bd1ba028c..e06f93a27 100644 --- a/src/main/java/techreborn/client/gui/GuiRecycler.java +++ b/src/main/java/techreborn/client/gui/GuiRecycler.java @@ -1,16 +1,12 @@ package techreborn.client.gui; -import org.lwjgl.util.Color; - import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import techreborn.client.container.ContainerCompressor; import techreborn.client.container.ContainerRecycler; -import techreborn.tiles.teir1.TileCompressor; import techreborn.tiles.teir1.TileRecycler; public class GuiRecycler extends GuiContainer { diff --git a/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java b/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java index 7b23cb2f9..bf2f91057 100644 --- a/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java +++ b/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java @@ -1,7 +1,5 @@ package techreborn.client.gui; -import java.io.IOException; - import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; @@ -18,6 +16,8 @@ import techreborn.client.container.ContainerVacuumFreezer; import techreborn.proxies.ClientProxy; import techreborn.tiles.TileVacuumFreezer; +import java.io.IOException; + public class GuiVacuumFreezer extends GuiContainer { public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/vacuum_freezer.png"); diff --git a/src/main/java/techreborn/client/hud/ChargeHud.java b/src/main/java/techreborn/client/hud/ChargeHud.java index 67f09a410..6d5f4feaa 100644 --- a/src/main/java/techreborn/client/hud/ChargeHud.java +++ b/src/main/java/techreborn/client/hud/ChargeHud.java @@ -1,7 +1,5 @@ package techreborn.client.hud; -import org.lwjgl.opengl.GL11; - import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.RenderHelper; @@ -14,6 +12,7 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; import reborncore.api.power.IEnergyInterfaceItem; import reborncore.common.powerSystem.PowerSystem; import reborncore.common.util.Color; diff --git a/src/main/java/techreborn/client/keybindings/KeyBindings.java b/src/main/java/techreborn/client/keybindings/KeyBindings.java index 210c89615..65eae60d0 100644 --- a/src/main/java/techreborn/client/keybindings/KeyBindings.java +++ b/src/main/java/techreborn/client/keybindings/KeyBindings.java @@ -1,8 +1,7 @@ package techreborn.client.keybindings; -import org.lwjgl.input.Keyboard; - import net.minecraft.client.settings.KeyBinding; +import org.lwjgl.input.Keyboard; import techreborn.lib.ModInfo; public class KeyBindings { diff --git a/src/main/java/techreborn/client/render/entitys/RenderNukePrimed.java b/src/main/java/techreborn/client/render/entitys/RenderNukePrimed.java new file mode 100644 index 000000000..5d66a80eb --- /dev/null +++ b/src/main/java/techreborn/client/render/entitys/RenderNukePrimed.java @@ -0,0 +1,67 @@ +package techreborn.client.render.entitys; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.BlockRendererDispatcher; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.init.Blocks; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import techreborn.entitys.EntityNukePrimed; +import techreborn.init.ModBlocks; + +/** + * Created by Mark on 13/03/2016. + */ +public class RenderNukePrimed extends Render { + + public RenderNukePrimed(RenderManager renderManager) { + super(renderManager); + this.shadowSize = 0.5F; + } + + @Override + public void doRender(EntityNukePrimed entity, double x, double y, double z, float entityYaw, float partialTicks) { + BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher(); + GlStateManager.pushMatrix(); + GlStateManager.translate((float) x, (float) y + 0.5F, (float) z); + if ((float) entity.fuse - partialTicks + 1.0F < 10.0F) { + float f = 1.0F - ((float) entity.fuse - partialTicks + 1.0F) / 10.0F; + f = MathHelper.clamp_float(f, 0.0F, 1.0F); + f = f * f; + f = f * f; + float f1 = 1.0F + f * 0.3F; + GlStateManager.scale(f1, f1, f1); + } + float f2 = (1.0F - ((float) entity.fuse - partialTicks + 1.0F) / 100.0F) * 0.8F; + this.bindEntityTexture(entity); + GlStateManager.translate(-0.5F, -0.5F, 0.5F); + blockrendererdispatcher.renderBlockBrightness(ModBlocks.nuke.getDefaultState(), entity.getBrightness(partialTicks)); + GlStateManager.translate(0.0F, 0.0F, 1.0F); + if (entity.fuse / 5 % 2 == 0) { + GlStateManager.disableTexture2D(); + GlStateManager.disableLighting(); + GlStateManager.enableBlend(); + GlStateManager.blendFunc(770, 772); + GlStateManager.color(1.0F, 1.0F, 1.0F, f2); + GlStateManager.doPolygonOffset(-3.0F, -3.0F); + GlStateManager.enablePolygonOffset(); + blockrendererdispatcher.renderBlockBrightness(Blocks.tnt.getDefaultState(), 1.0F); + GlStateManager.doPolygonOffset(0.0F, 0.0F); + GlStateManager.disablePolygonOffset(); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.disableBlend(); + GlStateManager.enableLighting(); + GlStateManager.enableTexture2D(); + } + GlStateManager.popMatrix(); + super.doRender(entity, x, y, z, entityYaw, partialTicks); + } + + @Override + protected ResourceLocation getEntityTexture(EntityNukePrimed entity) { + return TextureMap.locationBlocksTexture; + } +} diff --git a/src/main/java/techreborn/client/render/parts/ClientPartModelBakery.java b/src/main/java/techreborn/client/render/parts/ClientPartModelBakery.java index 0f6a7ecf6..9c483bdd4 100644 --- a/src/main/java/techreborn/client/render/parts/ClientPartModelBakery.java +++ b/src/main/java/techreborn/client/render/parts/ClientPartModelBakery.java @@ -8,7 +8,6 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import techreborn.parts.CableMultipart; import techreborn.parts.EnumCableType; /** diff --git a/src/main/java/techreborn/client/render/parts/RenderCablePart.java b/src/main/java/techreborn/client/render/parts/RenderCablePart.java index 9332b28a7..eb930bda8 100644 --- a/src/main/java/techreborn/client/render/parts/RenderCablePart.java +++ b/src/main/java/techreborn/client/render/parts/RenderCablePart.java @@ -1,10 +1,13 @@ package techreborn.client.render.parts; -import buildcraft.robotics.render.RobotItemModel; import mcmultipart.client.multipart.ISmartMultipartModel; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.block.model.*; +import net.minecraft.client.renderer.block.model.BakedQuad; +import net.minecraft.client.renderer.block.model.BlockFaceUV; +import net.minecraft.client.renderer.block.model.BlockPartFace; +import net.minecraft.client.renderer.block.model.FaceBakery; +import net.minecraft.client.renderer.block.model.ItemCameraTransforms; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.model.IBakedModel; import net.minecraft.client.resources.model.ModelRotation; diff --git a/src/main/java/techreborn/client/texture/CasingConnectedTextureGenerator.java b/src/main/java/techreborn/client/texture/CasingConnectedTextureGenerator.java index a17f18d18..0a9acdc7c 100644 --- a/src/main/java/techreborn/client/texture/CasingConnectedTextureGenerator.java +++ b/src/main/java/techreborn/client/texture/CasingConnectedTextureGenerator.java @@ -1,10 +1,5 @@ package techreborn.client.texture; -import java.awt.image.BufferedImage; -import java.io.IOException; - -import javax.imageio.ImageIO; - import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.IResource; @@ -14,6 +9,10 @@ import net.minecraft.util.ResourceLocation; import reborncore.client.texture.ConnectedTexture; import techreborn.lib.ModInfo; +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.IOException; + //1.8 Nope public class CasingConnectedTextureGenerator extends TextureAtlasSprite { diff --git a/src/main/java/techreborn/client/texture/LesuConnectedTextureGenerator.java b/src/main/java/techreborn/client/texture/LesuConnectedTextureGenerator.java index 6bd165eda..5f9a3c3c3 100644 --- a/src/main/java/techreborn/client/texture/LesuConnectedTextureGenerator.java +++ b/src/main/java/techreborn/client/texture/LesuConnectedTextureGenerator.java @@ -1,10 +1,5 @@ package techreborn.client.texture; -import java.awt.image.BufferedImage; -import java.io.IOException; - -import javax.imageio.ImageIO; - import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.IResource; @@ -14,6 +9,10 @@ import net.minecraft.util.ResourceLocation; import reborncore.client.texture.ConnectedTexture; import techreborn.lib.ModInfo; +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.IOException; + //TODO 1.8 nope public class LesuConnectedTextureGenerator extends TextureAtlasSprite { diff --git a/src/main/java/techreborn/command/TechRebornDevCommand.java b/src/main/java/techreborn/command/TechRebornDevCommand.java index 7b69818ff..15447cd43 100644 --- a/src/main/java/techreborn/command/TechRebornDevCommand.java +++ b/src/main/java/techreborn/command/TechRebornDevCommand.java @@ -1,13 +1,21 @@ package techreborn.command; +import net.minecraft.block.Block; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraftforge.fluids.Fluid; import reborncore.api.fuel.FluidPowerManager; +import reborncore.common.explosion.RebornExplosion; import techreborn.api.recipe.RecipeHandler; +import java.util.ArrayList; +import java.util.List; + public class TechRebornDevCommand extends CommandBase { @Override @@ -43,11 +51,26 @@ public class TechRebornDevCommand extends CommandBase { sender.addChatMessage(new ChatComponentText("Found invalid fluid entry")); } } -// } else if ("parts".equals(args[0])) { //TODO 1.8 -// for (IModPart part : ModPartRegistry.parts) { -// sender.addChatMessage(new ChatComponentText(part.getName())); -// } -// } + } else if ("clear".equals(args[0])) { + EntityPlayerMP playerMP = (EntityPlayerMP) sender; + List blocksToRemove = new ArrayList<>(); + blocksToRemove.add(Blocks.grass); + blocksToRemove.add(Blocks.dirt); + blocksToRemove.add(Blocks.stone); + for (int x = 0; x < 25; x++) { + for (int z = 0; z < 25; z++) { + for (int y = 0; y < playerMP.posY; y++) { + BlockPos pos = new BlockPos(playerMP.posX + x, y, playerMP.posZ + z); + if (blocksToRemove.contains(playerMP.worldObj.getBlockState(pos).getBlock())) { + playerMP.worldObj.setBlockState(pos, Blocks.air.getDefaultState(), 2); + } + } + } + } + }else if ("explode".equals(args[0])) { + EntityPlayerMP playerMP = (EntityPlayerMP) sender; + RebornExplosion explosion = new RebornExplosion(playerMP.getPosition(), playerMP.worldObj, 40); + explosion.explode(); } } } diff --git a/src/main/java/techreborn/compat/CompatManager.java b/src/main/java/techreborn/compat/CompatManager.java index d325bf4a6..3632d11fc 100644 --- a/src/main/java/techreborn/compat/CompatManager.java +++ b/src/main/java/techreborn/compat/CompatManager.java @@ -1,12 +1,9 @@ package techreborn.compat; -import java.util.ArrayList; - import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import techreborn.client.render.parts.ClientPartLoader; -import techreborn.client.render.parts.ClientPartModelBakery; import techreborn.compat.minetweaker.MinetweakerCompat; import techreborn.compat.recipes.RecipesBiomesOPlenty; import techreborn.compat.recipes.RecipesBuildcraft; @@ -17,6 +14,8 @@ import techreborn.parts.StandalonePartCompact; import techreborn.parts.TechRebornParts; import techreborn.parts.walia.WailaMcMultiPartCompact; +import java.util.ArrayList; + public class CompatManager { public ArrayList compatModules = new ArrayList(); diff --git a/src/main/java/techreborn/compat/jei/BaseRecipeWrapper.java b/src/main/java/techreborn/compat/jei/BaseRecipeWrapper.java index 16e133645..c0705205d 100644 --- a/src/main/java/techreborn/compat/jei/BaseRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/BaseRecipeWrapper.java @@ -1,18 +1,17 @@ package techreborn.compat.jei; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import javax.annotation.Nonnull; - import mezz.jei.api.recipe.BlankRecipeWrapper; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import techreborn.api.recipe.BaseRecipe; +import javax.annotation.Nonnull; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + public abstract class BaseRecipeWrapper extends BlankRecipeWrapper { protected final T baseRecipe; @Nonnull diff --git a/src/main/java/techreborn/compat/jei/RecipeUtil.java b/src/main/java/techreborn/compat/jei/RecipeUtil.java index e24c6be43..c940b7c2c 100644 --- a/src/main/java/techreborn/compat/jei/RecipeUtil.java +++ b/src/main/java/techreborn/compat/jei/RecipeUtil.java @@ -1,12 +1,5 @@ package techreborn.compat.jei; -import java.awt.Color; -import java.text.NumberFormat; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - import mezz.jei.api.gui.IGuiFluidStackGroup; import mezz.jei.api.gui.IGuiItemStackGroup; import mezz.jei.api.gui.IRecipeLayout; @@ -16,6 +9,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.awt.*; +import java.text.NumberFormat; +import java.util.List; + public class RecipeUtil { private static final int color = Color.darkGray.getRGB(); diff --git a/src/main/java/techreborn/compat/jei/TechRebornJeiPlugin.java b/src/main/java/techreborn/compat/jei/TechRebornJeiPlugin.java index b481dda55..396b5c7a1 100644 --- a/src/main/java/techreborn/compat/jei/TechRebornJeiPlugin.java +++ b/src/main/java/techreborn/compat/jei/TechRebornJeiPlugin.java @@ -1,10 +1,5 @@ package techreborn.compat.jei; -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nonnull; - import mezz.jei.api.BlankModPlugin; import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; @@ -19,8 +14,41 @@ import techreborn.api.reactor.FusionReactorRecipeHelper; import techreborn.api.recipe.RecipeHandler; import techreborn.api.recipe.machines.AssemblingMachineRecipe; import techreborn.api.recipe.machines.ImplosionCompressorRecipe; -import techreborn.client.container.*; -import techreborn.client.gui.*; +import techreborn.client.container.ContainerAlloyFurnace; +import techreborn.client.container.ContainerAlloySmelter; +import techreborn.client.container.ContainerAssemblingMachine; +import techreborn.client.container.ContainerBlastFurnace; +import techreborn.client.container.ContainerCentrifuge; +import techreborn.client.container.ContainerChemicalReactor; +import techreborn.client.container.ContainerCompressor; +import techreborn.client.container.ContainerExtractor; +import techreborn.client.container.ContainerFusionReactor; +import techreborn.client.container.ContainerGrinder; +import techreborn.client.container.ContainerImplosionCompressor; +import techreborn.client.container.ContainerIndustrialElectrolyzer; +import techreborn.client.container.ContainerIndustrialGrinder; +import techreborn.client.container.ContainerIndustrialSawmill; +import techreborn.client.container.ContainerRollingMachine; +import techreborn.client.container.ContainerVacuumFreezer; +import techreborn.client.gui.GuiAlloyFurnace; +import techreborn.client.gui.GuiAlloySmelter; +import techreborn.client.gui.GuiAssemblingMachine; +import techreborn.client.gui.GuiBlastFurnace; +import techreborn.client.gui.GuiCentrifuge; +import techreborn.client.gui.GuiChemicalReactor; +import techreborn.client.gui.GuiCompressor; +import techreborn.client.gui.GuiElectricFurnace; +import techreborn.client.gui.GuiExtractor; +import techreborn.client.gui.GuiFusionReactor; +import techreborn.client.gui.GuiGrinder; +import techreborn.client.gui.GuiImplosionCompressor; +import techreborn.client.gui.GuiIndustrialElectrolyzer; +import techreborn.client.gui.GuiIndustrialGrinder; +import techreborn.client.gui.GuiIndustrialSawmill; +import techreborn.client.gui.GuiIronFurnace; +import techreborn.client.gui.GuiRecycler; +import techreborn.client.gui.GuiRollingMachine; +import techreborn.client.gui.GuiVacuumFreezer; import techreborn.compat.jei.alloySmelter.AlloySmelterRecipeCategory; import techreborn.compat.jei.alloySmelter.AlloySmelterRecipeHandler; import techreborn.compat.jei.assemblingMachine.AssemblingMachineRecipeCategory; @@ -60,6 +88,10 @@ import techreborn.config.ConfigTechReborn; import techreborn.init.ModItems; import techreborn.items.ItemParts; +import javax.annotation.Nonnull; +import java.util.ArrayList; +import java.util.List; + @mezz.jei.api.JEIPlugin public class TechRebornJeiPlugin extends BlankModPlugin { @Override diff --git a/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeCategory.java b/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeCategory.java index 62a09c275..4d434a9b0 100644 --- a/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.alloySmelter; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IDrawableAnimated; @@ -16,6 +14,8 @@ import techreborn.client.gui.GuiAlloySmelter; import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; + public class AlloySmelterRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0, 1}; private static final int[] OUTPUT_SLOTS = {2}; diff --git a/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeHandler.java b/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeHandler.java index f4d51a07a..a416cf0d1 100644 --- a/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeHandler.java @@ -1,13 +1,13 @@ package techreborn.compat.jei.alloySmelter; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.machines.AlloySmelterRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class AlloySmelterRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeWrapper.java b/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeWrapper.java index e6402e2ea..6c5c9c1c2 100644 --- a/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeWrapper.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.alloySmelter; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; @@ -11,6 +9,8 @@ import techreborn.api.recipe.machines.AlloySmelterRecipe; import techreborn.client.gui.GuiAlloySmelter; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; + public class AlloySmelterRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated arrow; diff --git a/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeCategory.java b/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeCategory.java index 525f7c8a2..e23bbfb88 100644 --- a/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.assemblingMachine; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IDrawableAnimated; @@ -16,6 +14,8 @@ import techreborn.client.gui.GuiAssemblingMachine; import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; + public class AssemblingMachineRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0, 1}; private static final int[] OUTPUT_SLOTS = {2}; diff --git a/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeHandler.java b/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeHandler.java index fe95e6b48..5c06e8903 100644 --- a/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeHandler.java @@ -1,13 +1,13 @@ package techreborn.compat.jei.assemblingMachine; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.machines.AssemblingMachineRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class AssemblingMachineRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeWrapper.java b/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeWrapper.java index 2cfa501f7..075bd5973 100644 --- a/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeWrapper.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.assemblingMachine; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; @@ -11,6 +9,8 @@ import techreborn.api.recipe.machines.AssemblingMachineRecipe; import techreborn.client.gui.GuiAssemblingMachine; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; + public class AssemblingMachineRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progress; diff --git a/src/main/java/techreborn/compat/jei/blastFurnace/BlastFurnaceRecipeCategory.java b/src/main/java/techreborn/compat/jei/blastFurnace/BlastFurnaceRecipeCategory.java index ad7f9b29f..6222fc4c1 100644 --- a/src/main/java/techreborn/compat/jei/blastFurnace/BlastFurnaceRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/blastFurnace/BlastFurnaceRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.blastFurnace; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiItemStackGroup; @@ -13,6 +11,8 @@ import techreborn.client.gui.GuiBlastFurnace; import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; + public class BlastFurnaceRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0, 1}; private static final int[] OUTPUT_SLOTS = {2, 3}; diff --git a/src/main/java/techreborn/compat/jei/blastFurnace/BlastFurnaceRecipeHandler.java b/src/main/java/techreborn/compat/jei/blastFurnace/BlastFurnaceRecipeHandler.java index cdeca5537..b232c8b5b 100644 --- a/src/main/java/techreborn/compat/jei/blastFurnace/BlastFurnaceRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/blastFurnace/BlastFurnaceRecipeHandler.java @@ -1,13 +1,13 @@ package techreborn.compat.jei.blastFurnace; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.machines.BlastFurnaceRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class BlastFurnaceRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/blastFurnace/BlastFurnaceRecipeWrapper.java b/src/main/java/techreborn/compat/jei/blastFurnace/BlastFurnaceRecipeWrapper.java index ca510df44..2ec4f6c44 100644 --- a/src/main/java/techreborn/compat/jei/blastFurnace/BlastFurnaceRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/blastFurnace/BlastFurnaceRecipeWrapper.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.blastFurnace; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; @@ -11,6 +9,8 @@ import techreborn.api.recipe.machines.BlastFurnaceRecipe; import techreborn.client.gui.GuiBlastFurnace; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; + public class BlastFurnaceRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progress; diff --git a/src/main/java/techreborn/compat/jei/centrifuge/CentrifugeRecipeCategory.java b/src/main/java/techreborn/compat/jei/centrifuge/CentrifugeRecipeCategory.java index af4ac41ad..a18ca11f6 100644 --- a/src/main/java/techreborn/compat/jei/centrifuge/CentrifugeRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/centrifuge/CentrifugeRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.centrifuge; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiItemStackGroup; @@ -13,6 +11,8 @@ import techreborn.client.gui.GuiCentrifuge; import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; + public class CentrifugeRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0, 1}; private static final int[] OUTPUT_SLOTS = {2, 3, 4, 5}; diff --git a/src/main/java/techreborn/compat/jei/centrifuge/CentrifugeRecipeHandler.java b/src/main/java/techreborn/compat/jei/centrifuge/CentrifugeRecipeHandler.java index 9f4d1fcc7..a48c90e4e 100644 --- a/src/main/java/techreborn/compat/jei/centrifuge/CentrifugeRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/centrifuge/CentrifugeRecipeHandler.java @@ -1,13 +1,13 @@ package techreborn.compat.jei.centrifuge; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.machines.CentrifugeRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class CentrifugeRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/centrifuge/CentrifugeRecipeWrapper.java b/src/main/java/techreborn/compat/jei/centrifuge/CentrifugeRecipeWrapper.java index a01ea51ee..0b7cfb776 100644 --- a/src/main/java/techreborn/compat/jei/centrifuge/CentrifugeRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/centrifuge/CentrifugeRecipeWrapper.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.centrifuge; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; @@ -11,6 +9,8 @@ import techreborn.api.recipe.machines.CentrifugeRecipe; import techreborn.client.gui.GuiCentrifuge; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; + public class CentrifugeRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progressUp; private final IDrawableAnimated progressLeft; diff --git a/src/main/java/techreborn/compat/jei/chemicalReactor/ChemicalReactorRecipeCategory.java b/src/main/java/techreborn/compat/jei/chemicalReactor/ChemicalReactorRecipeCategory.java index 3ff1db3e6..039f005e1 100644 --- a/src/main/java/techreborn/compat/jei/chemicalReactor/ChemicalReactorRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/chemicalReactor/ChemicalReactorRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.chemicalReactor; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiItemStackGroup; @@ -13,6 +11,8 @@ import techreborn.client.gui.GuiChemicalReactor; import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; + public class ChemicalReactorRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0, 1}; private static final int[] OUTPUT_SLOTS = {2}; diff --git a/src/main/java/techreborn/compat/jei/chemicalReactor/ChemicalReactorRecipeHandler.java b/src/main/java/techreborn/compat/jei/chemicalReactor/ChemicalReactorRecipeHandler.java index 9c681308e..d36aaf352 100644 --- a/src/main/java/techreborn/compat/jei/chemicalReactor/ChemicalReactorRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/chemicalReactor/ChemicalReactorRecipeHandler.java @@ -1,13 +1,13 @@ package techreborn.compat.jei.chemicalReactor; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.machines.ChemicalReactorRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class ChemicalReactorRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/chemicalReactor/ChemicalReactorRecipeWrapper.java b/src/main/java/techreborn/compat/jei/chemicalReactor/ChemicalReactorRecipeWrapper.java index def0468df..191aaa23f 100644 --- a/src/main/java/techreborn/compat/jei/chemicalReactor/ChemicalReactorRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/chemicalReactor/ChemicalReactorRecipeWrapper.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.chemicalReactor; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; @@ -11,6 +9,8 @@ import techreborn.api.recipe.machines.ChemicalReactorRecipe; import techreborn.client.gui.GuiChemicalReactor; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; + public class ChemicalReactorRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progress; diff --git a/src/main/java/techreborn/compat/jei/compressor/CompressorRecipeCategory.java b/src/main/java/techreborn/compat/jei/compressor/CompressorRecipeCategory.java index a256eb44b..23e217c4e 100644 --- a/src/main/java/techreborn/compat/jei/compressor/CompressorRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/compressor/CompressorRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.compressor; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiItemStackGroup; @@ -10,10 +8,11 @@ import mezz.jei.api.recipe.BlankRecipeCategory; import mezz.jei.api.recipe.IRecipeWrapper; import net.minecraft.util.StatCollector; import techreborn.client.gui.GuiCompressor; -import techreborn.client.gui.GuiGrinder; import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; + public class CompressorRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0}; private static final int[] OUTPUT_SLOTS = {1}; diff --git a/src/main/java/techreborn/compat/jei/compressor/CompressorRecipeHandler.java b/src/main/java/techreborn/compat/jei/compressor/CompressorRecipeHandler.java index 21d730664..8ba644fc2 100644 --- a/src/main/java/techreborn/compat/jei/compressor/CompressorRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/compressor/CompressorRecipeHandler.java @@ -1,14 +1,13 @@ package techreborn.compat.jei.compressor; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.machines.CompressorRecipe; -import techreborn.api.recipe.machines.GrinderRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class CompressorRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/compressor/CompressorRecipeWrapper.java b/src/main/java/techreborn/compat/jei/compressor/CompressorRecipeWrapper.java index 8c1e9dbcd..7c682af8c 100644 --- a/src/main/java/techreborn/compat/jei/compressor/CompressorRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/compressor/CompressorRecipeWrapper.java @@ -1,18 +1,16 @@ package techreborn.compat.jei.compressor; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; import mezz.jei.api.gui.IDrawableStatic; import net.minecraft.client.Minecraft; import techreborn.api.recipe.machines.CompressorRecipe; -import techreborn.api.recipe.machines.GrinderRecipe; import techreborn.client.gui.GuiCompressor; -import techreborn.client.gui.GuiGrinder; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; + public class CompressorRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progress; diff --git a/src/main/java/techreborn/compat/jei/extractor/ExtractorRecipeCategory.java b/src/main/java/techreborn/compat/jei/extractor/ExtractorRecipeCategory.java index 6af5e4d57..9648cafb7 100644 --- a/src/main/java/techreborn/compat/jei/extractor/ExtractorRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/extractor/ExtractorRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.extractor; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiItemStackGroup; @@ -10,10 +8,11 @@ import mezz.jei.api.recipe.BlankRecipeCategory; import mezz.jei.api.recipe.IRecipeWrapper; import net.minecraft.util.StatCollector; import techreborn.client.gui.GuiExtractor; -import techreborn.client.gui.GuiGrinder; import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; + public class ExtractorRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0}; private static final int[] OUTPUT_SLOTS = {1}; diff --git a/src/main/java/techreborn/compat/jei/extractor/ExtractorRecipeHandler.java b/src/main/java/techreborn/compat/jei/extractor/ExtractorRecipeHandler.java index 1c719b1bf..c546fbb5f 100644 --- a/src/main/java/techreborn/compat/jei/extractor/ExtractorRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/extractor/ExtractorRecipeHandler.java @@ -1,14 +1,13 @@ package techreborn.compat.jei.extractor; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.machines.ExtractorRecipe; -import techreborn.api.recipe.machines.GrinderRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class ExtractorRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/extractor/ExtractorRecipeWrapper.java b/src/main/java/techreborn/compat/jei/extractor/ExtractorRecipeWrapper.java index 38c504e19..69deece16 100644 --- a/src/main/java/techreborn/compat/jei/extractor/ExtractorRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/extractor/ExtractorRecipeWrapper.java @@ -1,18 +1,16 @@ package techreborn.compat.jei.extractor; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; import mezz.jei.api.gui.IDrawableStatic; import net.minecraft.client.Minecraft; import techreborn.api.recipe.machines.ExtractorRecipe; -import techreborn.api.recipe.machines.GrinderRecipe; import techreborn.client.gui.GuiExtractor; -import techreborn.client.gui.GuiGrinder; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; + public class ExtractorRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progress; diff --git a/src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeCategory.java b/src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeCategory.java index 299992597..a374ebed0 100644 --- a/src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.fusionReactor; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiItemStackGroup; @@ -12,6 +10,8 @@ import net.minecraft.util.StatCollector; import techreborn.client.gui.GuiFusionReactor; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class FusionReactorRecipeCategory extends BlankRecipeCategory { private static final int inputSlotTop = 0; diff --git a/src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeHandler.java b/src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeHandler.java index ce9af95c2..0afe60fb8 100644 --- a/src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeHandler.java @@ -1,12 +1,12 @@ package techreborn.compat.jei.fusionReactor; -import javax.annotation.Nonnull; - import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.reactor.FusionReactorRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class FusionReactorRecipeHandler implements IRecipeHandler { @Nonnull diff --git a/src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeWrapper.java b/src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeWrapper.java index 5b2dcf54f..d68c532e7 100644 --- a/src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/fusionReactor/FusionReactorRecipeWrapper.java @@ -1,17 +1,16 @@ package techreborn.compat.jei.fusionReactor; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import javax.annotation.Nonnull; - import mezz.jei.api.recipe.BlankRecipeWrapper; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import techreborn.api.reactor.FusionReactorRecipe; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + public class FusionReactorRecipeWrapper extends BlankRecipeWrapper { private final FusionReactorRecipe baseRecipe; diff --git a/src/main/java/techreborn/compat/jei/grinder/GrinderRecipeCategory.java b/src/main/java/techreborn/compat/jei/grinder/GrinderRecipeCategory.java index 2d8616898..ea334f6b5 100644 --- a/src/main/java/techreborn/compat/jei/grinder/GrinderRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/grinder/GrinderRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.grinder; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiItemStackGroup; @@ -13,6 +11,8 @@ import techreborn.client.gui.GuiGrinder; import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; + public class GrinderRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0}; private static final int[] OUTPUT_SLOTS = {1}; diff --git a/src/main/java/techreborn/compat/jei/grinder/GrinderRecipeHandler.java b/src/main/java/techreborn/compat/jei/grinder/GrinderRecipeHandler.java index 14feeedd9..a393b33a8 100644 --- a/src/main/java/techreborn/compat/jei/grinder/GrinderRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/grinder/GrinderRecipeHandler.java @@ -1,13 +1,13 @@ package techreborn.compat.jei.grinder; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.machines.GrinderRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class GrinderRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/grinder/GrinderRecipeWrapper.java b/src/main/java/techreborn/compat/jei/grinder/GrinderRecipeWrapper.java index a29384ffe..8866440dd 100644 --- a/src/main/java/techreborn/compat/jei/grinder/GrinderRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/grinder/GrinderRecipeWrapper.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.grinder; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; @@ -11,6 +9,8 @@ import techreborn.api.recipe.machines.GrinderRecipe; import techreborn.client.gui.GuiGrinder; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; + public class GrinderRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progress; diff --git a/src/main/java/techreborn/compat/jei/implosionCompressor/ImplosionCompressorRecipeCategory.java b/src/main/java/techreborn/compat/jei/implosionCompressor/ImplosionCompressorRecipeCategory.java index 1e28d798a..b37d08a98 100644 --- a/src/main/java/techreborn/compat/jei/implosionCompressor/ImplosionCompressorRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/implosionCompressor/ImplosionCompressorRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.implosionCompressor; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IDrawableAnimated; @@ -16,6 +14,8 @@ import techreborn.client.gui.GuiImplosionCompressor; import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; + public class ImplosionCompressorRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0, 1}; private static final int[] OUTPUT_SLOTS = {2, 3}; diff --git a/src/main/java/techreborn/compat/jei/implosionCompressor/ImplosionCompressorRecipeHandler.java b/src/main/java/techreborn/compat/jei/implosionCompressor/ImplosionCompressorRecipeHandler.java index d5f833660..483daaa87 100644 --- a/src/main/java/techreborn/compat/jei/implosionCompressor/ImplosionCompressorRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/implosionCompressor/ImplosionCompressorRecipeHandler.java @@ -1,13 +1,13 @@ package techreborn.compat.jei.implosionCompressor; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.machines.ImplosionCompressorRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class ImplosionCompressorRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/implosionCompressor/ImplosionCompressorRecipeWrapper.java b/src/main/java/techreborn/compat/jei/implosionCompressor/ImplosionCompressorRecipeWrapper.java index a6705f65f..9ddf0c061 100644 --- a/src/main/java/techreborn/compat/jei/implosionCompressor/ImplosionCompressorRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/implosionCompressor/ImplosionCompressorRecipeWrapper.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.implosionCompressor; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; @@ -11,6 +9,8 @@ import techreborn.api.recipe.machines.ImplosionCompressorRecipe; import techreborn.client.gui.GuiImplosionCompressor; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; + public class ImplosionCompressorRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progress; diff --git a/src/main/java/techreborn/compat/jei/industrialElectrolyzer/IndustrialElectrolyzerRecipeCategory.java b/src/main/java/techreborn/compat/jei/industrialElectrolyzer/IndustrialElectrolyzerRecipeCategory.java index 693d599ce..2f78d4544 100644 --- a/src/main/java/techreborn/compat/jei/industrialElectrolyzer/IndustrialElectrolyzerRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/industrialElectrolyzer/IndustrialElectrolyzerRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.industrialElectrolyzer; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiItemStackGroup; @@ -13,6 +11,8 @@ import techreborn.client.gui.GuiIndustrialElectrolyzer; import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; + public class IndustrialElectrolyzerRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0, 1}; private static final int[] OUTPUT_SLOTS = {2, 3, 4, 5}; diff --git a/src/main/java/techreborn/compat/jei/industrialElectrolyzer/IndustrialElectrolyzerRecipeHandler.java b/src/main/java/techreborn/compat/jei/industrialElectrolyzer/IndustrialElectrolyzerRecipeHandler.java index 2c8a8fb08..e199e20de 100644 --- a/src/main/java/techreborn/compat/jei/industrialElectrolyzer/IndustrialElectrolyzerRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/industrialElectrolyzer/IndustrialElectrolyzerRecipeHandler.java @@ -1,13 +1,13 @@ package techreborn.compat.jei.industrialElectrolyzer; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.machines.IndustrialElectrolyzerRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class IndustrialElectrolyzerRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/industrialElectrolyzer/IndustrialElectrolyzerRecipeWrapper.java b/src/main/java/techreborn/compat/jei/industrialElectrolyzer/IndustrialElectrolyzerRecipeWrapper.java index 6fc7544dc..b249e135c 100644 --- a/src/main/java/techreborn/compat/jei/industrialElectrolyzer/IndustrialElectrolyzerRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/industrialElectrolyzer/IndustrialElectrolyzerRecipeWrapper.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.industrialElectrolyzer; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; @@ -11,6 +9,8 @@ import techreborn.api.recipe.machines.IndustrialElectrolyzerRecipe; import techreborn.client.gui.GuiIndustrialElectrolyzer; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; + public class IndustrialElectrolyzerRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progress; diff --git a/src/main/java/techreborn/compat/jei/industrialGrinder/IndustrialGrinderRecipeCategory.java b/src/main/java/techreborn/compat/jei/industrialGrinder/IndustrialGrinderRecipeCategory.java index 4cea09034..e5a429719 100644 --- a/src/main/java/techreborn/compat/jei/industrialGrinder/IndustrialGrinderRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/industrialGrinder/IndustrialGrinderRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.industrialGrinder; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiFluidStackGroup; @@ -16,6 +14,8 @@ import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; import techreborn.tiles.TileIndustrialGrinder; +import javax.annotation.Nonnull; + public class IndustrialGrinderRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0, 1}; private static final int[] OUTPUT_SLOTS = {2, 3, 4, 5}; diff --git a/src/main/java/techreborn/compat/jei/industrialGrinder/IndustrialGrinderRecipeHandler.java b/src/main/java/techreborn/compat/jei/industrialGrinder/IndustrialGrinderRecipeHandler.java index 333524df5..430f84c37 100644 --- a/src/main/java/techreborn/compat/jei/industrialGrinder/IndustrialGrinderRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/industrialGrinder/IndustrialGrinderRecipeHandler.java @@ -1,13 +1,13 @@ package techreborn.compat.jei.industrialGrinder; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.machines.IndustrialGrinderRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class IndustrialGrinderRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/industrialGrinder/IndustrialGrinderRecipeWrapper.java b/src/main/java/techreborn/compat/jei/industrialGrinder/IndustrialGrinderRecipeWrapper.java index fd7d20b03..16da76a38 100644 --- a/src/main/java/techreborn/compat/jei/industrialGrinder/IndustrialGrinderRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/industrialGrinder/IndustrialGrinderRecipeWrapper.java @@ -1,10 +1,5 @@ package techreborn.compat.jei.industrialGrinder; -import java.util.Collections; -import java.util.List; - -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; @@ -15,6 +10,10 @@ import techreborn.api.recipe.machines.IndustrialGrinderRecipe; import techreborn.client.gui.GuiIndustrialGrinder; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; +import java.util.Collections; +import java.util.List; + public class IndustrialGrinderRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progress; diff --git a/src/main/java/techreborn/compat/jei/industrialSawmill/IndustrialSawmillRecipeCategory.java b/src/main/java/techreborn/compat/jei/industrialSawmill/IndustrialSawmillRecipeCategory.java index beb58786c..04cf32622 100644 --- a/src/main/java/techreborn/compat/jei/industrialSawmill/IndustrialSawmillRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/industrialSawmill/IndustrialSawmillRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.industrialSawmill; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiFluidStackGroup; @@ -16,6 +14,8 @@ import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; import techreborn.tiles.TileIndustrialSawmill; +import javax.annotation.Nonnull; + public class IndustrialSawmillRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0, 1}; private static final int[] OUTPUT_SLOTS = {2, 3, 4}; diff --git a/src/main/java/techreborn/compat/jei/industrialSawmill/IndustrialSawmillRecipeHandler.java b/src/main/java/techreborn/compat/jei/industrialSawmill/IndustrialSawmillRecipeHandler.java index ae463e950..a10b6430b 100644 --- a/src/main/java/techreborn/compat/jei/industrialSawmill/IndustrialSawmillRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/industrialSawmill/IndustrialSawmillRecipeHandler.java @@ -1,13 +1,13 @@ package techreborn.compat.jei.industrialSawmill; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.machines.IndustrialSawmillRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class IndustrialSawmillRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/industrialSawmill/IndustrialSawmillRecipeWrapper.java b/src/main/java/techreborn/compat/jei/industrialSawmill/IndustrialSawmillRecipeWrapper.java index 5fc9b297c..0bef098a2 100644 --- a/src/main/java/techreborn/compat/jei/industrialSawmill/IndustrialSawmillRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/industrialSawmill/IndustrialSawmillRecipeWrapper.java @@ -1,10 +1,5 @@ package techreborn.compat.jei.industrialSawmill; -import java.util.Collections; -import java.util.List; - -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; @@ -15,6 +10,10 @@ import techreborn.api.recipe.machines.IndustrialSawmillRecipe; import techreborn.client.gui.GuiIndustrialSawmill; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; +import java.util.Collections; +import java.util.List; + public class IndustrialSawmillRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progress; diff --git a/src/main/java/techreborn/compat/jei/recycler/RecyclerRecipeCategory.java b/src/main/java/techreborn/compat/jei/recycler/RecyclerRecipeCategory.java index 0b30a72f5..51432d989 100644 --- a/src/main/java/techreborn/compat/jei/recycler/RecyclerRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/recycler/RecyclerRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.recycler; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiItemStackGroup; @@ -9,12 +7,12 @@ import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.recipe.BlankRecipeCategory; import mezz.jei.api.recipe.IRecipeWrapper; import net.minecraft.util.StatCollector; -import techreborn.client.gui.GuiCompressor; -import techreborn.client.gui.GuiGrinder; import techreborn.client.gui.GuiRecycler; import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; + public class RecyclerRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0}; private static final int[] OUTPUT_SLOTS = {1}; diff --git a/src/main/java/techreborn/compat/jei/recycler/RecyclerRecipeHandler.java b/src/main/java/techreborn/compat/jei/recycler/RecyclerRecipeHandler.java index 596b7304c..a65acd0f1 100644 --- a/src/main/java/techreborn/compat/jei/recycler/RecyclerRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/recycler/RecyclerRecipeHandler.java @@ -1,15 +1,13 @@ package techreborn.compat.jei.recycler; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.RecyclerRecipe; -import techreborn.api.recipe.machines.CompressorRecipe; -import techreborn.api.recipe.machines.GrinderRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class RecyclerRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/recycler/RecyclerRecipeWrapper.java b/src/main/java/techreborn/compat/jei/recycler/RecyclerRecipeWrapper.java index 900fcc58c..c4a7fb1fc 100644 --- a/src/main/java/techreborn/compat/jei/recycler/RecyclerRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/recycler/RecyclerRecipeWrapper.java @@ -1,20 +1,16 @@ package techreborn.compat.jei.recycler; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; import mezz.jei.api.gui.IDrawableStatic; import net.minecraft.client.Minecraft; import techreborn.api.recipe.RecyclerRecipe; -import techreborn.api.recipe.machines.CompressorRecipe; -import techreborn.api.recipe.machines.GrinderRecipe; -import techreborn.client.gui.GuiCompressor; -import techreborn.client.gui.GuiGrinder; import techreborn.client.gui.GuiRecycler; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; + public class RecyclerRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progress; diff --git a/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeCategory.java b/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeCategory.java index 70ed7ac4f..69c82cc11 100644 --- a/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.rollingMachine; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.ICraftingGridHelper; import mezz.jei.api.gui.IDrawable; @@ -16,6 +14,8 @@ import net.minecraft.util.StatCollector; import techreborn.client.gui.GuiRollingMachine; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class RollingMachineRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; private static final int[] OUTPUT_SLOTS = {10}; diff --git a/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeHandler.java b/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeHandler.java index 903482501..b2017e2f9 100644 --- a/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeHandler.java @@ -1,11 +1,11 @@ package techreborn.compat.jei.rollingMachine; -import javax.annotation.Nonnull; - import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class RollingMachineRecipeHandler implements IRecipeHandler { @Nonnull @Override diff --git a/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeMaker.java b/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeMaker.java index b8c29c954..fce13a83c 100644 --- a/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeMaker.java +++ b/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeMaker.java @@ -1,11 +1,11 @@ package techreborn.compat.jei.rollingMachine; -import java.util.ArrayList; -import java.util.List; - import net.minecraft.item.crafting.IRecipe; import techreborn.api.RollingMachineRecipe; +import java.util.ArrayList; +import java.util.List; + public class RollingMachineRecipeMaker { private RollingMachineRecipeMaker() { diff --git a/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeWrapper.java b/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeWrapper.java index efa024ff3..21a4284ea 100644 --- a/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/rollingMachine/RollingMachineRecipeWrapper.java @@ -1,10 +1,5 @@ package techreborn.compat.jei.rollingMachine; -import java.util.List; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - import mezz.jei.api.recipe.BlankRecipeWrapper; import mezz.jei.api.recipe.wrapper.ICraftingRecipeWrapper; import mezz.jei.plugins.vanilla.crafting.ShapedOreRecipeWrapper; @@ -18,6 +13,10 @@ import net.minecraft.item.crafting.ShapelessRecipes; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.List; + public class RollingMachineRecipeWrapper extends BlankRecipeWrapper implements ICraftingRecipeWrapper { private final ICraftingRecipeWrapper baseRecipe; diff --git a/src/main/java/techreborn/compat/jei/scrapbox/ScrapboxRecipeCategory.java b/src/main/java/techreborn/compat/jei/scrapbox/ScrapboxRecipeCategory.java index 7610b0542..ba22465c8 100644 --- a/src/main/java/techreborn/compat/jei/scrapbox/ScrapboxRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/scrapbox/ScrapboxRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.scrapbox; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiItemStackGroup; @@ -10,10 +8,11 @@ import mezz.jei.api.recipe.BlankRecipeCategory; import mezz.jei.api.recipe.IRecipeWrapper; import net.minecraft.util.StatCollector; import techreborn.client.gui.GuiCompressor; -import techreborn.client.gui.GuiGrinder; import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; + public class ScrapboxRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0}; private static final int[] OUTPUT_SLOTS = {1}; diff --git a/src/main/java/techreborn/compat/jei/scrapbox/ScrapboxRecipeHandler.java b/src/main/java/techreborn/compat/jei/scrapbox/ScrapboxRecipeHandler.java index 06aa39b09..3eceb5213 100644 --- a/src/main/java/techreborn/compat/jei/scrapbox/ScrapboxRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/scrapbox/ScrapboxRecipeHandler.java @@ -1,13 +1,13 @@ package techreborn.compat.jei.scrapbox; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.ScrapboxRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class ScrapboxRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/scrapbox/ScrapboxRecipeWrapper.java b/src/main/java/techreborn/compat/jei/scrapbox/ScrapboxRecipeWrapper.java index 84b26311b..c14639ca0 100644 --- a/src/main/java/techreborn/compat/jei/scrapbox/ScrapboxRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/scrapbox/ScrapboxRecipeWrapper.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.scrapbox; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; @@ -11,6 +9,8 @@ import techreborn.api.recipe.ScrapboxRecipe; import techreborn.client.gui.GuiCompressor; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; + public class ScrapboxRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progress; diff --git a/src/main/java/techreborn/compat/jei/vacuumFreezer/VacuumFreezerRecipeCategory.java b/src/main/java/techreborn/compat/jei/vacuumFreezer/VacuumFreezerRecipeCategory.java index 71293c83c..ec2c95ad8 100644 --- a/src/main/java/techreborn/compat/jei/vacuumFreezer/VacuumFreezerRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/vacuumFreezer/VacuumFreezerRecipeCategory.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.vacuumFreezer; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiItemStackGroup; @@ -13,6 +11,8 @@ import techreborn.client.gui.GuiVacuumFreezer; import techreborn.compat.jei.RecipeCategoryUids; import techreborn.compat.jei.RecipeUtil; +import javax.annotation.Nonnull; + public class VacuumFreezerRecipeCategory extends BlankRecipeCategory { private static final int[] INPUT_SLOTS = {0}; private static final int[] OUTPUT_SLOTS = {1}; diff --git a/src/main/java/techreborn/compat/jei/vacuumFreezer/VacuumFreezerRecipeHandler.java b/src/main/java/techreborn/compat/jei/vacuumFreezer/VacuumFreezerRecipeHandler.java index 75d125bd0..1e7fd685e 100644 --- a/src/main/java/techreborn/compat/jei/vacuumFreezer/VacuumFreezerRecipeHandler.java +++ b/src/main/java/techreborn/compat/jei/vacuumFreezer/VacuumFreezerRecipeHandler.java @@ -1,13 +1,13 @@ package techreborn.compat.jei.vacuumFreezer; -import javax.annotation.Nonnull; - import mezz.jei.api.IJeiHelpers; import mezz.jei.api.recipe.IRecipeHandler; import mezz.jei.api.recipe.IRecipeWrapper; import techreborn.api.recipe.machines.VacuumFreezerRecipe; import techreborn.compat.jei.RecipeCategoryUids; +import javax.annotation.Nonnull; + public class VacuumFreezerRecipeHandler implements IRecipeHandler { @Nonnull private final IJeiHelpers jeiHelpers; diff --git a/src/main/java/techreborn/compat/jei/vacuumFreezer/VacuumFreezerRecipeWrapper.java b/src/main/java/techreborn/compat/jei/vacuumFreezer/VacuumFreezerRecipeWrapper.java index 6e63f3daf..cc032f54e 100644 --- a/src/main/java/techreborn/compat/jei/vacuumFreezer/VacuumFreezerRecipeWrapper.java +++ b/src/main/java/techreborn/compat/jei/vacuumFreezer/VacuumFreezerRecipeWrapper.java @@ -1,7 +1,5 @@ package techreborn.compat.jei.vacuumFreezer; -import javax.annotation.Nonnull; - import mezz.jei.api.IGuiHelper; import mezz.jei.api.IJeiHelpers; import mezz.jei.api.gui.IDrawableAnimated; @@ -11,6 +9,8 @@ import techreborn.api.recipe.machines.VacuumFreezerRecipe; import techreborn.client.gui.GuiVacuumFreezer; import techreborn.compat.jei.BaseRecipeWrapper; +import javax.annotation.Nonnull; + public class VacuumFreezerRecipeWrapper extends BaseRecipeWrapper { private final IDrawableAnimated progress; diff --git a/src/main/java/techreborn/compat/minetweaker/MTFusionReactor.java b/src/main/java/techreborn/compat/minetweaker/MTFusionReactor.java index 8ce1a77b2..cc9628629 100644 --- a/src/main/java/techreborn/compat/minetweaker/MTFusionReactor.java +++ b/src/main/java/techreborn/compat/minetweaker/MTFusionReactor.java @@ -1,8 +1,5 @@ package techreborn.compat.minetweaker; -import java.util.ArrayList; -import java.util.List; - import minetweaker.IUndoableAction; import minetweaker.MineTweakerAPI; import minetweaker.api.item.IIngredient; @@ -15,6 +12,9 @@ import stanhebben.zenscript.annotations.ZenMethod; import techreborn.api.reactor.FusionReactorRecipe; import techreborn.api.reactor.FusionReactorRecipeHelper; +import java.util.ArrayList; +import java.util.List; + @ZenClass("mods.techreborn.fusionReactor") public class MTFusionReactor { diff --git a/src/main/java/techreborn/compat/minetweaker/MTGeneric.java b/src/main/java/techreborn/compat/minetweaker/MTGeneric.java index 442d2bc92..26b8dba5e 100644 --- a/src/main/java/techreborn/compat/minetweaker/MTGeneric.java +++ b/src/main/java/techreborn/compat/minetweaker/MTGeneric.java @@ -1,8 +1,5 @@ package techreborn.compat.minetweaker; -import java.util.ArrayList; -import java.util.List; - import minetweaker.IUndoableAction; import minetweaker.MineTweakerAPI; import minetweaker.api.item.IIngredient; @@ -13,6 +10,9 @@ import techreborn.api.recipe.BaseRecipe; import techreborn.api.recipe.IBaseRecipeType; import techreborn.api.recipe.RecipeHandler; +import java.util.ArrayList; +import java.util.List; + public class MTGeneric { public static String getMachineName() { return null; diff --git a/src/main/java/techreborn/compat/minetweaker/MTRollingMachine.java b/src/main/java/techreborn/compat/minetweaker/MTRollingMachine.java index 900292f21..05d083f97 100644 --- a/src/main/java/techreborn/compat/minetweaker/MTRollingMachine.java +++ b/src/main/java/techreborn/compat/minetweaker/MTRollingMachine.java @@ -1,6 +1,5 @@ package techreborn.compat.minetweaker; -import minetweaker.IUndoableAction; import minetweaker.MineTweakerAPI; import minetweaker.api.item.IIngredient; import minetweaker.api.item.IItemStack; diff --git a/src/main/java/techreborn/compat/minetweaker/MinetweakerCompat.java b/src/main/java/techreborn/compat/minetweaker/MinetweakerCompat.java index 8d1dabd1f..dab87d95a 100644 --- a/src/main/java/techreborn/compat/minetweaker/MinetweakerCompat.java +++ b/src/main/java/techreborn/compat/minetweaker/MinetweakerCompat.java @@ -1,8 +1,5 @@ package techreborn.compat.minetweaker; -import static minetweaker.api.minecraft.MineTweakerMC.getItemStack; -import static minetweaker.api.minecraft.MineTweakerMC.getLiquidStack; - import minetweaker.MineTweakerAPI; import minetweaker.api.item.IIngredient; import minetweaker.api.item.IItemStack; @@ -18,6 +15,9 @@ import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import net.minecraftforge.fml.relauncher.ReflectionHelper; import techreborn.compat.ICompatModule; +import static minetweaker.api.minecraft.MineTweakerMC.getItemStack; +import static minetweaker.api.minecraft.MineTweakerMC.getLiquidStack; + public class MinetweakerCompat implements ICompatModule { @Override diff --git a/src/main/java/techreborn/compat/recipes/RecipesBuildcraft.java b/src/main/java/techreborn/compat/recipes/RecipesBuildcraft.java index fb336755d..337fc193c 100644 --- a/src/main/java/techreborn/compat/recipes/RecipesBuildcraft.java +++ b/src/main/java/techreborn/compat/recipes/RecipesBuildcraft.java @@ -2,13 +2,13 @@ package techreborn.compat.recipes; import buildcraft.BuildCraftBuilders; import buildcraft.api.fuels.IFuel; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLServerStartingEvent; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import reborncore.api.fuel.FluidPowerManager; import reborncore.common.powerSystem.PowerSystem; diff --git a/src/main/java/techreborn/compat/recipes/RecipesThaumcraft.java b/src/main/java/techreborn/compat/recipes/RecipesThaumcraft.java index 33b3769e6..c9f655a2f 100644 --- a/src/main/java/techreborn/compat/recipes/RecipesThaumcraft.java +++ b/src/main/java/techreborn/compat/recipes/RecipesThaumcraft.java @@ -1,14 +1,14 @@ package techreborn.compat.recipes; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; -import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import ic2.api.item.IC2Items; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import net.minecraftforge.oredict.OreDictionary; import techreborn.api.recipe.RecipeHandler; import techreborn.api.recipe.machines.IndustrialSawmillRecipe; diff --git a/src/main/java/techreborn/compat/waila/WailaProviderMachines.java b/src/main/java/techreborn/compat/waila/WailaProviderMachines.java index 624e3a8fb..56e1769e4 100644 --- a/src/main/java/techreborn/compat/waila/WailaProviderMachines.java +++ b/src/main/java/techreborn/compat/waila/WailaProviderMachines.java @@ -1,8 +1,5 @@ package techreborn.compat.waila; -import java.util.ArrayList; -import java.util.List; - import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import mcp.mobius.waila.api.IWailaDataProvider; @@ -14,6 +11,9 @@ import net.minecraft.util.BlockPos; import net.minecraft.world.World; import reborncore.api.IListInfoProvider; +import java.util.ArrayList; +import java.util.List; + public class WailaProviderMachines implements IWailaDataProvider { private List info = new ArrayList(); diff --git a/src/main/java/techreborn/config/ConfigTechReborn.java b/src/main/java/techreborn/config/ConfigTechReborn.java index 2f9dc3035..d24b85f15 100644 --- a/src/main/java/techreborn/config/ConfigTechReborn.java +++ b/src/main/java/techreborn/config/ConfigTechReborn.java @@ -1,9 +1,9 @@ package techreborn.config; -import java.io.File; - import net.minecraftforge.common.config.Configuration; +import java.io.File; + public class ConfigTechReborn { private static ConfigTechReborn instance = null; public static String CATEGORY_WORLD = "world"; @@ -13,71 +13,11 @@ public class ConfigTechReborn { public static String CATEGORY_EMC = "emc"; public static String CATEGORY_INTEGRATION = "Integration"; - // WORLDGEN - public static boolean GalenaOreTrue; - public static int GalenaOreRare; - - public static boolean IridiumOreTrue; - public static int IridiumOreRare; - - public static boolean RubyOreTrue; - public static int RubyOreRare; - - public static boolean SapphireOreTrue; - public static int SapphireOreRare; - - public static boolean BauxiteOreTrue; - public static int BauxiteOreRare; - - public static boolean TetrahedriteOreTrue; - public static int TetrahedriteOreRare; - - public static boolean CassiteriteOreTrue; - public static int CassiteriteOreRare; - - public static boolean LeadOreTrue; - public static int LeadOreRare; - - public static boolean SilverOreTrue; - public static int SilverOreRare; - - public static boolean CopperOreTrue; - public static int CopperOreRare; - - public static boolean TinOreTrue; - public static int TinOreRare; - - public static boolean PyriteOreTrue; - public static int PyriteOreRare; - - public static boolean CinnabarOreTrue; - public static int CinnabarOreRare; - - public static boolean SphaleriteOreTrue; - public static int SphaleriteOreRare; - - public static boolean TungstenOreTrue; - public static int TungstenOreRare; - - public static boolean SheldoniteOreTrue; - public static int SheldoniteOreRare; - - public static boolean PeridotOreTrue; - public static int PeridotOreRare; - - public static boolean SodaliteOreTrue; - public static int SodaliteOreRare; - public static double FortuneSecondaryOreMultiplierPerLevel; - public static boolean RubberTreeGen; - public static boolean RubberSaplingLoot; - public static boolean TinIngotsLoot; - public static boolean CopperIngotsLoot; - public static boolean SteelIngotsLoot; public static boolean UninsulatedElectocutionSound; @@ -226,75 +166,6 @@ public class ConfigTechReborn { } public static void Configs() { - GalenaOreTrue = config.get(CATEGORY_WORLD, "Generate Galena Ore", true, "Allow GalenaOre to generate in world") - .getBoolean(true); - - IridiumOreTrue = config - .get(CATEGORY_WORLD, "Generate Iridium Ore", true, "Allow Iridium Ore to generate in world") - .getBoolean(true); - - RubyOreTrue = config.get(CATEGORY_WORLD, "Generate Ruby Ore", true, "Allow Ruby Ore to generate in world") - .getBoolean(true); - - SapphireOreTrue = config - .get(CATEGORY_WORLD, "Generate Sapphire Ore", true, "Allow Sapphire Ore to generate in world") - .getBoolean(true); - - BauxiteOreTrue = config - .get(CATEGORY_WORLD, "Generate Bauxite Ore", true, "Allow Bauxite Ore to generate in world") - .getBoolean(true); - - TetrahedriteOreTrue = config - .get(CATEGORY_WORLD, "Generate Tetrahedrite Ore", true, "Allow Tetrahedrite Ore to generate in world") - .getBoolean(true); - - CassiteriteOreTrue = config - .get(CATEGORY_WORLD, "Generate Cassiterite Ore", true, "Allow Cassiterite Ore to generate in world") - .getBoolean(true); - - LeadOreTrue = config.get(CATEGORY_WORLD, "Generate Lead Ore", true, "Allow Lead Ore to generate in world") - .getBoolean(true); - - SilverOreTrue = config.get(CATEGORY_WORLD, "Generate Silver Ore", true, "Allow Silver Ore to generate in world") - .getBoolean(true); - - CopperOreTrue = config.get(CATEGORY_WORLD, "Generate Copper Ore", true, "Allow Copper Ore to generate in world") - .getBoolean(true); - - TinOreTrue = config.get(CATEGORY_WORLD, "Generate Tin Ore", true, "Allow Tin Ore to generate in world") - .getBoolean(true); - - PyriteOreTrue = config.get(CATEGORY_WORLD, "Generate Pyrite Ore", true, "Allow Pyrite Ore to generate in world") - .getBoolean(true); - - CinnabarOreTrue = config - .get(CATEGORY_WORLD, "Generate Cinnabar Ore", true, "Allow Cinnabar Ore to generate in world") - .getBoolean(true); - - SphaleriteOreTrue = config - .get(CATEGORY_WORLD, "Generate Sphalerite Ore", true, "Allow Sphalerite Ore to generate in world") - .getBoolean(true); - - TungstenOreTrue = config - .get(CATEGORY_WORLD, "Generate Tungsten Ore", true, "Allow Tungsten Ore to generate in world") - .getBoolean(true); - - SheldoniteOreTrue = config - .get(CATEGORY_WORLD, "Generate Sheldonite Ore", true, "Allow Sheldonite Ore to generate in world") - .getBoolean(true); - - PeridotOreTrue = config - .get(CATEGORY_WORLD, "Generate Peridot Ore", true, "Allow Peridot Ore to generate in world") - .getBoolean(true); - - SodaliteOreTrue = config - .get(CATEGORY_WORLD, "Generate Sodalite Ore", true, "Allow Sodalite Ore to generate in world") - .getBoolean(true); - - RubberTreeGen = config - .get(CATEGORY_WORLD, "Rubber Tree Generation", true, "Allow Rubber Trees to generate in world") - .getBoolean(true); - RubberSaplingLoot = config .get(CATEGORY_WORLD, "Rubber Sapling Loot", true, "Allow Rubber Saplings to generate in loot chests") .getBoolean(true); @@ -311,64 +182,6 @@ public class ConfigTechReborn { .get(CATEGORY_WORLD, "Steel Ingots Loot", true, "Allow Steel Ingots to generate in loot chests") .getBoolean(true); - GalenaOreRare = config.get(CATEGORY_WORLD, "Galena Ore vein size", 8, "Set the max vein size for Galena Ore") - .getInt(); - - CopperOreRare = config.get(CATEGORY_WORLD, "Copper Ore vein size", 8, "Set the max vein size for Copper Ore") - .getInt(); - - TinOreRare = config.get(CATEGORY_WORLD, "Tin Ore vein size", 8, "Set the max vein size for Tin Ore") - .getInt(); - - IridiumOreRare = config.get(CATEGORY_WORLD, "Iridium Ore vein size", 1, "Set the max vein size for Iridium Ore") - .getInt(); - - RubyOreRare = config.get(CATEGORY_WORLD, "Ruby Ore vein size", 6, "Set the max vein size for Ruby Ore") - .getInt(); - - SapphireOreRare = config - .get(CATEGORY_WORLD, "Sapphire Ore vein size", 6, "Set the max vein size for Sapphire Ore").getInt(); - - BauxiteOreRare = config.get(CATEGORY_WORLD, "Bauxite Ore vein size", 6, "Set the max vein size for Bauxite Ore") - .getInt(); - - PyriteOreRare = config.get(CATEGORY_WORLD, "Pyrite Ore vein size", 6, "Set the max vein size for Pyrite Ore") - .getInt(); - - CinnabarOreRare = config - .get(CATEGORY_WORLD, "Cinnabar Ore vein size", 6, "Set the max vein size for Cinnabar Ore").getInt(); - - SphaleriteOreRare = config - .get(CATEGORY_WORLD, "Sphalerite Ore vein size", 6, "Set the max vein size for Sphalerite Ore") - .getInt(); - - TungstenOreRare = config - .get(CATEGORY_WORLD, "Tungsten Ore vein size", 6, "Set the max vein size for Tungsten Ore").getInt(); - - SheldoniteOreRare = config - .get(CATEGORY_WORLD, "Sheldonite Ore vein size", 6, "Set the max vein size for Sheldonite Ore") - .getInt(); - - PeridotOreRare = config.get(CATEGORY_WORLD, "Peridot Ore vein size", 6, "Set the max vein size for Peridot Ore") - .getInt(); - - SodaliteOreRare = config - .get(CATEGORY_WORLD, "Sodalite Ore vein size", 6, "Set the max vein size for Sodalite Ore").getInt(); - - TetrahedriteOreRare = config - .get(CATEGORY_WORLD, "Tetrahedrite Ore vein size", 6, "Set the max vein size for Tetrahedrite Ore") - .getInt(); - - CassiteriteOreRare = config - .get(CATEGORY_WORLD, "Cassiterite Ore vein size", 6, "Set the max vein size for Cassiterite Ore") - .getInt(); - - LeadOreRare = config.get(CATEGORY_WORLD, "Lead Ore vein size", 6, "Set the max vein size for Lead Ore") - .getInt(); - - SilverOreRare = config.get(CATEGORY_WORLD, "Silver Ore vein size", 6, "Set the max vein size for Silver Ore") - .getInt(); - FortuneSecondaryOreMultiplierPerLevel = config.get(CATEGORY_WORLD, "FortuneSecondaryOreMultiplierPerLevel", 0.5, "FortuneSecondaryOreMultiplierPerLevel").getDouble(); diff --git a/src/main/java/techreborn/config/TechRebornConfigGui.java b/src/main/java/techreborn/config/TechRebornConfigGui.java index e94a7682f..866c5def2 100644 --- a/src/main/java/techreborn/config/TechRebornConfigGui.java +++ b/src/main/java/techreborn/config/TechRebornConfigGui.java @@ -1,8 +1,5 @@ package techreborn.config; -import java.util.ArrayList; -import java.util.List; - import net.minecraft.client.gui.GuiScreen; import net.minecraft.util.StatCollector; import net.minecraftforge.common.config.ConfigElement; @@ -13,6 +10,9 @@ import net.minecraftforge.fml.client.config.GuiConfigEntries; import net.minecraftforge.fml.client.config.GuiConfigEntries.CategoryEntry; import net.minecraftforge.fml.client.config.IConfigElement; +import java.util.ArrayList; +import java.util.List; + public class TechRebornConfigGui extends GuiConfig { public TechRebornConfigGui(GuiScreen top) { super(top, getConfigCategories(), "TechReborn", false, false, GuiConfig diff --git a/src/main/java/techreborn/config/TechRebornGUIFactory.java b/src/main/java/techreborn/config/TechRebornGUIFactory.java index 795616339..db9b0e1f5 100644 --- a/src/main/java/techreborn/config/TechRebornGUIFactory.java +++ b/src/main/java/techreborn/config/TechRebornGUIFactory.java @@ -1,11 +1,11 @@ package techreborn.config; -import java.util.Set; - import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraftforge.fml.client.IModGuiFactory; +import java.util.Set; + public class TechRebornGUIFactory implements IModGuiFactory { @Override public void initialize(Minecraft minecraftInstance) { diff --git a/src/main/java/techreborn/dispenser/BehaviorDispenseScrapbox.java b/src/main/java/techreborn/dispenser/BehaviorDispenseScrapbox.java index 4b0b61889..7e0256053 100644 --- a/src/main/java/techreborn/dispenser/BehaviorDispenseScrapbox.java +++ b/src/main/java/techreborn/dispenser/BehaviorDispenseScrapbox.java @@ -4,11 +4,9 @@ import net.minecraft.block.BlockDispenser; import net.minecraft.dispenser.BehaviorDefaultDispenseItem; import net.minecraft.dispenser.IBlockSource; import net.minecraft.dispenser.IPosition; -import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import techreborn.api.ScrapboxList; -import techreborn.init.ModItems; public class BehaviorDispenseScrapbox extends BehaviorDefaultDispenseItem { diff --git a/src/main/java/techreborn/entitys/EntityNukePrimed.java b/src/main/java/techreborn/entitys/EntityNukePrimed.java new file mode 100644 index 000000000..890994684 --- /dev/null +++ b/src/main/java/techreborn/entitys/EntityNukePrimed.java @@ -0,0 +1,60 @@ +package techreborn.entitys; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityTNTPrimed; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumParticleTypes; +import net.minecraft.world.World; +import reborncore.common.explosion.RebornExplosion; + +/** + * Created by Mark on 13/03/2016. + */ +public class EntityNukePrimed extends EntityTNTPrimed { + + int nukeFuseTime = 400; + + public EntityNukePrimed(World world) { + super(world); + this.fuse = nukeFuseTime; + } + + public EntityNukePrimed(World world, double x, double y, double z, EntityLivingBase tntPlacedBy) { + super(world, x, y, z, tntPlacedBy); + this.fuse = nukeFuseTime; + } + + @Override + public void onUpdate() { + + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + this.motionY -= 0.03999999910593033D; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + this.motionX *= 0.9800000190734863D; + this.motionY *= 0.9800000190734863D; + this.motionZ *= 0.9800000190734863D; + if (this.onGround) { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + this.motionY *= -0.5D; + } + if (this.fuse-- <= 0) { + this.setDead(); + if (!this.worldObj.isRemote) { + this.explodeNuke(); + } + } else { + this.handleWaterMovement(); + this.worldObj.spawnParticle(EnumParticleTypes.SMOKE_LARGE, this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D, new int[0]); + } + } + + public void explodeNuke() { + RebornExplosion nukeExplosion = new RebornExplosion(new BlockPos(this.posX, this.posY, this.posZ), worldObj, 40); + nukeExplosion.explode(); + } + + +} diff --git a/src/main/java/techreborn/events/OreUnifier.java b/src/main/java/techreborn/events/OreUnifier.java index b9206e1cd..086fe3d81 100644 --- a/src/main/java/techreborn/events/OreUnifier.java +++ b/src/main/java/techreborn/events/OreUnifier.java @@ -1,7 +1,5 @@ package techreborn.events; -import java.util.HashMap; - import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -11,6 +9,8 @@ import net.minecraftforge.oredict.OreDictionary; import reborncore.common.util.ItemUtils; import techreborn.config.ConfigTechReborn; +import java.util.HashMap; + public class OreUnifier { public static HashMap oreHash = new HashMap(); diff --git a/src/main/java/techreborn/events/TRTickHandler.java b/src/main/java/techreborn/events/TRTickHandler.java index 42ef912f9..a1d681916 100644 --- a/src/main/java/techreborn/events/TRTickHandler.java +++ b/src/main/java/techreborn/events/TRTickHandler.java @@ -9,10 +9,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import techreborn.init.ModItems; import techreborn.power.PowerTickEvent; -import techreborn.power.TRPowerNet; - -import java.util.ArrayList; -import java.util.List; public class TRTickHandler { diff --git a/src/main/java/techreborn/init/ModBlocks.java b/src/main/java/techreborn/init/ModBlocks.java index 07b3afc83..ea1353d83 100644 --- a/src/main/java/techreborn/init/ModBlocks.java +++ b/src/main/java/techreborn/init/ModBlocks.java @@ -8,7 +8,31 @@ import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.OreDictionary; import reborncore.common.tile.TileMachineBase; import techreborn.Core; -import techreborn.blocks.*; +import techreborn.blocks.BlockChunkLoader; +import techreborn.blocks.BlockComputerCube; +import techreborn.blocks.BlockDigitalChest; +import techreborn.blocks.BlockElectricCraftingTable; +import techreborn.blocks.BlockFusionCoil; +import techreborn.blocks.BlockFusionControlComputer; +import techreborn.blocks.BlockHighlyAdvancedMachine; +import techreborn.blocks.BlockIronFence; +import techreborn.blocks.BlockIronFurnace; +import techreborn.blocks.BlockMachineCasing; +import techreborn.blocks.BlockMachineFrame; +import techreborn.blocks.BlockNuke; +import techreborn.blocks.BlockOre; +import techreborn.blocks.BlockOre2; +import techreborn.blocks.BlockPlayerDetector; +import techreborn.blocks.BlockQuantumChest; +import techreborn.blocks.BlockQuantumTank; +import techreborn.blocks.BlockReinforcedGlass; +import techreborn.blocks.BlockRubberLeaves; +import techreborn.blocks.BlockRubberLog; +import techreborn.blocks.BlockRubberPlank; +import techreborn.blocks.BlockRubberSapling; +import techreborn.blocks.BlockStorage; +import techreborn.blocks.BlockStorage2; +import techreborn.blocks.BlockSupercondensator; import techreborn.blocks.generator.BlockDieselGenerator; import techreborn.blocks.generator.BlockDragonEggSiphoner; import techreborn.blocks.generator.BlockGasTurbine; @@ -59,9 +83,39 @@ import techreborn.itemblocks.ItemBlockQuantumTank; import techreborn.itemblocks.ItemBlockRubberSapling; import techreborn.itemblocks.ItemBlockStorage; import techreborn.itemblocks.ItemBlockStorage2; -import techreborn.tiles.*; +import techreborn.tiles.TileAesu; +import techreborn.tiles.TileAlloyFurnace; +import techreborn.tiles.TileAlloySmelter; +import techreborn.tiles.TileAssemblingMachine; +import techreborn.tiles.TileBlastFurnace; +import techreborn.tiles.TileCentrifuge; +import techreborn.tiles.TileChargeBench; +import techreborn.tiles.TileChemicalReactor; +import techreborn.tiles.TileChunkLoader; +import techreborn.tiles.TileDigitalChest; +import techreborn.tiles.TileImplosionCompressor; +import techreborn.tiles.TileIndustrialElectrolyzer; +import techreborn.tiles.TileIndustrialGrinder; +import techreborn.tiles.TileIndustrialSawmill; +import techreborn.tiles.TileIronFurnace; +import techreborn.tiles.TileMachineCasing; +import techreborn.tiles.TileMatterFabricator; +import techreborn.tiles.TilePlayerDectector; +import techreborn.tiles.TileQuantumChest; +import techreborn.tiles.TileQuantumTank; +import techreborn.tiles.TileRollingMachine; +import techreborn.tiles.TileVacuumFreezer; import techreborn.tiles.fusionReactor.TileEntityFusionController; -import techreborn.tiles.generator.*; +import techreborn.tiles.generator.TileDieselGenerator; +import techreborn.tiles.generator.TileDragonEggSiphoner; +import techreborn.tiles.generator.TileGasTurbine; +import techreborn.tiles.generator.TileGenerator; +import techreborn.tiles.generator.TileHeatGenerator; +import techreborn.tiles.generator.TileSemifluidGenerator; +import techreborn.tiles.generator.TileSolarPanel; +import techreborn.tiles.generator.TileThermalGenerator; +import techreborn.tiles.generator.TileWaterMill; +import techreborn.tiles.generator.TileWindMill; import techreborn.tiles.idsu.TileIDSU; import techreborn.tiles.lesu.TileLesu; import techreborn.tiles.lesu.TileLesuStorage; @@ -131,6 +185,7 @@ public class ModBlocks { public static Block machineframe; public static Block reinforcedglass; public static Block ironFurnace; + public static Block nuke; public static Block rubberLog; public static Block rubberLeaves; @@ -368,6 +423,10 @@ public class ModBlocks { ironFurnace = new BlockIronFurnace(); GameRegistry.registerBlock(ironFurnace, "ironfurnace"); GameRegistry.registerTileEntity(TileIronFurnace.class, "TileIronFurnaceTR"); + + nuke = new BlockNuke(); + GameRegistry.registerBlock(nuke, "nuke"); + registerOreDict(); Core.logHelper.info("TechReborns Blocks Loaded"); } diff --git a/src/main/java/techreborn/init/ModItems.java b/src/main/java/techreborn/init/ModItems.java index 47e9e411b..ad5cdc2ef 100644 --- a/src/main/java/techreborn/init/ModItems.java +++ b/src/main/java/techreborn/init/ModItems.java @@ -12,11 +12,44 @@ import reborncore.common.powerSystem.PoweredItem; import reborncore.common.util.BucketHandler; import techreborn.Core; import techreborn.events.OreUnifier; -import techreborn.items.*; +import techreborn.items.ItemCells; +import techreborn.items.ItemCrushedOre; +import techreborn.items.ItemDusts; +import techreborn.items.ItemDustsSmall; +import techreborn.items.ItemEnergyCrystal; +import techreborn.items.ItemGems; +import techreborn.items.ItemIngots; +import techreborn.items.ItemLapotronCrystal; +import techreborn.items.ItemLapotronicOrb; +import techreborn.items.ItemLithiumBattery; +import techreborn.items.ItemMissingRecipe; +import techreborn.items.ItemNuggets; +import techreborn.items.ItemParts; +import techreborn.items.ItemPlates; +import techreborn.items.ItemPurifiedCrushedOre; +import techreborn.items.ItemReBattery; +import techreborn.items.ItemScrapBox; +import techreborn.items.ItemUUmatter; import techreborn.items.armor.ItemLapotronPack; import techreborn.items.armor.ItemLithiumBatpack; -import techreborn.items.tools.*; -import techreborn.parts.ItemCables; +import techreborn.items.tools.ItemAdvancedChainsaw; +import techreborn.items.tools.ItemAdvancedDrill; +import techreborn.items.tools.ItemCloakingDevice; +import techreborn.items.tools.ItemDiamondChainsaw; +import techreborn.items.tools.ItemDiamondDrill; +import techreborn.items.tools.ItemDiamondJackhammer; +import techreborn.items.tools.ItemFluidbucket; +import techreborn.items.tools.ItemHammer; +import techreborn.items.tools.ItemIronChainsaw; +import techreborn.items.tools.ItemIronDrill; +import techreborn.items.tools.ItemIronJackhammer; +import techreborn.items.tools.ItemNanosaber; +import techreborn.items.tools.ItemOmniTool; +import techreborn.items.tools.ItemRockCutter; +import techreborn.items.tools.ItemSteelJackhammer; +import techreborn.items.tools.ItemTechManual; +import techreborn.items.tools.ItemTreeTap; +import techreborn.items.tools.ItemWrench; public class ModItems { diff --git a/src/main/java/techreborn/init/ModLoot.java b/src/main/java/techreborn/init/ModLoot.java index 16fe2dae8..25da3be4a 100644 --- a/src/main/java/techreborn/init/ModLoot.java +++ b/src/main/java/techreborn/init/ModLoot.java @@ -1,13 +1,13 @@ package techreborn.init; -import java.util.Arrays; - import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandomChestContent; import net.minecraftforge.common.ChestGenHooks; import techreborn.config.ConfigTechReborn; import techreborn.items.ItemIngots; +import java.util.Arrays; + public class ModLoot { public static WeightedRandomChestContent rubberSaplingLoot = new WeightedRandomChestContent(new ItemStack(ModBlocks.rubberSapling), 1, 3, 25); diff --git a/src/main/java/techreborn/init/ModParts.java b/src/main/java/techreborn/init/ModParts.java index e41ed04c4..6044e1c63 100644 --- a/src/main/java/techreborn/init/ModParts.java +++ b/src/main/java/techreborn/init/ModParts.java @@ -1,9 +1,9 @@ package techreborn.init; -import java.util.HashMap; - import net.minecraft.item.ItemStack; +import java.util.HashMap; + public class ModParts { public static HashMap stackCable = new HashMap(); diff --git a/src/main/java/techreborn/init/ModRecipes.java b/src/main/java/techreborn/init/ModRecipes.java index 37a0b1d9e..bc73e45b8 100644 --- a/src/main/java/techreborn/init/ModRecipes.java +++ b/src/main/java/techreborn/init/ModRecipes.java @@ -1,9 +1,5 @@ package techreborn.init; -import java.security.InvalidParameterException; - -import org.apache.commons.lang3.ArrayUtils; - import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -13,6 +9,7 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.OreDictionary; +import org.apache.commons.lang3.ArrayUtils; import reborncore.common.util.CraftingHelper; import reborncore.common.util.OreUtil; import techreborn.Core; @@ -53,6 +50,8 @@ import techreborn.items.ItemPlates; import techreborn.parts.ItemStandaloneCables; import techreborn.utils.RecipeUtils; +import java.security.InvalidParameterException; + public class ModRecipes { public static ConfigTechReborn config; diff --git a/src/main/java/techreborn/init/RecipeCompact.java b/src/main/java/techreborn/init/RecipeCompact.java index 77f1cfcb0..5179df699 100644 --- a/src/main/java/techreborn/init/RecipeCompact.java +++ b/src/main/java/techreborn/init/RecipeCompact.java @@ -1,12 +1,5 @@ package techreborn.init; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; - import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -17,6 +10,13 @@ import techreborn.items.ItemIngots; import techreborn.items.ItemParts; import techreborn.items.ItemPlates; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; + public class RecipeCompact implements IRecipeCompact { HashMap recipes = new HashMap<>(); @@ -83,7 +83,7 @@ public class RecipeCompact implements IRecipeCompact { } public void saveMissingItems(File mcDir) throws IOException { - File missingItemsFile = new File(mcDir, "TechRebornMissingItems.txt"); + File missingItemsFile = new File(mcDir, "missingItems.txt"); if(missingItemsFile.exists()){ missingItemsFile.delete(); } diff --git a/src/main/java/techreborn/itemblocks/ItemBlockAesu.java b/src/main/java/techreborn/itemblocks/ItemBlockAesu.java index cff2a5797..d734d1daa 100644 --- a/src/main/java/techreborn/itemblocks/ItemBlockAesu.java +++ b/src/main/java/techreborn/itemblocks/ItemBlockAesu.java @@ -1,7 +1,5 @@ package techreborn.itemblocks; -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; @@ -19,6 +17,8 @@ import reborncore.common.powerSystem.PowerSystem; import techreborn.init.ModBlocks; import techreborn.tiles.TileAesu; +import java.util.List; + public class ItemBlockAesu extends ItemBlock { public ItemBlockAesu(Block p_i45328_1_) { diff --git a/src/main/java/techreborn/itemblocks/ItemBlockDigitalChest.java b/src/main/java/techreborn/itemblocks/ItemBlockDigitalChest.java index dc28200a7..eae6ace27 100644 --- a/src/main/java/techreborn/itemblocks/ItemBlockDigitalChest.java +++ b/src/main/java/techreborn/itemblocks/ItemBlockDigitalChest.java @@ -1,7 +1,5 @@ package techreborn.itemblocks; -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -14,6 +12,8 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import techreborn.tiles.TileDigitalChest; +import java.util.List; + public class ItemBlockDigitalChest extends ItemBlock { public ItemBlockDigitalChest(Block p_i45328_1_) { diff --git a/src/main/java/techreborn/itemblocks/ItemBlockQuantumChest.java b/src/main/java/techreborn/itemblocks/ItemBlockQuantumChest.java index bf6338ae9..1f4c59706 100644 --- a/src/main/java/techreborn/itemblocks/ItemBlockQuantumChest.java +++ b/src/main/java/techreborn/itemblocks/ItemBlockQuantumChest.java @@ -1,7 +1,5 @@ package techreborn.itemblocks; -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -14,6 +12,8 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import techreborn.tiles.TileQuantumChest; +import java.util.List; + public class ItemBlockQuantumChest extends ItemBlock { public ItemBlockQuantumChest(Block p_i45328_1_) { diff --git a/src/main/java/techreborn/items/ItemCells.java b/src/main/java/techreborn/items/ItemCells.java index 7b43de23f..442c94388 100644 --- a/src/main/java/techreborn/items/ItemCells.java +++ b/src/main/java/techreborn/items/ItemCells.java @@ -1,7 +1,5 @@ package techreborn.items; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -14,6 +12,8 @@ import techreborn.client.TechRebornCreativeTab; import techreborn.init.ModItems; import techreborn.lib.ModInfo; +import java.util.List; + public class ItemCells extends ItemTextureBase implements IFluidContainerItem { public static ItemStack getCellByName(String name, int count) { diff --git a/src/main/java/techreborn/items/ItemCrushedOre.java b/src/main/java/techreborn/items/ItemCrushedOre.java index 1e12a8001..bbe66c263 100644 --- a/src/main/java/techreborn/items/ItemCrushedOre.java +++ b/src/main/java/techreborn/items/ItemCrushedOre.java @@ -1,8 +1,5 @@ package techreborn.items; -import java.security.InvalidParameterException; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -10,6 +7,9 @@ import techreborn.client.TechRebornCreativeTabMisc; import techreborn.init.ModItems; import techreborn.lib.ModInfo; +import java.security.InvalidParameterException; +import java.util.List; + public class ItemCrushedOre extends ItemTextureBase { public static ItemStack getCrushedOreByName(String name, int count) { for (int i = 0; i < types.length; i++) { diff --git a/src/main/java/techreborn/items/ItemDusts.java b/src/main/java/techreborn/items/ItemDusts.java index 61fefd58a..ee7e831b0 100644 --- a/src/main/java/techreborn/items/ItemDusts.java +++ b/src/main/java/techreborn/items/ItemDusts.java @@ -1,8 +1,5 @@ package techreborn.items; -import java.security.InvalidParameterException; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; @@ -11,6 +8,9 @@ import techreborn.client.TechRebornCreativeTabMisc; import techreborn.init.ModItems; import techreborn.lib.ModInfo; +import java.security.InvalidParameterException; +import java.util.List; + public class ItemDusts extends ItemTextureBase { public static ItemStack getDustByName(String name, int count) { for (int i = 0; i < types.length; i++) { diff --git a/src/main/java/techreborn/items/ItemDustsSmall.java b/src/main/java/techreborn/items/ItemDustsSmall.java index 1592c4f56..8074d8d9e 100644 --- a/src/main/java/techreborn/items/ItemDustsSmall.java +++ b/src/main/java/techreborn/items/ItemDustsSmall.java @@ -1,8 +1,5 @@ package techreborn.items; -import java.security.InvalidParameterException; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -10,6 +7,9 @@ import techreborn.client.TechRebornCreativeTabMisc; import techreborn.init.ModItems; import techreborn.lib.ModInfo; +import java.security.InvalidParameterException; +import java.util.List; + public class ItemDustsSmall extends ItemTextureBase { public static ItemStack getSmallDustByName(String name, int count) { diff --git a/src/main/java/techreborn/items/ItemEnergyCrystal.java b/src/main/java/techreborn/items/ItemEnergyCrystal.java index 9bd9e35ef..591407138 100644 --- a/src/main/java/techreborn/items/ItemEnergyCrystal.java +++ b/src/main/java/techreborn/items/ItemEnergyCrystal.java @@ -3,7 +3,6 @@ package techreborn.items; import net.minecraft.item.ItemStack; import reborncore.api.power.IEnergyItemInfo; import techreborn.client.TechRebornCreativeTab; -import techreborn.config.ConfigTechReborn; public class ItemEnergyCrystal extends ItemTextureBase implements IEnergyItemInfo { diff --git a/src/main/java/techreborn/items/ItemGems.java b/src/main/java/techreborn/items/ItemGems.java index d406930cf..eba89ed6e 100644 --- a/src/main/java/techreborn/items/ItemGems.java +++ b/src/main/java/techreborn/items/ItemGems.java @@ -1,8 +1,5 @@ package techreborn.items; -import java.security.InvalidParameterException; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -10,6 +7,9 @@ import techreborn.client.TechRebornCreativeTabMisc; import techreborn.init.ModItems; import techreborn.lib.ModInfo; +import java.security.InvalidParameterException; +import java.util.List; + public class ItemGems extends ItemTextureBase { public static ItemStack getGemByName(String name, int count) { diff --git a/src/main/java/techreborn/items/ItemIngots.java b/src/main/java/techreborn/items/ItemIngots.java index b9395a285..a7b7af5cf 100644 --- a/src/main/java/techreborn/items/ItemIngots.java +++ b/src/main/java/techreborn/items/ItemIngots.java @@ -1,8 +1,5 @@ package techreborn.items; -import java.security.InvalidParameterException; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -10,6 +7,9 @@ import techreborn.client.TechRebornCreativeTabMisc; import techreborn.init.ModItems; import techreborn.lib.ModInfo; +import java.security.InvalidParameterException; +import java.util.List; + public class ItemIngots extends ItemTextureBase { public static ItemStack getIngotByName(String name, int count) { for (int i = 0; i < types.length; i++) { diff --git a/src/main/java/techreborn/items/ItemLapotronCrystal.java b/src/main/java/techreborn/items/ItemLapotronCrystal.java index b0220a789..d872216c7 100644 --- a/src/main/java/techreborn/items/ItemLapotronCrystal.java +++ b/src/main/java/techreborn/items/ItemLapotronCrystal.java @@ -3,7 +3,6 @@ package techreborn.items; import net.minecraft.item.ItemStack; import reborncore.api.power.IEnergyItemInfo; import techreborn.client.TechRebornCreativeTab; -import techreborn.config.ConfigTechReborn; public class ItemLapotronCrystal extends ItemTextureBase implements IEnergyItemInfo { diff --git a/src/main/java/techreborn/items/ItemLithiumBattery.java b/src/main/java/techreborn/items/ItemLithiumBattery.java index cafbbcc82..1c09c7b81 100644 --- a/src/main/java/techreborn/items/ItemLithiumBattery.java +++ b/src/main/java/techreborn/items/ItemLithiumBattery.java @@ -1,7 +1,5 @@ package techreborn.items; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -11,6 +9,8 @@ import reborncore.api.power.IEnergyItemInfo; import reborncore.common.powerSystem.PoweredItem; import techreborn.client.TechRebornCreativeTab; +import java.util.List; + public class ItemLithiumBattery extends ItemTextureBase implements IEnergyItemInfo { public ItemLithiumBattery() { diff --git a/src/main/java/techreborn/items/ItemNuggets.java b/src/main/java/techreborn/items/ItemNuggets.java index 856a42211..12ed8d054 100644 --- a/src/main/java/techreborn/items/ItemNuggets.java +++ b/src/main/java/techreborn/items/ItemNuggets.java @@ -1,8 +1,5 @@ package techreborn.items; -import java.security.InvalidParameterException; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -10,6 +7,9 @@ import techreborn.client.TechRebornCreativeTabMisc; import techreborn.init.ModItems; import techreborn.lib.ModInfo; +import java.security.InvalidParameterException; +import java.util.List; + public class ItemNuggets extends ItemTextureBase { public static ItemStack getNuggetByName(String name, int count) { diff --git a/src/main/java/techreborn/items/ItemParts.java b/src/main/java/techreborn/items/ItemParts.java index 88d714e7f..08be719b0 100644 --- a/src/main/java/techreborn/items/ItemParts.java +++ b/src/main/java/techreborn/items/ItemParts.java @@ -1,8 +1,5 @@ package techreborn.items; -import java.security.InvalidParameterException; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -14,6 +11,9 @@ import techreborn.client.TechRebornCreativeTab; import techreborn.init.ModItems; import techreborn.lib.ModInfo; +import java.security.InvalidParameterException; +import java.util.List; + public class ItemParts extends ItemTextureBase { public static ItemStack getPartByName(String name, int count) { for (int i = 0; i < types.length; i++) { diff --git a/src/main/java/techreborn/items/ItemPlates.java b/src/main/java/techreborn/items/ItemPlates.java index 73b6a4e39..22bac53e6 100644 --- a/src/main/java/techreborn/items/ItemPlates.java +++ b/src/main/java/techreborn/items/ItemPlates.java @@ -1,8 +1,5 @@ package techreborn.items; -import java.security.InvalidParameterException; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -10,6 +7,9 @@ import techreborn.client.TechRebornCreativeTabMisc; import techreborn.init.ModItems; import techreborn.lib.ModInfo; +import java.security.InvalidParameterException; +import java.util.List; + public class ItemPlates extends ItemTextureBase { public static ItemStack getPlateByName(String name, int count) { diff --git a/src/main/java/techreborn/items/ItemPurifiedCrushedOre.java b/src/main/java/techreborn/items/ItemPurifiedCrushedOre.java index a81bab8d9..c0ff62860 100644 --- a/src/main/java/techreborn/items/ItemPurifiedCrushedOre.java +++ b/src/main/java/techreborn/items/ItemPurifiedCrushedOre.java @@ -1,8 +1,5 @@ package techreborn.items; -import java.security.InvalidParameterException; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -10,6 +7,9 @@ import techreborn.client.TechRebornCreativeTabMisc; import techreborn.init.ModItems; import techreborn.lib.ModInfo; +import java.security.InvalidParameterException; +import java.util.List; + public class ItemPurifiedCrushedOre extends ItemTextureBase { public static ItemStack getPurifiedCrushedOreByName(String name, int count) { diff --git a/src/main/java/techreborn/items/ItemReBattery.java b/src/main/java/techreborn/items/ItemReBattery.java index 90769fea0..8a4ef54bf 100644 --- a/src/main/java/techreborn/items/ItemReBattery.java +++ b/src/main/java/techreborn/items/ItemReBattery.java @@ -1,7 +1,5 @@ package techreborn.items; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -11,6 +9,8 @@ import reborncore.api.power.IEnergyItemInfo; import reborncore.common.powerSystem.PoweredItem; import techreborn.client.TechRebornCreativeTab; +import java.util.List; + public class ItemReBattery extends ItemTextureBase implements IEnergyItemInfo { public ItemReBattery() { diff --git a/src/main/java/techreborn/items/ItemScrapBox.java b/src/main/java/techreborn/items/ItemScrapBox.java index cd7b3098e..2f8f47726 100644 --- a/src/main/java/techreborn/items/ItemScrapBox.java +++ b/src/main/java/techreborn/items/ItemScrapBox.java @@ -1,15 +1,9 @@ package techreborn.items; -import java.util.List; -import java.util.Random; - import me.modmuss50.jsonDestroyer.api.ITexturedItem; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import net.minecraft.util.ChatComponentText; import net.minecraft.world.World; import reborncore.RebornCore; import techreborn.api.ScrapboxList; diff --git a/src/main/java/techreborn/items/ItemUpgrade.java b/src/main/java/techreborn/items/ItemUpgrade.java index ee1f1a30e..1ab76271f 100644 --- a/src/main/java/techreborn/items/ItemUpgrade.java +++ b/src/main/java/techreborn/items/ItemUpgrade.java @@ -1,8 +1,5 @@ package techreborn.items; -import java.security.InvalidParameterException; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -11,6 +8,9 @@ import techreborn.api.upgrade.IMachineUpgrade; import techreborn.client.TechRebornCreativeTabMisc; import techreborn.init.ModItems; +import java.security.InvalidParameterException; +import java.util.List; + public class ItemUpgrade extends ItemTR implements IMachineUpgrade { public static ItemStack getUpgradeByName(String name, int count) { diff --git a/src/main/java/techreborn/items/armor/ItemLapotronPack.java b/src/main/java/techreborn/items/armor/ItemLapotronPack.java index f32e16ebc..d5a1bae99 100644 --- a/src/main/java/techreborn/items/armor/ItemLapotronPack.java +++ b/src/main/java/techreborn/items/armor/ItemLapotronPack.java @@ -1,8 +1,6 @@ package techreborn.items.armor; -import java.util.List; - import me.modmuss50.jsonDestroyer.api.ITexturedItem; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; @@ -17,6 +15,8 @@ import reborncore.common.powerSystem.PoweredItem; import techreborn.client.TechRebornCreativeTab; import techreborn.config.ConfigTechReborn; +import java.util.List; + public class ItemLapotronPack extends ItemArmor implements IEnergyItemInfo, ITexturedItem { public static final int maxCharge = ConfigTechReborn.LapotronPackCharge; diff --git a/src/main/java/techreborn/items/armor/ItemLithiumBatpack.java b/src/main/java/techreborn/items/armor/ItemLithiumBatpack.java index 308e01535..4796baeb2 100644 --- a/src/main/java/techreborn/items/armor/ItemLithiumBatpack.java +++ b/src/main/java/techreborn/items/armor/ItemLithiumBatpack.java @@ -1,7 +1,5 @@ package techreborn.items.armor; -import java.util.List; - import me.modmuss50.jsonDestroyer.api.ITexturedItem; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; @@ -16,6 +14,8 @@ import reborncore.common.powerSystem.PoweredItem; import techreborn.client.TechRebornCreativeTab; import techreborn.config.ConfigTechReborn; +import java.util.List; + public class ItemLithiumBatpack extends ItemArmor implements IEnergyItemInfo, ITexturedItem { public static final int maxCharge = ConfigTechReborn.LithiumBatpackCharge; diff --git a/src/main/java/techreborn/items/tools/ItemChainsaw.java b/src/main/java/techreborn/items/tools/ItemChainsaw.java index 9068e4fee..29b73f825 100644 --- a/src/main/java/techreborn/items/tools/ItemChainsaw.java +++ b/src/main/java/techreborn/items/tools/ItemChainsaw.java @@ -1,8 +1,5 @@ package techreborn.items.tools; -import java.util.List; -import java.util.Random; - import me.modmuss50.jsonDestroyer.api.ITexturedItem; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; @@ -13,7 +10,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.Item; -import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; @@ -28,6 +24,9 @@ import reborncore.common.util.TorchHelper; import techreborn.client.TechRebornCreativeTab; import techreborn.utils.OreDictUtils; +import java.util.List; +import java.util.Random; + public class ItemChainsaw extends ItemAxe implements IEnergyItemInfo, ITexturedItem { public int maxCharge = 1; diff --git a/src/main/java/techreborn/items/tools/ItemCloakingDevice.java b/src/main/java/techreborn/items/tools/ItemCloakingDevice.java index f1e1690f0..f15b88488 100644 --- a/src/main/java/techreborn/items/tools/ItemCloakingDevice.java +++ b/src/main/java/techreborn/items/tools/ItemCloakingDevice.java @@ -1,7 +1,5 @@ package techreborn.items.tools; -import java.util.List; - import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -17,6 +15,8 @@ import techreborn.client.TechRebornCreativeTab; import techreborn.config.ConfigTechReborn; import techreborn.items.ItemTextureBase; +import java.util.List; + public class ItemCloakingDevice extends ItemTextureBase implements IEnergyItemInfo { public static int Teir = ConfigTechReborn.CloakingDeviceTier; public static int MaxCharge = ConfigTechReborn.CloakingDeviceCharge; diff --git a/src/main/java/techreborn/items/tools/ItemDrill.java b/src/main/java/techreborn/items/tools/ItemDrill.java index d3abf4da5..2545cbe86 100644 --- a/src/main/java/techreborn/items/tools/ItemDrill.java +++ b/src/main/java/techreborn/items/tools/ItemDrill.java @@ -1,8 +1,5 @@ package techreborn.items.tools; -import java.util.List; -import java.util.Random; - import me.modmuss50.jsonDestroyer.api.ITexturedItem; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; @@ -26,6 +23,9 @@ import reborncore.common.powerSystem.PoweredItem; import reborncore.common.util.TorchHelper; import techreborn.client.TechRebornCreativeTab; +import java.util.List; +import java.util.Random; + public class ItemDrill extends ItemPickaxe implements IEnergyItemInfo, ITexturedItem { public int maxCharge = 1; diff --git a/src/main/java/techreborn/items/tools/ItemHammer.java b/src/main/java/techreborn/items/tools/ItemHammer.java index 13474df60..35f001415 100644 --- a/src/main/java/techreborn/items/tools/ItemHammer.java +++ b/src/main/java/techreborn/items/tools/ItemHammer.java @@ -1,15 +1,12 @@ package techreborn.items.tools; import me.modmuss50.jsonDestroyer.api.ITexturedItem; -import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; -import techreborn.items.ItemPlates; import techreborn.items.ItemTR; public class ItemHammer extends ItemTR implements ITexturedItem { diff --git a/src/main/java/techreborn/items/tools/ItemJackhammer.java b/src/main/java/techreborn/items/tools/ItemJackhammer.java index c250fd894..9bc0b6bb6 100644 --- a/src/main/java/techreborn/items/tools/ItemJackhammer.java +++ b/src/main/java/techreborn/items/tools/ItemJackhammer.java @@ -1,8 +1,5 @@ package techreborn.items.tools; -import java.util.List; -import java.util.Random; - import me.modmuss50.jsonDestroyer.api.ITexturedItem; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; @@ -11,8 +8,6 @@ import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; @@ -28,6 +23,9 @@ import reborncore.common.util.TorchHelper; import techreborn.client.TechRebornCreativeTab; import techreborn.utils.OreDictUtils; +import java.util.List; +import java.util.Random; + public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo, ITexturedItem { public int maxCharge = 1; diff --git a/src/main/java/techreborn/items/tools/ItemNanosaber.java b/src/main/java/techreborn/items/tools/ItemNanosaber.java index b78cfba2e..c6599333d 100644 --- a/src/main/java/techreborn/items/tools/ItemNanosaber.java +++ b/src/main/java/techreborn/items/tools/ItemNanosaber.java @@ -1,23 +1,12 @@ package techreborn.items.tools; -import java.util.List; -import java.util.Random; - import me.modmuss50.jsonDestroyer.api.ITexturedItem; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; import net.minecraft.item.Item; -import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -25,9 +14,10 @@ import reborncore.RebornCore; import reborncore.api.power.IEnergyItemInfo; import reborncore.common.powerSystem.PoweredItem; import reborncore.common.util.ItemNBTHelper; -import reborncore.common.util.TorchHelper; import techreborn.client.TechRebornCreativeTab; +import java.util.List; + public class ItemNanosaber extends ItemSword implements IEnergyItemInfo, ITexturedItem { public int maxCharge = 1; diff --git a/src/main/java/techreborn/items/tools/ItemOmniTool.java b/src/main/java/techreborn/items/tools/ItemOmniTool.java index 21df9d3b8..4d5794771 100644 --- a/src/main/java/techreborn/items/tools/ItemOmniTool.java +++ b/src/main/java/techreborn/items/tools/ItemOmniTool.java @@ -1,7 +1,5 @@ package techreborn.items.tools; -import java.util.List; - import me.modmuss50.jsonDestroyer.api.ITexturedItem; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; @@ -25,6 +23,8 @@ import reborncore.common.util.TorchHelper; import techreborn.client.TechRebornCreativeTab; import techreborn.config.ConfigTechReborn; +import java.util.List; + public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo, ITexturedItem { public static final int maxCharge = ConfigTechReborn.OmniToolCharge; diff --git a/src/main/java/techreborn/items/tools/ItemRockCutter.java b/src/main/java/techreborn/items/tools/ItemRockCutter.java index ed29abb1e..4ab9652a6 100644 --- a/src/main/java/techreborn/items/tools/ItemRockCutter.java +++ b/src/main/java/techreborn/items/tools/ItemRockCutter.java @@ -1,7 +1,5 @@ package techreborn.items.tools; -import java.util.List; - import me.modmuss50.jsonDestroyer.api.ITexturedItem; import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; @@ -21,6 +19,8 @@ import reborncore.common.util.Color; import techreborn.client.TechRebornCreativeTab; import techreborn.config.ConfigTechReborn; +import java.util.List; + public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo, ITexturedItem { public static final int maxCharge = ConfigTechReborn.RockCutterCharge; diff --git a/src/main/java/techreborn/items/tools/ItemWrench.java b/src/main/java/techreborn/items/tools/ItemWrench.java index a4da0b393..f51be1acb 100644 --- a/src/main/java/techreborn/items/tools/ItemWrench.java +++ b/src/main/java/techreborn/items/tools/ItemWrench.java @@ -1,9 +1,9 @@ package techreborn.items.tools; import ic2.api.tile.IWrenchable; +import me.modmuss50.jsonDestroyer.api.ITexturedItem; import net.minecraft.block.BlockDynamicLiquid; import net.minecraft.block.BlockStaticLiquid; -import me.modmuss50.jsonDestroyer.api.ITexturedItem; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -18,7 +18,6 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidBase; import techreborn.client.TechRebornCreativeTabMisc; import techreborn.items.ItemTR; -import techreborn.items.ItemTextureBase; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/techreborn/manual/GuiManual.java b/src/main/java/techreborn/manual/GuiManual.java index 88320c017..d658dbe2a 100644 --- a/src/main/java/techreborn/manual/GuiManual.java +++ b/src/main/java/techreborn/manual/GuiManual.java @@ -1,10 +1,5 @@ package techreborn.manual; -import java.io.IOException; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; @@ -13,6 +8,8 @@ import net.minecraft.inventory.Container; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; import techreborn.init.ModBlocks; import techreborn.init.ModItems; import techreborn.items.ItemParts; @@ -26,6 +23,8 @@ import techreborn.manual.pages.GeneratingPowerPage; import techreborn.manual.pages.GettingStartedPage; import techreborn.manual.pages.ToolsPage; +import java.io.IOException; + @SideOnly(Side.CLIENT) public class GuiManual extends GuiScreen { diff --git a/src/main/java/techreborn/manual/PageCollection.java b/src/main/java/techreborn/manual/PageCollection.java index bf3edc9dc..f2d834a09 100644 --- a/src/main/java/techreborn/manual/PageCollection.java +++ b/src/main/java/techreborn/manual/PageCollection.java @@ -1,15 +1,14 @@ package techreborn.manual; -import java.io.IOException; -import java.util.List; - import com.google.common.collect.Lists; - import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiButton; import techreborn.manual.pages.BasePage; +import java.io.IOException; +import java.util.List; + public class PageCollection extends Gui { public final List pages = Lists.newArrayList(); diff --git a/src/main/java/techreborn/manual/pages/AdvancedMachines.java b/src/main/java/techreborn/manual/pages/AdvancedMachines.java index b6c716a39..3d3c640b1 100644 --- a/src/main/java/techreborn/manual/pages/AdvancedMachines.java +++ b/src/main/java/techreborn/manual/pages/AdvancedMachines.java @@ -1,7 +1,5 @@ package techreborn.manual.pages; -import java.awt.Color; - import net.minecraft.client.gui.GuiButton; import net.minecraft.item.ItemStack; import techreborn.init.ModBlocks; @@ -10,6 +8,8 @@ import techreborn.manual.Reference; import techreborn.manual.util.ButtonUtil; import techreborn.manual.util.GuiButtonItemTexture; +import java.awt.*; + public class AdvancedMachines extends TitledPage { public AdvancedMachines(String name, PageCollection collection) diff --git a/src/main/java/techreborn/manual/pages/BasePage.java b/src/main/java/techreborn/manual/pages/BasePage.java index 5b9ef56c9..df1a7e5c2 100644 --- a/src/main/java/techreborn/manual/pages/BasePage.java +++ b/src/main/java/techreborn/manual/pages/BasePage.java @@ -1,7 +1,5 @@ package techreborn.manual.pages; -import java.io.IOException; - import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; @@ -10,6 +8,8 @@ import net.minecraft.util.StatCollector; import techreborn.manual.PageCollection; import techreborn.manual.Reference; +import java.io.IOException; + public class BasePage extends GuiScreen { //Name used to reference the page diff --git a/src/main/java/techreborn/manual/pages/BasicMachinesPage.java b/src/main/java/techreborn/manual/pages/BasicMachinesPage.java index bf45f2b90..1f5a627a9 100644 --- a/src/main/java/techreborn/manual/pages/BasicMachinesPage.java +++ b/src/main/java/techreborn/manual/pages/BasicMachinesPage.java @@ -1,7 +1,5 @@ package techreborn.manual.pages; -import java.awt.Color; - import net.minecraft.client.gui.GuiButton; import net.minecraft.item.ItemStack; import techreborn.init.ModBlocks; @@ -10,6 +8,8 @@ import techreborn.manual.Reference; import techreborn.manual.util.ButtonUtil; import techreborn.manual.util.GuiButtonItemTexture; +import java.awt.*; + public class BasicMachinesPage extends TitledPage { public BasicMachinesPage(String name, PageCollection collection) diff --git a/src/main/java/techreborn/manual/pages/ContentsPage.java b/src/main/java/techreborn/manual/pages/ContentsPage.java index 300a6d24e..0aa7262fb 100644 --- a/src/main/java/techreborn/manual/pages/ContentsPage.java +++ b/src/main/java/techreborn/manual/pages/ContentsPage.java @@ -1,7 +1,5 @@ package techreborn.manual.pages; -import java.awt.Color; - import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.item.ItemStack; @@ -12,6 +10,8 @@ import techreborn.manual.PageCollection; import techreborn.manual.Reference; import techreborn.manual.util.GuiButtonItemTexture; +import java.awt.*; + public class ContentsPage extends TitledPage { public ContentsPage(String name, PageCollection collection) diff --git a/src/main/java/techreborn/manual/pages/CraftingInfoPage.java b/src/main/java/techreborn/manual/pages/CraftingInfoPage.java index aa9244dda..8a569c1a1 100644 --- a/src/main/java/techreborn/manual/pages/CraftingInfoPage.java +++ b/src/main/java/techreborn/manual/pages/CraftingInfoPage.java @@ -1,19 +1,9 @@ package techreborn.manual.pages; -import java.awt.Color; -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.lwjgl.opengl.GL11; - import com.google.common.base.Objects; import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; - import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; @@ -31,9 +21,17 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; +import org.lwjgl.opengl.GL11; import techreborn.manual.PageCollection; import techreborn.manual.util.ButtonUtil; +import java.awt.*; +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + public class CraftingInfoPage extends TitledPage { public ItemStack result; diff --git a/src/main/java/techreborn/manual/pages/DescriptionPage.java b/src/main/java/techreborn/manual/pages/DescriptionPage.java index 2ec467681..204ad82cc 100644 --- a/src/main/java/techreborn/manual/pages/DescriptionPage.java +++ b/src/main/java/techreborn/manual/pages/DescriptionPage.java @@ -1,23 +1,21 @@ package techreborn.manual.pages; -import java.awt.Color; -import java.util.ArrayList; -import java.util.List; - -import org.lwjgl.opengl.GL11; - import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; - import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; import techreborn.manual.PageCollection; import techreborn.manual.Reference; import techreborn.manual.util.ButtonUtil; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + public class DescriptionPage extends TitledPage { public boolean hasImage; diff --git a/src/main/java/techreborn/manual/pages/GeneratingPowerPage.java b/src/main/java/techreborn/manual/pages/GeneratingPowerPage.java index a80b840c5..2c60a095e 100644 --- a/src/main/java/techreborn/manual/pages/GeneratingPowerPage.java +++ b/src/main/java/techreborn/manual/pages/GeneratingPowerPage.java @@ -1,7 +1,5 @@ package techreborn.manual.pages; -import java.awt.Color; - import net.minecraft.client.gui.GuiButton; import net.minecraft.item.ItemStack; import techreborn.init.ModBlocks; @@ -10,6 +8,8 @@ import techreborn.manual.Reference; import techreborn.manual.util.ButtonUtil; import techreborn.manual.util.GuiButtonItemTexture; +import java.awt.*; + public class GeneratingPowerPage extends TitledPage { public GeneratingPowerPage(String name, PageCollection collection) diff --git a/src/main/java/techreborn/manual/pages/GettingStartedPage.java b/src/main/java/techreborn/manual/pages/GettingStartedPage.java index f112b3a22..fd301eb3c 100644 --- a/src/main/java/techreborn/manual/pages/GettingStartedPage.java +++ b/src/main/java/techreborn/manual/pages/GettingStartedPage.java @@ -1,7 +1,5 @@ package techreborn.manual.pages; -import java.awt.Color; - import net.minecraft.client.gui.GuiButton; import techreborn.items.ItemParts; import techreborn.items.ItemPlates; @@ -10,6 +8,8 @@ import techreborn.manual.Reference; import techreborn.manual.util.ButtonUtil; import techreborn.manual.util.GuiButtonItemTexture; +import java.awt.*; + public class GettingStartedPage extends TitledPage { public GettingStartedPage(String name, PageCollection collection) diff --git a/src/main/java/techreborn/manual/pages/ToolsPage.java b/src/main/java/techreborn/manual/pages/ToolsPage.java index 23159bd4a..50b9dc1af 100644 --- a/src/main/java/techreborn/manual/pages/ToolsPage.java +++ b/src/main/java/techreborn/manual/pages/ToolsPage.java @@ -1,16 +1,15 @@ package techreborn.manual.pages; -import java.awt.Color; - import net.minecraft.client.gui.GuiButton; import net.minecraft.item.ItemStack; -import techreborn.init.ModBlocks; import techreborn.init.ModItems; import techreborn.manual.PageCollection; import techreborn.manual.Reference; import techreborn.manual.util.ButtonUtil; import techreborn.manual.util.GuiButtonItemTexture; +import java.awt.*; + public class ToolsPage extends TitledPage { public ToolsPage(String name, PageCollection collection) diff --git a/src/main/java/techreborn/manual/util/ButtonUtil.java b/src/main/java/techreborn/manual/util/ButtonUtil.java index e86a09035..601408cb3 100644 --- a/src/main/java/techreborn/manual/util/ButtonUtil.java +++ b/src/main/java/techreborn/manual/util/ButtonUtil.java @@ -1,10 +1,10 @@ package techreborn.manual.util; -import java.util.List; - import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.List; + @SideOnly(Side.CLIENT) public class ButtonUtil { diff --git a/src/main/java/techreborn/manual/util/GuiButtonAHeight.java b/src/main/java/techreborn/manual/util/GuiButtonAHeight.java index 450bae207..6f1e01a38 100644 --- a/src/main/java/techreborn/manual/util/GuiButtonAHeight.java +++ b/src/main/java/techreborn/manual/util/GuiButtonAHeight.java @@ -1,11 +1,10 @@ package techreborn.manual.util; -import org.lwjgl.opengl.GL11; - import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.renderer.OpenGlHelper; +import org.lwjgl.opengl.GL11; public class GuiButtonAHeight extends GuiButton { diff --git a/src/main/java/techreborn/manual/util/GuiButtonCustomTexture.java b/src/main/java/techreborn/manual/util/GuiButtonCustomTexture.java index c4ec159fe..9ad089b3f 100644 --- a/src/main/java/techreborn/manual/util/GuiButtonCustomTexture.java +++ b/src/main/java/techreborn/manual/util/GuiButtonCustomTexture.java @@ -1,14 +1,13 @@ package techreborn.manual.util; -import java.awt.Color; - -import org.lwjgl.opengl.GL11; - import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.config.GuiButtonExt; +import org.lwjgl.opengl.GL11; + +import java.awt.*; public class GuiButtonCustomTexture extends GuiButtonExt { diff --git a/src/main/java/techreborn/manual/util/GuiButtonItemTexture.java b/src/main/java/techreborn/manual/util/GuiButtonItemTexture.java index b1d8eb5b2..0a846bef8 100644 --- a/src/main/java/techreborn/manual/util/GuiButtonItemTexture.java +++ b/src/main/java/techreborn/manual/util/GuiButtonItemTexture.java @@ -1,14 +1,13 @@ package techreborn.manual.util; -import java.awt.Color; - -import org.lwjgl.opengl.GL11; - import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.client.config.GuiButtonExt; +import org.lwjgl.opengl.GL11; + +import java.awt.*; public class GuiButtonItemTexture extends GuiButtonExt { diff --git a/src/main/java/techreborn/manual/util/GuiButtonTextOnly.java b/src/main/java/techreborn/manual/util/GuiButtonTextOnly.java index 4e866031e..72e6a2c19 100644 --- a/src/main/java/techreborn/manual/util/GuiButtonTextOnly.java +++ b/src/main/java/techreborn/manual/util/GuiButtonTextOnly.java @@ -1,14 +1,13 @@ package techreborn.manual.util; -import java.awt.Color; - -import org.lwjgl.opengl.GL11; - import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.util.EnumChatFormatting; +import org.lwjgl.opengl.GL11; + +import java.awt.*; public class GuiButtonTextOnly extends GuiButton { public String LINKED_PAGE; diff --git a/src/main/java/techreborn/packets/PacketAesu.java b/src/main/java/techreborn/packets/PacketAesu.java index 1310f9f71..ed86871e6 100644 --- a/src/main/java/techreborn/packets/PacketAesu.java +++ b/src/main/java/techreborn/packets/PacketAesu.java @@ -1,11 +1,11 @@ package techreborn.packets; -import java.io.IOException; - import io.netty.buffer.ByteBuf; import reborncore.common.packets.SimplePacket; import techreborn.tiles.TileAesu; +import java.io.IOException; + public class PacketAesu extends SimplePacket { diff --git a/src/main/java/techreborn/packets/PacketIdsu.java b/src/main/java/techreborn/packets/PacketIdsu.java index cdea1ad91..c60d6ad19 100644 --- a/src/main/java/techreborn/packets/PacketIdsu.java +++ b/src/main/java/techreborn/packets/PacketIdsu.java @@ -1,11 +1,11 @@ package techreborn.packets; -import java.io.IOException; - import io.netty.buffer.ByteBuf; import reborncore.common.packets.SimplePacket; import techreborn.tiles.idsu.TileIDSU; +import java.io.IOException; + public class PacketIdsu extends SimplePacket { diff --git a/src/main/java/techreborn/parts/CableMultipart.java b/src/main/java/techreborn/parts/CableMultipart.java index 73f03711e..7b6b5df37 100644 --- a/src/main/java/techreborn/parts/CableMultipart.java +++ b/src/main/java/techreborn/parts/CableMultipart.java @@ -2,7 +2,14 @@ package techreborn.parts; import mcmultipart.MCMultiPartMod; import mcmultipart.microblock.IMicroblock; -import mcmultipart.multipart.*; +import mcmultipart.multipart.ICollidableMultipart; +import mcmultipart.multipart.IMultipartContainer; +import mcmultipart.multipart.IOccludingPart; +import mcmultipart.multipart.ISlottedPart; +import mcmultipart.multipart.Multipart; +import mcmultipart.multipart.MultipartHelper; +import mcmultipart.multipart.OcclusionHelper; +import mcmultipart.multipart.PartSlot; import mcmultipart.raytrace.PartMOP; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -16,7 +23,13 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.*; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.EnumWorldBlockLayer; +import net.minecraft.util.ITickable; import net.minecraft.world.World; import net.minecraftforge.common.property.ExtendedBlockState; import net.minecraftforge.common.property.IExtendedBlockState; @@ -30,7 +43,11 @@ import techreborn.parts.walia.IPartWaliaProvider; import techreborn.power.TRPowerNet; import techreborn.utils.damageSources.ElectrialShockSource; -import java.util.*; +import java.util.ArrayList; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * Created by modmuss50 on 02/03/2016. diff --git a/src/main/java/techreborn/parts/EnumCableType.java b/src/main/java/techreborn/parts/EnumCableType.java index 15c9dc1ec..644408b1b 100644 --- a/src/main/java/techreborn/parts/EnumCableType.java +++ b/src/main/java/techreborn/parts/EnumCableType.java @@ -2,7 +2,14 @@ package techreborn.parts; import net.minecraft.util.IStringSerializable; import reborncore.api.power.EnumPowerTier; -import techreborn.parts.types.*; +import techreborn.parts.types.CopperCable; +import techreborn.parts.types.GlassFiberCable; +import techreborn.parts.types.GoldCable; +import techreborn.parts.types.HVCable; +import techreborn.parts.types.InsulatedCopperCable; +import techreborn.parts.types.InsulatedGoldCable; +import techreborn.parts.types.InsulatedHVCable; +import techreborn.parts.types.TinCable; public enum EnumCableType implements IStringSerializable { COPPER("copper", "techreborn:blocks/cables/copper_cable", 128, 12.0, true, CopperCable.class, EnumPowerTier.LOW), diff --git a/src/main/java/techreborn/parts/walia/WailaMcMultiPartCompact.java b/src/main/java/techreborn/parts/walia/WailaMcMultiPartCompact.java index fdeb4c1e6..9fe293e39 100644 --- a/src/main/java/techreborn/parts/walia/WailaMcMultiPartCompact.java +++ b/src/main/java/techreborn/parts/walia/WailaMcMultiPartCompact.java @@ -2,7 +2,11 @@ package techreborn.parts.walia; import mcmultipart.block.TileMultipart; import mcp.mobius.waila.api.IWailaRegistrar; -import net.minecraftforge.fml.common.event.*; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLInterModComms; +import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import techreborn.compat.ICompatModule; /** diff --git a/src/main/java/techreborn/proxies/ClientProxy.java b/src/main/java/techreborn/proxies/ClientProxy.java index 197c97f19..5ed9780a1 100644 --- a/src/main/java/techreborn/proxies/ClientProxy.java +++ b/src/main/java/techreborn/proxies/ClientProxy.java @@ -1,7 +1,13 @@ package techreborn.proxies; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.entity.RenderManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.client.registry.ClientRegistry; +import net.minecraftforge.fml.client.registry.IRenderFactory; +import net.minecraftforge.fml.client.registry.RenderingRegistry; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import reborncore.client.multiblock.MultiblockRenderEvent; import techreborn.client.ClientMultiBlocks; import techreborn.client.IconSupplier; @@ -10,14 +16,22 @@ import techreborn.client.StackToolTipEvent; import techreborn.client.VersionCheckerClient; import techreborn.client.hud.ChargeHud; import techreborn.client.keybindings.KeyBindings; +import techreborn.client.render.entitys.RenderNukePrimed; +import techreborn.entitys.EntityNukePrimed; public class ClientProxy extends CommonProxy { public static MultiblockRenderEvent multiblockRenderEvent; @Override - public void init() { - super.init(); + public void preInit(FMLPreInitializationEvent event) { + super.preInit(event); + RenderingRegistry.registerEntityRenderingHandler(EntityNukePrimed.class, new RenderManagerNuke()); + } + + @Override + public void init(FMLInitializationEvent event) { + super.init(event); RegisterItemJsons.registerModels(); MinecraftForge.EVENT_BUS.register(new IconSupplier()); MinecraftForge.EVENT_BUS.register(new ChargeHud()); @@ -29,4 +43,13 @@ public class ClientProxy extends CommonProxy { ClientRegistry.registerKeyBinding(KeyBindings.config); ClientMultiBlocks.init(); } + + public class RenderManagerNuke implements IRenderFactory{ + + @Override + public Render createRenderFor(RenderManager manager) { + return new RenderNukePrimed(manager); + } + } + } diff --git a/src/main/java/techreborn/proxies/CommonProxy.java b/src/main/java/techreborn/proxies/CommonProxy.java index af3830cff..00075971c 100644 --- a/src/main/java/techreborn/proxies/CommonProxy.java +++ b/src/main/java/techreborn/proxies/CommonProxy.java @@ -1,9 +1,31 @@ package techreborn.proxies; -public class CommonProxy { +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.common.event.FMLServerStartingEvent; +import techreborn.compat.ICompatModule; - public void init() { +public class CommonProxy implements ICompatModule{ + + + @Override + public void preInit(FMLPreInitializationEvent event) { } + @Override + public void init(FMLInitializationEvent event) { + + } + + @Override + public void postInit(FMLPostInitializationEvent event) { + + } + + @Override + public void serverStarting(FMLServerStartingEvent event) { + + } } diff --git a/src/main/java/techreborn/tiles/TileCentrifuge.java b/src/main/java/techreborn/tiles/TileCentrifuge.java index 87797da47..bff8f199e 100644 --- a/src/main/java/techreborn/tiles/TileCentrifuge.java +++ b/src/main/java/techreborn/tiles/TileCentrifuge.java @@ -1,7 +1,5 @@ package techreborn.tiles; -import java.util.List; - import ic2.api.tile.IWrenchable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -19,6 +17,8 @@ import techreborn.config.ConfigTechReborn; import techreborn.init.ModBlocks; import techreborn.lib.Reference; +import java.util.List; + public class TileCentrifuge extends TilePowerAcceptor implements IWrenchable, IInventory, ISidedInventory, IListInfoProvider { public int tickTime; diff --git a/src/main/java/techreborn/tiles/TileDigitalChest.java b/src/main/java/techreborn/tiles/TileDigitalChest.java index ba4957e40..099ecc7a3 100644 --- a/src/main/java/techreborn/tiles/TileDigitalChest.java +++ b/src/main/java/techreborn/tiles/TileDigitalChest.java @@ -1,7 +1,5 @@ package techreborn.tiles; -import java.util.List; - import ic2.api.tile.IWrenchable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -18,6 +16,8 @@ import reborncore.common.util.Inventory; import reborncore.common.util.ItemUtils; import techreborn.init.ModBlocks; +import java.util.List; + public class TileDigitalChest extends TileMachineBase implements IInventory, IWrenchable, IListInfoProvider { diff --git a/src/main/java/techreborn/tiles/TileIronFurnace.java b/src/main/java/techreborn/tiles/TileIronFurnace.java index 98101ccbf..dc28cd39a 100644 --- a/src/main/java/techreborn/tiles/TileIronFurnace.java +++ b/src/main/java/techreborn/tiles/TileIronFurnace.java @@ -1,8 +1,6 @@ package techreborn.tiles; -import ic2.api.tile.IWrenchable; import net.minecraft.block.Block; -import net.minecraft.block.BlockFurnace; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -17,20 +15,11 @@ import net.minecraft.item.ItemSword; import net.minecraft.item.ItemTool; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumFacing; import net.minecraft.util.IChatComponent; -import net.minecraft.util.MathHelper; import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import reborncore.common.blocks.BlockMachineBase; import reborncore.common.tile.TileMachineBase; import reborncore.common.util.Inventory; -import reborncore.common.util.ItemUtils; -import techreborn.api.recipe.IBaseRecipeType; -import techreborn.api.recipe.RecipeHandler; -import techreborn.init.ModBlocks; -import techreborn.lib.Reference; public class TileIronFurnace extends TileMachineBase implements IInventory { diff --git a/src/main/java/techreborn/tiles/TilePlayerDectector.java b/src/main/java/techreborn/tiles/TilePlayerDectector.java index d49ad62fa..22d5caf8a 100644 --- a/src/main/java/techreborn/tiles/TilePlayerDectector.java +++ b/src/main/java/techreborn/tiles/TilePlayerDectector.java @@ -1,7 +1,5 @@ package techreborn.tiles; -import java.util.Iterator; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; @@ -9,6 +7,8 @@ import reborncore.api.power.EnumPowerTier; import reborncore.common.blocks.BlockMachineBase; import reborncore.common.powerSystem.TilePowerAcceptor; +import java.util.Iterator; + public class TilePlayerDectector extends TilePowerAcceptor { diff --git a/src/main/java/techreborn/tiles/TileQuantumChest.java b/src/main/java/techreborn/tiles/TileQuantumChest.java index 7593c21c6..14d67b9a6 100644 --- a/src/main/java/techreborn/tiles/TileQuantumChest.java +++ b/src/main/java/techreborn/tiles/TileQuantumChest.java @@ -1,7 +1,5 @@ package techreborn.tiles; -import java.util.List; - import ic2.api.tile.IWrenchable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -19,6 +17,8 @@ import reborncore.common.util.Inventory; import reborncore.common.util.ItemUtils; import techreborn.init.ModBlocks; +import java.util.List; + public class TileQuantumChest extends TileMachineBase implements IInventory, IWrenchable, IDeepStorageUnit, IListInfoProvider { diff --git a/src/main/java/techreborn/tiles/TileQuantumTank.java b/src/main/java/techreborn/tiles/TileQuantumTank.java index 629582852..855aa74ed 100644 --- a/src/main/java/techreborn/tiles/TileQuantumTank.java +++ b/src/main/java/techreborn/tiles/TileQuantumTank.java @@ -1,7 +1,5 @@ package techreborn.tiles; -import java.util.List; - import ic2.api.tile.IWrenchable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -23,6 +21,8 @@ import reborncore.common.util.Inventory; import reborncore.common.util.Tank; import techreborn.init.ModBlocks; +import java.util.List; + public class TileQuantumTank extends TileMachineBase implements IFluidHandler, IInventory, IWrenchable, IListInfoProvider { diff --git a/src/main/java/techreborn/tiles/generator/TileGasTurbine.java b/src/main/java/techreborn/tiles/generator/TileGasTurbine.java index ac0342c57..23e0a198f 100644 --- a/src/main/java/techreborn/tiles/generator/TileGasTurbine.java +++ b/src/main/java/techreborn/tiles/generator/TileGasTurbine.java @@ -1,8 +1,5 @@ package techreborn.tiles.generator; -import java.util.HashMap; -import java.util.Map; - import ic2.api.tile.IWrenchable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -27,6 +24,9 @@ import reborncore.common.util.Tank; import techreborn.config.ConfigTechReborn; import techreborn.init.ModBlocks; +import java.util.HashMap; +import java.util.Map; + public class TileGasTurbine extends TilePowerAcceptor implements IWrenchable, IFluidHandler, IInventory { diff --git a/src/main/java/techreborn/tiles/generator/TileGenerator.java b/src/main/java/techreborn/tiles/generator/TileGenerator.java index 7fc312097..942de6630 100644 --- a/src/main/java/techreborn/tiles/generator/TileGenerator.java +++ b/src/main/java/techreborn/tiles/generator/TileGenerator.java @@ -13,7 +13,6 @@ import reborncore.api.power.EnumPowerTier; import reborncore.common.blocks.BlockMachineBase; import reborncore.common.powerSystem.TilePowerAcceptor; import reborncore.common.util.Inventory; -import techreborn.config.ConfigTechReborn; import techreborn.init.ModBlocks; public class TileGenerator extends TilePowerAcceptor implements IWrenchable, IInventory diff --git a/src/main/java/techreborn/tiles/generator/TileSemifluidGenerator.java b/src/main/java/techreborn/tiles/generator/TileSemifluidGenerator.java index a093dac6b..2e7127cd3 100644 --- a/src/main/java/techreborn/tiles/generator/TileSemifluidGenerator.java +++ b/src/main/java/techreborn/tiles/generator/TileSemifluidGenerator.java @@ -1,8 +1,5 @@ package techreborn.tiles.generator; -import java.util.HashMap; -import java.util.Map; - import ic2.api.tile.IWrenchable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -27,6 +24,9 @@ import reborncore.common.util.Tank; import techreborn.config.ConfigTechReborn; import techreborn.init.ModBlocks; +import java.util.HashMap; +import java.util.Map; + public class TileSemifluidGenerator extends TilePowerAcceptor implements IWrenchable, IFluidHandler, IInventory { diff --git a/src/main/java/techreborn/tiles/generator/TileSolarPanel.java b/src/main/java/techreborn/tiles/generator/TileSolarPanel.java index 28e517ee7..543ae5b64 100644 --- a/src/main/java/techreborn/tiles/generator/TileSolarPanel.java +++ b/src/main/java/techreborn/tiles/generator/TileSolarPanel.java @@ -1,12 +1,12 @@ package techreborn.tiles.generator; -import java.util.List; - import net.minecraft.util.EnumFacing; import reborncore.api.power.EnumPowerTier; import reborncore.common.powerSystem.TilePowerAcceptor; import techreborn.blocks.generator.BlockSolarPanel; +import java.util.List; + /** * Created by modmuss50 on 25/02/2016. */ diff --git a/src/main/java/techreborn/tiles/idsu/IDSUManager.java b/src/main/java/techreborn/tiles/idsu/IDSUManager.java index a37389530..0fa4757a2 100644 --- a/src/main/java/techreborn/tiles/idsu/IDSUManager.java +++ b/src/main/java/techreborn/tiles/idsu/IDSUManager.java @@ -1,5 +1,14 @@ package techreborn.tiles.idsu; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.reflect.TypeToken; +import net.minecraft.world.World; +import net.minecraft.world.storage.ISaveHandler; +import net.minecraftforge.event.world.WorldEvent; +import net.minecraftforge.fml.common.eventhandler.EventPriority; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + import java.io.BufferedReader; import java.io.File; import java.io.FileReader; @@ -9,16 +18,6 @@ import java.lang.reflect.Type; import java.util.HashMap; import java.util.TreeMap; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.reflect.TypeToken; - -import net.minecraft.world.World; -import net.minecraft.world.storage.ISaveHandler; -import net.minecraftforge.event.world.WorldEvent; -import net.minecraftforge.fml.common.eventhandler.EventPriority; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; - public class IDSUManager { diff --git a/src/main/java/techreborn/tiles/idsu/TileIDSU.java b/src/main/java/techreborn/tiles/idsu/TileIDSU.java index 0080210df..66900e6ab 100644 --- a/src/main/java/techreborn/tiles/idsu/TileIDSU.java +++ b/src/main/java/techreborn/tiles/idsu/TileIDSU.java @@ -1,11 +1,10 @@ package techreborn.tiles.idsu; -import org.apache.commons.lang3.StringUtils; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; +import org.apache.commons.lang3.StringUtils; import reborncore.api.power.EnumPowerTier; import reborncore.common.powerSystem.TilePowerAcceptor; import techreborn.config.ConfigTechReborn; diff --git a/src/main/java/techreborn/tiles/lesu/TileLesu.java b/src/main/java/techreborn/tiles/lesu/TileLesu.java index 47546af83..d4194b0f1 100644 --- a/src/main/java/techreborn/tiles/lesu/TileLesu.java +++ b/src/main/java/techreborn/tiles/lesu/TileLesu.java @@ -1,8 +1,6 @@ package techreborn.tiles.lesu; -import java.util.ArrayList; - import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import reborncore.api.power.EnumPowerTier; @@ -10,6 +8,8 @@ import reborncore.common.powerSystem.TilePowerAcceptor; import reborncore.common.util.Inventory; import techreborn.config.ConfigTechReborn; +import java.util.ArrayList; + public class TileLesu extends TilePowerAcceptor {//TODO wrench private ArrayList countedNetworks = new ArrayList(); diff --git a/src/main/java/techreborn/tiles/teir1/TileRecycler.java b/src/main/java/techreborn/tiles/teir1/TileRecycler.java index 1c343dab7..e40f00564 100644 --- a/src/main/java/techreborn/tiles/teir1/TileRecycler.java +++ b/src/main/java/techreborn/tiles/teir1/TileRecycler.java @@ -1,14 +1,11 @@ package techreborn.tiles.teir1; -import java.util.Random; - import ic2.api.tile.IWrenchable; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraft.util.IChatComponent; @@ -16,11 +13,8 @@ import reborncore.api.power.EnumPowerTier; import reborncore.common.blocks.BlockMachineBase; import reborncore.common.powerSystem.TilePowerAcceptor; import reborncore.common.util.Inventory; -import techreborn.api.recipe.RecipeCrafter; import techreborn.init.ModBlocks; -import techreborn.init.ModItems; import techreborn.items.ItemParts; -import techreborn.lib.Reference; public class TileRecycler extends TilePowerAcceptor implements IWrenchable, IInventory, ISidedInventory { diff --git a/src/main/java/techreborn/utils/OreDictUtils.java b/src/main/java/techreborn/utils/OreDictUtils.java index 3e81a502d..878a8e6ef 100644 --- a/src/main/java/techreborn/utils/OreDictUtils.java +++ b/src/main/java/techreborn/utils/OreDictUtils.java @@ -4,8 +4,6 @@ import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockPos; -import net.minecraft.world.IBlockAccess; import net.minecraftforge.oredict.OreDictionary; public class OreDictUtils { diff --git a/src/main/java/techreborn/world/RubberTreeGenerator.java b/src/main/java/techreborn/world/RubberTreeGenerator.java index 6868b72fb..98c4eaf8b 100644 --- a/src/main/java/techreborn/world/RubberTreeGenerator.java +++ b/src/main/java/techreborn/world/RubberTreeGenerator.java @@ -1,7 +1,5 @@ package techreborn.world; -import java.util.Random; - import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockPos; @@ -9,10 +7,13 @@ import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.common.IPlantable; +import techreborn.Core; import techreborn.blocks.BlockRubberLeaves; import techreborn.blocks.BlockRubberLog; import techreborn.init.ModBlocks; +import java.util.Random; + public class RubberTreeGenerator extends WorldGenerator { boolean isWorldGen = true; @@ -55,7 +56,7 @@ public class RubberTreeGenerator extends WorldGenerator { } public boolean growTree(World world, Random rand, int x, int y, int z) { - int treeHeight = rand.nextInt(5) + 5; + int treeHeight = rand.nextInt(5) + Core.worldGen.config.rubberTreeConfig.treeBaseHeight; int worldHeight = world.getHeight(); if (y >= 1 && y + treeHeight + 1 <= worldHeight) { int xOffset; @@ -88,7 +89,7 @@ public class RubberTreeGenerator extends WorldGenerator { return false; } } - + BlockPos treeBase = new BlockPos(x, y, z); BlockPos treeRoot = treeBase.down(); world.getBlockState(treeRoot).getBlock().onPlantGrow(world, treeRoot, treeBase); @@ -117,11 +118,11 @@ public class RubberTreeGenerator extends WorldGenerator { if (block == null || block.isAir(world, blockpos) || block.isLeaves(world, blockpos) || block.isReplaceable(world, blockpos)) { IBlockState newState = ModBlocks.rubberLog.getDefaultState(); boolean isAddingSap = false; - if(rand.nextInt(10) == 0){ + if (rand.nextInt(Core.worldGen.config.rubberTreeConfig.sapRarity) == 0) { newState = newState.withProperty(BlockRubberLog.HAS_SAP, true).withProperty(BlockRubberLog.SAP_SIDE, EnumFacing.getHorizontal(rand.nextInt(4))); isAddingSap = true; } - if(isAddingSap){ + if (isAddingSap) { world.setBlockState(blockpos, newState, 2); } else { this.setBlockAndNotifyAdequately(world, blockpos, newState); @@ -130,8 +131,8 @@ public class RubberTreeGenerator extends WorldGenerator { topLogPos = blockpos; } } - if(topLogPos != null){ - for (int i = 0; i < 4; i++) { + if (topLogPos != null) { + for (int i = 0; i < Core.worldGen.config.rubberTreeConfig.spireHeight; i++) { BlockPos spikePos = topLogPos.up(i); this.setBlockAndNotifyAdequately(world, spikePos, ModBlocks.rubberLeaves.getDefaultState().withProperty(BlockRubberLeaves.DECAYABLE, true)); } diff --git a/src/main/java/techreborn/world/TROreGen.java b/src/main/java/techreborn/world/TROreGen.java deleted file mode 100644 index 6de36c982..000000000 --- a/src/main/java/techreborn/world/TROreGen.java +++ /dev/null @@ -1,259 +0,0 @@ -package techreborn.world; - -import java.util.Random; - -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkProvider; -import net.minecraft.world.gen.feature.WorldGenMinable; -import net.minecraftforge.fml.common.IWorldGenerator; -import techreborn.Core; -import techreborn.config.ConfigTechReborn; -import techreborn.init.ModBlocks; - -public class TROreGen implements IWorldGenerator { - public static ConfigTechReborn config; - - WorldGenMinable oreGalena; - WorldGenMinable oreIridium; - WorldGenMinable oreRuby; - WorldGenMinable oreSapphire; - WorldGenMinable oreBauxite; - WorldGenMinable orePyrite; - WorldGenMinable oreCinnabar; - WorldGenMinable oreSphalerite; - WorldGenMinable oreTungston; - WorldGenMinable oreSheldonite; - WorldGenMinable orePeridot; - WorldGenMinable oreSodalite; - WorldGenMinable oreTetrahedrite; - WorldGenMinable oreCassiterite; - WorldGenMinable oreLead; - WorldGenMinable oreSilver; - WorldGenMinable oreCopper; - WorldGenMinable oreTin; - - public TROreGen() { - // World - oreGalena = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Galena"), ConfigTechReborn.GalenaOreRare); - oreIridium = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Iridium"), ConfigTechReborn.IridiumOreRare); - oreRuby = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Ruby"), ConfigTechReborn.RubyOreRare); - oreSapphire = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Sapphire"), ConfigTechReborn.SapphireOreRare); - oreBauxite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Bauxite"), ConfigTechReborn.BauxiteOreRare); - oreTetrahedrite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Tetrahedrite"), ConfigTechReborn.TetrahedriteOreRare); - oreCassiterite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Cassiterite"), ConfigTechReborn.CassiteriteOreRare); - oreLead = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Lead"), ConfigTechReborn.LeadOreRare); - oreSilver = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Silver"), ConfigTechReborn.SilverOreRare); - oreCopper = new WorldGenMinable(ModBlocks.ore2.getBlockStateFromName("copper"), ConfigTechReborn.CopperOreRare); - oreTin = new WorldGenMinable(ModBlocks.ore2.getBlockStateFromName("tin"), ConfigTechReborn.TinOreRare); - - // Nether - orePyrite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Pyrite"), ConfigTechReborn.PyriteOreRare); - oreCinnabar = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Cinnabar"), ConfigTechReborn.CinnabarOreRare); - oreSphalerite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Sphalerite"), ConfigTechReborn.SphaleriteOreRare); - - // End - oreTungston = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Tungston"), ConfigTechReborn.TungstenOreRare); - oreSheldonite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Sheldonite"), ConfigTechReborn.SheldoniteOreRare); - orePeridot = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Peridot"), ConfigTechReborn.PeridotOreRare); - oreSodalite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Sodalite"), ConfigTechReborn.SodaliteOreRare); - - Core.logHelper.info("WorldGen Loaded"); - } - - public void retroGen(Random random, int chunkX, int chunkZ, World world) { - //TODO - generateUndergroundOres(random, chunkX, chunkZ, world); - generateHellOres(random, chunkX, chunkZ, world); - generateEndOres(random, chunkX, chunkZ, world); - world.getChunkFromChunkCoords(chunkX, chunkZ).setChunkModified(); - } - - @Override - public void generate(Random random, int xChunk, int zChunk, World world, - IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { - - if (world.provider.isSurfaceWorld()) { - generateUndergroundOres(random, xChunk * 16, zChunk * 16, world); - } else if (world.provider.getDimensionId() == 0) { - generateHellOres(random, xChunk * 16, zChunk * 16, world); - } else if (world.provider.getDimensionId() == 1) { - generateEndOres(random, xChunk * 16, zChunk * 16, world); - } - - } - - void generateUndergroundOres(Random random, int xChunk, int zChunk, World world) { - int xPos, yPos, zPos; - if (config.GalenaOreTrue) { - for (int i = 0; i <= 16; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 10); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreGalena.generate(world, random, pos); - } - } - if (config.IridiumOreTrue) { - for (int i = 0; i <= 1; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 10); - zPos = zChunk + random.nextInt(1); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreIridium.generate(world, random, pos); - } - } - if (config.RubyOreTrue) { - for (int i = 0; i <= 3; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 10); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreRuby.generate(world, random, pos); - } - } - if (config.SapphireOreTrue) { - for (int i = 0; i <= 3; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 10); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreSapphire.generate(world, random, pos); - } - } - if (config.BauxiteOreTrue) { - for (int i = 0; i <= 10; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 10); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreBauxite.generate(world, random, pos); - } - } - if (config.TetrahedriteOreTrue) { - for (int i = 0; i <= 16; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 10); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreTetrahedrite.generate(world, random, pos); - } - } - if (config.CassiteriteOreTrue) { - for (int i = 0; i <= 16; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 20); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreCassiterite.generate(world, random, pos); - } - } - if (config.LeadOreTrue) { - for (int i = 0; i <= 16; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 20); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreLead.generate(world, random, pos); - } - } - if (config.SilverOreTrue) { - for (int i = 0; i <= 16; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 20); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreSilver.generate(world, random, pos); - } - } - if (config.CopperOreTrue) { - for (int i = 0; i <= 16; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 20); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreCopper.generate(world, random, pos); - } - } - if (config.TinOreTrue) { - for (int i = 0; i <= 16; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 20); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreTin.generate(world, random, pos); - } - } - } - - void generateHellOres(Random random, int xChunk, int zChunk, World world) { - int xPos, yPos, zPos; - if (config.PyriteOreTrue) { - for (int i = 0; i <= 16; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 10); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - orePyrite.generate(world, random, pos); - } - } - if (config.CinnabarOreTrue) { - for (int i = 0; i <= 16; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 10); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreCinnabar.generate(world, random, pos); - } - } - if (config.SphaleriteOreTrue) { - for (int i = 0; i <= 16; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 10); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreSphalerite.generate(world, random, pos); - } - } - } - - void generateEndOres(Random random, int xChunk, int zChunk, World world) { - int xPos, yPos, zPos; - if (config.TungstenOreTrue) { - for (int i = 0; i <= 2; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 10); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreTungston.generate(world, random, pos); - } - } - if (config.SheldoniteOreTrue) { - for (int i = 0; i <= 3; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 10); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreSheldonite.generate(world, random, pos); - } - } - if (config.PeridotOreTrue) { - for (int i = 0; i <= 3; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 10); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - orePeridot.generate(world, random, pos); - } - } - if (config.SodaliteOreTrue) { - for (int i = 0; i <= 3; i++) { - xPos = xChunk + random.nextInt(16); - yPos = 10 + random.nextInt(60 - 10); - zPos = zChunk + random.nextInt(16); - BlockPos pos = new BlockPos(xPos, yPos, zPos); - oreSodalite.generate(world, random, pos); - } - } - } -} diff --git a/src/main/java/techreborn/world/TechRebornRetroGen.java b/src/main/java/techreborn/world/TechRebornRetroGen.java new file mode 100644 index 000000000..07c88d6e5 --- /dev/null +++ b/src/main/java/techreborn/world/TechRebornRetroGen.java @@ -0,0 +1,84 @@ +package techreborn.world; + +import com.google.common.base.Objects; +import com.google.common.collect.Sets; +import net.minecraft.world.World; +import net.minecraftforge.event.world.ChunkDataEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.TickEvent; +import net.minecraftforge.fml.relauncher.Side; +import reborncore.common.misc.ChunkCoord; +import techreborn.Core; + +import java.util.ArrayDeque; +import java.util.Deque; +import java.util.Random; +import java.util.Set; + +/** + * Based off https://github.com/SteamNSteel/SteamNSteel + */ +public class TechRebornRetroGen { + private static final String RETROGEN_TAG = "techrebonr:retogen"; + private static final Set completedChunks = Sets.newHashSet(); + private final Deque chunksToRetroGen = new ArrayDeque(64); + + private boolean isChunkEligibleForRetroGen(ChunkDataEvent.Load event) { + return Core.worldGen.config.retroGenOres && event.world.provider.getDimensionId() == 0 + && event.getData().getString(RETROGEN_TAG).isEmpty(); + } + + public void markChunk(ChunkCoord coord) { + completedChunks.add(coord); + } + + private boolean isTickEligibleForRetroGen(TickEvent.WorldTickEvent event) { + return event.phase == TickEvent.Phase.END || event.side == Side.SERVER; + } + + + @SubscribeEvent + public void onWorldTick(TickEvent.WorldTickEvent event) { + if (isTickEligibleForRetroGen(event)) { + if (!chunksToRetroGen.isEmpty()) { + final ChunkCoord coord = chunksToRetroGen.pollFirst(); + Core.logHelper.info("Regenerating ore in " + coord + '.'); + final World world = event.world; + if (world.getChunkProvider().chunkExists(coord.getX(), coord.getZ())) { + final long seed = world.getSeed(); + final Random rng = new Random(seed); + final long xSeed = rng.nextLong() >> 2 + 1L; + final long zSeed = rng.nextLong() >> 2 + 1L; + final long chunkSeed = (xSeed * coord.getX() + zSeed * coord.getZ()) * seed; + rng.setSeed(chunkSeed); + Core.worldGen.generate(rng, coord.getX() << 4, coord.getZ() << 4, world, null, null); + } + } + } + } + + @SubscribeEvent + public void onChunkLoad(ChunkDataEvent.Load event) { + if (isChunkEligibleForRetroGen(event)) { + final ChunkCoord coord = ChunkCoord.of(event); + Core.logHelper.info("Queueing retro ore gen for " + coord + '.'); + chunksToRetroGen.addLast(coord); + } + } + + @SubscribeEvent + public void onChunkSave(ChunkDataEvent.Save event) { + final ChunkCoord coord = ChunkCoord.of(event); + if (completedChunks.contains(coord)) { + event.getData().setString(RETROGEN_TAG, "X"); + completedChunks.remove(coord); + } + } + + @Override + public String toString() { + return Objects.toStringHelper(this) + .add("chunksToRetroGen", chunksToRetroGen) + .toString(); + } +} diff --git a/src/main/java/techreborn/world/TechRebornWorldGen.java b/src/main/java/techreborn/world/TechRebornWorldGen.java new file mode 100644 index 000000000..ee595d69f --- /dev/null +++ b/src/main/java/techreborn/world/TechRebornWorldGen.java @@ -0,0 +1,204 @@ +package techreborn.world; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.reflect.TypeToken; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.fml.common.IWorldGenerator; +import reborncore.common.misc.ChunkCoord; +import techreborn.Core; +import techreborn.init.ModBlocks; +import techreborn.world.config.OreConfig; +import techreborn.world.config.WorldGenConfig; + +import javax.annotation.Nullable; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +/** + * Created by modmuss50 on 11/03/2016. + */ +public class TechRebornWorldGen implements IWorldGenerator { + + private void init() { + defaultConfig = new WorldGenConfig(); + defaultConfig.overworldOres = new ArrayList<>(); + defaultConfig.endOres = new ArrayList<>(); + defaultConfig.neatherOres = new ArrayList<>(); + + defaultConfig.overworldOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Galena"), 8, 16, 10, 60)); + defaultConfig.overworldOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Iridium"), 1, 1, 10, 60)); + defaultConfig.overworldOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Ruby"), 6, 3, 10, 60)); + defaultConfig.overworldOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Sapphire"), 6, 3, 10, 60)); + defaultConfig.overworldOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Bauxite"), 6, 10, 10, 60)); + defaultConfig.overworldOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Tetrahedrite"), 6, 16, 10, 60)); + defaultConfig.overworldOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Cassiterite"), 6, 16, 20, 60)); + defaultConfig.overworldOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Lead"), 6, 16, 20, 60)); + defaultConfig.overworldOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Silver"), 6, 16, 20, 60)); + defaultConfig.overworldOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("copper"), 8, 16, 20, 60)); + defaultConfig.overworldOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("tin"), 8, 16, 20, 60)); + + defaultConfig.neatherOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Pyrite"), 6, 3, 10, 250)); + defaultConfig.neatherOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Cinnabar"), 6, 3, 10, 250)); + defaultConfig.neatherOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Sphalerite"), 6, 3, 10, 250)); + + defaultConfig.endOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Tungston"), 6, 3, 10, 250)); + defaultConfig.endOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Sheldonite"), 6, 3, 10, 250)); + defaultConfig.endOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Peridot"), 6, 3, 10, 250)); + defaultConfig.endOres.add(new OreConfig(ModBlocks.ore.getBlockStateFromName("Sodalite"), 6, 3, 10, 250)); + } + + WorldGenConfig config; + WorldGenConfig defaultConfig; + public File configFile; + public static RubberTreeGenerator treeGenerator = new RubberTreeGenerator(); + public boolean jsonInvalid = false; + public final TechRebornRetroGen retroGen = new TechRebornRetroGen(); + + public void load() { + init(); + if (configFile.exists()) { + loadFromJson(); + } else { + config = defaultConfig; + } + config.overworldOres.addAll(getMissingOres(config.overworldOres, defaultConfig.overworldOres)); + config.neatherOres.addAll(getMissingOres(config.neatherOres, defaultConfig.neatherOres)); + config.endOres.addAll(getMissingOres(config.endOres, defaultConfig.endOres)); + if(!jsonInvalid){ + save(); + } + } + + private List getMissingOres(List config, List defaultOres) { + List missingOres = new ArrayList<>(); + for (OreConfig defaultOre : defaultOres) { + boolean hasFoundOre = false; + for (OreConfig ore : config) { + if (ore.blockName.equals(defaultOre.blockName) && ore.meta == defaultOre.meta) { + hasFoundOre = true; + ore.state = defaultOre.state; //Should allow for states to be saved/loaded + } + } + if (!hasFoundOre) { + missingOres.add(defaultOre); + } + } + return missingOres; + } + + private void loadFromJson() { + try { + Gson gson = new Gson(); + BufferedReader reader = new BufferedReader(new FileReader(configFile)); + Type typeOfHashMap = new TypeToken() { + }.getType(); + config = gson.fromJson(reader, typeOfHashMap); + } catch (Exception e) { + Core.logHelper.error("The ores.json file was invalid, bad things are about to happen, I will try and save the world now :"); + config = defaultConfig; + jsonInvalid = true; + Core.logHelper.error("The ores.json file was ignored and the default values loaded, you file will NOT be over written"); + e.printStackTrace(); + } + } + + private void save() { + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + String json = gson.toJson(config); + try { + FileWriter writer = new FileWriter(configFile); + writer.write(json); + writer.close(); + } catch (IOException e) { + Core.logHelper.error("The ores.json file was invalid, something bad happened"); + e.printStackTrace(); + } + } + + public List getAllGenOresFromList(List configList) { + List list = new ArrayList<>(); + for (OreConfig config : configList) { + if (config.veinSize != 0 && config.veinsPerChunk != 0 && config.shouldSpawn) { + list.add(config); + } + } + return list; + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, @Nullable IChunkProvider chunkGenerator, @Nullable IChunkProvider chunkProvider) { + //TODO this could be optimised to not run every chunk gen + if(!config.generateTechRebornFeatures){ + return; + } + boolean genTree = false; + List list = new ArrayList<>(); + if (world.provider.isSurfaceWorld()) { + list.addAll(getAllGenOresFromList(config.overworldOres)); + genTree = true; + } else if (world.provider.getDimensionId() == 0) { + list.addAll(getAllGenOresFromList(config.neatherOres)); + } else if (world.provider.getDimensionId() == 1) { + list.addAll(getAllGenOresFromList(config.endOres)); + } + + if (!list.isEmpty() && config.generateOres) { + int xPos, yPos, zPos; + for (OreConfig ore : list) { + WorldGenMinable worldGenMinable = new WorldGenMinable(ore.state, ore.veinSize); + for (int i = 0; i < ore.veinsPerChunk; i++) { + xPos = chunkX * 16 + random.nextInt(16); + yPos = 10 + random.nextInt(ore.maxYHeight - ore.minYHeight); + zPos = chunkZ * 16 + random.nextInt(16); + BlockPos pos = new BlockPos(xPos, yPos, zPos); + worldGenMinable.generate(world, random, pos); + } + } + } + if (genTree && config.rubberTreeConfig.shouldSpawn) { + int chance = config.rubberTreeConfig.chance; + boolean isValidSpawn = false; + BiomeGenBase biomeGenBase = world.getBiomeGenForCoords(new BlockPos(chunkX * 16, 72, chunkZ * 16)); + if (BiomeDictionary.isBiomeOfType(biomeGenBase, BiomeDictionary.Type.SWAMP)) { + //TODO check the config file for bounds on this, might cause issues + chance -= random.nextInt(10) + 10; + isValidSpawn = true; + } + if (BiomeDictionary.isBiomeOfType(biomeGenBase, BiomeDictionary.Type.FOREST) || BiomeDictionary.isBiomeOfType(biomeGenBase, BiomeDictionary.Type.JUNGLE)) { + chance -= random.nextInt(5) + 3; + isValidSpawn = true; + } + if (!isValidSpawn) { + return; + } + if (random.nextInt(chance) == 0) { + int x = (chunkX * 16) + random.nextInt(15); + int z = (chunkZ * 16) + random.nextInt(15); + for (int i = 0; i < config.rubberTreeConfig.clusterSize; i++) { + int y = world.getActualHeight() - 1; + while (world.isAirBlock(new BlockPos(x, y, z)) && y > 0) { + y--; + } + treeGenerator.generate(world, random, new BlockPos(x, 72, z)); + x += random.nextInt(16) - 8; + z += random.nextInt(16) - 8; + } + + } + retroGen.markChunk(ChunkCoord.of(chunkX, chunkZ)); + } + } +} diff --git a/src/main/java/techreborn/world/TreeGenerator.java b/src/main/java/techreborn/world/TreeGenerator.java deleted file mode 100644 index d324bae35..000000000 --- a/src/main/java/techreborn/world/TreeGenerator.java +++ /dev/null @@ -1,56 +0,0 @@ -package techreborn.world; - -import java.util.Random; - -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.chunk.IChunkProvider; -import net.minecraftforge.common.BiomeDictionary; -import net.minecraftforge.fml.common.IWorldGenerator; -import techreborn.config.ConfigTechReborn; - -/** - * Created by modmuss50 on 19/02/2016. - */ -public class TreeGenerator implements IWorldGenerator { - - public static RubberTreeGenerator treeGenerator = new RubberTreeGenerator(); - - @Override - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { - if (ConfigTechReborn.RubberTreeGen) { - int chance = 75; - boolean isValidSpawn = false; - BiomeGenBase biomeGenBase = world.getBiomeGenForCoords(new BlockPos(chunkX * 16, 72, chunkZ * 16)); - if (BiomeDictionary.isBiomeOfType(biomeGenBase, BiomeDictionary.Type.SWAMP)) { - chance -= random.nextInt(10) + 10; - isValidSpawn = true; - } - if (BiomeDictionary.isBiomeOfType(biomeGenBase, BiomeDictionary.Type.FOREST) || BiomeDictionary.isBiomeOfType(biomeGenBase, BiomeDictionary.Type.JUNGLE)) { - chance -= random.nextInt(5) + 3; - isValidSpawn = true; - } - if (!isValidSpawn) { - return; - } - if (world.provider.isSurfaceWorld()) { - if (random.nextInt(chance) == 0) { - int x = (chunkX * 16) + random.nextInt(15); - int z = (chunkZ * 16) + random.nextInt(15); - for (int i = 0; i < 7; i++) { - int y = world.getActualHeight() - 1; - while (world.isAirBlock(new BlockPos(x, y, z)) && y > 0) { - y--; - } - treeGenerator.generate(world, random, new BlockPos(x, 72, z)); - x += random.nextInt(16) - 8; - z += random.nextInt(16) - 8; - } - - } - - } - } - } -} diff --git a/src/main/java/techreborn/world/config/IOreNameProvider.java b/src/main/java/techreborn/world/config/IOreNameProvider.java new file mode 100644 index 000000000..3b7751a29 --- /dev/null +++ b/src/main/java/techreborn/world/config/IOreNameProvider.java @@ -0,0 +1,12 @@ +package techreborn.world.config; + +import net.minecraft.block.state.IBlockState; + +/** + * Created by modmuss50 on 11/03/2016. + */ +public interface IOreNameProvider { + + public String getUserLoclisedName(IBlockState state); + +} diff --git a/src/main/java/techreborn/world/config/OreConfig.java b/src/main/java/techreborn/world/config/OreConfig.java new file mode 100644 index 000000000..2e2fbb2c6 --- /dev/null +++ b/src/main/java/techreborn/world/config/OreConfig.java @@ -0,0 +1,44 @@ +package techreborn.world.config; + +import net.minecraft.block.state.IBlockState; + +/** + * Created by modmuss50 on 11/03/2016. + */ +public class OreConfig { + + public String blockName; + + public String blockNiceName; + + public int meta; + + //This doesn't get written to the json file + public transient IBlockState state; + + public int veinSize; + + public int veinsPerChunk; + + public int minYHeight; + + public int maxYHeight; + + public boolean shouldSpawn = true; + + + public OreConfig(IBlockState blockSate, int veinSize, int veinsPerChunk, int minYHeight, int maxYHeight) { + this.meta = blockSate.getBlock().getMetaFromState(blockSate); + this.state = blockSate; + this.blockName = blockSate.getBlock().getUnlocalizedName(); + if(blockSate.getBlock() instanceof IOreNameProvider){ + this.blockNiceName = ((IOreNameProvider) blockSate.getBlock()).getUserLoclisedName(blockSate); + } else { + this.blockNiceName = "unknown"; + } + this.veinSize = veinSize; + this.veinsPerChunk = veinsPerChunk; + this.minYHeight = minYHeight; + this.maxYHeight = maxYHeight; + } +} diff --git a/src/main/java/techreborn/world/config/RubberTreeConfig.java b/src/main/java/techreborn/world/config/RubberTreeConfig.java new file mode 100644 index 000000000..235e8893b --- /dev/null +++ b/src/main/java/techreborn/world/config/RubberTreeConfig.java @@ -0,0 +1,20 @@ +package techreborn.world.config; + +/** + * Created by modmuss50 on 11/03/2016. + */ +//TODO add some sanity checks to this +public class RubberTreeConfig { + + public boolean shouldSpawn = true; + + public int chance = 75; + + public int clusterSize = 7; + + public int sapRarity = 10; + + public int spireHeight = 4; + + public int treeBaseHeight = 5; +} diff --git a/src/main/java/techreborn/world/config/WorldGenConfig.java b/src/main/java/techreborn/world/config/WorldGenConfig.java new file mode 100644 index 000000000..46eef200c --- /dev/null +++ b/src/main/java/techreborn/world/config/WorldGenConfig.java @@ -0,0 +1,23 @@ +package techreborn.world.config; + +import java.util.List; + +/** + * Created by modmuss50 on 11/03/2016. + */ +public class WorldGenConfig { + + public boolean generateTechRebornFeatures = true; + + public boolean generateOres = true; + + public boolean retroGenOres = false; + + public List overworldOres; + + public List neatherOres; + + public List endOres; + + public RubberTreeConfig rubberTreeConfig = new RubberTreeConfig(); +}