diff --git a/CodeFormatter.xml b/CodeFormatter.xml
new file mode 100644
index 000000000..10c498c26
--- /dev/null
+++ b/CodeFormatter.xml
@@ -0,0 +1,295 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/techreborn/Core.java b/src/main/java/techreborn/Core.java
index 9ec00ad81..6daafe2a7 100644
--- a/src/main/java/techreborn/Core.java
+++ b/src/main/java/techreborn/Core.java
@@ -1,5 +1,7 @@
package techreborn;
+import java.io.File;
+
import net.minecraft.block.BlockDispenser;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
@@ -14,7 +16,9 @@ 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;
@@ -33,19 +37,24 @@ 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.ModSounds;
+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.utils.StackWIPHandler;
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.9]")
-public class Core {
+public class Core
+{
public static ConfigTechReborn config;
@SidedProxy(clientSide = ModInfo.CLIENT_PROXY_CLASS, serverSide = ModInfo.SERVER_PROXY_CLASS)
@@ -64,14 +73,16 @@ public class Core {
public static TechRebornWorldGen worldGen;
@Mod.EventHandler
- public void preinit(FMLPreInitializationEvent event) {
+ public void preinit(FMLPreInitializationEvent event)
+ {
event.getModMetadata().version = ModInfo.MOD_VERSION;
INSTANCE = this;
FMLCommonHandler.instance().bus().register(this);
MinecraftForge.EVENT_BUS.register(this);
configDir = new File(event.getModConfigurationDirectory(), "techreborn");
- if(!configDir.exists()){
+ if (!configDir.exists())
+ {
configDir.mkdir();
}
config = ConfigTechReborn.initialize(new File(configDir, "main.cfg"));
@@ -81,10 +92,11 @@ public class Core {
recipeCompact = new RecipeCompact();
TechRebornAPI.recipeCompact = recipeCompact;
- for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules) {
+ for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules)
+ {
compatModule.preInit(event);
}
- //Entitys
+ // Entitys
EntityRegistry.registerModEntity(EntityNukePrimed.class, "nuke", 0, INSTANCE, 160, 5, true);
proxy.preInit(event);
@@ -96,7 +108,8 @@ public class Core {
}
@Mod.EventHandler
- public void init(FMLInitializationEvent event) throws IllegalAccessException, InstantiationException {
+ public void init(FMLInitializationEvent event) throws IllegalAccessException, InstantiationException
+ {
// Register ModBlocks
ModBlocks.init();
// Register Fluids
@@ -107,10 +120,11 @@ public class Core {
ModLoot.init();
// Multiparts
ModParts.init();
- //Sounds
+ // Sounds
ModSounds.init();
// Compat
- for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules) {
+ for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules)
+ {
compatModule.init(event);
}
// Recipes
@@ -134,24 +148,27 @@ public class Core {
MinecraftForge.EVENT_BUS.register(new MultiblockEventHandler());
// IDSU manager
IDSUManager.INSTANCE = new IDSUManager();
- //Event busses
+ // 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);
MinecraftForge.EVENT_BUS.register(new StackWIPHandler());
- //Scrapbox
- if (config.scrapboxDispenser) {
+ // Scrapbox
+ if (config.scrapboxDispenser)
+ {
BlockDispenser.dispenseBehaviorRegistry.putObject(ModItems.scrapBox, new BehaviorDispenseScrapbox());
}
logHelper.info("Initialization Complete");
}
@Mod.EventHandler
- public void postinit(FMLPostInitializationEvent event) throws Exception {
+ public void postinit(FMLPostInitializationEvent event) throws Exception
+ {
// Has to be done here as Buildcraft registers their recipes late
- for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules) {
+ for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules)
+ {
compatModule.postInit(event);
}
proxy.postInit(event);
@@ -164,22 +181,27 @@ public class Core {
}
@Mod.EventHandler
- public void serverStarting(FMLServerStartingEvent event) {
+ public void serverStarting(FMLServerStartingEvent event)
+ {
event.registerServerCommand(new TechRebornDevCommand());
- for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules) {
+ for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules)
+ {
compatModule.serverStarting(event);
}
}
@SubscribeEvent
- public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent cfgChange) {
- if (cfgChange.modID.equals("TechReborn")) {
+ public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent cfgChange)
+ {
+ if (cfgChange.modID.equals("TechReborn"))
+ {
ConfigTechReborn.Configs();
}
}
@SubscribeEvent
- public void addDiscriminator(AddDiscriminatorEvent event) {
+ public void addDiscriminator(AddDiscriminatorEvent event)
+ {
event.getPacketHandler().addDiscriminator(event.getPacketHandler().nextDiscriminator, PacketAesu.class);
event.getPacketHandler().addDiscriminator(event.getPacketHandler().nextDiscriminator, PacketIdsu.class);
}
diff --git a/src/main/java/techreborn/achievement/AchievementMod.java b/src/main/java/techreborn/achievement/AchievementMod.java
index 4cc7e9f6b..2f5ac4f35 100644
--- a/src/main/java/techreborn/achievement/AchievementMod.java
+++ b/src/main/java/techreborn/achievement/AchievementMod.java
@@ -1,33 +1,33 @@
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 class AchievementMod extends Achievement {
+ public static List achievements = new ArrayList();
- public static List achievements = new ArrayList();
+ public AchievementMod(String name, int x, int y, ItemStack icon, Achievement parent)
+ {
+ super("achievement.techreborn:" + name, "TechReborn:" + name, x, y, icon, parent);
+ achievements.add(this);
+ registerStat();
+ }
- public AchievementMod(String name, int x, int y, ItemStack icon,
- Achievement parent) {
- super("achievement.techreborn:" + name, "TechReborn:" + name, x, y,
- icon, parent);
- achievements.add(this);
- registerStat();
- }
+ public AchievementMod(String name, int x, int y, Item icon, Achievement parent)
+ {
+ this(name, x, y, new ItemStack(icon), parent);
+ }
- public AchievementMod(String name, int x, int y, Item icon,
- Achievement parent) {
- this(name, x, y, new ItemStack(icon), parent);
- }
-
- public AchievementMod(String name, int x, int y, Block icon,
- Achievement parent) {
- this(name, x, y, new ItemStack(icon), parent);
- }
+ public AchievementMod(String name, int x, int y, Block icon, Achievement parent)
+ {
+ this(name, x, y, new ItemStack(icon), parent);
+ }
}
diff --git a/src/main/java/techreborn/achievement/AchievementTriggerer.java b/src/main/java/techreborn/achievement/AchievementTriggerer.java
index 9428b5f7e..05afb747a 100644
--- a/src/main/java/techreborn/achievement/AchievementTriggerer.java
+++ b/src/main/java/techreborn/achievement/AchievementTriggerer.java
@@ -8,29 +8,32 @@ import net.minecraftforge.fml.common.gameevent.PlayerEvent.ItemPickupEvent;
import reborncore.common.achievement.ICraftAchievement;
import reborncore.common.achievement.IPickupAchievement;
-public class AchievementTriggerer {
+public class AchievementTriggerer
+{
- @SubscribeEvent
- public void onItemPickedUp(ItemPickupEvent event) {
- ItemStack stack = event.pickedUp.getEntityItem();
- if (stack != null && stack.getItem() instanceof IPickupAchievement) {
- Achievement achievement = ((IPickupAchievement) stack.getItem())
- .getAchievementOnPickup(stack, event.player, event.pickedUp);
- if (achievement != null)
- event.player.addStat(achievement, 1);
- }
- }
+ @SubscribeEvent
+ public void onItemPickedUp(ItemPickupEvent event)
+ {
+ ItemStack stack = event.pickedUp.getEntityItem();
+ if (stack != null && stack.getItem() instanceof IPickupAchievement)
+ {
+ Achievement achievement = ((IPickupAchievement) stack.getItem()).getAchievementOnPickup(stack, event.player,
+ event.pickedUp);
+ if (achievement != null)
+ event.player.addStat(achievement, 1);
+ }
+ }
- @SubscribeEvent
- public void onItemCrafted(ItemCraftedEvent event) {
- if (event.crafting != null
- && event.crafting.getItem() instanceof ICraftAchievement) {
- Achievement achievement = ((ICraftAchievement) event.crafting
- .getItem()).getAchievementOnCraft(event.crafting,
- event.player, event.craftMatrix);
- if (achievement != null)
- event.player.addStat(achievement, 1);
- }
- }
+ @SubscribeEvent
+ public void onItemCrafted(ItemCraftedEvent event)
+ {
+ if (event.crafting != null && event.crafting.getItem() instanceof ICraftAchievement)
+ {
+ Achievement achievement = ((ICraftAchievement) event.crafting.getItem())
+ .getAchievementOnCraft(event.crafting, event.player, event.craftMatrix);
+ if (achievement != null)
+ event.player.addStat(achievement, 1);
+ }
+ }
}
diff --git a/src/main/java/techreborn/achievement/TRAchievements.java b/src/main/java/techreborn/achievement/TRAchievements.java
index 62a868a25..d4be4acbc 100644
--- a/src/main/java/techreborn/achievement/TRAchievements.java
+++ b/src/main/java/techreborn/achievement/TRAchievements.java
@@ -7,32 +7,29 @@ import net.minecraftforge.fml.common.FMLCommonHandler;
import techreborn.init.ModBlocks;
import techreborn.lib.ModInfo;
-public class TRAchievements {
+public class TRAchievements
+{
- public static AchievementPage techrebornPage;
- public static int pageIndex;
+ public static AchievementPage techrebornPage;
+ public static int pageIndex;
- public static Achievement ore_PickUp;
- public static Achievement thermalgen_Craft;
- public static Achievement centrifuge_Craft;
+ public static Achievement ore_PickUp;
+ public static Achievement thermalgen_Craft;
+ public static Achievement centrifuge_Craft;
- public static void init() {
- ore_PickUp = new AchievementMod("ore_PickUp", 0, 0, new ItemStack(
- ModBlocks.ore, 1, 0), null);
- centrifuge_Craft = new AchievementMod("centrifuge_Craft", 1, 1,
- ModBlocks.centrifuge, ore_PickUp);
- thermalgen_Craft = new AchievementMod("thermalgen_Craft", 2, 1,
- ModBlocks.thermalGenerator, ore_PickUp);
+ public static void init()
+ {
+ ore_PickUp = new AchievementMod("ore_PickUp", 0, 0, new ItemStack(ModBlocks.ore, 1, 0), null);
+ centrifuge_Craft = new AchievementMod("centrifuge_Craft", 1, 1, ModBlocks.centrifuge, ore_PickUp);
+ thermalgen_Craft = new AchievementMod("thermalgen_Craft", 2, 1, ModBlocks.thermalGenerator, ore_PickUp);
- pageIndex = AchievementPage.getAchievementPages().size();
- techrebornPage = new AchievementPage(ModInfo.MOD_NAME,
- AchievementMod.achievements
- .toArray(new Achievement[AchievementMod.achievements
- .size()]));
- AchievementPage.registerAchievementPage(techrebornPage);
+ pageIndex = AchievementPage.getAchievementPages().size();
+ techrebornPage = new AchievementPage(ModInfo.MOD_NAME,
+ AchievementMod.achievements.toArray(new Achievement[AchievementMod.achievements.size()]));
+ AchievementPage.registerAchievementPage(techrebornPage);
- FMLCommonHandler.instance().bus().register(new AchievementTriggerer());
+ FMLCommonHandler.instance().bus().register(new AchievementTriggerer());
- }
+ }
}
diff --git a/src/main/java/techreborn/api/RollingMachineRecipe.java b/src/main/java/techreborn/api/RollingMachineRecipe.java
index 4ca34459b..2963e8b90 100644
--- a/src/main/java/techreborn/api/RollingMachineRecipe.java
+++ b/src/main/java/techreborn/api/RollingMachineRecipe.java
@@ -1,5 +1,9 @@
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;
@@ -11,111 +15,128 @@ 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
+{
-public class RollingMachineRecipe {
+ private final List recipes = new ArrayList();
- private final List recipes = new ArrayList();
+ public static final RollingMachineRecipe instance = new RollingMachineRecipe();
- public static final RollingMachineRecipe instance = new RollingMachineRecipe();
+ public void addShapedOreRecipe(ItemStack outputItemStack, Object... objectInputs)
+ {
+ recipes.add(new ShapedOreRecipe(outputItemStack, objectInputs));
+ }
- public void addShapedOreRecipe(ItemStack outputItemStack,
- Object... objectInputs) {
- recipes.add(new ShapedOreRecipe(outputItemStack, objectInputs));
- }
+ public void addShapelessOreRecipe(ItemStack outputItemStack, Object... objectInputs)
+ {
+ recipes.add(new ShapelessOreRecipe(outputItemStack, objectInputs));
+ }
- public void addShapelessOreRecipe(ItemStack outputItemStack,
- Object... objectInputs) {
- recipes
- .add(new ShapelessOreRecipe(outputItemStack, objectInputs));
- }
+ public void addRecipe(ItemStack output, Object... components)
+ {
+ String s = "";
+ int i = 0;
+ int j = 0;
+ int k = 0;
+ if (components[i] instanceof String[])
+ {
+ String as[] = (String[]) components[i++];
+ for (int l = 0; l < as.length; l++)
+ {
+ String s2 = as[l];
+ k++;
+ j = s2.length();
+ s = (new StringBuilder()).append(s).append(s2).toString();
+ }
+ } else
+ {
+ while (components[i] instanceof String)
+ {
+ String s1 = (String) components[i++];
+ k++;
+ j = s1.length();
+ s = (new StringBuilder()).append(s).append(s1).toString();
+ }
+ }
+ HashMap hashmap = new HashMap();
+ for (; i < components.length; i += 2)
+ {
+ Character character = (Character) components[i];
+ ItemStack itemstack1 = null;
+ if (components[i + 1] instanceof Item)
+ {
+ itemstack1 = new ItemStack((Item) components[i + 1]);
+ } else if (components[i + 1] instanceof Block)
+ {
+ itemstack1 = new ItemStack((Block) components[i + 1], 1, -1);
+ } else if (components[i + 1] instanceof ItemStack)
+ {
+ itemstack1 = (ItemStack) components[i + 1];
+ }
+ hashmap.put(character, itemstack1);
+ }
- public void addRecipe(ItemStack output, Object... components) {
- String s = "";
- int i = 0;
- int j = 0;
- int k = 0;
- if (components[i] instanceof String[]) {
- String as[] = (String[]) components[i++];
- for (int l = 0; l < as.length; l++) {
- String s2 = as[l];
- k++;
- j = s2.length();
- s = (new StringBuilder()).append(s).append(s2).toString();
- }
- } else {
- while (components[i] instanceof String) {
- String s1 = (String) components[i++];
- k++;
- j = s1.length();
- s = (new StringBuilder()).append(s).append(s1).toString();
- }
- }
- HashMap hashmap = new HashMap();
- for (; i < components.length; i += 2) {
- Character character = (Character) components[i];
- ItemStack itemstack1 = null;
- if (components[i + 1] instanceof Item) {
- itemstack1 = new ItemStack((Item) components[i + 1]);
- } else if (components[i + 1] instanceof Block) {
- itemstack1 = new ItemStack((Block) components[i + 1], 1, -1);
- } else if (components[i + 1] instanceof ItemStack) {
- itemstack1 = (ItemStack) components[i + 1];
- }
- hashmap.put(character, itemstack1);
- }
+ ItemStack recipeArray[] = new ItemStack[j * k];
+ for (int i1 = 0; i1 < j * k; i1++)
+ {
+ char c = s.charAt(i1);
+ if (hashmap.containsKey(Character.valueOf(c)))
+ {
+ recipeArray[i1] = ((ItemStack) hashmap.get(Character.valueOf(c))).copy();
+ } else
+ {
+ recipeArray[i1] = null;
+ }
+ }
- ItemStack recipeArray[] = new ItemStack[j * k];
- for (int i1 = 0; i1 < j * k; i1++) {
- char c = s.charAt(i1);
- if (hashmap.containsKey(Character.valueOf(c))) {
- recipeArray[i1] = ((ItemStack) hashmap
- .get(Character.valueOf(c))).copy();
- } else {
- recipeArray[i1] = null;
- }
- }
+ recipes.add(new ShapedRecipes(j, k, recipeArray, output));
+ }
- recipes.add(new ShapedRecipes(j, k, recipeArray, output));
- }
+ public void addShapelessRecipe(ItemStack output, Object... components)
+ {
+ List ingredients = new ArrayList();
+ for (int j = 0; j < components.length; j++)
+ {
+ Object obj = components[j];
+ if (obj instanceof ItemStack)
+ {
+ ingredients.add(((ItemStack) obj).copy());
+ continue;
+ }
+ if (obj instanceof Item)
+ {
+ ingredients.add(new ItemStack((Item) obj));
+ continue;
+ }
+ if (obj instanceof Block)
+ {
+ ingredients.add(new ItemStack((Block) obj));
+ } else
+ {
+ throw new RuntimeException("Invalid shapeless recipe!");
+ }
+ }
- public void addShapelessRecipe(ItemStack output, Object... components) {
- List ingredients = new ArrayList();
- for (int j = 0; j < components.length; j++) {
- Object obj = components[j];
- if (obj instanceof ItemStack) {
- ingredients.add(((ItemStack) obj).copy());
- continue;
- }
- if (obj instanceof Item) {
- ingredients.add(new ItemStack((Item) obj));
- continue;
- }
- if (obj instanceof Block) {
- ingredients.add(new ItemStack((Block) obj));
- } else {
- throw new RuntimeException("Invalid shapeless recipe!");
- }
- }
+ recipes.add(new ShapelessRecipes(output, ingredients));
+ }
- recipes.add(new ShapelessRecipes(output, ingredients));
- }
+ public ItemStack findMatchingRecipe(InventoryCrafting inv, World world)
+ {
+ for (int k = 0; k < recipes.size(); k++)
+ {
+ IRecipe irecipe = (IRecipe) recipes.get(k);
+ if (irecipe.matches(inv, world))
+ {
+ return irecipe.getCraftingResult(inv);
+ }
+ }
- public ItemStack findMatchingRecipe(InventoryCrafting inv, World world) {
- for (int k = 0; k < recipes.size(); k++) {
- IRecipe irecipe = (IRecipe) recipes.get(k);
- if (irecipe.matches(inv, world)) {
- return irecipe.getCraftingResult(inv);
- }
- }
+ return null;
+ }
- return null;
- }
-
- public List getRecipeList() {
- return recipes;
- }
+ public List getRecipeList()
+ {
+ return recipes;
+ }
}
diff --git a/src/main/java/techreborn/api/ScrapboxList.java b/src/main/java/techreborn/api/ScrapboxList.java
index afe701939..cff6284ef 100644
--- a/src/main/java/techreborn/api/ScrapboxList.java
+++ b/src/main/java/techreborn/api/ScrapboxList.java
@@ -1,15 +1,17 @@
package techreborn.api;
-import net.minecraft.item.ItemStack;
-
import java.util.ArrayList;
import java.util.List;
-public class ScrapboxList {
-
+import net.minecraft.item.ItemStack;
+
+public class ScrapboxList
+{
+
public static List stacks = new ArrayList();
-
- public static void addItemStackToList(ItemStack stack){
+
+ public static void addItemStackToList(ItemStack stack)
+ {
stacks.add(stack);
}
}
diff --git a/src/main/java/techreborn/api/SlotUpgrade.java b/src/main/java/techreborn/api/SlotUpgrade.java
index 6789f1a88..f87ca7c3f 100644
--- a/src/main/java/techreborn/api/SlotUpgrade.java
+++ b/src/main/java/techreborn/api/SlotUpgrade.java
@@ -5,17 +5,21 @@ import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import techreborn.api.upgrade.IMachineUpgrade;
-public class SlotUpgrade extends Slot{
+public class SlotUpgrade extends Slot
+{
- public SlotUpgrade(IInventory inventoryIn, int index, int xPosition, int yPosition) {
+ public SlotUpgrade(IInventory inventoryIn, int index, int xPosition, int yPosition)
+ {
super(inventoryIn, index, xPosition, yPosition);
}
-
+
@Override
- public boolean isItemValid(ItemStack stack) {
- if(stack.getItem() instanceof IMachineUpgrade){
+ public boolean isItemValid(ItemStack stack)
+ {
+ if (stack.getItem() instanceof IMachineUpgrade)
+ {
return true;
- }
- else return false;
+ } else
+ return false;
}
}
diff --git a/src/main/java/techreborn/api/TechRebornAPI.java b/src/main/java/techreborn/api/TechRebornAPI.java
index 51906eaa5..71989a038 100644
--- a/src/main/java/techreborn/api/TechRebornAPI.java
+++ b/src/main/java/techreborn/api/TechRebornAPI.java
@@ -3,34 +3,37 @@ package techreborn.api;
import net.minecraft.item.ItemStack;
import techreborn.api.recipe.IRecipeCompact;
-public final class TechRebornAPI {
+public final class TechRebornAPI
+{
- public static IRecipeCompact recipeCompact;
+ public static IRecipeCompact recipeCompact;
- public static void addRollingOreMachinceRecipe(ItemStack output,
- Object... components) {
- RollingMachineRecipe.instance.addShapedOreRecipe(output, components);
- }
+ public static void addRollingOreMachinceRecipe(ItemStack output, Object... components)
+ {
+ RollingMachineRecipe.instance.addShapedOreRecipe(output, components);
+ }
- public static void addShapelessOreRollingMachinceRecipe(ItemStack output,
- Object... components) {
- RollingMachineRecipe.instance.addShapelessOreRecipe(output, components);
- }
+ public static void addShapelessOreRollingMachinceRecipe(ItemStack output, Object... components)
+ {
+ RollingMachineRecipe.instance.addShapelessOreRecipe(output, components);
+ }
- public static void addRollingMachinceRecipe(ItemStack output,
- Object... components) {
- RollingMachineRecipe.instance.addRecipe(output, components);
- }
+ public static void addRollingMachinceRecipe(ItemStack output, Object... components)
+ {
+ RollingMachineRecipe.instance.addRecipe(output, components);
+ }
- public static void addShapelessRollingMachinceRecipe(ItemStack output,
- Object... components) {
- RollingMachineRecipe.instance.addShapelessRecipe(output, components);
- }
+ public static void addShapelessRollingMachinceRecipe(ItemStack output, Object... components)
+ {
+ RollingMachineRecipe.instance.addShapelessRecipe(output, components);
+ }
}
-class RegisteredItemRecipe extends Exception {
- public RegisteredItemRecipe(String message) {
- super(message);
- }
+class RegisteredItemRecipe extends Exception
+{
+ public RegisteredItemRecipe(String message)
+ {
+ super(message);
+ }
}
diff --git a/src/main/java/techreborn/api/TechRebornBlocks.java b/src/main/java/techreborn/api/TechRebornBlocks.java
index 723e2c5aa..3093b43bc 100644
--- a/src/main/java/techreborn/api/TechRebornBlocks.java
+++ b/src/main/java/techreborn/api/TechRebornBlocks.java
@@ -1,82 +1,49 @@
package techreborn.api;
-
import net.minecraft.block.Block;
-public class TechRebornBlocks {
+public class TechRebornBlocks
+{
- public static Block getBlock(String name) {
- try {
- Object e = Class.forName("techreborn.init.ModBlocks").getField(name).get(null);
- return e instanceof Block ? (Block) e : null;
- } catch (NoSuchFieldException e1) {
- e1.printStackTrace();
- return null;
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- return null;
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- return null;
- }
- }
+ public static Block getBlock(String name)
+ {
+ try
+ {
+ Object e = Class.forName("techreborn.init.ModBlocks").getField(name).get(null);
+ return e instanceof Block ? (Block) e : null;
+ } catch (NoSuchFieldException e1)
+ {
+ e1.printStackTrace();
+ return null;
+ } catch (IllegalAccessException e)
+ {
+ e.printStackTrace();
+ return null;
+ } catch (ClassNotFoundException e)
+ {
+ e.printStackTrace();
+ return null;
+ }
+ }
- /**
-
- Full list of blocks.
-
- thermalGenerator
- quantumTank
- quantumChest
- digitalChest
- centrifuge
- RollingMachine
- MachineCasing
- BlastFurnace
- AlloySmelter
- Grinder
- ImplosionCompressor
- MatterFabricator
- ChunkLoader
- HighAdvancedMachineBlock
- Dragoneggenergysiphoner
- Magicenergeyconverter
- AssemblyMachine
- DieselGenerator
- IndustrialElectrolyzer
- MagicalAbsorber
- Semifluidgenerator
- Gasturbine
- AlloyFurnace
- ChemicalReactor
- lathe
- platecuttingmachine
- Idsu
- Aesu
- Lesu
- Supercondensator
- Woodenshelf
- Metalshelf
- LesuStorage
- Distillationtower
- ElectricCraftingTable
- VacuumFreezer
- PlasmaGenerator
- FusionControlComputer
- ComputerCube
- FusionCoil
- LightningRod
- heatGenerator
- industrialSawmill
- chargeBench
- farm
-
- ore
- storage
- storage2
- machineframe
-
-
- */
+ /**
+ *
+ * Full list of blocks.
+ *
+ * thermalGenerator quantumTank quantumChest digitalChest centrifuge
+ * RollingMachine MachineCasing BlastFurnace AlloySmelter Grinder
+ * ImplosionCompressor MatterFabricator ChunkLoader HighAdvancedMachineBlock
+ * Dragoneggenergysiphoner Magicenergeyconverter AssemblyMachine
+ * DieselGenerator IndustrialElectrolyzer MagicalAbsorber Semifluidgenerator
+ * Gasturbine AlloyFurnace ChemicalReactor lathe platecuttingmachine Idsu
+ * Aesu Lesu Supercondensator Woodenshelf Metalshelf LesuStorage
+ * Distillationtower ElectricCraftingTable VacuumFreezer PlasmaGenerator
+ * FusionControlComputer ComputerCube FusionCoil LightningRod heatGenerator
+ * industrialSawmill chargeBench farm
+ *
+ * ore storage storage2 machineframe
+ *
+ *
+ */
}
diff --git a/src/main/java/techreborn/api/TechRebornItems.java b/src/main/java/techreborn/api/TechRebornItems.java
index 3930d41fd..28a9ffd24 100644
--- a/src/main/java/techreborn/api/TechRebornItems.java
+++ b/src/main/java/techreborn/api/TechRebornItems.java
@@ -2,79 +2,47 @@ package techreborn.api;
import net.minecraft.item.Item;
-public class TechRebornItems {
+public class TechRebornItems
+{
- public static Item getItem(String name) {
- try {
- Object e = Class.forName("techreborn.init.ModItems").getField(name).get(null);
- return e instanceof Item ? (Item) e : null;
- } catch (NoSuchFieldException e1) {
- e1.printStackTrace();
- return null;
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- return null;
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- return null;
- }
- }
-
- /*
-
- Items
-
- gems
- ingots
- nuggets
- dusts
- smallDusts
- tinyDusts
- parts
- cells
- rockCutter
- lithiumBatpack
- lapotronpack
- omniTool
- advancedDrill
- lapotronicOrb
- manuel
- uuMatter
- plate
- rods
- crushedOre
- purifiedCrushedOre
- cloakingDevice
+ public static Item getItem(String name)
+ {
+ try
+ {
+ Object e = Class.forName("techreborn.init.ModItems").getField(name).get(null);
+ return e instanceof Item ? (Item) e : null;
+ } catch (NoSuchFieldException e1)
+ {
+ e1.printStackTrace();
+ return null;
+ } catch (IllegalAccessException e)
+ {
+ e.printStackTrace();
+ return null;
+ } catch (ClassNotFoundException e)
+ {
+ e.printStackTrace();
+ return null;
+ }
+ }
- bucketBerylium
- bucketcalcium
- bucketcalciumcarbonate
- bucketChlorite
- bucketDeuterium
- bucketGlyceryl
- bucketHelium
- bucketHelium3
- bucketHeliumplasma
- bucketHydrogen
- bucketLithium
- bucketMercury
- bucketMethane
- bucketNitrocoalfuel
- bucketNitrofuel
- bucketNitrogen
- bucketNitrogendioxide
- bucketPotassium
- bucketSilicon
- bucketSodium
- bucketSodiumpersulfate
- bucketTritium
- bucketWolframium
-
- hammerIron
- hammerDiamond
- upgrades
- farmPatten
-
- */
+ /*
+ *
+ * Items
+ *
+ * gems ingots nuggets dusts smallDusts tinyDusts parts cells rockCutter
+ * lithiumBatpack lapotronpack omniTool advancedDrill lapotronicOrb manuel
+ * uuMatter plate rods crushedOre purifiedCrushedOre cloakingDevice
+ *
+ * bucketBerylium bucketcalcium bucketcalciumcarbonate bucketChlorite
+ * bucketDeuterium bucketGlyceryl bucketHelium bucketHelium3
+ * bucketHeliumplasma bucketHydrogen bucketLithium bucketMercury
+ * bucketMethane bucketNitrocoalfuel bucketNitrofuel bucketNitrogen
+ * bucketNitrogendioxide bucketPotassium bucketSilicon bucketSodium
+ * bucketSodiumpersulfate bucketTritium bucketWolframium
+ *
+ * hammerIron hammerDiamond upgrades farmPatten
+ *
+ */
}
diff --git a/src/main/java/techreborn/api/package-info.java b/src/main/java/techreborn/api/package-info.java
index 99e5b33b3..5a06d53dc 100644
--- a/src/main/java/techreborn/api/package-info.java
+++ b/src/main/java/techreborn/api/package-info.java
@@ -1,4 +1,2 @@
-@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI") package techreborn.api;
-
-import net.minecraftforge.fml.common.API;
-
+@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI")
+package techreborn.api;
diff --git a/src/main/java/techreborn/api/reactor/FusionReactorRecipe.java b/src/main/java/techreborn/api/reactor/FusionReactorRecipe.java
index de6bd2f8d..0f82d88ed 100644
--- a/src/main/java/techreborn/api/reactor/FusionReactorRecipe.java
+++ b/src/main/java/techreborn/api/reactor/FusionReactorRecipe.java
@@ -1,86 +1,100 @@
package techreborn.api.reactor;
-
import net.minecraft.item.ItemStack;
-public class FusionReactorRecipe {
+public class FusionReactorRecipe
+{
- /**
- * This is the item stack that is required in the top slot
- *
- * This cannot be null
- */
- ItemStack topInput;
+ /**
+ * This is the item stack that is required in the top slot
+ *
+ * This cannot be null
+ */
+ ItemStack topInput;
- /**
- * This is the item stack that is required in the bottom slot
- *
- * This can be null
- */
- ItemStack bottomInput;
+ /**
+ * This is the item stack that is required in the bottom slot
+ *
+ * This can be null
+ */
+ ItemStack bottomInput;
- /**
- * This is the output stack
- *
- * This cannot be null
- */
- ItemStack output;
+ /**
+ * This is the output stack
+ *
+ * This cannot be null
+ */
+ ItemStack output;
+ /**
+ * This is the required eu that has to be in the rector for the reaction to
+ * start
+ */
+ double startEU;
+ /**
+ * This is the eu that changes every tick, set as a minus number to use
+ * power and a positive number to gen power.
+ */
+ double euTick;
- /**
- * This is the required eu that has to be in the rector for the reaction to start
- */
- double startEU;
- /**
- * This is the eu that changes every tick, set as a minus number to use power and a positive number to gen power.
- */
- double euTick;
+ /**
+ * This is the time in ticks that the reaction takes to complete
+ */
+ int tickTime;
- /**
- * This is the time in ticks that the reaction takes to complete
- */
- int tickTime;
+ /**
+ *
+ * @param topInput
+ * This is the top slot stack
+ * @param bottomInput
+ * This is the bottom slot stack
+ * @param output
+ * This is the output stack
+ * @param startEU
+ * This is the inital EU amount
+ * @param euTick
+ * This is the eu that is transfured every tick
+ * @param tickTime
+ * This is the time the recipe takes to process
+ */
+ public FusionReactorRecipe(ItemStack topInput, ItemStack bottomInput, ItemStack output, double startEU,
+ double euTick, int tickTime)
+ {
+ this.topInput = topInput;
+ this.bottomInput = bottomInput;
+ this.output = output;
+ this.startEU = startEU;
+ this.euTick = euTick;
+ this.tickTime = tickTime;
+ }
- /**
- *
- * @param topInput This is the top slot stack
- * @param bottomInput This is the bottom slot stack
- * @param output This is the output stack
- * @param startEU This is the inital EU amount
- * @param euTick This is the eu that is transfured every tick
- * @param tickTime This is the time the recipe takes to process
- */
- public FusionReactorRecipe(ItemStack topInput, ItemStack bottomInput, ItemStack output, double startEU, double euTick, int tickTime) {
- this.topInput = topInput;
- this.bottomInput = bottomInput;
- this.output = output;
- this.startEU = startEU;
- this.euTick = euTick;
- this.tickTime = tickTime;
- }
+ public ItemStack getTopInput()
+ {
+ return topInput;
+ }
+ public ItemStack getBottomInput()
+ {
+ return bottomInput;
+ }
- public ItemStack getTopInput() {
- return topInput;
- }
+ public ItemStack getOutput()
+ {
+ return output;
+ }
- public ItemStack getBottomInput() {
- return bottomInput;
- }
+ public double getStartEU()
+ {
+ return startEU;
+ }
- public ItemStack getOutput() {
- return output;
- }
+ public double getEuTick()
+ {
+ return euTick;
+ }
- public double getStartEU() {
- return startEU;
- }
-
- public double getEuTick() {
- return euTick;
- }
-
- public int getTickTime() {
- return tickTime;
- }
+ public int getTickTime()
+ {
+ return tickTime;
+ }
}
diff --git a/src/main/java/techreborn/api/reactor/FusionReactorRecipeHelper.java b/src/main/java/techreborn/api/reactor/FusionReactorRecipeHelper.java
index 1a23ce006..ad532bbd5 100644
--- a/src/main/java/techreborn/api/reactor/FusionReactorRecipeHelper.java
+++ b/src/main/java/techreborn/api/reactor/FusionReactorRecipeHelper.java
@@ -1,21 +1,23 @@
package techreborn.api.reactor;
-
import java.util.ArrayList;
-public class FusionReactorRecipeHelper {
+public class FusionReactorRecipeHelper
+{
- /**
- * This is the list of all the recipes
- */
- public static ArrayList reactorRecipes = new ArrayList();
+ /**
+ * This is the list of all the recipes
+ */
+ public static ArrayList reactorRecipes = new ArrayList();
- /**
- * Register your reactor recipe here
- *
- * @param reactorRecipe the recipe you want to add
- */
- public static void registerRecipe(FusionReactorRecipe reactorRecipe){
- reactorRecipes.add(reactorRecipe);
- }
+ /**
+ * Register your reactor recipe here
+ *
+ * @param reactorRecipe
+ * the recipe you want to add
+ */
+ public static void registerRecipe(FusionReactorRecipe reactorRecipe)
+ {
+ reactorRecipes.add(reactorRecipe);
+ }
}
diff --git a/src/main/java/techreborn/api/reactor/package-info.java b/src/main/java/techreborn/api/reactor/package-info.java
index 24a938caf..29e213bdd 100644
--- a/src/main/java/techreborn/api/reactor/package-info.java
+++ b/src/main/java/techreborn/api/reactor/package-info.java
@@ -1,4 +1,2 @@
-@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI") package techreborn.api.reactor;
-
-import net.minecraftforge.fml.common.API;
-
+@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI")
+package techreborn.api.reactor;
diff --git a/src/main/java/techreborn/api/recipe/BaseRecipe.java b/src/main/java/techreborn/api/recipe/BaseRecipe.java
index da81cd469..550fa504c 100644
--- a/src/main/java/techreborn/api/recipe/BaseRecipe.java
+++ b/src/main/java/techreborn/api/recipe/BaseRecipe.java
@@ -1,92 +1,105 @@
package techreborn.api.recipe;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-
import java.util.ArrayList;
import java.util.List;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+
/**
* Extend this to add a recipe
*/
-public abstract class BaseRecipe implements IBaseRecipeType, Cloneable {
+public abstract class BaseRecipe implements IBaseRecipeType, Cloneable
+{
- public ArrayList inputs;
+ public ArrayList inputs;
- private ArrayList outputs;
+ private ArrayList outputs;
- public String name;
+ public String name;
- public int tickTime;
+ public int tickTime;
- public int euPerTick;
+ public int euPerTick;
- public BaseRecipe(String name, int tickTime, int euPerTick) {
- inputs = new ArrayList();
- outputs = new ArrayList();
- this.name = name;
- //This adds all new recipes
- this.tickTime = tickTime;
- this.euPerTick = euPerTick;
- }
+ public BaseRecipe(String name, int tickTime, int euPerTick)
+ {
+ inputs = new ArrayList();
+ outputs = new ArrayList();
+ this.name = name;
+ // This adds all new recipes
+ this.tickTime = tickTime;
+ this.euPerTick = euPerTick;
+ }
- @Override
- public ItemStack getOutput(int i) {
- return outputs.get(i).copy();
- }
+ @Override
+ public ItemStack getOutput(int i)
+ {
+ return outputs.get(i).copy();
+ }
- @Override
- public int getOutputsSize() {
- return outputs.size();
- }
+ @Override
+ public int getOutputsSize()
+ {
+ return outputs.size();
+ }
- public void addOutput(ItemStack stack) {
- outputs.add(stack);
- }
+ public void addOutput(ItemStack stack)
+ {
+ outputs.add(stack);
+ }
+ @Override
+ public List getInputs()
+ {
+ return inputs;
+ }
- @Override
- public List getInputs() {
- return inputs;
- }
+ @Override
+ public String getRecipeName()
+ {
+ return name;
+ }
- @Override
- public String getRecipeName() {
- return name;
- }
+ @Override
+ public int tickTime()
+ {
+ return tickTime;
+ }
- @Override
- public int tickTime() {
- return tickTime;
- }
+ @Override
+ public int euPerTick()
+ {
+ return euPerTick;
+ }
- @Override
- public int euPerTick() {
- return euPerTick;
- }
+ @Override
+ public boolean canCraft(TileEntity tile)
+ {
+ return true;
+ }
- @Override
- public boolean canCraft(TileEntity tile) {
- return true;
- }
+ @Override
+ public boolean onCraft(TileEntity tile)
+ {
+ return true;
+ }
- @Override
- public boolean onCraft(TileEntity tile) {
- return true;
- }
+ @Override
+ public Object clone() throws CloneNotSupportedException
+ {
+ return super.clone();
+ }
- @Override
- public Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
+ @Override
+ public boolean useOreDic()
+ {
+ return true;
+ }
- @Override
- public boolean useOreDic() {
- return true;
- }
-
- @Override
- public List getOutputs() {
- return outputs;
- }
+ @Override
+ public List getOutputs()
+ {
+ return outputs;
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/IBaseRecipeType.java b/src/main/java/techreborn/api/recipe/IBaseRecipeType.java
index cd47e0dfe..c7202ee4d 100644
--- a/src/main/java/techreborn/api/recipe/IBaseRecipeType.java
+++ b/src/main/java/techreborn/api/recipe/IBaseRecipeType.java
@@ -1,81 +1,87 @@
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
*/
-public interface IBaseRecipeType {
+public interface IBaseRecipeType
+{
- /**
- * Use this to get all of the inputs
- *
- * @return the List of inputs
- */
- public List getInputs();
+ /**
+ * Use this to get all of the inputs
+ *
+ * @return the List of inputs
+ */
+ public List getInputs();
- /**
- * This gets the output form the array list
- * @param i get output form position in arraylist
- * @return the output
- */
- public ItemStack getOutput(int i);
+ /**
+ * This gets the output form the array list
+ *
+ * @param i
+ * get output form position in arraylist
+ * @return the output
+ */
+ public ItemStack getOutput(int i);
- /**
- * @return The ammount of outputs
- */
- public int getOutputsSize();
+ /**
+ * @return The ammount of outputs
+ */
+ public int getOutputsSize();
- /**
- * @return get outputs
- */
- public List getOutputs();
+ /**
+ * @return get outputs
+ */
+ public List getOutputs();
- /**
- * This is the name to check that the recipe is the one that should be used in
- * the tile entity that is set up to process this recipe.
- *
- * @return The recipeName
- */
- public String getRecipeName();
+ /**
+ * This is the name to check that the recipe is the one that should be used
+ * in the tile entity that is set up to process this recipe.
+ *
+ * @return The recipeName
+ */
+ public String getRecipeName();
- /**
- * This should be a user friendly name
- *
- * @return The user friendly name of the recipe.
- */
- public String getUserFreindlyName();
+ /**
+ * This should be a user friendly name
+ *
+ * @return The user friendly name of the recipe.
+ */
+ public String getUserFreindlyName();
- /**
- * This is how long the recipe needs to tick for the crafting operation to complete
- *
- * @return tick length
- */
- public int tickTime();
+ /**
+ * This is how long the recipe needs to tick for the crafting operation to
+ * complete
+ *
+ * @return tick length
+ */
+ public int tickTime();
- /**
- * This is how much eu Per tick the machine should use
- *
- * @return the amount of eu to be used per tick.
- */
- public int euPerTick();
+ /**
+ * This is how much eu Per tick the machine should use
+ *
+ * @return the amount of eu to be used per tick.
+ */
+ public int euPerTick();
- /**
- * @param tile the tile that is doing the crafting
- * @return if true the recipe will craft, if false it will not
- */
- public boolean canCraft(TileEntity tile);
+ /**
+ * @param tile
+ * the tile that is doing the crafting
+ * @return if true the recipe will craft, if false it will not
+ */
+ public boolean canCraft(TileEntity tile);
- /**
- * @param tile the tile that is doing the crafting
- * @return return true if fluid was taken and should craft
- */
- public boolean onCraft(TileEntity tile);
+ /**
+ * @param tile
+ * the tile that is doing the crafting
+ * @return return true if fluid was taken and should craft
+ */
+ public boolean onCraft(TileEntity tile);
- public Object clone() throws CloneNotSupportedException;
+ public Object clone() throws CloneNotSupportedException;
- public boolean useOreDic();
+ public boolean useOreDic();
}
diff --git a/src/main/java/techreborn/api/recipe/IRecipeCompact.java b/src/main/java/techreborn/api/recipe/IRecipeCompact.java
index 7ccb48b85..be8112d38 100644
--- a/src/main/java/techreborn/api/recipe/IRecipeCompact.java
+++ b/src/main/java/techreborn/api/recipe/IRecipeCompact.java
@@ -2,7 +2,8 @@ package techreborn.api.recipe;
import net.minecraft.item.ItemStack;
-public interface IRecipeCompact {
+public interface IRecipeCompact
+{
- ItemStack getItem(String name);
+ ItemStack getItem(String name);
}
diff --git a/src/main/java/techreborn/api/recipe/RecipeCrafter.java b/src/main/java/techreborn/api/recipe/RecipeCrafter.java
index 47a509c7d..2c86b4dbf 100644
--- a/src/main/java/techreborn/api/recipe/RecipeCrafter.java
+++ b/src/main/java/techreborn/api/recipe/RecipeCrafter.java
@@ -1,5 +1,7 @@
package techreborn.api.recipe;
+import java.util.ArrayList;
+
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import reborncore.api.power.IEnergyInterfaceTile;
@@ -8,327 +10,421 @@ 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
*/
-public class RecipeCrafter {
+public class RecipeCrafter
+{
- /**
- * This is the recipe type to use
- */
- public String recipeName;
+ /**
+ * This is the recipe type to use
+ */
+ public String recipeName;
- /**
- * This is the parent tile
- */
- public TileMachineBase parentTile;
+ /**
+ * This is the parent tile
+ */
+ public TileMachineBase parentTile;
- /**
- * This is the place to use the power from
- */
- public IEnergyInterfaceTile energy;
+ /**
+ * This is the place to use the power from
+ */
+ public IEnergyInterfaceTile energy;
- /**
- * This is the amount of inputs that the setRecipe has
- */
- public int inputs;
+ /**
+ * This is the amount of inputs that the setRecipe has
+ */
+ public int inputs;
- /**
- * This is the amount of outputs that the recipe has
- */
- public int outputs;
+ /**
+ * This is the amount of outputs that the recipe has
+ */
+ public int outputs;
- /**
- * This is the inventory to use for the crafting
- */
- public Inventory inventory;
+ /**
+ * This is the inventory to use for the crafting
+ */
+ public Inventory inventory;
- /**
- * This is the list of the slots that the crafting logic should look for the input item stacks.
- */
- public int[] inputSlots;
+ /**
+ * This is the list of the slots that the crafting logic should look for the
+ * input item stacks.
+ */
+ public int[] inputSlots;
- /**
- * This is the list for the slots that the crafting logic should look fot the output item stacks.
- */
- public int[] outputSlots;
+ /**
+ * This is the list for the slots that the crafting logic should look fot
+ * the output item stacks.
+ */
+ public int[] outputSlots;
- /**
- * This is the constructor, not a lot to say here :P
- *
- * @param recipeName The recipe name that should be crafted
- * @param parentTile The tile that wil be using this recipe crafter
- * @param inputs The amount of input slots
- * @param outputs The amount of output slots
- * @param inventory The inventory of the machine
- * @param inputSlots A list of the input slot ids
- * @param outputSlots A list of output slot ids
- */
- public RecipeCrafter(String recipeName, TileMachineBase parentTile, int inputs, int outputs, Inventory inventory, int[] inputSlots, int[] outputSlots) {
- this.recipeName = recipeName;
- this.parentTile = parentTile;
- if (parentTile instanceof IEnergyInterfaceTile) {
- energy = (IEnergyInterfaceTile) parentTile;
- }
- this.inputs = inputs;
- this.outputs = outputs;
- this.inventory = inventory;
- this.inputSlots = inputSlots;
- this.outputSlots = outputSlots;
- }
+ /**
+ * This is the constructor, not a lot to say here :P
+ *
+ * @param recipeName
+ * The recipe name that should be crafted
+ * @param parentTile
+ * The tile that wil be using this recipe crafter
+ * @param inputs
+ * The amount of input slots
+ * @param outputs
+ * The amount of output slots
+ * @param inventory
+ * The inventory of the machine
+ * @param inputSlots
+ * A list of the input slot ids
+ * @param outputSlots
+ * A list of output slot ids
+ */
+ public RecipeCrafter(String recipeName, TileMachineBase parentTile, int inputs, int outputs, Inventory inventory,
+ int[] inputSlots, int[] outputSlots)
+ {
+ this.recipeName = recipeName;
+ this.parentTile = parentTile;
+ if (parentTile instanceof IEnergyInterfaceTile)
+ {
+ energy = (IEnergyInterfaceTile) parentTile;
+ }
+ this.inputs = inputs;
+ this.outputs = outputs;
+ this.inventory = inventory;
+ this.inputSlots = inputSlots;
+ this.outputSlots = outputSlots;
+ }
+ public IBaseRecipeType currentRecipe;
+ public int currentTickTime = 0;
+ public int currentNeededTicks = 1;// Set to 1 to stop rare crashes
+ double lastEnergy;
- public IBaseRecipeType currentRecipe;
- public int currentTickTime = 0;
- public int currentNeededTicks = 1;//Set to 1 to stop rare crashes
- double lastEnergy;
+ /**
+ * This is used to change the speed of the crafting operation.
+ *
+ * 0 = none; 0.2 = 20% speed increase 0.75 = 75% increase
+ */
+ double speedMultiplier = 0;
- /**
- * This is used to change the speed of the crafting operation.
- *
- * 0 = none;
- * 0.2 = 20% speed increase
- * 0.75 = 75% increase
- */
- double speedMultiplier = 0;
+ /**
+ * This is used to change the power of the crafting operation.
+ *
+ * 1 = none; 1.2 = 20% speed increase 1.75 = 75% increase 5 = uses 5 times
+ * more power
+ */
+ double powerMultiplier = 1;
- /**
- * This is used to change the power of the crafting operation.
- *
- * 1 = none;
- * 1.2 = 20% speed increase
- * 1.75 = 75% increase
- * 5 = uses 5 times more power
- */
- double powerMultiplier = 1;
+ int ticksSinceLastChange;
- int ticksSinceLastChange;
+ /**
+ * Call this on the tile tick
+ */
+ public void updateEntity()
+ {
+ if (parentTile.getWorld().isRemote)
+ {
+ return;
+ }
+ ticksSinceLastChange++;
+ if (ticksSinceLastChange == 20)
+ {// Force a has chanced every second
+ inventory.hasChanged = true;
+ ticksSinceLastChange = 0;
+ }
+ if (currentRecipe == null && inventory.hasChanged)
+ {// It will now look for new recipes.
+ currentTickTime = 0;
+ for (IBaseRecipeType recipe : RecipeHandler.getRecipeClassFromName(recipeName))
+ {
+ if (recipe.canCraft(parentTile) && hasAllInputs(recipe))
+ {// This checks to see if it has all of the inputs
+ boolean canGiveInvAll = true;
+ for (int i = 0; i < recipe.getOutputsSize(); i++)
+ {// This checks to see if it can fit all of the outputs
+ if (!canFitStack(recipe.getOutput(i), outputSlots[i], recipe.useOreDic()))
+ {
+ canGiveInvAll = false;
+ return;
+ }
+ }
+ if (canGiveInvAll)
+ {
+ setCurrentRecipe(recipe);// Sets the current recipe then
+ // syncs
+ this.currentNeededTicks = (int) (currentRecipe.tickTime() * (1.0 - speedMultiplier));
+ this.currentTickTime = -1;
+ setIsActive();
+ } else
+ {
+ this.currentTickTime = -1;
+ }
+ }
+ }
+ } else
+ {
+ if (inventory.hasChanged && !hasAllInputs())
+ {// If it doesn't have all the inputs reset
+ currentRecipe = null;
+ currentTickTime = -1;
+ setIsActive();
+ }
+ if (currentRecipe != null && currentTickTime >= currentNeededTicks)
+ {// If it has reached the recipe tick time
+ boolean canGiveInvAll = true;
+ for (int i = 0; i < currentRecipe.getOutputsSize(); i++)
+ {// Checks to see if it can fit the output
+ if (!canFitStack(currentRecipe.getOutput(i), outputSlots[i], currentRecipe.useOreDic()))
+ {
+ canGiveInvAll = false;
+ }
+ }
+ ArrayList filledSlots = new ArrayList();// The
+ // slots
+ // that
+ // have
+ // been
+ // filled
+ if (canGiveInvAll && currentRecipe.onCraft(parentTile))
+ {
+ for (int i = 0; i < currentRecipe.getOutputsSize(); i++)
+ {
+ if (!filledSlots.contains(outputSlots[i]))
+ {// checks it has not been filled
+ fitStack(currentRecipe.getOutput(i).copy(), outputSlots[i]);// fills
+ // the
+ // slot
+ // with
+ // the
+ // output
+ // stack
+ filledSlots.add(outputSlots[i]);
+ }
+ }
+ useAllInputs();// this uses all the inputs
+ currentRecipe = null;// resets
+ currentTickTime = -1;
+ setIsActive();
+ }
+ } else if (currentRecipe != null && currentTickTime < currentNeededTicks)
+ {
+ if (energy.canUseEnergy(getEuPerTick()))
+ {// This uses the power
+ energy.useEnergy(getEuPerTick());
+ currentTickTime++;// increase the ticktime
+ }
+ }
+ }
+ if (inventory.hasChanged)
+ {
+ inventory.hasChanged = false;
+ }
+ }
- /**
- * Call this on the tile tick
- */
- public void updateEntity() {
- if (parentTile.getWorld().isRemote) {
- return;
- }
- ticksSinceLastChange++;
- if (ticksSinceLastChange == 20) {//Force a has chanced every second
- inventory.hasChanged = true;
- ticksSinceLastChange = 0;
- }
- if (currentRecipe == null && inventory.hasChanged) {//It will now look for new recipes.
- currentTickTime = 0;
- for (IBaseRecipeType recipe : RecipeHandler.getRecipeClassFromName(recipeName)) {
- if (recipe.canCraft(parentTile) && hasAllInputs(recipe)) {//This checks to see if it has all of the inputs
- boolean canGiveInvAll = true;
- for (int i = 0; i < recipe.getOutputsSize(); i++) {//This checks to see if it can fit all of the outputs
- if (!canFitStack(recipe.getOutput(i), outputSlots[i], recipe.useOreDic())) {
- canGiveInvAll = false;
- return;
- }
- }
- if (canGiveInvAll) {
- setCurrentRecipe(recipe);//Sets the current recipe then syncs
- this.currentNeededTicks = (int) (currentRecipe.tickTime() * (1.0 - speedMultiplier));
- this.currentTickTime = -1;
- setIsActive();
- } else {
- this.currentTickTime = -1;
- }
- }
- }
- } else {
- if (inventory.hasChanged && !hasAllInputs()) {//If it doesn't have all the inputs reset
- currentRecipe = null;
- currentTickTime = -1;
- setIsActive();
- }
- if (currentRecipe != null && currentTickTime >= currentNeededTicks) {//If it has reached the recipe tick time
- boolean canGiveInvAll = true;
- for (int i = 0; i < currentRecipe.getOutputsSize(); i++) {//Checks to see if it can fit the output
- if (!canFitStack(currentRecipe.getOutput(i), outputSlots[i], currentRecipe.useOreDic())) {
- canGiveInvAll = false;
- }
- }
- ArrayList filledSlots = new ArrayList();//The slots that have been filled
- if (canGiveInvAll && currentRecipe.onCraft(parentTile)) {
- for (int i = 0; i < currentRecipe.getOutputsSize(); i++) {
- if (!filledSlots.contains(outputSlots[i])) {//checks it has not been filled
- fitStack(currentRecipe.getOutput(i).copy(), outputSlots[i]);//fills the slot with the output stack
- filledSlots.add(outputSlots[i]);
- }
- }
- useAllInputs();//this uses all the inputs
- currentRecipe = null;//resets
- currentTickTime = -1;
- setIsActive();
- }
- } else if (currentRecipe != null && currentTickTime < currentNeededTicks) {
- if (energy.canUseEnergy(getEuPerTick())) {//This uses the power
- energy.useEnergy(getEuPerTick());
- currentTickTime++;//increase the ticktime
- }
- }
- }
- if (inventory.hasChanged) {
- inventory.hasChanged = false;
- }
- }
+ public boolean hasAllInputs()
+ {
+ if (currentRecipe == null)
+ {
+ return false;
+ }
+ for (ItemStack input : currentRecipe.getInputs())
+ {
+ Boolean hasItem = false;
+ for (int inputSlot : inputSlots)
+ {// Checks to see if it can find the input
+ if (ItemUtils.isItemEqual(input, inventory.getStackInSlot(inputSlot), true, true,
+ currentRecipe.useOreDic()) && inventory.getStackInSlot(inputSlot).stackSize >= input.stackSize)
+ {
+ hasItem = true;
+ }
+ }
+ if (!hasItem)
+ return false;
+ }
+ return true;
+ }
- public boolean hasAllInputs() {
- if (currentRecipe == null) {
- return false;
- }
- for (ItemStack input : currentRecipe.getInputs()) {
- Boolean hasItem = false;
- for (int inputSlot : inputSlots) {//Checks to see if it can find the input
- if (ItemUtils.isItemEqual(input, inventory.getStackInSlot(inputSlot), true, true, currentRecipe.useOreDic()) && inventory.getStackInSlot(inputSlot).stackSize >= input.stackSize) {
- hasItem = true;
- }
- }
- if (!hasItem)
- return false;
- }
- return true;
- }
+ public boolean hasAllInputs(IBaseRecipeType recipeType)
+ {
+ if (recipeType == null)
+ {
+ return false;
+ }
+ for (ItemStack input : recipeType.getInputs())
+ {
+ Boolean hasItem = false;
+ for (int inputslot : inputSlots)
+ {
+ if (ItemUtils.isItemEqual(input, inventory.getStackInSlot(inputslot), true, true,
+ recipeType.useOreDic()) && inventory.getStackInSlot(inputslot).stackSize >= input.stackSize)
+ {
+ hasItem = true;
+ }
+ }
+ if (!hasItem)
+ return false;
+ }
+ return true;
+ }
- public boolean hasAllInputs(IBaseRecipeType recipeType) {
- if (recipeType == null) {
- return false;
- }
- for (ItemStack input : recipeType.getInputs()) {
- Boolean hasItem = false;
- for (int inputslot : inputSlots) {
- if (ItemUtils.isItemEqual(input, inventory.getStackInSlot(inputslot), true, true, recipeType.useOreDic()) && inventory.getStackInSlot(inputslot).stackSize >= input.stackSize) {
- hasItem = true;
- }
- }
- if (!hasItem)
- return false;
- }
- return true;
- }
+ public void useAllInputs()
+ {
+ if (currentRecipe == null)
+ {
+ return;
+ }
+ for (ItemStack input : currentRecipe.getInputs())
+ {
+ for (int inputSlot : inputSlots)
+ {// Uses all of the inputs
+ if (ItemUtils.isItemEqual(input, inventory.getStackInSlot(inputSlot), true, true,
+ currentRecipe.useOreDic()))
+ {
+ inventory.decrStackSize(inputSlot, input.stackSize);
+ break;
+ }
+ }
+ }
+ }
- public void useAllInputs() {
- if (currentRecipe == null) {
- return;
- }
- for (ItemStack input : currentRecipe.getInputs()) {
- for (int inputSlot : inputSlots) {//Uses all of the inputs
- if (ItemUtils.isItemEqual(input, inventory.getStackInSlot(inputSlot), true, true, currentRecipe.useOreDic())) {
- inventory.decrStackSize(inputSlot, input.stackSize);
- break;
- }
- }
- }
- }
+ public boolean canFitStack(ItemStack stack, int slot, boolean oreDic)
+ {// Checks to see if it can fit the stack
+ if (stack == null)
+ {
+ return true;
+ }
+ if (inventory.getStackInSlot(slot) == null)
+ {
+ return true;
+ }
+ if (ItemUtils.isItemEqual(inventory.getStackInSlot(slot), stack, true, true, oreDic))
+ {
+ if (stack.stackSize + inventory.getStackInSlot(slot).stackSize <= stack.getMaxStackSize())
+ {
+ return true;
+ }
+ }
+ return false;
+ }
- public boolean canFitStack(ItemStack stack, int slot, boolean oreDic) {//Checks to see if it can fit the stack
- if (stack == null) {
- return true;
- }
- if (inventory.getStackInSlot(slot) == null) {
- return true;
- }
- if (ItemUtils.isItemEqual(inventory.getStackInSlot(slot), stack, true, true, oreDic)) {
- if (stack.stackSize + inventory.getStackInSlot(slot).stackSize <= stack.getMaxStackSize()) {
- return true;
- }
- }
- return false;
- }
+ public void fitStack(ItemStack stack, int slot)
+ {// This fits a stack into a slot
+ if (stack == null)
+ {
+ return;
+ }
+ if (inventory.getStackInSlot(slot) == null)
+ {// If the slot is empty set the contents
+ inventory.setInventorySlotContents(slot, stack);
+ return;
+ }
+ if (ItemUtils.isItemEqual(inventory.getStackInSlot(slot), stack, true, true, currentRecipe.useOreDic()))
+ {// If the slot has stuff in
+ if (stack.stackSize + inventory.getStackInSlot(slot).stackSize <= stack.getMaxStackSize())
+ {// Check to see if it fits
+ ItemStack newStack = stack.copy();
+ newStack.stackSize = inventory.getStackInSlot(slot).stackSize + stack.stackSize;// Sets
+ // the
+ // new
+ // stack
+ // size
+ inventory.setInventorySlotContents(slot, newStack);
+ }
+ }
+ }
- public void fitStack(ItemStack stack, int slot) {//This fits a stack into a slot
- if (stack == null) {
- return;
- }
- if (inventory.getStackInSlot(slot) == null) {//If the slot is empty set the contents
- inventory.setInventorySlotContents(slot, stack);
- return;
- }
- if (ItemUtils.isItemEqual(inventory.getStackInSlot(slot), stack, true, true, currentRecipe.useOreDic())) {//If the slot has stuff in
- if (stack.stackSize + inventory.getStackInSlot(slot).stackSize <= stack.getMaxStackSize()) {//Check to see if it fits
- ItemStack newStack = stack.copy();
- newStack.stackSize = inventory.getStackInSlot(slot).stackSize + stack.stackSize;//Sets the new stack size
- inventory.setInventorySlotContents(slot, newStack);
- }
- }
- }
+ public void readFromNBT(NBTTagCompound tag)
+ {
+ NBTTagCompound data = tag.getCompoundTag("Crater");
- public void readFromNBT(NBTTagCompound tag) {
- NBTTagCompound data = tag.getCompoundTag("Crater");
+ if (data.hasKey("currentTickTime"))
+ currentTickTime = data.getInteger("currentTickTime");
- if (data.hasKey("currentTickTime"))
- currentTickTime = data.getInteger("currentTickTime");
+ if (parentTile != null && parentTile.getWorld() != null && parentTile.getWorld().isRemote)
+ {
+ parentTile.getWorld().notifyBlockUpdate(parentTile.getPos(),
+ parentTile.getWorld().getBlockState(parentTile.getPos()),
+ parentTile.getWorld().getBlockState(parentTile.getPos()), 3);
+ parentTile.getWorld().markBlockRangeForRenderUpdate(parentTile.getPos().getX(), parentTile.getPos().getY(),
+ parentTile.getPos().getZ(), parentTile.getPos().getX(), parentTile.getPos().getY(),
+ parentTile.getPos().getZ());
+ }
+ }
- if (parentTile != null && parentTile.getWorld() != null && parentTile.getWorld().isRemote) {
- parentTile.getWorld().notifyBlockUpdate(parentTile.getPos(), parentTile.getWorld().getBlockState(parentTile.getPos()), parentTile.getWorld().getBlockState(parentTile.getPos()), 3);
- parentTile.getWorld().markBlockRangeForRenderUpdate(parentTile.getPos().getX(), parentTile.getPos().getY(), parentTile.getPos().getZ(), parentTile.getPos().getX(), parentTile.getPos().getY(), parentTile.getPos().getZ());
- }
- }
+ public void writeToNBT(NBTTagCompound tag)
+ {
- public void writeToNBT(NBTTagCompound tag) {
+ NBTTagCompound data = new NBTTagCompound();
- NBTTagCompound data = new NBTTagCompound();
+ data.setDouble("currentTickTime", currentTickTime);
- data.setDouble("currentTickTime", currentTickTime);
+ tag.setTag("Crater", data);
+ }
- tag.setTag("Crater", data);
- }
+ private boolean isActive()
+ {
+ return currentRecipe != null && energy.getEnergy() >= currentRecipe.euPerTick();
+ }
+ public void addSpeedMulti(double amount)
+ {
+ if (speedMultiplier + amount <= 0.99)
+ {
+ speedMultiplier += amount;
+ } else
+ {
+ speedMultiplier = 0.99;
+ }
+ }
- private boolean isActive() {
- return currentRecipe != null && energy.getEnergy() >= currentRecipe.euPerTick();
- }
+ public void resetSpeedMulti()
+ {
+ speedMultiplier = 0;
+ }
- public void addSpeedMulti(double amount) {
- if (speedMultiplier + amount <= 0.99) {
- speedMultiplier += amount;
- } else {
- speedMultiplier = 0.99;
- }
- }
+ public double getSpeedMultiplier()
+ {
+ return speedMultiplier;
+ }
- public void resetSpeedMulti() {
- speedMultiplier = 0;
- }
+ public void addPowerMulti(double amount)
+ {
+ powerMultiplier += amount;
+ }
- public double getSpeedMultiplier() {
- return speedMultiplier;
- }
+ public void resetPowerMulti()
+ {
+ powerMultiplier = 1;
+ }
- public void addPowerMulti(double amount) {
- powerMultiplier += amount;
- }
+ public double getPowerMultiplier()
+ {
+ return powerMultiplier;
+ }
- public void resetPowerMulti() {
- powerMultiplier = 1;
- }
+ public double getEuPerTick()
+ {
+ return currentRecipe.euPerTick() * powerMultiplier;
+ }
- public double getPowerMultiplier() {
- return powerMultiplier;
- }
+ public void setIsActive()
+ {
+ if (parentTile.getWorld().getBlockState(parentTile.getPos()).getBlock() instanceof BlockMachineBase)
+ {
+ BlockMachineBase blockMachineBase = (BlockMachineBase) parentTile.getWorld()
+ .getBlockState(parentTile.getPos()).getBlock();
+ blockMachineBase.setActive(isActive(), parentTile.getWorld(), parentTile.getPos());
+ }
+ parentTile.getWorld().notifyBlockUpdate(parentTile.getPos(),
+ parentTile.getWorld().getBlockState(parentTile.getPos()),
+ parentTile.getWorld().getBlockState(parentTile.getPos()), 3);
+ }
- public double getEuPerTick() {
- return currentRecipe.euPerTick() * powerMultiplier;
- }
-
-
- public void setIsActive() {
- if(parentTile.getWorld().getBlockState(parentTile.getPos()).getBlock() instanceof BlockMachineBase){
- BlockMachineBase blockMachineBase = (BlockMachineBase) parentTile.getWorld().getBlockState(parentTile.getPos()).getBlock();
- blockMachineBase.setActive(isActive(), parentTile.getWorld(), parentTile.getPos());
- }
- parentTile.getWorld().notifyBlockUpdate(parentTile.getPos(), parentTile.getWorld().getBlockState(parentTile.getPos()), parentTile.getWorld().getBlockState(parentTile.getPos()), 3);
- }
-
- public void setCurrentRecipe(IBaseRecipeType recipe) {
- try {
- this.currentRecipe = (IBaseRecipeType) recipe.clone();
- } catch (CloneNotSupportedException e) {
- e.printStackTrace();
- }
- }
+ public void setCurrentRecipe(IBaseRecipeType recipe)
+ {
+ try
+ {
+ this.currentRecipe = (IBaseRecipeType) recipe.clone();
+ } catch (CloneNotSupportedException e)
+ {
+ e.printStackTrace();
+ }
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/RecipeHandler.java b/src/main/java/techreborn/api/recipe/RecipeHandler.java
index c07097342..b214d9e1f 100644
--- a/src/main/java/techreborn/api/recipe/RecipeHandler.java
+++ b/src/main/java/techreborn/api/recipe/RecipeHandler.java
@@ -1,103 +1,127 @@
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 net.minecraft.item.ItemStack;
-public class RecipeHandler {
+import org.apache.commons.lang3.time.StopWatch;
- /**
- * This is the array list of all of the recipes for all of the machines
- */
- public static final ArrayList recipeList = new ArrayList();
+import reborncore.common.util.ItemUtils;
+import techreborn.Core;
+public class RecipeHandler
+{
- public static HashMap stackMap = new HashMap();
- /**
- * This is a list of all the registered machine names.
- */
- public static ArrayList machineNames = new ArrayList();
+ /**
+ * This is the array list of all of the recipes for all of the machines
+ */
+ public static final ArrayList recipeList = new ArrayList();
- /**
- * Use this to get all of the recipes form a recipe name
- *
- * @param name the name that the recipe was resisted as.
- * @return A list of all the recipes of a given name.
- */
- public static List getRecipeClassFromName(String name) {
- List baseRecipeList = new ArrayList();
- for (IBaseRecipeType baseRecipe : recipeList) {
- if (baseRecipe.getRecipeName().equals(name)) {
- baseRecipeList.add(baseRecipe);
- }
- }
- return baseRecipeList;
- }
+ public static HashMap stackMap = new HashMap();
+ /**
+ * This is a list of all the registered machine names.
+ */
+ public static ArrayList machineNames = new ArrayList();
- public static String getUserFreindlyName(String name) {
- for (IBaseRecipeType baseRecipe : recipeList) {
- if (baseRecipe.getRecipeName().equals(name)) {
- return baseRecipe.getUserFreindlyName();
- }
- }
- return "";
- }
+ /**
+ * Use this to get all of the recipes form a recipe name
+ *
+ * @param name
+ * the name that the recipe was resisted as.
+ * @return A list of all the recipes of a given name.
+ */
+ public static List getRecipeClassFromName(String name)
+ {
+ List baseRecipeList = new ArrayList();
+ for (IBaseRecipeType baseRecipe : recipeList)
+ {
+ if (baseRecipe.getRecipeName().equals(name))
+ {
+ baseRecipeList.add(baseRecipe);
+ }
+ }
+ return baseRecipeList;
+ }
- /**
- * Add a recipe to the system
- *
- * @param recipe The recipe to add to the system.
- */
- public static void addRecipe(IBaseRecipeType recipe) {
- if (recipe == null) {
- return;
- }
- if (recipeList.contains(recipe)) {
- return;
- }
-// if (!RecipeConfigManager.canLoadRecipe(recipe)) {
-// return;
-// }
- if (!machineNames.contains(recipe.getRecipeName())) {
- machineNames.add(recipe.getRecipeName());
- }
- recipeList.add(recipe);
- StringBuffer buffer = new StringBuffer();
- for (StackTraceElement ste : Thread.currentThread().getStackTrace()) {
- buffer.append(ste);
- }
- stackMap.put(recipe, buffer.toString());
- }
+ public static String getUserFreindlyName(String name)
+ {
+ for (IBaseRecipeType baseRecipe : recipeList)
+ {
+ if (baseRecipe.getRecipeName().equals(name))
+ {
+ return baseRecipe.getUserFreindlyName();
+ }
+ }
+ return "";
+ }
+ /**
+ * Add a recipe to the system
+ *
+ * @param recipe
+ * The recipe to add to the system.
+ */
+ public static void addRecipe(IBaseRecipeType recipe)
+ {
+ if (recipe == null)
+ {
+ return;
+ }
+ if (recipeList.contains(recipe))
+ {
+ return;
+ }
+ // if (!RecipeConfigManager.canLoadRecipe(recipe)) {
+ // return;
+ // }
+ if (!machineNames.contains(recipe.getRecipeName()))
+ {
+ machineNames.add(recipe.getRecipeName());
+ }
+ recipeList.add(recipe);
+ StringBuffer buffer = new StringBuffer();
+ for (StackTraceElement ste : Thread.currentThread().getStackTrace())
+ {
+ buffer.append(ste);
+ }
+ stackMap.put(recipe, buffer.toString());
+ }
- public static void scanForDupeRecipes() throws Exception {
- StopWatch watch = new StopWatch();
- watch.start();
- for (IBaseRecipeType baseRecipeType : recipeList) {
- for (IBaseRecipeType recipe : recipeList) {
- if (baseRecipeType != recipe && baseRecipeType.getRecipeName().equals(recipe.getRecipeName())) {
- for (int i = 0; i < baseRecipeType.getInputs().size(); i++) {
- if (ItemUtils.isItemEqual(baseRecipeType.getInputs().get(i), recipe.getInputs().get(i), true, false, false)) {
- StringBuffer itemInfo = new StringBuffer();
- for (ItemStack inputs : baseRecipeType.getInputs()) {
- itemInfo.append(":" + inputs.getItem().getUnlocalizedName() + "," + inputs.getDisplayName() + "," + inputs.stackSize);
- }
- Core.logHelper.all(stackMap.get(baseRecipeType));
- // throw new Exception("Found a duplicate recipe for " + baseRecipeType.getRecipeName() + " with inputs " + itemInfo.toString());
- }
- }
- }
- }
- }
- Core.logHelper.all(watch + " : Scanning dupe recipes");
- watch.stop();
+ public static void scanForDupeRecipes() throws Exception
+ {
+ StopWatch watch = new StopWatch();
+ watch.start();
+ for (IBaseRecipeType baseRecipeType : recipeList)
+ {
+ for (IBaseRecipeType recipe : recipeList)
+ {
+ if (baseRecipeType != recipe && baseRecipeType.getRecipeName().equals(recipe.getRecipeName()))
+ {
+ for (int i = 0; i < baseRecipeType.getInputs().size(); i++)
+ {
+ if (ItemUtils.isItemEqual(baseRecipeType.getInputs().get(i), recipe.getInputs().get(i), true,
+ false, false))
+ {
+ StringBuffer itemInfo = new StringBuffer();
+ for (ItemStack inputs : baseRecipeType.getInputs())
+ {
+ itemInfo.append(":" + inputs.getItem().getUnlocalizedName() + ","
+ + inputs.getDisplayName() + "," + inputs.stackSize);
+ }
+ Core.logHelper.all(stackMap.get(baseRecipeType));
+ // throw new Exception("Found a duplicate recipe for
+ // " + baseRecipeType.getRecipeName() + " with
+ // inputs " + itemInfo.toString());
+ }
+ }
+ }
+ }
+ }
+ Core.logHelper.all(watch + " : Scanning dupe recipes");
+ watch.stop();
- }
+ }
}
\ No newline at end of file
diff --git a/src/main/java/techreborn/api/recipe/RecyclerRecipe.java b/src/main/java/techreborn/api/recipe/RecyclerRecipe.java
index 57ef4585e..33faee782 100644
--- a/src/main/java/techreborn/api/recipe/RecyclerRecipe.java
+++ b/src/main/java/techreborn/api/recipe/RecyclerRecipe.java
@@ -3,17 +3,21 @@ package techreborn.api.recipe;
import net.minecraft.item.ItemStack;
import techreborn.items.ItemParts;
import techreborn.lib.Reference;
-//THIS is only here to trick JEI into showing recipes for the recycler
-public class RecyclerRecipe extends BaseRecipe {
- public RecyclerRecipe(ItemStack input) {
+//THIS is only here to trick JEI into showing recipes for the recycler
+public class RecyclerRecipe extends BaseRecipe
+{
+
+ public RecyclerRecipe(ItemStack input)
+ {
super(Reference.recyclerRecipe, 0, 0);
inputs.add(input);
addOutput(ItemParts.getPartByName("scrap"));
}
@Override
- public String getUserFreindlyName() {
+ public String getUserFreindlyName()
+ {
return "Recycler";
}
}
diff --git a/src/main/java/techreborn/api/recipe/ScrapboxRecipe.java b/src/main/java/techreborn/api/recipe/ScrapboxRecipe.java
index e35b6fcba..3c45dba6b 100644
--- a/src/main/java/techreborn/api/recipe/ScrapboxRecipe.java
+++ b/src/main/java/techreborn/api/recipe/ScrapboxRecipe.java
@@ -4,16 +4,19 @@ import net.minecraft.item.ItemStack;
import techreborn.init.ModItems;
import techreborn.lib.Reference;
-public class ScrapboxRecipe extends BaseRecipe {
+public class ScrapboxRecipe extends BaseRecipe
+{
- public ScrapboxRecipe(ItemStack output) {
+ public ScrapboxRecipe(ItemStack output)
+ {
super(Reference.scrapboxRecipe, 0, 0);
inputs.add(new ItemStack(ModItems.scrapBox));
addOutput(output);
}
@Override
- public String getUserFreindlyName() {
+ public String getUserFreindlyName()
+ {
return "Scrapbox";
}
}
diff --git a/src/main/java/techreborn/api/recipe/machines/AlloySmelterRecipe.java b/src/main/java/techreborn/api/recipe/machines/AlloySmelterRecipe.java
index 49613cd25..4f290bc94 100644
--- a/src/main/java/techreborn/api/recipe/machines/AlloySmelterRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/AlloySmelterRecipe.java
@@ -4,20 +4,23 @@ import net.minecraft.item.ItemStack;
import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
-public class AlloySmelterRecipe extends BaseRecipe {
+public class AlloySmelterRecipe extends BaseRecipe
+{
- public AlloySmelterRecipe(ItemStack input1, ItemStack input2, ItemStack output1, int tickTime, int euPerTick) {
- super(Reference.alloySmelteRecipe, tickTime, euPerTick);
- if (input1 != null)
- inputs.add(input1);
- if (input2 != null)
- inputs.add(input2);
- if (output1 != null)
- addOutput(output1);
- }
+ public AlloySmelterRecipe(ItemStack input1, ItemStack input2, ItemStack output1, int tickTime, int euPerTick)
+ {
+ super(Reference.alloySmelteRecipe, tickTime, euPerTick);
+ if (input1 != null)
+ inputs.add(input1);
+ if (input2 != null)
+ inputs.add(input2);
+ if (output1 != null)
+ addOutput(output1);
+ }
- @Override
- public String getUserFreindlyName() {
- return "Alloy Smelter";
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "Alloy Smelter";
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/machines/AssemblingMachineRecipe.java b/src/main/java/techreborn/api/recipe/machines/AssemblingMachineRecipe.java
index aff4972b4..2f60f4605 100644
--- a/src/main/java/techreborn/api/recipe/machines/AssemblingMachineRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/AssemblingMachineRecipe.java
@@ -4,20 +4,23 @@ import net.minecraft.item.ItemStack;
import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
-public class AssemblingMachineRecipe extends BaseRecipe {
+public class AssemblingMachineRecipe extends BaseRecipe
+{
- public AssemblingMachineRecipe(ItemStack input1, ItemStack input2, ItemStack output1, int tickTime, int euPerTick) {
- super(Reference.assemblingMachineRecipe, tickTime, euPerTick);
- if (input1 != null)
- inputs.add(input1);
- if (input2 != null)
- inputs.add(input2);
- if (output1 != null)
- addOutput(output1);
- }
+ public AssemblingMachineRecipe(ItemStack input1, ItemStack input2, ItemStack output1, int tickTime, int euPerTick)
+ {
+ super(Reference.assemblingMachineRecipe, tickTime, euPerTick);
+ if (input1 != null)
+ inputs.add(input1);
+ if (input2 != null)
+ inputs.add(input2);
+ if (output1 != null)
+ addOutput(output1);
+ }
- @Override
- public String getUserFreindlyName() {
- return "Assembling Machine";
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "Assembling Machine";
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/machines/BlastFurnaceRecipe.java b/src/main/java/techreborn/api/recipe/machines/BlastFurnaceRecipe.java
index a7b872c22..dc2951015 100644
--- a/src/main/java/techreborn/api/recipe/machines/BlastFurnaceRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/BlastFurnaceRecipe.java
@@ -6,41 +6,47 @@ import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
import techreborn.tiles.TileBlastFurnace;
-public class BlastFurnaceRecipe extends BaseRecipe {
+public class BlastFurnaceRecipe extends BaseRecipe
+{
+ public int neededHeat;
- public int neededHeat;
+ public BlastFurnaceRecipe(ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2, int tickTime,
+ int euPerTick, int neededHeat)
+ {
+ super(Reference.blastFurnaceRecipe, tickTime, euPerTick);
+ if (input1 != null)
+ inputs.add(input1);
+ if (input2 != null)
+ inputs.add(input2);
+ if (output1 != null)
+ addOutput(output1);
+ if (output2 != null)
+ addOutput(output2);
- public BlastFurnaceRecipe(ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2, int tickTime, int euPerTick, int neededHeat) {
- super(Reference.blastFurnaceRecipe, tickTime, euPerTick);
- if (input1 != null)
- inputs.add(input1);
- if (input2 != null)
- inputs.add(input2);
- if (output1 != null)
- addOutput(output1);
- if (output2 != null)
- addOutput(output2);
+ this.neededHeat = neededHeat;
+ }
- this.neededHeat = neededHeat;
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "Blast Furnace";
+ }
- @Override
- public String getUserFreindlyName() {
- return "Blast Furnace";
- }
+ @Override
+ public boolean canCraft(TileEntity tile)
+ {
+ if (tile instanceof TileBlastFurnace)
+ {
+ TileBlastFurnace blastFurnace = (TileBlastFurnace) tile;
+ return blastFurnace.getHeat() >= neededHeat;
+ }
+ return false;
+ }
- @Override
- public boolean canCraft(TileEntity tile) {
- if (tile instanceof TileBlastFurnace) {
- TileBlastFurnace blastFurnace = (TileBlastFurnace) tile;
- return blastFurnace.getHeat() >= neededHeat;
- }
- return false;
- }
-
- @Override
- public boolean onCraft(TileEntity tile) {
- return super.onCraft(tile);
- }
+ @Override
+ public boolean onCraft(TileEntity tile)
+ {
+ return super.onCraft(tile);
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/machines/CentrifugeRecipe.java b/src/main/java/techreborn/api/recipe/machines/CentrifugeRecipe.java
index d8fd5d914..ed1e449af 100644
--- a/src/main/java/techreborn/api/recipe/machines/CentrifugeRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/CentrifugeRecipe.java
@@ -4,26 +4,30 @@ import net.minecraft.item.ItemStack;
import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
-public class CentrifugeRecipe extends BaseRecipe {
+public class CentrifugeRecipe extends BaseRecipe
+{
- public CentrifugeRecipe(ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2, ItemStack output3, ItemStack output4, int tickTime, int euPerTick) {
- super(Reference.centrifugeRecipe, tickTime, euPerTick);
- if (input1 != null)
- inputs.add(input1);
- if (input2 != null)
- inputs.add(input2);
- if (output1 != null)
- addOutput(output1);
- if (output2 != null)
- addOutput(output2);
- if (output3 != null)
- addOutput(output3);
- if (output4 != null)
- addOutput(output4);
- }
+ public CentrifugeRecipe(ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2, ItemStack output3,
+ ItemStack output4, int tickTime, int euPerTick)
+ {
+ super(Reference.centrifugeRecipe, tickTime, euPerTick);
+ if (input1 != null)
+ inputs.add(input1);
+ if (input2 != null)
+ inputs.add(input2);
+ if (output1 != null)
+ addOutput(output1);
+ if (output2 != null)
+ addOutput(output2);
+ if (output3 != null)
+ addOutput(output3);
+ if (output4 != null)
+ addOutput(output4);
+ }
- @Override
- public String getUserFreindlyName() {
- return "Centrifuge";
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "Centrifuge";
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/machines/ChemicalReactorRecipe.java b/src/main/java/techreborn/api/recipe/machines/ChemicalReactorRecipe.java
index b020829a0..32cb0fd58 100644
--- a/src/main/java/techreborn/api/recipe/machines/ChemicalReactorRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/ChemicalReactorRecipe.java
@@ -4,20 +4,23 @@ import net.minecraft.item.ItemStack;
import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
-public class ChemicalReactorRecipe extends BaseRecipe {
+public class ChemicalReactorRecipe extends BaseRecipe
+{
- public ChemicalReactorRecipe(ItemStack input1, ItemStack input2, ItemStack output1, int tickTime, int euPerTick) {
- super(Reference.chemicalReactorRecipe, tickTime, euPerTick);
- if (input1 != null)
- inputs.add(input1);
- if (input2 != null)
- inputs.add(input2);
- if (output1 != null)
- addOutput(output1);
- }
+ public ChemicalReactorRecipe(ItemStack input1, ItemStack input2, ItemStack output1, int tickTime, int euPerTick)
+ {
+ super(Reference.chemicalReactorRecipe, tickTime, euPerTick);
+ if (input1 != null)
+ inputs.add(input1);
+ if (input2 != null)
+ inputs.add(input2);
+ if (output1 != null)
+ addOutput(output1);
+ }
- @Override
- public String getUserFreindlyName() {
- return "Chemical Reactor";
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "Chemical Reactor";
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/machines/CompressorRecipe.java b/src/main/java/techreborn/api/recipe/machines/CompressorRecipe.java
index f7ba0407c..04185c759 100644
--- a/src/main/java/techreborn/api/recipe/machines/CompressorRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/CompressorRecipe.java
@@ -1,22 +1,24 @@
package techreborn.api.recipe.machines;
-
import net.minecraft.item.ItemStack;
import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
-public class CompressorRecipe extends BaseRecipe {
+public class CompressorRecipe extends BaseRecipe
+{
- public CompressorRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick) {
- super(Reference.compressorRecipe, tickTime, euPerTick);
- if (input1 != null)
- inputs.add(input1);
- if (output1 != null)
- addOutput(output1);
- }
+ public CompressorRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick)
+ {
+ super(Reference.compressorRecipe, tickTime, euPerTick);
+ if (input1 != null)
+ inputs.add(input1);
+ if (output1 != null)
+ addOutput(output1);
+ }
- @Override
- public String getUserFreindlyName() {
- return "Compressor";
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "Compressor";
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/machines/ExtractorRecipe.java b/src/main/java/techreborn/api/recipe/machines/ExtractorRecipe.java
index 9da869428..a9858f4f3 100644
--- a/src/main/java/techreborn/api/recipe/machines/ExtractorRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/ExtractorRecipe.java
@@ -1,22 +1,24 @@
package techreborn.api.recipe.machines;
-
import net.minecraft.item.ItemStack;
import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
-public class ExtractorRecipe extends BaseRecipe {
+public class ExtractorRecipe extends BaseRecipe
+{
- public ExtractorRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick) {
- super(Reference.extractorRecipe, tickTime, euPerTick);
- if (input1 != null)
- inputs.add(input1);
- if (output1 != null)
- addOutput(output1);
- }
+ public ExtractorRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick)
+ {
+ super(Reference.extractorRecipe, tickTime, euPerTick);
+ if (input1 != null)
+ inputs.add(input1);
+ if (output1 != null)
+ addOutput(output1);
+ }
- @Override
- public String getUserFreindlyName() {
- return "Extractor";
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "Extractor";
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/machines/GrinderRecipe.java b/src/main/java/techreborn/api/recipe/machines/GrinderRecipe.java
index 335293aba..efde79d6f 100644
--- a/src/main/java/techreborn/api/recipe/machines/GrinderRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/GrinderRecipe.java
@@ -1,22 +1,24 @@
package techreborn.api.recipe.machines;
-
import net.minecraft.item.ItemStack;
import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
-public class GrinderRecipe extends BaseRecipe {
+public class GrinderRecipe extends BaseRecipe
+{
- public GrinderRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick) {
- super(Reference.grinderRecipe, tickTime, euPerTick);
- if (input1 != null)
- inputs.add(input1);
- if (output1 != null)
- addOutput(output1);
- }
+ public GrinderRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick)
+ {
+ super(Reference.grinderRecipe, tickTime, euPerTick);
+ if (input1 != null)
+ inputs.add(input1);
+ if (output1 != null)
+ addOutput(output1);
+ }
- @Override
- public String getUserFreindlyName() {
- return "Grinder";
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "Grinder";
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/machines/ImplosionCompressorRecipe.java b/src/main/java/techreborn/api/recipe/machines/ImplosionCompressorRecipe.java
index 1be102253..df2af3859 100644
--- a/src/main/java/techreborn/api/recipe/machines/ImplosionCompressorRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/ImplosionCompressorRecipe.java
@@ -4,22 +4,26 @@ import net.minecraft.item.ItemStack;
import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
-public class ImplosionCompressorRecipe extends BaseRecipe {
+public class ImplosionCompressorRecipe extends BaseRecipe
+{
- public ImplosionCompressorRecipe(ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2, int tickTime, int euPerTick) {
- super(Reference.implosionCompressorRecipe, tickTime, euPerTick);
- if (input1 != null)
- inputs.add(input1);
- if (input2 != null)
- inputs.add(input2);
- if (output1 != null)
- addOutput(output1);
- if (output2 != null)
- addOutput(output2);
- }
+ public ImplosionCompressorRecipe(ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2,
+ int tickTime, int euPerTick)
+ {
+ super(Reference.implosionCompressorRecipe, tickTime, euPerTick);
+ if (input1 != null)
+ inputs.add(input1);
+ if (input2 != null)
+ inputs.add(input2);
+ if (output1 != null)
+ addOutput(output1);
+ if (output2 != null)
+ addOutput(output2);
+ }
- @Override
- public String getUserFreindlyName() {
- return "Implosion Compressor";
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "Implosion Compressor";
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/machines/IndustrialElectrolyzerRecipe.java b/src/main/java/techreborn/api/recipe/machines/IndustrialElectrolyzerRecipe.java
index 85ef8fdb3..f28eb4a2d 100644
--- a/src/main/java/techreborn/api/recipe/machines/IndustrialElectrolyzerRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/IndustrialElectrolyzerRecipe.java
@@ -4,33 +4,38 @@ import net.minecraft.item.ItemStack;
import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
-public class IndustrialElectrolyzerRecipe extends BaseRecipe {
+public class IndustrialElectrolyzerRecipe extends BaseRecipe
+{
- public IndustrialElectrolyzerRecipe(ItemStack inputCells, ItemStack input2, ItemStack output1, ItemStack output2, ItemStack output3, ItemStack output4, int tickTime, int euPerTick) {
- super(Reference.industrialElectrolyzerRecipe, tickTime, euPerTick);
- if (inputCells != null)
- inputs.add(inputCells);
- if (input2 != null)
- inputs.add(input2);
- if (output1 != null)
- addOutput(output1);
- if (output2 != null)
- addOutput(output2);
- if (output3 != null)
- addOutput(output3);
- if (output4 != null)
- addOutput(output4);
- }
+ public IndustrialElectrolyzerRecipe(ItemStack inputCells, ItemStack input2, ItemStack output1, ItemStack output2,
+ ItemStack output3, ItemStack output4, int tickTime, int euPerTick)
+ {
+ super(Reference.industrialElectrolyzerRecipe, tickTime, euPerTick);
+ if (inputCells != null)
+ inputs.add(inputCells);
+ if (input2 != null)
+ inputs.add(input2);
+ if (output1 != null)
+ addOutput(output1);
+ if (output2 != null)
+ addOutput(output2);
+ if (output3 != null)
+ addOutput(output3);
+ if (output4 != null)
+ addOutput(output4);
+ }
- @Override
- public String getUserFreindlyName() {
- return "Industrial Electrolyzer";
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "Industrial Electrolyzer";
+ }
- @Override
- public boolean useOreDic() {
- return useOreDictionary;
- }
+ @Override
+ public boolean useOreDic()
+ {
+ return useOreDictionary;
+ }
- private boolean useOreDictionary = true;
+ private boolean useOreDictionary = true;
}
diff --git a/src/main/java/techreborn/api/recipe/machines/IndustrialGrinderRecipe.java b/src/main/java/techreborn/api/recipe/machines/IndustrialGrinderRecipe.java
index e45ffb195..6c644a458 100644
--- a/src/main/java/techreborn/api/recipe/machines/IndustrialGrinderRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/IndustrialGrinderRecipe.java
@@ -1,6 +1,5 @@
package techreborn.api.recipe.machines;
-
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fluids.FluidStack;
@@ -8,72 +7,91 @@ import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
import techreborn.tiles.TileIndustrialGrinder;
-public class IndustrialGrinderRecipe extends BaseRecipe {
+public class IndustrialGrinderRecipe extends BaseRecipe
+{
- public FluidStack fluidStack;
+ public FluidStack fluidStack;
- public IndustrialGrinderRecipe(ItemStack input1, ItemStack input2, FluidStack fluidStack, ItemStack output1, ItemStack output2, ItemStack output3, ItemStack output4, int tickTime, int euPerTick) {
- super(Reference.industrialGrinderRecipe, tickTime, euPerTick);
- if (input1 != null)
- inputs.add(input1);
- if (input2 != null)
- inputs.add(input2);
- if (output1 != null)
- addOutput(output1);
- if (output2 != null)
- addOutput(output2);
- if (output3 != null)
- addOutput(output3);
- if (output4 != null)
- addOutput(output4);
- this.fluidStack = fluidStack;
- }
+ public IndustrialGrinderRecipe(ItemStack input1, ItemStack input2, FluidStack fluidStack, ItemStack output1,
+ ItemStack output2, ItemStack output3, ItemStack output4, int tickTime, int euPerTick)
+ {
+ super(Reference.industrialGrinderRecipe, tickTime, euPerTick);
+ if (input1 != null)
+ inputs.add(input1);
+ if (input2 != null)
+ inputs.add(input2);
+ if (output1 != null)
+ addOutput(output1);
+ if (output2 != null)
+ addOutput(output2);
+ if (output3 != null)
+ addOutput(output3);
+ if (output4 != null)
+ addOutput(output4);
+ this.fluidStack = fluidStack;
+ }
- @Override
- public String getUserFreindlyName() {
- return "IndustrialGrinder";
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "IndustrialGrinder";
+ }
- @Override
- public boolean canCraft(TileEntity tile) {
- if (fluidStack == null) {
- return true;
- }
- if (tile instanceof TileIndustrialGrinder) {
- TileIndustrialGrinder grinder = (TileIndustrialGrinder) tile;
- if (grinder.tank.getFluid() == null) {
- return false;
- }
- if (grinder.tank.getFluid() == fluidStack) {
- if (grinder.tank.getFluidAmount() >= fluidStack.amount) {
- return true;
- }
- }
- }
- return false;
- }
+ @Override
+ public boolean canCraft(TileEntity tile)
+ {
+ if (fluidStack == null)
+ {
+ return true;
+ }
+ if (tile instanceof TileIndustrialGrinder)
+ {
+ TileIndustrialGrinder grinder = (TileIndustrialGrinder) tile;
+ if (grinder.tank.getFluid() == null)
+ {
+ return false;
+ }
+ if (grinder.tank.getFluid() == fluidStack)
+ {
+ if (grinder.tank.getFluidAmount() >= fluidStack.amount)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
- @Override
- public boolean onCraft(TileEntity tile) {
- if (fluidStack == null) {
- return true;
- }
- if (tile instanceof TileIndustrialGrinder) {
- TileIndustrialGrinder grinder = (TileIndustrialGrinder) tile;
- if (grinder.tank.getFluid() == null) {
- return false;
- }
- if (grinder.tank.getFluid() == fluidStack) {
- if (grinder.tank.getFluidAmount() >= fluidStack.amount) {
- if (grinder.tank.getFluidAmount() > 0) {
- grinder.tank.setFluid(new FluidStack(fluidStack.getFluid(), grinder.tank.getFluidAmount() - fluidStack.amount));
- } else {
- grinder.tank.setFluid(null);
- }
- return true;
- }
- }
- }
- return false;
- }
+ @Override
+ public boolean onCraft(TileEntity tile)
+ {
+ if (fluidStack == null)
+ {
+ return true;
+ }
+ if (tile instanceof TileIndustrialGrinder)
+ {
+ TileIndustrialGrinder grinder = (TileIndustrialGrinder) tile;
+ if (grinder.tank.getFluid() == null)
+ {
+ return false;
+ }
+ if (grinder.tank.getFluid() == fluidStack)
+ {
+ if (grinder.tank.getFluidAmount() >= fluidStack.amount)
+ {
+ if (grinder.tank.getFluidAmount() > 0)
+ {
+ grinder.tank.setFluid(new FluidStack(fluidStack.getFluid(),
+ grinder.tank.getFluidAmount() - fluidStack.amount));
+ } else
+ {
+ grinder.tank.setFluid(null);
+ }
+ return true;
+ }
+ }
+ }
+ return false;
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/machines/IndustrialSawmillRecipe.java b/src/main/java/techreborn/api/recipe/machines/IndustrialSawmillRecipe.java
index 2bf48aed6..2da4c3733 100644
--- a/src/main/java/techreborn/api/recipe/machines/IndustrialSawmillRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/IndustrialSawmillRecipe.java
@@ -7,93 +7,115 @@ import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
import techreborn.tiles.TileIndustrialSawmill;
-public class IndustrialSawmillRecipe extends BaseRecipe {
+public class IndustrialSawmillRecipe extends BaseRecipe
+{
- public FluidStack fluidStack;
+ public FluidStack fluidStack;
- public boolean canUseOreDict = false;
+ public boolean canUseOreDict = false;
- public IndustrialSawmillRecipe(ItemStack input1, ItemStack input2, FluidStack fluidStack, ItemStack output1, ItemStack output2, ItemStack output3, int tickTime, int euPerTick) {
- super(Reference.industrialSawmillRecipe, tickTime, euPerTick);
- if (input1 != null)
- inputs.add(input1);
- if (input2 != null)
- inputs.add(input2);
- if (output1 != null)
- addOutput(output1);
- if (output2 != null)
- addOutput(output2);
- if (output3 != null)
- addOutput(output3);
- this.fluidStack = fluidStack;
- }
+ public IndustrialSawmillRecipe(ItemStack input1, ItemStack input2, FluidStack fluidStack, ItemStack output1,
+ ItemStack output2, ItemStack output3, int tickTime, int euPerTick)
+ {
+ super(Reference.industrialSawmillRecipe, tickTime, euPerTick);
+ if (input1 != null)
+ inputs.add(input1);
+ if (input2 != null)
+ inputs.add(input2);
+ if (output1 != null)
+ addOutput(output1);
+ if (output2 != null)
+ addOutput(output2);
+ if (output3 != null)
+ addOutput(output3);
+ this.fluidStack = fluidStack;
+ }
- public IndustrialSawmillRecipe(ItemStack input1, ItemStack input2, FluidStack fluidStack, ItemStack output1, ItemStack output2, ItemStack output3, int tickTime, int euPerTick, boolean canUseOreDict) {
- super(Reference.industrialSawmillRecipe, tickTime, euPerTick);
- if (input1 != null)
- inputs.add(input1);
- if (input2 != null)
- inputs.add(input2);
- if (output1 != null)
- addOutput(output1);
- if (output2 != null)
- addOutput(output2);
- if (output3 != null)
- addOutput(output3);
- this.fluidStack = fluidStack;
- this.canUseOreDict = canUseOreDict;
- }
+ public IndustrialSawmillRecipe(ItemStack input1, ItemStack input2, FluidStack fluidStack, ItemStack output1,
+ ItemStack output2, ItemStack output3, int tickTime, int euPerTick, boolean canUseOreDict)
+ {
+ super(Reference.industrialSawmillRecipe, tickTime, euPerTick);
+ if (input1 != null)
+ inputs.add(input1);
+ if (input2 != null)
+ inputs.add(input2);
+ if (output1 != null)
+ addOutput(output1);
+ if (output2 != null)
+ addOutput(output2);
+ if (output3 != null)
+ addOutput(output3);
+ this.fluidStack = fluidStack;
+ this.canUseOreDict = canUseOreDict;
+ }
- @Override
- public String getUserFreindlyName() {
- return "Industrial Sawmill";
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "Industrial Sawmill";
+ }
- @Override
- public boolean canCraft(TileEntity tile) {
- if (fluidStack == null) {
- return true;
- }
- if (tile instanceof TileIndustrialSawmill) {
- TileIndustrialSawmill sawmill = (TileIndustrialSawmill) tile;
- if (sawmill.tank.getFluid() == null) {
- return false;
- }
- if (sawmill.tank.getFluid()== fluidStack) {
- if (sawmill.tank.getFluidAmount() >= fluidStack.amount) {
- return true;
- }
- }
- }
- return false;
- }
+ @Override
+ public boolean canCraft(TileEntity tile)
+ {
+ if (fluidStack == null)
+ {
+ return true;
+ }
+ if (tile instanceof TileIndustrialSawmill)
+ {
+ TileIndustrialSawmill sawmill = (TileIndustrialSawmill) tile;
+ if (sawmill.tank.getFluid() == null)
+ {
+ return false;
+ }
+ if (sawmill.tank.getFluid() == fluidStack)
+ {
+ if (sawmill.tank.getFluidAmount() >= fluidStack.amount)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
- @Override
- public boolean onCraft(TileEntity tile) {
- if (fluidStack == null) {
- return true;
- }
- if (tile instanceof TileIndustrialSawmill) {
- TileIndustrialSawmill sawmill = (TileIndustrialSawmill) tile;
- if (sawmill.tank.getFluid() == null) {
- return false;
- }
- if (sawmill.tank.getFluid() == fluidStack) {
- if (sawmill.tank.getFluidAmount() >= fluidStack.amount) {
- if (sawmill.tank.getFluidAmount() > 0) {
- sawmill.tank.setFluid(new FluidStack(fluidStack.getFluid(), sawmill.tank.getFluidAmount() - fluidStack.amount));
- } else {
- sawmill.tank.setFluid(null);
- }
- return true;
- }
- }
- }
- return false;
- }
+ @Override
+ public boolean onCraft(TileEntity tile)
+ {
+ if (fluidStack == null)
+ {
+ return true;
+ }
+ if (tile instanceof TileIndustrialSawmill)
+ {
+ TileIndustrialSawmill sawmill = (TileIndustrialSawmill) tile;
+ if (sawmill.tank.getFluid() == null)
+ {
+ return false;
+ }
+ if (sawmill.tank.getFluid() == fluidStack)
+ {
+ if (sawmill.tank.getFluidAmount() >= fluidStack.amount)
+ {
+ if (sawmill.tank.getFluidAmount() > 0)
+ {
+ sawmill.tank.setFluid(new FluidStack(fluidStack.getFluid(),
+ sawmill.tank.getFluidAmount() - fluidStack.amount));
+ } else
+ {
+ sawmill.tank.setFluid(null);
+ }
+ return true;
+ }
+ }
+ }
+ return false;
+ }
- @Override
- public boolean useOreDic() {
- return canUseOreDict;
- }
+ @Override
+ public boolean useOreDic()
+ {
+ return canUseOreDict;
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/machines/PlateCuttingMachineRecipe.java b/src/main/java/techreborn/api/recipe/machines/PlateCuttingMachineRecipe.java
index 430d2c04c..b26269b25 100644
--- a/src/main/java/techreborn/api/recipe/machines/PlateCuttingMachineRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/PlateCuttingMachineRecipe.java
@@ -4,18 +4,21 @@ import net.minecraft.item.ItemStack;
import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
-public class PlateCuttingMachineRecipe extends BaseRecipe {
+public class PlateCuttingMachineRecipe extends BaseRecipe
+{
- public PlateCuttingMachineRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick) {
- super(Reference.plateCuttingMachineRecipe, tickTime, euPerTick);
- if (input1 != null)
- inputs.add(input1);
- if (output1 != null)
- addOutput(output1);
- }
+ public PlateCuttingMachineRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick)
+ {
+ super(Reference.plateCuttingMachineRecipe, tickTime, euPerTick);
+ if (input1 != null)
+ inputs.add(input1);
+ if (output1 != null)
+ addOutput(output1);
+ }
- @Override
- public String getUserFreindlyName() {
- return "Plate Cutting Machine";
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "Plate Cutting Machine";
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/machines/VacuumFreezerRecipe.java b/src/main/java/techreborn/api/recipe/machines/VacuumFreezerRecipe.java
index 187bb1e05..e19f2b1eb 100644
--- a/src/main/java/techreborn/api/recipe/machines/VacuumFreezerRecipe.java
+++ b/src/main/java/techreborn/api/recipe/machines/VacuumFreezerRecipe.java
@@ -6,28 +6,34 @@ import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
import techreborn.tiles.TileVacuumFreezer;
-public class VacuumFreezerRecipe extends BaseRecipe {
+public class VacuumFreezerRecipe extends BaseRecipe
+{
- public VacuumFreezerRecipe(ItemStack input, ItemStack output, int tickTime, int euPerTick) {
- super(Reference.vacuumFreezerRecipe, tickTime, euPerTick);
- if (input != null)
- inputs.add(input);
- if (output != null)
- addOutput(output);
- }
+ public VacuumFreezerRecipe(ItemStack input, ItemStack output, int tickTime, int euPerTick)
+ {
+ super(Reference.vacuumFreezerRecipe, tickTime, euPerTick);
+ if (input != null)
+ inputs.add(input);
+ if (output != null)
+ addOutput(output);
+ }
- @Override
- public String getUserFreindlyName() {
- return "Vacuum Freezer";
- }
+ @Override
+ public String getUserFreindlyName()
+ {
+ return "Vacuum Freezer";
+ }
- @Override
- public boolean canCraft(TileEntity tile) {
- if(tile instanceof TileVacuumFreezer){
- if(((TileVacuumFreezer) tile).multiBlockStatus == 1){
- return true;
- }
- }
- return false;
- }
+ @Override
+ public boolean canCraft(TileEntity tile)
+ {
+ if (tile instanceof TileVacuumFreezer)
+ {
+ if (((TileVacuumFreezer) tile).multiBlockStatus == 1)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/techreborn/api/recipe/machines/package-info.java b/src/main/java/techreborn/api/recipe/machines/package-info.java
index b78194ac1..dac7c5126 100644
--- a/src/main/java/techreborn/api/recipe/machines/package-info.java
+++ b/src/main/java/techreborn/api/recipe/machines/package-info.java
@@ -1,4 +1,3 @@
-@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI") package techreborn.api.recipe.machines;
-
-import net.minecraftforge.fml.common.API;
+@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI")
+package techreborn.api.recipe.machines;
diff --git a/src/main/java/techreborn/api/recipe/package-info.java b/src/main/java/techreborn/api/recipe/package-info.java
index 05972c5df..d04d6b467 100644
--- a/src/main/java/techreborn/api/recipe/package-info.java
+++ b/src/main/java/techreborn/api/recipe/package-info.java
@@ -1,4 +1,2 @@
-@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI") package techreborn.api.recipe;
-
-import net.minecraftforge.fml.common.API;
-
+@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI")
+package techreborn.api.recipe;
diff --git a/src/main/java/techreborn/api/recipe/recipeConfig/ConfigItem.java b/src/main/java/techreborn/api/recipe/recipeConfig/ConfigItem.java
index bf9dcf1aa..394424d5d 100644
--- a/src/main/java/techreborn/api/recipe/recipeConfig/ConfigItem.java
+++ b/src/main/java/techreborn/api/recipe/recipeConfig/ConfigItem.java
@@ -1,46 +1,53 @@
package techreborn.api.recipe.recipeConfig;
+public class ConfigItem
+{
-public class ConfigItem {
+ String localName;
- String localName;
+ String itemName;
- String itemName;
+ int meta;
- int meta;
+ int stackSize;
- int stackSize;
+ public String getItemName()
+ {
+ return itemName;
+ }
+ public void setItemName(String itemName)
+ {
+ this.itemName = itemName;
+ }
- public String getItemName() {
- return itemName;
- }
+ public int getMeta()
+ {
+ return meta;
+ }
- public void setItemName(String itemName) {
- this.itemName = itemName;
- }
+ public void setMeta(int meta)
+ {
+ this.meta = meta;
+ }
- public int getMeta() {
- return meta;
- }
+ public int getStackSize()
+ {
+ return stackSize;
+ }
- public void setMeta(int meta) {
- this.meta = meta;
- }
+ public void setStackSize(int stackSize)
+ {
+ this.stackSize = stackSize;
+ }
- public int getStackSize() {
- return stackSize;
- }
+ public String getLocalName()
+ {
+ return localName;
+ }
- public void setStackSize(int stackSize) {
- this.stackSize = stackSize;
- }
-
- public String getLocalName() {
- return localName;
- }
-
- public void setLocalName(String localName) {
- this.localName = localName;
- }
+ public void setLocalName(String localName)
+ {
+ this.localName = localName;
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/recipeConfig/RecipeConfig.java b/src/main/java/techreborn/api/recipe/recipeConfig/RecipeConfig.java
index 2b25c88d6..b37132287 100644
--- a/src/main/java/techreborn/api/recipe/recipeConfig/RecipeConfig.java
+++ b/src/main/java/techreborn/api/recipe/recipeConfig/RecipeConfig.java
@@ -2,59 +2,72 @@ package techreborn.api.recipe.recipeConfig;
import java.util.ArrayList;
-public class RecipeConfig {
+public class RecipeConfig
+{
- ArrayList inputs;
+ ArrayList inputs;
- ArrayList outputs;
+ ArrayList outputs;
- Boolean enabled;
+ Boolean enabled;
- String machine;
+ String machine;
- public ArrayList getInputs() {
- return inputs;
- }
+ public ArrayList getInputs()
+ {
+ return inputs;
+ }
- public void setInputs(ArrayList inputs) {
- this.inputs = inputs;
- }
+ public void setInputs(ArrayList inputs)
+ {
+ this.inputs = inputs;
+ }
- public ArrayList getOutputs() {
- return outputs;
- }
+ public ArrayList getOutputs()
+ {
+ return outputs;
+ }
- public void setOutputs(ArrayList outputs) {
- this.outputs = outputs;
- }
+ public void setOutputs(ArrayList outputs)
+ {
+ this.outputs = outputs;
+ }
- public Boolean getEnabled() {
- return enabled;
- }
+ public Boolean getEnabled()
+ {
+ return enabled;
+ }
- public void setEnabled(Boolean enabled) {
- this.enabled = enabled;
- }
+ public void setEnabled(Boolean enabled)
+ {
+ this.enabled = enabled;
+ }
- public String getMachine() {
- return machine;
- }
+ public String getMachine()
+ {
+ return machine;
+ }
- public void setMachine(String machine) {
- this.machine = machine;
- }
+ public void setMachine(String machine)
+ {
+ this.machine = machine;
+ }
- public void addInputs(ConfigItem item) {
- if (inputs == null) {
- inputs = new ArrayList();
- }
- inputs.add(item);
- }
+ public void addInputs(ConfigItem item)
+ {
+ if (inputs == null)
+ {
+ inputs = new ArrayList();
+ }
+ inputs.add(item);
+ }
- public void addOutputs(ConfigItem item) {
- if (outputs == null) {
- outputs = new ArrayList();
- }
- outputs.add(item);
- }
+ public void addOutputs(ConfigItem item)
+ {
+ if (outputs == null)
+ {
+ outputs = new ArrayList();
+ }
+ outputs.add(item);
+ }
}
diff --git a/src/main/java/techreborn/api/recipe/recipeConfig/RecipeConfigManager.java b/src/main/java/techreborn/api/recipe/recipeConfig/RecipeConfigManager.java
index cb5e9f505..9e85f2918 100644
--- a/src/main/java/techreborn/api/recipe/recipeConfig/RecipeConfigManager.java
+++ b/src/main/java/techreborn/api/recipe/recipeConfig/RecipeConfigManager.java
@@ -1,65 +1,75 @@
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;
-public class RecipeConfigManager {
+import net.minecraft.item.ItemStack;
+import techreborn.api.recipe.IBaseRecipeType;
- public static ArrayList configs = new ArrayList();
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
- static File configFile = null;
+public class RecipeConfigManager
+{
- public static void load(File configDir) {
- if (configFile == null) {
- configFile = new File(configDir, "techRebornRecipes.json");
- }
- }
+ public static ArrayList configs = new ArrayList();
- public static void save() {
- if (configFile.exists()) {
- configFile.delete();
- }
- Gson gson = new GsonBuilder().setPrettyPrinting().create();
- String json = gson.toJson(configs);
- try {
- FileWriter writer = new FileWriter(configFile);
- writer.write(json);
- writer.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
+ static File configFile = null;
+ public static void load(File configDir)
+ {
+ if (configFile == null)
+ {
+ configFile = new File(configDir, "techRebornRecipes.json");
+ }
+ }
- public static boolean canLoadRecipe(IBaseRecipeType recipeType) {
- RecipeConfig config = new RecipeConfig();
- for (ItemStack stack : recipeType.getInputs()) {
- config.addInputs(itemToConfig(stack));
- }
- for (ItemStack stack : recipeType.getOutputs()) {
- config.addOutputs(itemToConfig(stack));
- }
- config.enabled = true;
- config.setMachine(recipeType.getRecipeName());
- configs.add(config);
- return config.enabled;
- }
+ public static void save()
+ {
+ if (configFile.exists())
+ {
+ configFile.delete();
+ }
+ Gson gson = new GsonBuilder().setPrettyPrinting().create();
+ String json = gson.toJson(configs);
+ try
+ {
+ FileWriter writer = new FileWriter(configFile);
+ writer.write(json);
+ writer.close();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+ public static boolean canLoadRecipe(IBaseRecipeType recipeType)
+ {
+ RecipeConfig config = new RecipeConfig();
+ for (ItemStack stack : recipeType.getInputs())
+ {
+ config.addInputs(itemToConfig(stack));
+ }
+ for (ItemStack stack : recipeType.getOutputs())
+ {
+ config.addOutputs(itemToConfig(stack));
+ }
+ config.enabled = true;
+ config.setMachine(recipeType.getRecipeName());
+ configs.add(config);
+ return config.enabled;
+ }
- public static ConfigItem itemToConfig(ItemStack stack) {
- ConfigItem newItem = new ConfigItem();
- newItem.setItemName(stack.getItem().getUnlocalizedName());
- newItem.setMeta(stack.getItemDamage());
- newItem.setStackSize(stack.stackSize);
- newItem.setLocalName(stack.getDisplayName());
- return newItem;
- }
+ public static ConfigItem itemToConfig(ItemStack stack)
+ {
+ ConfigItem newItem = new ConfigItem();
+ newItem.setItemName(stack.getItem().getUnlocalizedName());
+ newItem.setMeta(stack.getItemDamage());
+ newItem.setStackSize(stack.stackSize);
+ newItem.setLocalName(stack.getDisplayName());
+ return newItem;
+ }
}
diff --git a/src/main/java/techreborn/api/upgrade/IMachineUpgrade.java b/src/main/java/techreborn/api/upgrade/IMachineUpgrade.java
index 0ff52d2c4..d528e41c1 100644
--- a/src/main/java/techreborn/api/upgrade/IMachineUpgrade.java
+++ b/src/main/java/techreborn/api/upgrade/IMachineUpgrade.java
@@ -3,7 +3,8 @@ package techreborn.api.upgrade;
import net.minecraft.item.ItemStack;
import techreborn.api.recipe.RecipeCrafter;
-public interface IMachineUpgrade {
+public interface IMachineUpgrade
+{
- public void processUpgrade(RecipeCrafter crafter, ItemStack stack);
+ public void processUpgrade(RecipeCrafter crafter, ItemStack stack);
}
diff --git a/src/main/java/techreborn/api/upgrade/UpgradeHandler.java b/src/main/java/techreborn/api/upgrade/UpgradeHandler.java
index 575a18b26..53b8cc0c3 100644
--- a/src/main/java/techreborn/api/upgrade/UpgradeHandler.java
+++ b/src/main/java/techreborn/api/upgrade/UpgradeHandler.java
@@ -1,39 +1,46 @@
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
+{
-public class UpgradeHandler {
+ RecipeCrafter crafter;
- RecipeCrafter crafter;
+ Inventory inventory;
- Inventory inventory;
+ ArrayList slots = new ArrayList();
- ArrayList slots = new ArrayList();
+ public UpgradeHandler(RecipeCrafter crafter, Inventory inventory, int... slots)
+ {
+ this.crafter = crafter;
+ this.inventory = inventory;
+ for (int slot : slots)
+ {
+ this.slots.add(slot);
+ }
+ }
- public UpgradeHandler(RecipeCrafter crafter, Inventory inventory, int... slots) {
- this.crafter = crafter;
- this.inventory = inventory;
- for (int slot : slots) {
- this.slots.add(slot);
- }
- }
-
- public void tick() {
- if (crafter.parentTile.getWorld().isRemote)
- return;
- crafter.resetPowerMulti();
- crafter.resetSpeedMulti();
- for (int slot : this.slots) {
- ItemStack stack = inventory.getStackInSlot(slot);
- if (stack != null && stack.getItem() instanceof IMachineUpgrade) {
- ((IMachineUpgrade) stack.getItem()).processUpgrade(crafter, stack);
- }
- }
- if (crafter.currentRecipe != null)
- crafter.currentNeededTicks = (int) (crafter.currentRecipe.tickTime() * (1.0 - crafter.getSpeedMultiplier()));
- }
+ public void tick()
+ {
+ if (crafter.parentTile.getWorld().isRemote)
+ return;
+ crafter.resetPowerMulti();
+ crafter.resetSpeedMulti();
+ for (int slot : this.slots)
+ {
+ ItemStack stack = inventory.getStackInSlot(slot);
+ if (stack != null && stack.getItem() instanceof IMachineUpgrade)
+ {
+ ((IMachineUpgrade) stack.getItem()).processUpgrade(crafter, stack);
+ }
+ }
+ if (crafter.currentRecipe != null)
+ crafter.currentNeededTicks = (int) (crafter.currentRecipe.tickTime()
+ * (1.0 - crafter.getSpeedMultiplier()));
+ }
}
diff --git a/src/main/java/techreborn/api/upgrade/package-info.java b/src/main/java/techreborn/api/upgrade/package-info.java
index 2f223430f..54f640a22 100644
--- a/src/main/java/techreborn/api/upgrade/package-info.java
+++ b/src/main/java/techreborn/api/upgrade/package-info.java
@@ -1,4 +1,2 @@
-@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI") package techreborn.api.upgrade;
-
-import net.minecraftforge.fml.common.API;
-
+@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI")
+package techreborn.api.upgrade;
diff --git a/src/main/java/techreborn/blocks/BlockComputerCube.java b/src/main/java/techreborn/blocks/BlockComputerCube.java
index 197f63559..fdcbe10c4 100644
--- a/src/main/java/techreborn/blocks/BlockComputerCube.java
+++ b/src/main/java/techreborn/blocks/BlockComputerCube.java
@@ -9,44 +9,49 @@ import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
-public class BlockComputerCube extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockComputerCube extends BlockMachineBase implements IAdvancedRotationTexture
+{
+ public BlockComputerCube(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.computercube");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- public BlockComputerCube(Material material) {
- super();
- setUnlocalizedName("techreborn.computercube");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.manuelID, world, x, y, z);
+ return true;
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z,
- EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.manuelID, world, x,
- y, z);
- return true;
- }
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "computer_cube";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "computer_cube";
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "computer_cube";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "computer_cube" ;
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "computer_cube";
+ }
- @Override
- public String getTop(boolean isActive) {
- return prefix + "computer_cube";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "computer_cube";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "computer_cube";
+ }
}
\ No newline at end of file
diff --git a/src/main/java/techreborn/blocks/BlockDigitalChest.java b/src/main/java/techreborn/blocks/BlockDigitalChest.java
index 73b6b699b..ec3515a37 100644
--- a/src/main/java/techreborn/blocks/BlockDigitalChest.java
+++ b/src/main/java/techreborn/blocks/BlockDigitalChest.java
@@ -10,48 +10,55 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileDigitalChest;
-public class BlockDigitalChest extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockDigitalChest extends BlockMachineBase implements IAdvancedRotationTexture
+{
- public BlockDigitalChest() {
- super();
- setUnlocalizedName("techreborn.digitalChest");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockDigitalChest()
+ {
+ super();
+ setUnlocalizedName("techreborn.digitalChest");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileDigitalChest();
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileDigitalChest();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z,
- EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.digitalChestID, world, x,
- y, z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.digitalChestID, world, x, y, z);
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- @Override
- public String getFront(boolean isActive) {
- return prefix + "quantum_chest";
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "quantum_chest";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "qchest_side" ;
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "qchest_side";
+ }
- @Override
- public String getTop(boolean isActive) {
- return prefix + "quantum_top";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "quantum_top";
+ }
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "machine_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockElectricCraftingTable.java b/src/main/java/techreborn/blocks/BlockElectricCraftingTable.java
index 7673ebab9..2a38bc41c 100644
--- a/src/main/java/techreborn/blocks/BlockElectricCraftingTable.java
+++ b/src/main/java/techreborn/blocks/BlockElectricCraftingTable.java
@@ -5,36 +5,40 @@ import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IAdvancedRotationTexture;
import techreborn.client.TechRebornCreativeTab;
+public class BlockElectricCraftingTable extends BlockMachineBase implements IAdvancedRotationTexture
+{
-public class BlockElectricCraftingTable extends BlockMachineBase implements IAdvancedRotationTexture {
+ public BlockElectricCraftingTable(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.electriccraftingtable");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- public BlockElectricCraftingTable(Material material) {
- super();
- setUnlocalizedName("techreborn.electriccraftingtable");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "electric_crafting_table_front";
+ }
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "machine_side";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "electric_crafting_table_front";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "electric_crafting_table_top";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "machine_side" ;
- }
-
- @Override
- public String getTop(boolean isActive) {
- return prefix + "electric_crafting_table_top";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "machine_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockFusionCoil.java b/src/main/java/techreborn/blocks/BlockFusionCoil.java
index f13379342..952f74d76 100644
--- a/src/main/java/techreborn/blocks/BlockFusionCoil.java
+++ b/src/main/java/techreborn/blocks/BlockFusionCoil.java
@@ -6,20 +6,21 @@ import net.minecraft.util.EnumFacing;
import reborncore.common.blocks.BlockMachineBase;
import techreborn.client.TechRebornCreativeTab;
-public class BlockFusionCoil extends BlockMachineBase {
+public class BlockFusionCoil extends BlockMachineBase
+{
+ public BlockFusionCoil(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.fusioncoil");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- public BlockFusionCoil(Material material) {
- super();
- setUnlocalizedName("techreborn.fusioncoil");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
-
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
-
- @Override
- public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing) {
- return prefix + "fusion_coil";
- }
+ @Override
+ public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing)
+ {
+ return prefix + "fusion_coil";
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockFusionControlComputer.java b/src/main/java/techreborn/blocks/BlockFusionControlComputer.java
index a72c295d1..41e48f6f3 100644
--- a/src/main/java/techreborn/blocks/BlockFusionControlComputer.java
+++ b/src/main/java/techreborn/blocks/BlockFusionControlComputer.java
@@ -14,59 +14,71 @@ import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.fusionReactor.TileEntityFusionController;
import techreborn.utils.damageSources.FusionDamageSource;
-public class BlockFusionControlComputer extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockFusionControlComputer extends BlockMachineBase implements IAdvancedRotationTexture
+{
- public BlockFusionControlComputer(Material material) {
- super();
- setUnlocalizedName("techreborn.fusioncontrolcomputer");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockFusionControlComputer(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.fusioncontrolcomputer");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z,
- EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- TileEntityFusionController tileEntityFusionController = (TileEntityFusionController) world.getTileEntity(new BlockPos(x, y, z));
- tileEntityFusionController.checkCoils();
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.fusionID, world, x, y,
- z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ TileEntityFusionController tileEntityFusionController = (TileEntityFusionController) world
+ .getTileEntity(new BlockPos(x, y, z));
+ tileEntityFusionController.checkCoils();
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.fusionID, world, x, y, z);
+ return true;
+ }
- @Override
- public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, Entity entityIn) {
- super.onEntityCollidedWithBlock(worldIn, pos, entityIn);
- if(worldIn.getTileEntity(pos) instanceof TileEntityFusionController){
- if(((TileEntityFusionController) worldIn.getTileEntity(pos)).crafingTickTime != 0 && ((TileEntityFusionController) worldIn.getTileEntity(pos)).checkCoils()){
- entityIn.attackEntityFrom(new FusionDamageSource(), 200F);
- }
- }
- }
+ @Override
+ public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, Entity entityIn)
+ {
+ super.onEntityCollidedWithBlock(worldIn, pos, entityIn);
+ if (worldIn.getTileEntity(pos) instanceof TileEntityFusionController)
+ {
+ if (((TileEntityFusionController) worldIn.getTileEntity(pos)).crafingTickTime != 0
+ && ((TileEntityFusionController) worldIn.getTileEntity(pos)).checkCoils())
+ {
+ entityIn.attackEntityFrom(new FusionDamageSource(), 200F);
+ }
+ }
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int meta) {
- return new TileEntityFusionController();
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int meta)
+ {
+ return new TileEntityFusionController();
+ }
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- @Override
- public String getFront(boolean isActive) {
- return prefix + "fusion_control_computer_front";
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "fusion_control_computer_front";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "machine_side" ;
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "machine_side";
+ }
- @Override
- public String getTop(boolean isActive) {
- return prefix + "machine_side";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "machine_side";
+ }
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "machine_side";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "machine_side";
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockHighlyAdvancedMachine.java b/src/main/java/techreborn/blocks/BlockHighlyAdvancedMachine.java
index 9c299d3ab..cfdb4927d 100644
--- a/src/main/java/techreborn/blocks/BlockHighlyAdvancedMachine.java
+++ b/src/main/java/techreborn/blocks/BlockHighlyAdvancedMachine.java
@@ -6,20 +6,22 @@ import net.minecraft.util.EnumFacing;
import reborncore.common.blocks.BlockMachineBase;
import techreborn.client.TechRebornCreativeTab;
-public class BlockHighlyAdvancedMachine extends BlockMachineBase {
+public class BlockHighlyAdvancedMachine extends BlockMachineBase
+{
- public BlockHighlyAdvancedMachine(Material material) {
- super();
- setUnlocalizedName("techreborn.highlyAdvancedMachine");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockHighlyAdvancedMachine(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.highlyAdvancedMachine");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- private final String prefix = "techreborn:blocks/machine/machine_blocks/";
+ private final String prefix = "techreborn:blocks/machine/machine_blocks/";
-
- @Override
- public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing) {
- return prefix + "highlyadvancedmachine";
- }
+ @Override
+ public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing)
+ {
+ return prefix + "highlyadvancedmachine";
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockIronFence.java b/src/main/java/techreborn/blocks/BlockIronFence.java
index 04cf1bd65..bd0ef3f66 100644
--- a/src/main/java/techreborn/blocks/BlockIronFence.java
+++ b/src/main/java/techreborn/blocks/BlockIronFence.java
@@ -5,14 +5,16 @@ import net.minecraft.block.BlockPlanks;
import net.minecraft.block.material.Material;
import techreborn.client.TechRebornCreativeTabMisc;
-public class BlockIronFence extends BlockFence {
+public class BlockIronFence extends BlockFence
+{
- public BlockIronFence() {
+ public BlockIronFence()
+ {
super(Material.iron, BlockPlanks.EnumType.OAK.getMapColor());
- setUnlocalizedName("techreborn.ironfence");
- setCreativeTab(TechRebornCreativeTabMisc.instance);
- setHardness(2.0F);
- setHarvestLevel("pickaxe", 2);
+ setUnlocalizedName("techreborn.ironfence");
+ setCreativeTab(TechRebornCreativeTabMisc.instance);
+ setHardness(2.0F);
+ setHarvestLevel("pickaxe", 2);
}
}
diff --git a/src/main/java/techreborn/blocks/BlockMachineCasing.java b/src/main/java/techreborn/blocks/BlockMachineCasing.java
index 0406c8d01..e30f41940 100644
--- a/src/main/java/techreborn/blocks/BlockMachineCasing.java
+++ b/src/main/java/techreborn/blocks/BlockMachineCasing.java
@@ -1,5 +1,8 @@
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;
@@ -20,93 +23,105 @@ 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 class BlockMachineCasing extends BlockMultiblockBase implements ITexturedBlock {
+ public static final String[] types = new String[] { "standard", "reinforced", "advanced" };
- public static final String[] types = new String[]
- {"standard", "reinforced", "advanced"};
+ public BlockMachineCasing(Material material)
+ {
+ super(material);
+ setCreativeTab(TechRebornCreativeTab.instance);
+ setUnlocalizedName("techreborn.machineCasing");
+ setHardness(2F);
+ this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0));
+ }
- public BlockMachineCasing(Material material) {
- super(material);
- setCreativeTab(TechRebornCreativeTab.instance);
- setUnlocalizedName("techreborn.machineCasing");
- setHardness(2F);
- this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0));
- }
+ public PropertyInteger METADATA;
- public PropertyInteger METADATA;
+ @Override
+ public IBlockState getStateFromMeta(int meta)
+ {
+ return this.getDefaultState().withProperty(METADATA, meta);
+ }
- @Override
- public IBlockState getStateFromMeta(int meta) {
- return this.getDefaultState().withProperty(METADATA, meta);
- }
+ @Override
+ public int getMetaFromState(IBlockState state)
+ {
+ return (Integer) state.getValue(METADATA);
+ }
- @Override
- public int getMetaFromState(IBlockState state) {
- return (Integer) state.getValue(METADATA);
- }
+ protected BlockStateContainer createBlockState()
+ {
- protected BlockStateContainer createBlockState() {
+ METADATA = PropertyInteger.create("type", 0, types.length);
+ return new BlockStateContainer(this, METADATA);
+ }
- METADATA = PropertyInteger.create("type", 0, types.length);
- return new BlockStateContainer(this, METADATA);
- }
+ public int getHeatFromState(IBlockState state)
+ {
+ switch (getMetaFromState(state))
+ {
+ case 0:
+ return 1020 / 25;
+ case 1:
+ return 1700 / 25;
+ case 2:
+ return 2380 / 25;
+ }
+ return 0;
+ }
- public int getHeatFromState(IBlockState state) {
- switch (getMetaFromState(state)) {
- case 0:
- return 1020 / 25;
- case 1:
- return 1700 / 25;
- case 2:
- return 2380 / 25;
- }
- return 0;
- }
+ @Override
+ public Item getItemDropped(IBlockState state, Random rand, int fortune)
+ {
+ return Item.getItemFromBlock(this);
+ }
- @Override
- public Item getItemDropped(IBlockState state, Random rand, int fortune) {
- return Item.getItemFromBlock(this);
- }
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
+ {
+ for (int meta = 0; meta < types.length; meta++)
+ {
+ list.add(new ItemStack(item, 1, meta));
+ }
+ }
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
- for (int meta = 0; meta < types.length; meta++) {
- list.add(new ItemStack(item, 1, meta));
- }
- }
+ @Override
+ public int damageDropped(IBlockState state)
+ {
+ return super.damageDropped(state);
+ }
- @Override
- public int damageDropped(IBlockState state) {
- return super.damageDropped(state);
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileMachineCasing();
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileMachineCasing();
- }
+ @Override
+ public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess worldIn, BlockPos pos, EnumFacing side)
+ {
+ Block b = worldIn.getBlockState(pos).getBlock();
+ return b == (Block) this ? false : super.shouldSideBeRendered(blockState, worldIn, pos, side);
+ }
- @Override
- public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess worldIn, BlockPos pos, EnumFacing side) {
- Block b = worldIn.getBlockState(pos).getBlock();
- return b == (Block) this ? false : super.shouldSideBeRendered(blockState, worldIn, pos, side);
- }
+ public boolean shouldConnectToBlock(IBlockAccess blockAccess, int x, int y, int z, Block block, int meta)
+ {
+ return block == (Block) this;
+ }
- public boolean shouldConnectToBlock(IBlockAccess blockAccess, int x, int y, int z, Block block, int meta) {
- return block == (Block) this;
- }
+ @Override
+ public String getTextureNameFromState(IBlockState blockState, EnumFacing facing)
+ {
+ return "techreborn:blocks/machine/machine_blocks/casing" + types[getMetaFromState(blockState)] + "_full";
+ }
- @Override
- public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
- return "techreborn:blocks/machine/machine_blocks/casing" + types[getMetaFromState(blockState)] + "_full";
- }
-
- @Override
- public int amountOfStates() {
- return types.length;
- }
+ @Override
+ public int amountOfStates()
+ {
+ return types.length;
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockMachineFrame.java b/src/main/java/techreborn/blocks/BlockMachineFrame.java
index 76d780c27..1cde557c0 100644
--- a/src/main/java/techreborn/blocks/BlockMachineFrame.java
+++ b/src/main/java/techreborn/blocks/BlockMachineFrame.java
@@ -1,5 +1,8 @@
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;
@@ -15,70 +18,78 @@ 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;
-public class BlockMachineFrame extends BaseBlock implements ITexturedBlock {
- public PropertyInteger METADATA;
+ public static ItemStack getFrameByName(String name, int count)
+ {
+ for (int i = 0; i < types.length; i++)
+ {
+ if (types[i].equalsIgnoreCase(name))
+ {
+ return new ItemStack(ModBlocks.machineframe, count, i);
+ }
+ }
+ throw new InvalidParameterException("The part " + name + " could not be found.");
+ }
- public static ItemStack getFrameByName(String name, int count) {
- for (int i = 0; i < types.length; i++) {
- if (types[i].equalsIgnoreCase(name)) {
- return new ItemStack(ModBlocks.machineframe, count, i);
- }
- }
- throw new InvalidParameterException("The part " + name + " could not be found.");
- }
+ public static final String[] types = new String[] { "aluminum", "iron", "bronze", "brass", "steel", "titanium",
+ "machine", "advancedMachine" };
- public static final String[] types = new String[]
- {"aluminum", "iron", "bronze", "brass", "steel", "titanium", "machine", "advancedMachine"};
+ public BlockMachineFrame(Material material)
+ {
+ super(material);
+ setUnlocalizedName("techreborn.machineFrame");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ setHardness(1f);
+ this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0));
+ }
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
+ {
+ for (int meta = 0; meta < types.length; meta++)
+ {
+ list.add(new ItemStack(item, 1, meta));
+ }
+ }
- public BlockMachineFrame(Material material) {
- super(material);
- setUnlocalizedName("techreborn.machineFrame");
- setCreativeTab(TechRebornCreativeTab.instance);
- setHardness(1f);
- this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0));
- }
+ @Override
+ public int damageDropped(IBlockState state)
+ {
+ return super.damageDropped(state);
+ }
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
- for (int meta = 0; meta < types.length; meta++) {
- list.add(new ItemStack(item, 1, meta));
- }
- }
+ @Override
+ public String getTextureNameFromState(IBlockState blockState, EnumFacing facing)
+ {
+ return "techreborn:blocks/machine/machine_blocks/" + types[getMetaFromState(blockState)] + "_machine_block";
+ }
+ @Override
+ public int amountOfStates()
+ {
+ return types.length;
+ }
- @Override
- public int damageDropped(IBlockState state) {
- return super.damageDropped(state);
- }
+ @Override
+ public int getMetaFromState(IBlockState state)
+ {
+ return state.getValue(METADATA);
+ }
- @Override
- public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
- return "techreborn:blocks/machine/machine_blocks/" + types[getMetaFromState(blockState)] + "_machine_block";
- }
+ protected BlockStateContainer createBlockState()
+ {
- @Override
- public int amountOfStates() {
- return types.length;
- }
+ METADATA = PropertyInteger.create("type", 0, types.length - 1);
+ return new BlockStateContainer(this, METADATA);
+ }
- @Override
- public int getMetaFromState(IBlockState state) {
- return state.getValue(METADATA);
- }
-
- protected BlockStateContainer createBlockState() {
-
- METADATA = PropertyInteger.create("type", 0, types.length -1);
- return new BlockStateContainer(this, METADATA);
- }
-
- @Override
- public IBlockState getStateFromMeta(int meta) {
- return this.getDefaultState().withProperty(METADATA, meta);
- }
+ @Override
+ public IBlockState getStateFromMeta(int meta)
+ {
+ return this.getDefaultState().withProperty(METADATA, meta);
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockNuke.java b/src/main/java/techreborn/blocks/BlockNuke.java
index c06b00be0..99b6b8477 100644
--- a/src/main/java/techreborn/blocks/BlockNuke.java
+++ b/src/main/java/techreborn/blocks/BlockNuke.java
@@ -9,8 +9,8 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
import net.minecraft.entity.projectile.EntityArrow;
+import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
@@ -24,92 +24,116 @@ import techreborn.entitys.EntityNukePrimed;
/**
* Created by Mark on 13/03/2016.
*/
-public class BlockNuke extends BaseBlock implements ITexturedBlock {
- public static final PropertyBool OVERLAY = PropertyBool.create("overlay");
+public class BlockNuke extends BaseBlock implements ITexturedBlock
+{
+ public static final PropertyBool OVERLAY = PropertyBool.create("overlay");
- public BlockNuke() {
- super(Material.tnt);
- setUnlocalizedName("techreborn.nuke");
- setCreativeTab(TechRebornCreativeTabMisc.instance);
- RebornCore.jsonDestroyer.registerObject(this);
- this.setDefaultState(this.blockState.getBaseState().withProperty(OVERLAY, false));
- }
+ public BlockNuke()
+ {
+ super(Material.tnt);
+ setUnlocalizedName("techreborn.nuke");
+ setCreativeTab(TechRebornCreativeTabMisc.instance);
+ RebornCore.jsonDestroyer.registerObject(this);
+ this.setDefaultState(this.blockState.getBaseState().withProperty(OVERLAY, false));
+ }
- public void explode(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase igniter) {
- if (!worldIn.isRemote) {
- 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);
- }
- }
+ public void explode(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase igniter)
+ {
+ if (!worldIn.isRemote)
+ {
+ 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 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);
+ }
+ }
- public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) {
- if (!worldIn.isRemote && entityIn instanceof EntityArrow) {
- EntityArrow entityarrow = (EntityArrow) entityIn;
+ public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
+ {
+ if (!worldIn.isRemote && entityIn instanceof EntityArrow)
+ {
+ EntityArrow entityarrow = (EntityArrow) entityIn;
- if (entityarrow.isBurning()) {
- this.explode(worldIn, pos, state, entityarrow.shootingEntity instanceof EntityLivingBase ? (EntityLivingBase) entityarrow.shootingEntity : null);
- worldIn.setBlockToAir(pos);
- }
- }
- }
+ if (entityarrow.isBurning())
+ {
+ this.explode(worldIn, pos, state, entityarrow.shootingEntity instanceof EntityLivingBase
+ ? (EntityLivingBase) entityarrow.shootingEntity : null);
+ worldIn.setBlockToAir(pos);
+ }
+ }
+ }
- public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
- super.onBlockAdded(worldIn, pos, state);
- if (worldIn.isBlockPowered(pos)) {
- this.explode(worldIn, pos, state, null);
- worldIn.setBlockToAir(pos);
- }
- }
+ public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
+ {
+ super.onBlockAdded(worldIn, pos, state);
+ if (worldIn.isBlockPowered(pos))
+ {
+ this.explode(worldIn, pos, state, null);
+ worldIn.setBlockToAir(pos);
+ }
+ }
- /**
- * Called when a neighboring block changes.
- */
- public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) {
- if (worldIn.isBlockPowered(pos)) {
- this.explode(worldIn, pos, state, null);
- worldIn.setBlockToAir(pos);
- }
- }
+ /**
+ * Called when a neighboring block changes.
+ */
+ public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
+ {
+ if (worldIn.isBlockPowered(pos))
+ {
+ this.explode(worldIn, pos, state, null);
+ worldIn.setBlockToAir(pos);
+ }
+ }
- @Override
- public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
- return false;
- }
+ @Override
+ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn,
+ EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
+ {
+ return false;
+ }
- @Override
- public String getTextureNameFromState(IBlockState iBlockState, EnumFacing enumFacing) {
- if (iBlockState.getValue(OVERLAY)) {
- return "techreborn:blocks/nuke_overlay";
- }
- return "techreborn:blocks/nuke";
- }
+ @Override
+ public String getTextureNameFromState(IBlockState iBlockState, EnumFacing enumFacing)
+ {
+ if (iBlockState.getValue(OVERLAY))
+ {
+ return "techreborn:blocks/nuke_overlay";
+ }
+ return "techreborn:blocks/nuke";
+ }
- @Override
- public int amountOfStates() {
- return 2;
- }
+ @Override
+ public int amountOfStates()
+ {
+ return 2;
+ }
- public int getMetaFromState(IBlockState state) {
- return state.getValue(OVERLAY) ? 1 : 0;
- }
+ public int getMetaFromState(IBlockState state)
+ {
+ return state.getValue(OVERLAY) ? 1 : 0;
+ }
- public IBlockState getStateFromMeta(int meta)
- {
- return this.getDefaultState().withProperty(OVERLAY, Boolean.valueOf((meta & 1) > 0));
- }
+ public IBlockState getStateFromMeta(int meta)
+ {
+ return this.getDefaultState().withProperty(OVERLAY, Boolean.valueOf((meta & 1) > 0));
+ }
- protected BlockStateContainer createBlockState() {
- return new BlockStateContainer(this, OVERLAY);
- }
+ protected BlockStateContainer createBlockState()
+ {
+ return new BlockStateContainer(this, OVERLAY);
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockOre.java b/src/main/java/techreborn/blocks/BlockOre.java
index 5cd015473..e15210b3a 100644
--- a/src/main/java/techreborn/blocks/BlockOre.java
+++ b/src/main/java/techreborn/blocks/BlockOre.java
@@ -1,5 +1,10 @@
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;
@@ -27,173 +32,203 @@ import techreborn.items.ItemDusts;
import techreborn.items.ItemGems;
import techreborn.world.config.IOreNameProvider;
-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 class BlockOre extends BaseBlock implements ITexturedBlock, IOreNameProvider {
+ public static ItemStack getOreByName(String name, int count)
+ {
+ for (int i = 0; i < types.length; i++)
+ {
+ if (types[i].equalsIgnoreCase(name))
+ {
+ return new ItemStack(ModBlocks.ore, count, i);
+ }
+ }
+ throw new InvalidParameterException("The ore block " + name + " could not be found.");
+ }
- public static ItemStack getOreByName(String name, int count) {
- for (int i = 0; i < types.length; i++) {
- if (types[i].equalsIgnoreCase(name)) {
- return new ItemStack(ModBlocks.ore, count, i);
- }
- }
- throw new InvalidParameterException("The ore block " + name + " could not be found.");
- }
+ public static ItemStack getOreByName(String name)
+ {
+ return getOreByName(name, 1);
+ }
- public static ItemStack getOreByName(String name) {
- return getOreByName(name, 1);
- }
+ public IBlockState getBlockStateFromName(String name)
+ {
+ int index = -1;
+ for (int i = 0; i < types.length; i++)
+ {
+ if (types[i].equalsIgnoreCase(name))
+ {
+ index = i;
+ break;
+ }
+ }
+ if (index == -1)
+ {
+ return ModBlocks.ore2.getBlockStateFromName(name);
+ }
+ return getStateFromMeta(index);
+ }
- public IBlockState getBlockStateFromName(String name){
- int index = -1;
- for (int i = 0; i < types.length; i++) {
- if (types[i].equalsIgnoreCase(name)) {
- index = i;
- break;
- }
- }
- if(index == -1){
- return ModBlocks.ore2.getBlockStateFromName(name);
- }
- return getStateFromMeta(index);
- }
+ public static final String[] types = new String[] { "Galena", "Iridium", "Ruby", "Sapphire", "Bauxite", "Pyrite",
+ "Cinnabar", "Sphalerite", "Tungston", "Sheldonite", "Peridot", "Sodalite", "Tetrahedrite", "Cassiterite",
+ "Lead", "Silver" };
- public static final String[] types = new String[]
- {"Galena", "Iridium", "Ruby", "Sapphire", "Bauxite", "Pyrite", "Cinnabar",
- "Sphalerite", "Tungston", "Sheldonite", "Peridot", "Sodalite",
- "Tetrahedrite", "Cassiterite", "Lead", "Silver"};
+ public PropertyInteger METADATA;
- public PropertyInteger METADATA;
+ public BlockOre(Material material)
+ {
+ super(material);
+ setUnlocalizedName("techreborn.ore");
+ setCreativeTab(TechRebornCreativeTabMisc.instance);
+ setHardness(2.0f);
+ setHarvestLevel("pickaxe", 2);
+ this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0));
+ }
- public BlockOre(Material material) {
- super(material);
- setUnlocalizedName("techreborn.ore");
- setCreativeTab(TechRebornCreativeTabMisc.instance);
- setHardness(2.0f);
- setHarvestLevel("pickaxe", 2);
- this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0));
- }
+ @Deprecated
+ public ArrayList getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
+ {
+ int metadata = getMetaFromState(state);
+ Random random = new Random();
+ // Ruby
+ if (metadata == 2)
+ {
+ OreDrop ruby = new OreDrop(ItemGems.getGemByName("ruby"),
+ ConfigTechReborn.FortuneSecondaryOreMultiplierPerLevel);
+ OreDrop redGarnet = new OreDrop(ItemGems.getGemByName("redGarnet"), 0.02);
+ OreDropSet set = new OreDropSet(ruby, redGarnet);
+ return set.drop(fortune, random);
+ }
+ // Sapphire
+ if (metadata == 3)
+ {
+ OreDrop sapphire = new OreDrop(ItemGems.getGemByName("sapphire"),
+ ConfigTechReborn.FortuneSecondaryOreMultiplierPerLevel);
+ OreDrop peridot = new OreDrop(ItemGems.getGemByName("peridot"), 0.03);
+ OreDropSet set = new OreDropSet(sapphire, peridot);
+ return set.drop(fortune, random);
+ }
+ // Pyrite
+ if (metadata == 5)
+ {
+ OreDrop pyriteDust = new OreDrop(ItemDusts.getDustByName("pyrite"),
+ ConfigTechReborn.FortuneSecondaryOreMultiplierPerLevel);
+ OreDropSet set = new OreDropSet(pyriteDust);
+ return set.drop(fortune, random);
+ }
- @Deprecated
- public ArrayList getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
- int metadata = getMetaFromState(state);
- Random random = new Random();
- //Ruby
- if (metadata == 2) {
- OreDrop ruby = new OreDrop(ItemGems.getGemByName("ruby"), ConfigTechReborn.FortuneSecondaryOreMultiplierPerLevel);
- OreDrop redGarnet = new OreDrop(ItemGems.getGemByName("redGarnet"), 0.02);
- OreDropSet set = new OreDropSet(ruby, redGarnet);
- return set.drop(fortune, random);
- }
+ // Sodolite
+ if (metadata == 11)
+ {
+ OreDrop sodalite = new OreDrop(ItemDusts.getDustByName("sodalite", 6),
+ ConfigTechReborn.FortuneSecondaryOreMultiplierPerLevel);
+ OreDrop aluminum = new OreDrop(ItemDusts.getDustByName("aluminum"), 0.50);
+ OreDropSet set = new OreDropSet(sodalite, aluminum);
+ return set.drop(fortune, random);
+ }
- //Sapphire
- if (metadata == 3) {
- OreDrop sapphire = new OreDrop(ItemGems.getGemByName("sapphire"), ConfigTechReborn.FortuneSecondaryOreMultiplierPerLevel);
- OreDrop peridot = new OreDrop(ItemGems.getGemByName("peridot"), 0.03);
- OreDropSet set = new OreDropSet(sapphire, peridot);
- return set.drop(fortune, random);
- }
+ // Cinnabar
+ if (metadata == 6)
+ {
+ OreDrop cinnabar = new OreDrop(ItemDusts.getDustByName("cinnabar"),
+ ConfigTechReborn.FortuneSecondaryOreMultiplierPerLevel);
+ OreDrop redstone = new OreDrop(new ItemStack(Items.redstone), 0.25);
+ OreDropSet set = new OreDropSet(cinnabar, redstone);
+ return set.drop(fortune, random);
+ }
- //Pyrite
- if (metadata == 5) {
- OreDrop pyriteDust = new OreDrop(ItemDusts.getDustByName("pyrite"), ConfigTechReborn.FortuneSecondaryOreMultiplierPerLevel);
- OreDropSet set = new OreDropSet(pyriteDust);
- return set.drop(fortune, random);
- }
+ // Sphalerite 1, 1/8 yellow garnet
+ if (metadata == 7)
+ {
+ OreDrop sphalerite = new OreDrop(ItemDusts.getDustByName("sphalerite"),
+ ConfigTechReborn.FortuneSecondaryOreMultiplierPerLevel);
+ OreDrop yellowGarnet = new OreDrop(ItemGems.getGemByName("yellowGarnet"), 0.125);
+ OreDropSet set = new OreDropSet(sphalerite, yellowGarnet);
+ return set.drop(fortune, random);
+ }
- //Sodolite
- if (metadata == 11) {
- OreDrop sodalite = new OreDrop(ItemDusts.getDustByName("sodalite", 6), ConfigTechReborn.FortuneSecondaryOreMultiplierPerLevel);
- OreDrop aluminum = new OreDrop(ItemDusts.getDustByName("aluminum"), 0.50);
- OreDropSet set = new OreDropSet(sodalite, aluminum);
- return set.drop(fortune, random);
- }
+ ArrayList block = new ArrayList();
+ block.add(new ItemStack(Item.getItemFromBlock(this), 1, metadata));
+ return block;
+ }
- //Cinnabar
- if (metadata == 6) {
- OreDrop cinnabar = new OreDrop(ItemDusts.getDustByName("cinnabar"), ConfigTechReborn.FortuneSecondaryOreMultiplierPerLevel);
- OreDrop redstone = new OreDrop(new ItemStack(Items.redstone), 0.25);
- OreDropSet set = new OreDropSet(cinnabar, redstone);
- return set.drop(fortune, random);
- }
+ @Override
+ protected boolean canSilkHarvest()
+ {
+ return true;
+ }
- //Sphalerite 1, 1/8 yellow garnet
- if (metadata == 7) {
- OreDrop sphalerite = new OreDrop(ItemDusts.getDustByName("sphalerite"), ConfigTechReborn.FortuneSecondaryOreMultiplierPerLevel);
- OreDrop yellowGarnet = new OreDrop(ItemGems.getGemByName("yellowGarnet"), 0.125);
- OreDropSet set = new OreDropSet(sphalerite, yellowGarnet);
- return set.drop(fortune, random);
- }
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
+ {
+ for (int meta = 0; meta < types.length; meta++)
+ {
+ list.add(new ItemStack(item, 1, meta));
+ }
+ }
- ArrayList block = new ArrayList();
- block.add(new ItemStack(Item.getItemFromBlock(this), 1, metadata));
- return block;
- }
+ @Override
+ public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos,
+ EntityPlayer player)
+ {
+ return super.getPickBlock(state, target, world, pos, player);
+ }
- @Override
- protected boolean canSilkHarvest() {
- return true;
- }
+ @Override
+ public int damageDropped(IBlockState state)
+ {
+ int meta = getMetaFromState(state);
+ if (meta == 2)
+ {
+ return 0;
+ } else if (meta == 3)
+ {
+ return 1;
+ } else if (meta == 5)
+ {
+ return 60;
+ }
+ return meta;
+ }
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
- for (int meta = 0; meta < types.length; meta++) {
- list.add(new ItemStack(item, 1, meta));
- }
- }
+ @Override
+ public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing)
+ {
+ return "techreborn:blocks/ore/ore" + types[getMetaFromState(BlockStateContainer)];
+ }
- @Override
- public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
- return super.getPickBlock(state, target, world, pos, player);
- }
+ @Override
+ public int amountOfStates()
+ {
+ return types.length;
+ }
- @Override
- public int damageDropped(IBlockState state) {
- int meta = getMetaFromState(state);
- if (meta == 2) {
- return 0;
- } else if (meta == 3) {
- return 1;
- } else if (meta == 5) {
- return 60;
- }
- return meta;
- }
+ @Override
+ public IBlockState getStateFromMeta(int meta)
+ {
+ return this.getDefaultState().withProperty(METADATA, meta);
+ }
- @Override
- public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing) {
- return "techreborn:blocks/ore/ore" + types[getMetaFromState(BlockStateContainer)];
- }
+ @Override
+ public int getMetaFromState(IBlockState state)
+ {
+ return state.getValue(METADATA);
+ }
- @Override
- public int amountOfStates() {
- return types.length;
- }
+ protected BlockStateContainer createBlockState()
+ {
- @Override
- public IBlockState getStateFromMeta(int meta) {
- return this.getDefaultState().withProperty(METADATA, meta);
- }
+ METADATA = PropertyInteger.create("type", 0, types.length - 1);
+ return new BlockStateContainer(this, METADATA);
+ }
- @Override
- public int getMetaFromState(IBlockState state) {
- return state.getValue(METADATA);
- }
-
- protected BlockStateContainer createBlockState() {
-
- METADATA = PropertyInteger.create("type", 0, types.length -1);
- return new BlockStateContainer(this, METADATA);
- }
-
- @Override
- public String getUserLoclisedName(IBlockState state) {
- return types[state.getValue(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 faf785f57..579997a6c 100644
--- a/src/main/java/techreborn/blocks/BlockOre2.java
+++ b/src/main/java/techreborn/blocks/BlockOre2.java
@@ -1,5 +1,8 @@
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;
@@ -20,104 +23,122 @@ import techreborn.client.TechRebornCreativeTabMisc;
import techreborn.init.ModBlocks;
import techreborn.world.config.IOreNameProvider;
-import java.security.InvalidParameterException;
-import java.util.List;
+public class BlockOre2 extends BaseBlock implements ITexturedBlock, IOreNameProvider
+{
-public class BlockOre2 extends BaseBlock implements ITexturedBlock, IOreNameProvider {
+ public static ItemStack getOreByName(String name, int count)
+ {
+ for (int i = 0; i < types.length; i++)
+ {
+ if (types[i].equalsIgnoreCase(name))
+ {
+ return new ItemStack(ModBlocks.ore2, count, i);
+ }
+ }
+ throw new InvalidParameterException("The ore block " + name + " could not be found.");
+ }
- public static ItemStack getOreByName(String name, int count) {
- for (int i = 0; i < types.length; i++) {
- if (types[i].equalsIgnoreCase(name)) {
- return new ItemStack(ModBlocks.ore2, count, i);
- }
- }
- throw new InvalidParameterException("The ore block " + name + " could not be found.");
- }
+ public static ItemStack getOreByName(String name)
+ {
+ return getOreByName(name, 1);
+ }
- public static ItemStack getOreByName(String name) {
- return getOreByName(name, 1);
- }
+ public IBlockState getBlockStateFromName(String name)
+ {
+ int index = -1;
+ for (int i = 0; i < types.length; i++)
+ {
+ if (types[i].equalsIgnoreCase(name))
+ {
+ index = i;
+ break;
+ }
+ }
+ if (index == -1)
+ {
+ throw new InvalidParameterException("The ore block " + name + " could not be found.");
+ }
+ return getStateFromMeta(index);
+ }
- public IBlockState getBlockStateFromName(String name){
- int index = -1;
- for (int i = 0; i < types.length; i++) {
- if (types[i].equalsIgnoreCase(name)) {
- index = i;
- break;
- }
- }
- if(index == -1){
- throw new InvalidParameterException("The ore block " + name + " could not be found.");
- }
- return getStateFromMeta(index);
- }
+ public static final String[] types = new String[] { "Copper", "Tin" };
- public static final String[] types = new String[]
- {"Copper", "Tin"};
+ public PropertyInteger METADATA;
- public PropertyInteger METADATA;
+ public BlockOre2(Material material)
+ {
+ super(material);
+ setUnlocalizedName("techreborn.ore2");
+ setCreativeTab(TechRebornCreativeTabMisc.instance);
+ setHardness(2.0f);
+ setHarvestLevel("pickaxe", 1);
+ this.setDefaultState(this.blockState.getBaseState().withProperty(METADATA, 0));
+ }
- public BlockOre2(Material material) {
- super(material);
- setUnlocalizedName("techreborn.ore2");
- setCreativeTab(TechRebornCreativeTabMisc.instance);
- setHardness(2.0f);
- setHarvestLevel("pickaxe", 1);
- this.setDefaultState(this.blockState.getBaseState().withProperty(METADATA, 0));
- }
+ @Override
+ protected boolean canSilkHarvest()
+ {
+ return true;
+ }
- @Override
- protected boolean canSilkHarvest() {
- return true;
- }
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
+ {
+ for (int meta = 0; meta < types.length; meta++)
+ {
+ list.add(new ItemStack(item, 1, meta));
+ }
+ }
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
- for (int meta = 0; meta < types.length; meta++) {
- list.add(new ItemStack(item, 1, meta));
- }
- }
+ @Override
+ public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos,
+ EntityPlayer player)
+ {
+ return super.getPickBlock(state, target, world, pos, player);
+ }
- @Override
- public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
- return super.getPickBlock(state, target, world, pos, player);
- }
+ @Override
+ public int damageDropped(IBlockState state)
+ {
+ int meta = getMetaFromState(state);
+ return meta;
+ }
- @Override
- public int damageDropped(IBlockState state) {
- int meta = getMetaFromState(state);
- return meta;
- }
+ @Override
+ public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing)
+ {
+ return "techreborn:blocks/ore/ore" + types[getMetaFromState(BlockStateContainer)];
+ }
- @Override
- public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing) {
- return "techreborn:blocks/ore/ore" + types[getMetaFromState(BlockStateContainer)];
- }
+ @Override
+ public int amountOfStates()
+ {
+ return types.length;
+ }
- @Override
- public int amountOfStates() {
- return types.length;
- }
+ @Override
+ public IBlockState getStateFromMeta(int meta)
+ {
+ return this.getDefaultState().withProperty(METADATA, meta);
+ }
- @Override
- public IBlockState getStateFromMeta(int meta) {
- return this.getDefaultState().withProperty(METADATA, meta);
- }
+ @Override
+ public int getMetaFromState(IBlockState state)
+ {
+ return state.getValue(METADATA);
+ }
- @Override
- public int getMetaFromState(IBlockState state) {
- return state.getValue(METADATA);
- }
+ protected BlockStateContainer createBlockState()
+ {
- protected BlockStateContainer createBlockState() {
+ METADATA = PropertyInteger.create("type", 0, types.length - 1);
+ return new BlockStateContainer(this, METADATA);
+ }
- METADATA = PropertyInteger.create("type", 0, types.length -1);
- return new BlockStateContainer(this, METADATA);
- }
-
- @Override
- public String getUserLoclisedName(IBlockState state) {
- return types[state.getValue(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 96dec90ef..ee5c6deee 100644
--- a/src/main/java/techreborn/blocks/BlockPlayerDetector.java
+++ b/src/main/java/techreborn/blocks/BlockPlayerDetector.java
@@ -1,8 +1,9 @@
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.PropertyBool;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.properties.PropertyInteger;
@@ -23,132 +24,150 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
-import reborncore.common.BaseTileBlock;
import reborncore.common.blocks.BlockMachineBase;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TilePlayerDectector;
-import java.util.List;
-import java.util.Random;
+public class BlockPlayerDetector extends BlockMachineBase implements ITexturedBlock
+{
-public class BlockPlayerDetector extends BlockMachineBase implements ITexturedBlock {
+ public PropertyInteger METADATA;
- public PropertyInteger METADATA;
+ public BlockPlayerDetector()
+ {
+ super();
+ setUnlocalizedName("techreborn.playerDetector");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ setHardness(2f);
+ this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0).withProperty(FACING, EnumFacing.NORTH)
+ .withProperty(ACTIVE, false));
+ }
- public BlockPlayerDetector() {
- super();
- setUnlocalizedName("techreborn.playerDetector");
- setCreativeTab(TechRebornCreativeTab.instance);
- setHardness(2f);
- this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0).withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, false));
- }
+ public static final String[] types = new String[] { "all", "others", "you" };
- public static final String[] types = new String[]
- {"all", "others", "you"};
+ @Override
+ public Item getItemDropped(IBlockState state, Random rand, int fortune)
+ {
+ return Item.getItemFromBlock(this);
+ }
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
+ {
+ for (int meta = 0; meta < types.length; meta++)
+ {
+ list.add(new ItemStack(item, 1, meta));
+ }
+ }
- @Override
- public Item getItemDropped(IBlockState state, Random rand, int fortune) {
- return Item.getItemFromBlock(this);
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TilePlayerDectector();
+ }
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
- for (int meta = 0; meta < types.length; meta++) {
- list.add(new ItemStack(item, 1, meta));
- }
- }
+ @Override
+ public boolean canConnectRedstone(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side)
+ {
+ return true;
+ }
+ @Override
+ public boolean canProvidePower(IBlockState state)
+ {
+ return true;
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TilePlayerDectector();
- }
+ @Override
+ public int getWeakPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
+ {
+ TileEntity entity = blockAccess.getTileEntity(pos);
+ if (entity instanceof TilePlayerDectector)
+ {
+ return ((TilePlayerDectector) entity).isProvidingPower() ? 15 : 0;
+ }
+ return 0;
+ }
- @Override
- public boolean canConnectRedstone(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) {
- return true;
- }
+ @Override
+ public int getStrongPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
+ {
+ TileEntity entity = blockAccess.getTileEntity(pos);
+ if (entity instanceof TilePlayerDectector)
+ {
+ return ((TilePlayerDectector) entity).isProvidingPower() ? 15 : 0;
+ }
+ return 0;
+ }
- @Override
- public boolean canProvidePower(IBlockState state) {
- return true;
- }
+ @Override
+ public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer,
+ ItemStack stack)
+ {
+ super.onBlockPlacedBy(worldIn, pos, state, placer, stack);
+ TileEntity tile = worldIn.getTileEntity(pos);
+ if (tile instanceof TilePlayerDectector)
+ {
+ ((TilePlayerDectector) tile).owenerUdid = placer.getUniqueID().toString();
+ }
+ }
- @Override
- public int getWeakPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
- TileEntity entity = blockAccess.getTileEntity(pos);
- if (entity instanceof TilePlayerDectector) {
- return ((TilePlayerDectector) entity).isProvidingPower() ? 15 : 0;
- }
- return 0;
- }
+ @Override
+ public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer entityPlayer,
+ EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
+ {
+ // int newMeta = (world.getBlockMetadata(x, y, z) + 1) % 3;
+ int newMeta = getMetaFromState(state);
+ String message = "";
+ switch (newMeta)
+ {
+ case 0:
+ message = TextFormatting.GREEN + "Detects all Players";
+ break;
+ case 1:
+ message = TextFormatting.RED + "Detects only other Players";
+ break;
+ case 2:
+ message = TextFormatting.BLUE + "Detects only you";
+ }
+ if (!world.isRemote)
+ {
+ entityPlayer.addChatComponentMessage(new TextComponentString(message));
+ // world.setBlockMetadataWithNotify(x, y, z, newMeta, 2);
+ }
+ return true;
+ }
- @Override
- public int getStrongPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
- TileEntity entity = blockAccess.getTileEntity(pos);
- if (entity instanceof TilePlayerDectector) {
- return ((TilePlayerDectector) entity).isProvidingPower() ? 15 : 0;
- }
- return 0;
- }
+ @Override
+ public String getTextureNameFromState(IBlockState blockState, EnumFacing facing)
+ {
+ return "techreborn:blocks/machine/greg_machines/player_detector_" + types[getMetaFromState(blockState)];
+ }
- @Override
- public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
- super.onBlockPlacedBy(worldIn, pos, state, placer, stack);
- TileEntity tile = worldIn.getTileEntity(pos);
- if (tile instanceof TilePlayerDectector) {
- ((TilePlayerDectector) tile).owenerUdid = placer.getUniqueID().toString();
- }
- }
+ @Override
+ public int amountOfStates()
+ {
+ return types.length;
+ }
- @Override
- public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer entityPlayer, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
- // int newMeta = (world.getBlockMetadata(x, y, z) + 1) % 3;
- int newMeta = getMetaFromState(state);
- String message = "";
- switch (newMeta) {
- case 0:
- message = TextFormatting.GREEN + "Detects all Players";
- break;
- case 1:
- message = TextFormatting.RED + "Detects only other Players";
- break;
- case 2:
- message = TextFormatting.BLUE + "Detects only you";
- }
- if(!world.isRemote){
- entityPlayer.addChatComponentMessage(new TextComponentString(message));
- //world.setBlockMetadataWithNotify(x, y, z, newMeta, 2);
- }
- return true;
- }
+ @Override
+ public int getMetaFromState(IBlockState state)
+ {
+ return (Integer) state.getValue(METADATA);
+ }
- @Override
- public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
- return "techreborn:blocks/machine/greg_machines/player_detector_" + types[getMetaFromState(blockState)];
- }
+ protected BlockStateContainer createBlockState()
+ {
+ FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
+ ACTIVE = PropertyBool.create("active");
+ METADATA = PropertyInteger.create("type", 0, types.length - 1);
+ return new BlockStateContainer(this, METADATA, FACING, ACTIVE);
+ }
- @Override
- public int amountOfStates() {
- return types.length;
- }
-
- @Override
- public int getMetaFromState(IBlockState state) {
- return (Integer) state.getValue(METADATA);
- }
-
- protected BlockStateContainer createBlockState() {
- FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
- ACTIVE = PropertyBool.create("active");
- METADATA = PropertyInteger.create("type", 0, types.length -1);
- return new BlockStateContainer(this, METADATA, FACING, ACTIVE);
- }
-
- @Override
- public IBlockState getStateFromMeta(int meta) {
- return this.getDefaultState().withProperty(METADATA, meta);
- }
+ @Override
+ public IBlockState getStateFromMeta(int meta)
+ {
+ return this.getDefaultState().withProperty(METADATA, meta);
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockQuantumChest.java b/src/main/java/techreborn/blocks/BlockQuantumChest.java
index 6345b7acd..7770c8eb2 100644
--- a/src/main/java/techreborn/blocks/BlockQuantumChest.java
+++ b/src/main/java/techreborn/blocks/BlockQuantumChest.java
@@ -15,48 +15,55 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileQuantumChest;
-public class BlockQuantumChest extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockQuantumChest extends BlockMachineBase implements IAdvancedRotationTexture
+{
- public BlockQuantumChest() {
- super();
- setUnlocalizedName("techreborn.quantumChest");
- setCreativeTab(TechRebornCreativeTab.instance);
- setHardness(2.0F);
- }
+ public BlockQuantumChest()
+ {
+ super();
+ setUnlocalizedName("techreborn.quantumChest");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ setHardness(2.0F);
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileQuantumChest();
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileQuantumChest();
+ }
- @Override
- public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
- if (!playerIn.isSneaking())
- playerIn.openGui(Core.INSTANCE, GuiHandler.quantumChestID, worldIn, pos.getX(),
- pos.getY(), pos.getZ());
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn,
+ EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
+ {
+ if (!playerIn.isSneaking())
+ playerIn.openGui(Core.INSTANCE, GuiHandler.quantumChestID, worldIn, pos.getX(), pos.getY(), pos.getZ());
+ return true;
+ }
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "quantum_chest";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "quantum_chest";
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "qchest_side";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "qchest_side";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "quantum_top";
+ }
- @Override
- public String getTop(boolean isActive) {
- return prefix + "quantum_top";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "machine_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockQuantumTank.java b/src/main/java/techreborn/blocks/BlockQuantumTank.java
index 0655fa469..fc03944e9 100644
--- a/src/main/java/techreborn/blocks/BlockQuantumTank.java
+++ b/src/main/java/techreborn/blocks/BlockQuantumTank.java
@@ -11,50 +11,61 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileQuantumTank;
-public class BlockQuantumTank extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockQuantumTank extends BlockMachineBase implements IAdvancedRotationTexture
+{
- public BlockQuantumTank() {
- super();
- setUnlocalizedName("techreborn.quantumTank");
- setHardness(2.0F);
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockQuantumTank()
+ {
+ super();
+ setUnlocalizedName("techreborn.quantumTank");
+ setHardness(2.0F);
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileQuantumTank();
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileQuantumTank();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if(fillBlockWithFluid(world, new BlockPos(x, y, z), player)) {
- return true;
- }
- if (!player.isSneaking()) {
- player.openGui(Core.INSTANCE, GuiHandler.quantumTankID, world, x, y, z);
- }
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (fillBlockWithFluid(world, new BlockPos(x, y, z), player))
+ {
+ return true;
+ }
+ if (!player.isSneaking())
+ {
+ player.openGui(Core.INSTANCE, GuiHandler.quantumTankID, world, x, y, z);
+ }
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- @Override
- public String getFront(boolean isActive) {
- return "techreborn:blocks/machine/generators/thermal_generator_side_off";
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return "techreborn:blocks/machine/generators/thermal_generator_side_off";
+ }
- @Override
- public String getSide(boolean isActive) {
- return "techreborn:blocks/machine/generators/thermal_generator_side_off";
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return "techreborn:blocks/machine/generators/thermal_generator_side_off";
+ }
- @Override
- public String getTop(boolean isActive) {
- return prefix + "quantum_top";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "quantum_top";
+ }
- @Override
- public String getBottom(boolean isActive) {
- return "techreborn:blocks/machine/generators/thermal_generator_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return "techreborn:blocks/machine/generators/thermal_generator_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockReinforcedGlass.java b/src/main/java/techreborn/blocks/BlockReinforcedGlass.java
index 085a11f86..54d174c82 100644
--- a/src/main/java/techreborn/blocks/BlockReinforcedGlass.java
+++ b/src/main/java/techreborn/blocks/BlockReinforcedGlass.java
@@ -10,9 +10,11 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.common.BaseBlock;
import techreborn.client.TechRebornCreativeTabMisc;
-public class BlockReinforcedGlass extends BaseBlock implements ITexturedBlock {
-
- public BlockReinforcedGlass(Material materialIn) {
+public class BlockReinforcedGlass extends BaseBlock implements ITexturedBlock
+{
+
+ public BlockReinforcedGlass(Material materialIn)
+ {
super(materialIn);
setUnlocalizedName("techreborn.reinforcedglass");
setCreativeTab(TechRebornCreativeTabMisc.instance);
@@ -20,7 +22,8 @@ public class BlockReinforcedGlass extends BaseBlock implements ITexturedBlock {
}
@Override
- public boolean isOpaqueCube(IBlockState state) {
+ public boolean isOpaqueCube(IBlockState state)
+ {
return false;
}
@@ -34,17 +37,19 @@ public class BlockReinforcedGlass extends BaseBlock implements ITexturedBlock {
{
return false;
}
-
- private final String prefix = "techreborn:blocks/";
+
+ private final String prefix = "techreborn:blocks/";
@Override
- public int amountOfStates() {
+ public int amountOfStates()
+ {
return 1;
}
@Override
- public String getTextureNameFromState(IBlockState arg0, EnumFacing arg1) {
+ public String getTextureNameFromState(IBlockState arg0, EnumFacing arg1)
+ {
return prefix + "reinforcedglass";
}
-
+
}
diff --git a/src/main/java/techreborn/blocks/BlockRubberLeaves.java b/src/main/java/techreborn/blocks/BlockRubberLeaves.java
index 08db1cbf3..667f1a19c 100644
--- a/src/main/java/techreborn/blocks/BlockRubberLeaves.java
+++ b/src/main/java/techreborn/blocks/BlockRubberLeaves.java
@@ -1,5 +1,8 @@
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;
@@ -20,29 +23,31 @@ 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.
*/
-public class BlockRubberLeaves extends BlockLeaves implements ITexturedBlock, IOpaqueBlock {
+public class BlockRubberLeaves extends BlockLeaves implements ITexturedBlock, IOpaqueBlock
+{
- public BlockRubberLeaves() {
+ public BlockRubberLeaves()
+ {
super();
setUnlocalizedName("techreborn.rubberleaves");
setCreativeTab(TechRebornCreativeTabMisc.instance);
RebornCore.jsonDestroyer.registerObject(this);
- this.setDefaultState(this.getDefaultState().withProperty(CHECK_DECAY, Boolean.valueOf(true)).withProperty(DECAYABLE, Boolean.valueOf(true)));
+ this.setDefaultState(this.getDefaultState().withProperty(CHECK_DECAY, Boolean.valueOf(true))
+ .withProperty(DECAYABLE, Boolean.valueOf(true)));
}
@Override
- public BlockPlanks.EnumType getWoodType(int meta) {
+ public BlockPlanks.EnumType getWoodType(int meta)
+ {
return null;
}
@Override
- public List onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune) {
+ public List onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune)
+ {
List list = new java.util.ArrayList();
list.add(new ItemStack(this, 1, 0));
return list;
@@ -65,46 +70,49 @@ public class BlockRubberLeaves extends BlockLeaves implements ITexturedBlock, IO
return false;
}
-
-
@Override
protected ItemStack createStackedBlock(IBlockState state)
{
- IBlockState newState = state.withProperty(CHECK_DECAY, Boolean.valueOf(false)).withProperty(DECAYABLE, Boolean.valueOf(false));
+ IBlockState newState = state.withProperty(CHECK_DECAY, Boolean.valueOf(false)).withProperty(DECAYABLE,
+ Boolean.valueOf(false));
return super.createStackedBlock(newState);
}
@Override
- public String getTextureNameFromState(IBlockState IBlockState, EnumFacing enumFacing) {
+ public String getTextureNameFromState(IBlockState IBlockState, EnumFacing enumFacing)
+ {
return "techreborn:blocks/rubber_leaves";
}
@Override
- public int amountOfStates() {
+ public int amountOfStates()
+ {
return 4;
}
@Override
protected BlockStateContainer createBlockState()
{
- return new BlockStateContainer(this, new IProperty[] { CHECK_DECAY, DECAYABLE});
+ return new BlockStateContainer(this, new IProperty[] { CHECK_DECAY, DECAYABLE });
}
@Override
public IBlockState getStateFromMeta(int meta)
{
- return this.getDefaultState().withProperty(DECAYABLE, Boolean.valueOf((meta & 1) == 0)).withProperty(CHECK_DECAY, Boolean.valueOf((meta & 2) > 0));
+ return this.getDefaultState().withProperty(DECAYABLE, Boolean.valueOf((meta & 1) == 0))
+ .withProperty(CHECK_DECAY, Boolean.valueOf((meta & 2) > 0));
}
+
@Override
public int getMetaFromState(IBlockState state)
{
int meta = 0;
- if (!((Boolean)state.getValue(DECAYABLE)).booleanValue())
+ if (!((Boolean) state.getValue(DECAYABLE)).booleanValue())
{
meta |= 1;
}
- if (((Boolean)state.getValue(CHECK_DECAY)).booleanValue())
+ if (((Boolean) state.getValue(CHECK_DECAY)).booleanValue())
{
meta |= 2;
}
@@ -130,7 +138,8 @@ public class BlockRubberLeaves extends BlockLeaves implements ITexturedBlock, IO
}
@Override
- public Item getItemDropped(IBlockState state, Random rand, int fortune) {
+ public Item getItemDropped(IBlockState state, Random rand, int fortune)
+ {
return Item.getItemFromBlock(ModBlocks.rubberSapling);
}
}
diff --git a/src/main/java/techreborn/blocks/BlockRubberLog.java b/src/main/java/techreborn/blocks/BlockRubberLog.java
index f120b12d0..02ecae67c 100644
--- a/src/main/java/techreborn/blocks/BlockRubberLog.java
+++ b/src/main/java/techreborn/blocks/BlockRubberLog.java
@@ -1,5 +1,9 @@
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;
@@ -20,37 +24,39 @@ 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.
*/
-public class BlockRubberLog extends Block implements ITexturedBlock {
+public class BlockRubberLog extends Block implements ITexturedBlock
+{
public static PropertyDirection SAP_SIDE = PropertyDirection.create("sapside", EnumFacing.Plane.HORIZONTAL);
public static PropertyBool HAS_SAP = PropertyBool.create("hassap");
- public BlockRubberLog() {
+ public BlockRubberLog()
+ {
super(Material.wood);
setUnlocalizedName("techreborn.rubberlog");
setCreativeTab(TechRebornCreativeTabMisc.instance);
this.setHardness(2.0F);
RebornCore.jsonDestroyer.registerObject(this);
- this.setDefaultState(this.getDefaultState().withProperty(SAP_SIDE, EnumFacing.NORTH).withProperty(HAS_SAP, false));
+ this.setDefaultState(
+ this.getDefaultState().withProperty(SAP_SIDE, EnumFacing.NORTH).withProperty(HAS_SAP, false));
this.setTickRandomly(true);
}
- protected BlockStateContainer createBlockState() {
+ protected BlockStateContainer createBlockState()
+ {
return new BlockStateContainer(this, SAP_SIDE, HAS_SAP);
}
@Override
- public IBlockState getStateFromMeta(int meta) {
+ public IBlockState getStateFromMeta(int meta)
+ {
boolean hasSap = false;
int tempMeta = meta;
- if(meta > 3){
+ if (meta > 3)
+ {
hasSap = true;
tempMeta -= 3;
}
@@ -59,10 +65,12 @@ public class BlockRubberLog extends Block implements ITexturedBlock {
}
@Override
- public int getMetaFromState(IBlockState state) {
+ public int getMetaFromState(IBlockState state)
+ {
int tempMeta = 0;
EnumFacing facing = state.getValue(SAP_SIDE);
- switch (facing){
+ switch (facing)
+ {
case SOUTH:
tempMeta = 0;
break;
@@ -75,19 +83,24 @@ public class BlockRubberLog extends Block implements ITexturedBlock {
case EAST:
tempMeta = 3;
}
- if(state.getValue(HAS_SAP)){
+ if (state.getValue(HAS_SAP))
+ {
tempMeta += 3;
}
return tempMeta;
}
@Override
- public String getTextureNameFromState(IBlockState IBlockState, EnumFacing enumFacing) {
- if(enumFacing == EnumFacing.DOWN || enumFacing == EnumFacing.UP){
- return "techreborn:blocks/rubber_log_top";
+ public String getTextureNameFromState(IBlockState IBlockState, EnumFacing enumFacing)
+ {
+ if (enumFacing == EnumFacing.DOWN || enumFacing == EnumFacing.UP)
+ {
+ return "techreborn:blocks/rubber_log_top";
}
- if(IBlockState.getValue(HAS_SAP)){
- if(IBlockState.getValue(SAP_SIDE) == enumFacing){
+ if (IBlockState.getValue(HAS_SAP))
+ {
+ if (IBlockState.getValue(SAP_SIDE) == enumFacing)
+ {
return "techreborn:blocks/rubber_log_sap";
}
}
@@ -95,40 +108,52 @@ public class BlockRubberLog extends Block implements ITexturedBlock {
}
@Override
- public int amountOfStates() {
+ public int amountOfStates()
+ {
return 8;
}
@Override
- public boolean canSustainLeaves(IBlockState state, IBlockAccess world, BlockPos pos) {
+ public boolean canSustainLeaves(IBlockState state, IBlockAccess world, BlockPos pos)
+ {
return true;
}
@Override
- public boolean isWood(net.minecraft.world.IBlockAccess world, BlockPos pos) {
+ public boolean isWood(net.minecraft.world.IBlockAccess world, BlockPos pos)
+ {
return true;
}
- public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
+ public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
+ {
int i = 4;
int j = i + 1;
- if (worldIn.isAreaLoaded(pos.add(-j, -j, -j), pos.add(j, j, j))) {
- for (BlockPos blockpos : BlockPos.getAllInBox(pos.add(-i, -i, -i), pos.add(i, i, i))) {
+ if (worldIn.isAreaLoaded(pos.add(-j, -j, -j), pos.add(j, j, j)))
+ {
+ for (BlockPos blockpos : BlockPos.getAllInBox(pos.add(-i, -i, -i), pos.add(i, i, i)))
+ {
IBlockState state1 = worldIn.getBlockState(blockpos);
- if (state1.getBlock().isLeaves(state1, worldIn, blockpos)) {
- state1.getBlock().beginLeavesDecay(state1,worldIn, blockpos);
+ if (state1.getBlock().isLeaves(state1, worldIn, blockpos))
+ {
+ state1.getBlock().beginLeavesDecay(state1, worldIn, blockpos);
}
}
}
}
@Override
- public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand) {
+ public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
+ {
super.updateTick(worldIn, pos, state, rand);
- if(!state.getValue(HAS_SAP)){
- if(rand.nextInt(50) == 0){
+ if (!state.getValue(HAS_SAP))
+ {
+ if (rand.nextInt(50) == 0)
+ {
EnumFacing facing = EnumFacing.getHorizontal(rand.nextInt(4));
- if(worldIn.getBlockState(pos.down()).getBlock() == this && worldIn.getBlockState(pos.up()).getBlock() == this){
+ if (worldIn.getBlockState(pos.down()).getBlock() == this
+ && worldIn.getBlockState(pos.up()).getBlock() == this)
+ {
worldIn.setBlockState(pos, state.withProperty(HAS_SAP, true).withProperty(SAP_SIDE, facing));
}
}
@@ -136,18 +161,27 @@ public class BlockRubberLog extends Block implements ITexturedBlock {
}
@Override
- public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
+ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn,
+ EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
+ {
super.onBlockActivated(worldIn, pos, state, playerIn, hand, heldItem, side, hitX, hitY, hitZ);
- if(playerIn.getHeldItem(EnumHand.MAIN_HAND) != null && playerIn.getHeldItem(EnumHand.MAIN_HAND).getItem() instanceof ItemTreeTap)
- if(state.getValue(HAS_SAP)){
- if(state.getValue(SAP_SIDE) == side){
- worldIn.setBlockState(pos, state.withProperty(HAS_SAP, false).withProperty(SAP_SIDE, EnumFacing.getHorizontal(0)));
- //TODO 1.9 sounds
- //worldIn.playSoundAtEntity(playerIn, "techreborn:sap_extract", 0.8F, 1F);
- if(!worldIn.isRemote){
+ if (playerIn.getHeldItem(EnumHand.MAIN_HAND) != null
+ && playerIn.getHeldItem(EnumHand.MAIN_HAND).getItem() instanceof ItemTreeTap)
+ if (state.getValue(HAS_SAP))
+ {
+ if (state.getValue(SAP_SIDE) == side)
+ {
+ worldIn.setBlockState(pos,
+ state.withProperty(HAS_SAP, false).withProperty(SAP_SIDE, EnumFacing.getHorizontal(0)));
+ // TODO 1.9 sounds
+ // worldIn.playSoundAtEntity(playerIn,
+ // "techreborn:sap_extract", 0.8F, 1F);
+ if (!worldIn.isRemote)
+ {
Random rand = new Random();
BlockPos itemPos = pos.offset(side);
- EntityItem item = new EntityItem(worldIn, itemPos.getX(), itemPos.getY(), itemPos.getZ(), ItemParts.getPartByName("rubberSap").copy());
+ EntityItem item = new EntityItem(worldIn, itemPos.getX(), itemPos.getY(), itemPos.getZ(),
+ ItemParts.getPartByName("rubberSap").copy());
float factor = 0.05F;
playerIn.getHeldItem(EnumHand.MAIN_HAND).damageItem(1, playerIn);
item.motionX = rand.nextGaussian() * factor;
@@ -162,16 +196,20 @@ public class BlockRubberLog extends Block implements ITexturedBlock {
}
@Override
- public int damageDropped(IBlockState state) {
+ public int damageDropped(IBlockState state)
+ {
return 0;
}
@Override
- public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
+ public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
+ {
List drops = new ArrayList();
drops.add(new ItemStack(this));
- if(state.getValue(HAS_SAP)){
- if(new Random().nextInt(4) == 0){
+ if (state.getValue(HAS_SAP))
+ {
+ if (new Random().nextInt(4) == 0)
+ {
drops.add(ItemParts.getPartByName("rubberSap"));
}
}
diff --git a/src/main/java/techreborn/blocks/BlockRubberPlank.java b/src/main/java/techreborn/blocks/BlockRubberPlank.java
index 805156c9b..f9795d575 100644
--- a/src/main/java/techreborn/blocks/BlockRubberPlank.java
+++ b/src/main/java/techreborn/blocks/BlockRubberPlank.java
@@ -11,23 +11,27 @@ import techreborn.client.TechRebornCreativeTabMisc;
/**
* Created by modmuss50 on 20/02/2016.
*/
-public class BlockRubberPlank extends Block implements ITexturedBlock {
+public class BlockRubberPlank extends Block implements ITexturedBlock
+{
- public BlockRubberPlank() {
- super(Material.wood);
- RebornCore.jsonDestroyer.registerObject(this);
- setUnlocalizedName("techreborn.rubberplank");
- setCreativeTab(TechRebornCreativeTabMisc.instance);
- this.setHardness(2.0F);
- }
+ public BlockRubberPlank()
+ {
+ super(Material.wood);
+ RebornCore.jsonDestroyer.registerObject(this);
+ setUnlocalizedName("techreborn.rubberplank");
+ setCreativeTab(TechRebornCreativeTabMisc.instance);
+ this.setHardness(2.0F);
+ }
- @Override
- public String getTextureNameFromState(IBlockState state, EnumFacing side) {
- return "techreborn:blocks/rubber_planks";
- }
+ @Override
+ public String getTextureNameFromState(IBlockState state, EnumFacing side)
+ {
+ return "techreborn:blocks/rubber_planks";
+ }
- @Override
- public int amountOfStates() {
- return 1;
- }
+ @Override
+ public int amountOfStates()
+ {
+ return 1;
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockRubberSapling.java b/src/main/java/techreborn/blocks/BlockRubberSapling.java
index ef177dfc7..63e408a53 100644
--- a/src/main/java/techreborn/blocks/BlockRubberSapling.java
+++ b/src/main/java/techreborn/blocks/BlockRubberSapling.java
@@ -1,5 +1,8 @@
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;
@@ -10,33 +13,37 @@ 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.
*/
-public class BlockRubberSapling extends BlockSapling {
+public class BlockRubberSapling extends BlockSapling
+{
- public BlockRubberSapling() {
- setUnlocalizedName("techreborn.rubbersapling");
- setCreativeTab(TechRebornCreativeTabMisc.instance);
- this.setDefaultState(this.getDefaultState().withProperty(STAGE, Integer.valueOf(0)));
- }
+ public BlockRubberSapling()
+ {
+ setUnlocalizedName("techreborn.rubbersapling");
+ setCreativeTab(TechRebornCreativeTabMisc.instance);
+ this.setDefaultState(this.getDefaultState().withProperty(STAGE, Integer.valueOf(0)));
+ }
- @Override
- public void generateTree(World worldIn, BlockPos pos, IBlockState state, Random rand) {
- if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(worldIn, rand, pos)) {
- return;
- }
- worldIn.setBlockToAir(pos);
- if(!new RubberTreeGenerator(false).generate(worldIn, rand, pos)){
- worldIn.setBlockState(pos, state); //Re-add the sapling if the tree failed to grow
- }
- }
+ @Override
+ public void generateTree(World worldIn, BlockPos pos, IBlockState state, Random rand)
+ {
+ if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(worldIn, rand, pos))
+ {
+ return;
+ }
+ worldIn.setBlockToAir(pos);
+ if (!new RubberTreeGenerator(false).generate(worldIn, rand, pos))
+ {
+ worldIn.setBlockState(pos, state); // Re-add the sapling if the tree
+ // failed to grow
+ }
+ }
- @Override
- public void getSubBlocks(Item itemIn, CreativeTabs tab, List list) {
- list.add(new ItemStack(itemIn, 1, 0));
- }
+ @Override
+ public void getSubBlocks(Item itemIn, CreativeTabs tab, List list)
+ {
+ list.add(new ItemStack(itemIn, 1, 0));
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockStorage.java b/src/main/java/techreborn/blocks/BlockStorage.java
index e2fc81654..8a512f619 100644
--- a/src/main/java/techreborn/blocks/BlockStorage.java
+++ b/src/main/java/techreborn/blocks/BlockStorage.java
@@ -1,5 +1,8 @@
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;
@@ -15,81 +18,91 @@ 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 class BlockStorage extends BaseBlock implements ITexturedBlock {
+ public static ItemStack getStorageBlockByName(String name, int count)
+ {
+ for (int i = 0; i < types.length; i++)
+ {
+ if (types[i].equals(name))
+ {
+ return new ItemStack(ModBlocks.storage, count, i);
+ }
+ }
+ return BlockStorage2.getStorageBlockByName(name, count);
+ }
- public static ItemStack getStorageBlockByName(String name, int count) {
- for (int i = 0; i < types.length; i++) {
- if (types[i].equals(name)) {
- return new ItemStack(ModBlocks.storage, count, i);
- }
- }
- return BlockStorage2.getStorageBlockByName(name, count);
- }
+ public static ItemStack getStorageBlockByName(String name)
+ {
+ return getStorageBlockByName(name, 1);
+ }
- public static ItemStack getStorageBlockByName(String name) {
- return getStorageBlockByName(name, 1);
- }
+ public static final String[] types = new String[] { "silver", "aluminum", "titanium", "chrome", "steel", "brass",
+ "lead", "electrum", "zinc", "platinum", "tungsten", "nickel", "invar", "osmium", "iridium" };
- public static final String[] types = new String[]
- {"silver", "aluminum", "titanium", "chrome", "steel", "brass", "lead",
- "electrum", "zinc", "platinum", "tungsten", "nickel", "invar", "osmium",
- "iridium"};
+ public PropertyInteger METADATA;
- public PropertyInteger METADATA;
+ public BlockStorage(Material material)
+ {
+ super(material);
+ setUnlocalizedName("techreborn.storage");
+ setCreativeTab(TechRebornCreativeTabMisc.instance);
+ setHardness(2f);
+ this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0));
+ }
+ @Override
+ public Item getItemDropped(IBlockState state, Random rand, int fortune)
+ {
+ return Item.getItemFromBlock(this);
+ }
- public BlockStorage(Material material) {
- super(material);
- setUnlocalizedName("techreborn.storage");
- setCreativeTab(TechRebornCreativeTabMisc.instance);
- setHardness(2f);
- this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0));
- }
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
+ {
+ for (int meta = 0; meta < types.length; meta++)
+ {
+ list.add(new ItemStack(item, 1, meta));
+ }
+ }
- @Override
- public Item getItemDropped(IBlockState state, Random rand, int fortune) {
- return Item.getItemFromBlock(this);
- }
+ @Override
+ public int damageDropped(IBlockState state)
+ {
+ return getMetaFromState(state);
+ }
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
- for (int meta = 0; meta < types.length; meta++) {
- list.add(new ItemStack(item, 1, meta));
- }
- }
+ @Override
+ public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing)
+ {
+ return "techreborn:blocks/storage/" + types[getMetaFromState(BlockStateContainer)] + "_block";
+ }
- @Override
- public int damageDropped(IBlockState state) {
- return getMetaFromState(state);
- }
- @Override
- public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing) {
- return "techreborn:blocks/storage/" + types[getMetaFromState(BlockStateContainer)] + "_block";
- }
+ @Override
+ public int amountOfStates()
+ {
+ return types.length;
+ }
- @Override
- public int amountOfStates() {
- return types.length;
- }
+ @Override
+ public IBlockState getStateFromMeta(int meta)
+ {
+ return this.getDefaultState().withProperty(METADATA, meta);
+ }
- @Override
- public IBlockState getStateFromMeta(int meta) {
- return this.getDefaultState().withProperty(METADATA, meta);
- }
+ @Override
+ public int getMetaFromState(IBlockState state)
+ {
+ return state.getValue(METADATA);
+ }
- @Override
- public int getMetaFromState(IBlockState state) {
- return state.getValue(METADATA);
- }
+ protected BlockStateContainer createBlockState()
+ {
- protected BlockStateContainer createBlockState() {
-
- METADATA = PropertyInteger.create("type", 0, types.length -1);
- return new BlockStateContainer(this, METADATA);
- }
+ METADATA = PropertyInteger.create("type", 0, types.length - 1);
+ return new BlockStateContainer(this, METADATA);
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockStorage2.java b/src/main/java/techreborn/blocks/BlockStorage2.java
index 5532902bd..afbe1a1b1 100644
--- a/src/main/java/techreborn/blocks/BlockStorage2.java
+++ b/src/main/java/techreborn/blocks/BlockStorage2.java
@@ -1,5 +1,9 @@
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;
@@ -15,79 +19,87 @@ 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 class BlockStorage2 extends BaseBlock implements ITexturedBlock {
+ public static ItemStack getStorageBlockByName(String name, int count)
+ {
+ for (int i = 0; i < types.length; i++)
+ {
+ if (types[i].equals(name))
+ {
+ return new ItemStack(ModBlocks.storage2, count, i);
+ }
+ }
+ throw new InvalidParameterException("The storage block " + name + " could not be found.");
+ }
- public static ItemStack getStorageBlockByName(String name, int count) {
- for (int i = 0; i < types.length; i++) {
- if (types[i].equals(name)) {
- return new ItemStack(ModBlocks.storage2, count, i);
- }
- }
- throw new InvalidParameterException("The storage block " + name + " could not be found.");
- }
+ public static final String[] types = new String[] { "tungstensteel", "lodestone", "tellurium",
+ "iridium_reinforced_tungstensteel", "iridium_reinforced_stone", "ruby", "sapphire", "peridot",
+ "yellowGarnet", "redGarnet", "copper", "tin" };
- public static final String[] types = new String[]
- {"tungstensteel", "lodestone", "tellurium", "iridium_reinforced_tungstensteel",
- "iridium_reinforced_stone", "ruby", "sapphire", "peridot", "yellowGarnet", "redGarnet", "copper", "tin"};
+ public BlockStorage2(Material material)
+ {
+ super(material);
+ setUnlocalizedName("techreborn.storage2");
+ setCreativeTab(TechRebornCreativeTabMisc.instance);
+ setHardness(2f);
+ this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0));
+ }
- public BlockStorage2(Material material) {
- super(material);
- setUnlocalizedName("techreborn.storage2");
- setCreativeTab(TechRebornCreativeTabMisc.instance);
- setHardness(2f);
- this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0));
- }
+ public PropertyInteger METADATA;
- public PropertyInteger METADATA;
+ @Override
+ public Item getItemDropped(IBlockState state, Random rand, int fortune)
+ {
+ return Item.getItemFromBlock(this);
+ }
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
+ {
+ for (int meta = 0; meta < types.length; meta++)
+ {
+ list.add(new ItemStack(item, 1, meta));
+ }
+ }
+ @Override
+ public int damageDropped(IBlockState state)
+ {
+ return getMetaFromState(state);
+ }
- @Override
- public Item getItemDropped(IBlockState state, Random rand, int fortune) {
- return Item.getItemFromBlock(this);
- }
+ @Override
+ public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing)
+ {
+ return "techreborn:blocks/storage/" + types[getMetaFromState(BlockStateContainer)] + "_block";
+ }
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
- for (int meta = 0; meta < types.length; meta++) {
- list.add(new ItemStack(item, 1, meta));
- }
- }
+ @Override
+ public int amountOfStates()
+ {
+ return types.length;
+ }
- @Override
- public int damageDropped(IBlockState state) {
- return getMetaFromState(state);
- }
+ @Override
+ public IBlockState getStateFromMeta(int meta)
+ {
+ return this.getDefaultState().withProperty(METADATA, meta);
+ }
- @Override
- public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing) {
- return "techreborn:blocks/storage/" + types[getMetaFromState(BlockStateContainer)] + "_block";
- }
+ @Override
+ public int getMetaFromState(IBlockState state)
+ {
+ return (Integer) state.getValue(METADATA);
+ }
- @Override
- public int amountOfStates() {
- return types.length;
- }
+ protected BlockStateContainer createBlockState()
+ {
- @Override
- public IBlockState getStateFromMeta(int meta) {
- return this.getDefaultState().withProperty(METADATA, meta);
- }
-
- @Override
- public int getMetaFromState(IBlockState state) {
- return (Integer) state.getValue(METADATA);
- }
-
- protected BlockStateContainer createBlockState() {
-
- METADATA = PropertyInteger.create("type", 0, types.length -1);
- return new BlockStateContainer(this, METADATA);
- }
+ METADATA = PropertyInteger.create("type", 0, types.length - 1);
+ return new BlockStateContainer(this, METADATA);
+ }
}
diff --git a/src/main/java/techreborn/blocks/BlockSupercondensator.java b/src/main/java/techreborn/blocks/BlockSupercondensator.java
index 2869fdbb8..33362111f 100644
--- a/src/main/java/techreborn/blocks/BlockSupercondensator.java
+++ b/src/main/java/techreborn/blocks/BlockSupercondensator.java
@@ -5,35 +5,40 @@ import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IAdvancedRotationTexture;
import techreborn.client.TechRebornCreativeTab;
-public class BlockSupercondensator extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockSupercondensator extends BlockMachineBase implements IAdvancedRotationTexture
+{
+ public BlockSupercondensator(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.supercondensator");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- public BlockSupercondensator(Material material) {
- super();
- setUnlocalizedName("techreborn.supercondensator");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "supercondensator_front";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "supercondensator_front";
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "supercondensator_side";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "supercondensator_side" ;
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "supercondensator_side";
+ }
- @Override
- public String getTop(boolean isActive) {
- return prefix + "supercondensator_side";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "machine_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/advanced_machine/BlockBlastFurnace.java b/src/main/java/techreborn/blocks/advanced_machine/BlockBlastFurnace.java
index 98c175447..8d4ca2a96 100644
--- a/src/main/java/techreborn/blocks/advanced_machine/BlockBlastFurnace.java
+++ b/src/main/java/techreborn/blocks/advanced_machine/BlockBlastFurnace.java
@@ -11,55 +11,66 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileBlastFurnace;
-public class BlockBlastFurnace extends BlockMachineBase implements IRotationTexture {
+public class BlockBlastFurnace extends BlockMachineBase implements IRotationTexture
+{
- public BlockBlastFurnace(Material material) {
- super();
- setUnlocalizedName("techreborn.blastfurnace");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockBlastFurnace(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.blastfurnace");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileBlastFurnace();
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileBlastFurnace();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.blastFurnaceID, world, x, y, z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.blastFurnaceID, world, x, y, z);
+ return true;
+ }
- @Override
- public boolean isAdvanced() {
- return true;
- }
+ @Override
+ public boolean isAdvanced()
+ {
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/advanced_machines/";
+ private final String prefix = "techreborn:blocks/machine/advanced_machines/";
- @Override
- public String getFrontOff() {
- return prefix + "industrial_blast_furnace_front_off";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "industrial_blast_furnace_front_off";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "industrial_blast_furnace_front_on";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "industrial_blast_furnace_front_on";
+ }
- @Override
- public String getSide() {
- return prefix + "advanced_machine_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "advanced_machine_side";
+ }
- @Override
- public String getTop() {
- return prefix + "advanced_machine_top";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "advanced_machine_top";
+ }
- @Override
- public String getBottom() {
- return prefix + "advanced_machine_bottom";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "advanced_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/advanced_machine/BlockCentrifuge.java b/src/main/java/techreborn/blocks/advanced_machine/BlockCentrifuge.java
index 8ffd3a3b4..e4c006a10 100644
--- a/src/main/java/techreborn/blocks/advanced_machine/BlockCentrifuge.java
+++ b/src/main/java/techreborn/blocks/advanced_machine/BlockCentrifuge.java
@@ -10,51 +10,62 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileCentrifuge;
-public class BlockCentrifuge extends BlockMachineBase implements IRotationTexture {
+public class BlockCentrifuge extends BlockMachineBase implements IRotationTexture
+{
- public BlockCentrifuge() {
- super();
- setUnlocalizedName("techreborn.centrifuge");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockCentrifuge()
+ {
+ super();
+ setUnlocalizedName("techreborn.centrifuge");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileCentrifuge();
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileCentrifuge();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking()) {
- player.openGui(Core.INSTANCE, GuiHandler.centrifugeID, world, x, y, z);
- }
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ {
+ player.openGui(Core.INSTANCE, GuiHandler.centrifugeID, world, x, y, z);
+ }
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/advanced_machines/";
+ private final String prefix = "techreborn:blocks/machine/advanced_machines/";
- @Override
- public String getFrontOff() {
- return prefix + "industrial_centrifuge_side_off";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "industrial_centrifuge_side_off";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "industrial_centrifuge_side_on";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "industrial_centrifuge_side_on";
+ }
- @Override
- public String getSide() {
- return getFrontOff();
- }
+ @Override
+ public String getSide()
+ {
+ return getFrontOff();
+ }
- @Override
- public String getTop() {
- return prefix + "industrial_centrifuge_top_off";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "industrial_centrifuge_top_off";
+ }
- @Override
- public String getBottom() {
- return prefix + "industrial_centrifuge_bottom";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "industrial_centrifuge_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/advanced_machine/BlockDistillationTower.java b/src/main/java/techreborn/blocks/advanced_machine/BlockDistillationTower.java
index 1adc3b48d..a352560bf 100644
--- a/src/main/java/techreborn/blocks/advanced_machine/BlockDistillationTower.java
+++ b/src/main/java/techreborn/blocks/advanced_machine/BlockDistillationTower.java
@@ -5,38 +5,45 @@ import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.client.TechRebornCreativeTab;
-public class BlockDistillationTower extends BlockMachineBase implements IRotationTexture {
+public class BlockDistillationTower extends BlockMachineBase implements IRotationTexture
+{
- public BlockDistillationTower(Material material) {
- super();
- setUnlocalizedName("techreborn.distillationtower");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockDistillationTower(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.distillationtower");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- private final String prefix = "techreborn:blocks/machine/advanced_machines/";
+ private final String prefix = "techreborn:blocks/machine/advanced_machines/";
- @Override
- public String getFrontOff() {
- return prefix + "distillation_tower_front_off";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "distillation_tower_front_off";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "distillation_tower_front_off";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "distillation_tower_front_off";
+ }
- @Override
- public String getSide() {
- return prefix + "advanced_machine_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "advanced_machine_side";
+ }
- @Override
- public String getTop() {
- return prefix + "industrial_centrifuge_top_off";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "industrial_centrifuge_top_off";
+ }
- @Override
- public String getBottom() {
- return prefix + "industrial_centrifuge_bottom";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "industrial_centrifuge_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/advanced_machine/BlockImplosionCompressor.java b/src/main/java/techreborn/blocks/advanced_machine/BlockImplosionCompressor.java
index a40ac2cdf..c038e0ea1 100644
--- a/src/main/java/techreborn/blocks/advanced_machine/BlockImplosionCompressor.java
+++ b/src/main/java/techreborn/blocks/advanced_machine/BlockImplosionCompressor.java
@@ -11,50 +11,60 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileImplosionCompressor;
-public class BlockImplosionCompressor extends BlockMachineBase implements IRotationTexture {
+public class BlockImplosionCompressor extends BlockMachineBase implements IRotationTexture
+{
- public BlockImplosionCompressor(Material material) {
- super();
- setUnlocalizedName("techreborn.implosioncompressor");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockImplosionCompressor(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.implosioncompressor");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileImplosionCompressor();
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileImplosionCompressor();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.implosionCompresserID, world, x, y, z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.implosionCompresserID, world, x, y, z);
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/advanced_machines/";
+ private final String prefix = "techreborn:blocks/machine/advanced_machines/";
- @Override
- public String getFrontOff() {
- return prefix + "implosion_compressor_front_off";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "implosion_compressor_front_off";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "implosion_compressor_front_on";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "implosion_compressor_front_on";
+ }
- @Override
- public String getSide() {
- return prefix + "advanced_machine_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "advanced_machine_side";
+ }
- @Override
- public String getTop() {
- return prefix + "industrial_centrifuge_top_off";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "industrial_centrifuge_top_off";
+ }
- @Override
- public String getBottom() {
- return prefix + "implosion_compressor_bottom";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "implosion_compressor_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/advanced_machine/BlockIndustrialElectrolyzer.java b/src/main/java/techreborn/blocks/advanced_machine/BlockIndustrialElectrolyzer.java
index aca563760..f276bea23 100644
--- a/src/main/java/techreborn/blocks/advanced_machine/BlockIndustrialElectrolyzer.java
+++ b/src/main/java/techreborn/blocks/advanced_machine/BlockIndustrialElectrolyzer.java
@@ -11,50 +11,60 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileIndustrialElectrolyzer;
-public class BlockIndustrialElectrolyzer extends BlockMachineBase implements IRotationTexture {
+public class BlockIndustrialElectrolyzer extends BlockMachineBase implements IRotationTexture
+{
- public BlockIndustrialElectrolyzer(Material material) {
- super();
- setUnlocalizedName("techreborn.industrialelectrolyzer");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockIndustrialElectrolyzer(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.industrialelectrolyzer");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileIndustrialElectrolyzer();
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileIndustrialElectrolyzer();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.industrialElectrolyzerID, world, x, y, z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.industrialElectrolyzerID, world, x, y, z);
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/advanced_machines/";
+ private final String prefix = "techreborn:blocks/machine/advanced_machines/";
- @Override
- public String getFrontOff() {
- return prefix + "industrial_electrolyzer_front_off";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "industrial_electrolyzer_front_off";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "industrial_electrolyzer_front_on";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "industrial_electrolyzer_front_on";
+ }
- @Override
- public String getSide() {
- return prefix + "industrial_electrolyzer_front_off";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "industrial_electrolyzer_front_off";
+ }
- @Override
- public String getTop() {
- return prefix + "machine_top";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "machine_top";
+ }
- @Override
- public String getBottom() {
- return prefix + "machine_bottom";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/advanced_machine/BlockIndustrialGrinder.java b/src/main/java/techreborn/blocks/advanced_machine/BlockIndustrialGrinder.java
index 3559fb142..06ba303d2 100644
--- a/src/main/java/techreborn/blocks/advanced_machine/BlockIndustrialGrinder.java
+++ b/src/main/java/techreborn/blocks/advanced_machine/BlockIndustrialGrinder.java
@@ -12,53 +12,64 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileIndustrialGrinder;
-public class BlockIndustrialGrinder extends BlockMachineBase implements IRotationTexture {
+public class BlockIndustrialGrinder extends BlockMachineBase implements IRotationTexture
+{
- public BlockIndustrialGrinder(Material material) {
- super();
- setUnlocalizedName("techreborn.industrialgrinder");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockIndustrialGrinder(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.industrialgrinder");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileIndustrialGrinder();
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileIndustrialGrinder();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if(fillBlockWithFluid(world, new BlockPos(x, y, z), player)){
- return true;
- }
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.industrialGrinderID, world, x, y, z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (fillBlockWithFluid(world, new BlockPos(x, y, z), player))
+ {
+ return true;
+ }
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.industrialGrinderID, world, x, y, z);
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/advanced_machines/";
+ private final String prefix = "techreborn:blocks/machine/advanced_machines/";
- @Override
- public String getFrontOff() {
- return prefix + "industrial_grinder_front_off";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "industrial_grinder_front_off";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "industrial_grinder_front_on";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "industrial_grinder_front_on";
+ }
- @Override
- public String getSide() {
- return prefix + "machine_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "machine_side";
+ }
- @Override
- public String getTop() {
- return prefix + "industrial_grinder_top_off";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "industrial_grinder_top_off";
+ }
- @Override
- public String getBottom() {
- return prefix + "industrial_centrifuge_bottom";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "industrial_centrifuge_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/advanced_machine/BlockIndustrialSawmill.java b/src/main/java/techreborn/blocks/advanced_machine/BlockIndustrialSawmill.java
index c55606036..fd9094179 100644
--- a/src/main/java/techreborn/blocks/advanced_machine/BlockIndustrialSawmill.java
+++ b/src/main/java/techreborn/blocks/advanced_machine/BlockIndustrialSawmill.java
@@ -12,53 +12,64 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileIndustrialSawmill;
-public class BlockIndustrialSawmill extends BlockMachineBase implements IRotationTexture {
+public class BlockIndustrialSawmill extends BlockMachineBase implements IRotationTexture
+{
- public BlockIndustrialSawmill(Material material) {
- super();
- setUnlocalizedName("techreborn.industrialsawmill");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockIndustrialSawmill(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.industrialsawmill");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileIndustrialSawmill();
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileIndustrialSawmill();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if(fillBlockWithFluid(world, new BlockPos(x, y, z), player)){
- return true;
- }
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.sawMillID, world, x, y, z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (fillBlockWithFluid(world, new BlockPos(x, y, z), player))
+ {
+ return true;
+ }
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.sawMillID, world, x, y, z);
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/advanced_machines/";
+ private final String prefix = "techreborn:blocks/machine/advanced_machines/";
- @Override
- public String getFrontOff() {
- return prefix + "industrial_sawmill_front_off";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "industrial_sawmill_front_off";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "industrial_sawmill_front_on";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "industrial_sawmill_front_on";
+ }
- @Override
- public String getSide() {
- return prefix + "advanced_machine_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "advanced_machine_side";
+ }
- @Override
- public String getTop() {
- return prefix + "advanced_machine_side";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "advanced_machine_side";
+ }
- @Override
- public String getBottom() {
- return prefix + "advanced_machine_side";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "advanced_machine_side";
+ }
}
diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidBase.java b/src/main/java/techreborn/blocks/fluid/BlockFluidBase.java
index 78cf23fa3..8ccc0b917 100644
--- a/src/main/java/techreborn/blocks/fluid/BlockFluidBase.java
+++ b/src/main/java/techreborn/blocks/fluid/BlockFluidBase.java
@@ -8,26 +8,29 @@ import net.minecraftforge.fluids.BlockFluidClassic;
import net.minecraftforge.fluids.Fluid;
import reborncore.RebornCore;
-public class BlockFluidBase extends BlockFluidClassic {
+public class BlockFluidBase extends BlockFluidClassic
+{
- public BlockFluidBase(Fluid fluid, Material material) {
- super(fluid, material);
- RebornCore.jsonDestroyer.registerObject(this);
- }
+ public BlockFluidBase(Fluid fluid, Material material)
+ {
+ super(fluid, material);
+ RebornCore.jsonDestroyer.registerObject(this);
+ }
+ @Override
+ public boolean canDisplace(IBlockAccess world, BlockPos pos)
+ {
+ if (world.getBlockState(pos).getBlock().getMaterial(world.getBlockState(pos)).isLiquid())
+ return false;
+ return super.canDisplace(world, pos);
+ }
- @Override
- public boolean canDisplace(IBlockAccess world, BlockPos pos) {
- if(world.getBlockState(pos).getBlock().getMaterial(world.getBlockState(pos)).isLiquid())
- return false;
- return super.canDisplace(world, pos);
- }
-
- @Override
- public boolean displaceIfPossible(World world, BlockPos pos) {
- if(world.getBlockState(pos).getBlock().getMaterial(world.getBlockState(pos)).isLiquid())
- return false;
- return super.displaceIfPossible(world, pos);
- }
+ @Override
+ public boolean displaceIfPossible(World world, BlockPos pos)
+ {
+ if (world.getBlockState(pos).getBlock().getMaterial(world.getBlockState(pos)).isLiquid())
+ return false;
+ return super.displaceIfPossible(world, pos);
+ }
}
diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidTechReborn.java b/src/main/java/techreborn/blocks/fluid/BlockFluidTechReborn.java
index 8b11f6682..587afabb0 100644
--- a/src/main/java/techreborn/blocks/fluid/BlockFluidTechReborn.java
+++ b/src/main/java/techreborn/blocks/fluid/BlockFluidTechReborn.java
@@ -4,18 +4,21 @@ import me.modmuss50.jsonDestroyer.api.ITexturedFluid;
import net.minecraft.block.material.Material;
import net.minecraftforge.fluids.Fluid;
-public class BlockFluidTechReborn extends BlockFluidBase implements ITexturedFluid {
+public class BlockFluidTechReborn extends BlockFluidBase implements ITexturedFluid
+{
- String name;
+ String name;
- public BlockFluidTechReborn(Fluid fluid, Material material, String name) {
- super(fluid, material);
- setUnlocalizedName(name);
- this.name = name;
- }
+ public BlockFluidTechReborn(Fluid fluid, Material material, String name)
+ {
+ super(fluid, material);
+ setUnlocalizedName(name);
+ this.name = name;
+ }
- @Override
- public String getTextureName() {
- return "techreborn:blocks/fluids/" + name.replaceAll("techreborn.", "") + "_flowing";
- }
+ @Override
+ public String getTextureName()
+ {
+ return "techreborn:blocks/fluids/" + name.replaceAll("techreborn.", "") + "_flowing";
+ }
}
diff --git a/src/main/java/techreborn/blocks/fluid/TechRebornFluid.java b/src/main/java/techreborn/blocks/fluid/TechRebornFluid.java
index 5d2b0ab86..ad33fd095 100644
--- a/src/main/java/techreborn/blocks/fluid/TechRebornFluid.java
+++ b/src/main/java/techreborn/blocks/fluid/TechRebornFluid.java
@@ -3,8 +3,12 @@ package techreborn.blocks.fluid;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fluids.Fluid;
-public class TechRebornFluid extends Fluid {
- public TechRebornFluid(String fluidName) {
- super(fluidName, new ResourceLocation("techreborn:blocks/fluids/" + fluidName.replaceFirst("fluid", "") + "_flowing"), new ResourceLocation("techreborn:blocks/fluids/" + fluidName.replaceFirst("fluid", "") + "_flowing"));
- }
+public class TechRebornFluid extends Fluid
+{
+ public TechRebornFluid(String fluidName)
+ {
+ super(fluidName,
+ new ResourceLocation("techreborn:blocks/fluids/" + fluidName.replaceFirst("fluid", "") + "_flowing"),
+ new ResourceLocation("techreborn:blocks/fluids/" + fluidName.replaceFirst("fluid", "") + "_flowing"));
+ }
}
diff --git a/src/main/java/techreborn/blocks/generator/BlockDieselGenerator.java b/src/main/java/techreborn/blocks/generator/BlockDieselGenerator.java
index 6633d3a4b..794ce9d20 100644
--- a/src/main/java/techreborn/blocks/generator/BlockDieselGenerator.java
+++ b/src/main/java/techreborn/blocks/generator/BlockDieselGenerator.java
@@ -12,54 +12,59 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.generator.TileDieselGenerator;
-public class BlockDieselGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockDieselGenerator extends BlockMachineBase implements IAdvancedRotationTexture
+{
+ public BlockDieselGenerator(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.dieselgenerator");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- public BlockDieselGenerator(Material material) {
- super();
- setUnlocalizedName("techreborn.dieselgenerator");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileDieselGenerator();
+ }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (fillBlockWithFluid(world, new BlockPos(x, y, z), player))
+ {
+ return true;
+ }
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.dieselGeneratorID, world, x, y, z);
+ return true;
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileDieselGenerator();
- }
+ private final String prefix = "techreborn:blocks/machine/generators/";
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z,
- EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if(fillBlockWithFluid(world, new BlockPos(x, y, z), player)){
- return true;
- }
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.dieselGeneratorID, world, x, y,
- z);
- return true;
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "generator_machine_side";
+ }
- private final String prefix = "techreborn:blocks/machine/generators/";
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "generator_machine_side";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "generator_machine_side";
- }
-
- @Override
- public String getSide(boolean isActive) {
- return prefix + "generator_machine_side" ;
- }
-
- @Override
- public String getTop(boolean isActive) {
- return prefix + "diesel_generator_top_off";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "generator_machine_bottom";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "diesel_generator_top_off";
+ }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "generator_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/generator/BlockDragonEggSiphoner.java b/src/main/java/techreborn/blocks/generator/BlockDragonEggSiphoner.java
index 6c7d94f36..072bd7827 100644
--- a/src/main/java/techreborn/blocks/generator/BlockDragonEggSiphoner.java
+++ b/src/main/java/techreborn/blocks/generator/BlockDragonEggSiphoner.java
@@ -8,42 +8,46 @@ import reborncore.common.blocks.IAdvancedRotationTexture;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.generator.TileDragonEggSiphoner;
-public class BlockDragonEggSiphoner extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockDragonEggSiphoner extends BlockMachineBase implements IAdvancedRotationTexture
+{
+ public BlockDragonEggSiphoner(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.dragoneggsiphoner");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileDragonEggSiphoner();
+ }
- public BlockDragonEggSiphoner(Material material) {
- super();
- setUnlocalizedName("techreborn.dragoneggsiphoner");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ private final String prefix = "techreborn:blocks/machine/generators/";
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "dragon_egg_energy_siphon_side_off";
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileDragonEggSiphoner();
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "dragon_egg_energy_siphon_side_off";
+ }
- private final String prefix = "techreborn:blocks/machine/generators/";
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "dragon_egg_energy_siphon_top";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "dragon_egg_energy_siphon_side_off";
- }
-
- @Override
- public String getSide(boolean isActive) {
- return prefix + "dragon_egg_energy_siphon_side_off" ;
- }
-
- @Override
- public String getTop(boolean isActive) {
- return prefix + "dragon_egg_energy_siphon_top";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "generator_machine_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "generator_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/generator/BlockGasTurbine.java b/src/main/java/techreborn/blocks/generator/BlockGasTurbine.java
index 1a0b94f90..ed4110189 100644
--- a/src/main/java/techreborn/blocks/generator/BlockGasTurbine.java
+++ b/src/main/java/techreborn/blocks/generator/BlockGasTurbine.java
@@ -12,52 +12,59 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.generator.TileGasTurbine;
-public class BlockGasTurbine extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockGasTurbine extends BlockMachineBase implements IAdvancedRotationTexture
+{
+ public BlockGasTurbine(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.gasTurbine");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- public BlockGasTurbine(Material material) {
- super();
- setUnlocalizedName("techreborn.gasTurbine");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileGasTurbine();
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileGasTurbine();
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (fillBlockWithFluid(world, new BlockPos(x, y, z), player))
+ {
+ return true;
+ }
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.gasTurbineID, world, x, y, z);
+ return true;
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z,
- EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if(fillBlockWithFluid(world, new BlockPos(x, y, z), player)){
- return true;
- }
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.gasTurbineID, world, x, y,
- z);
- return true;
- }
+ private final String prefix = "techreborn:blocks/machine/generators/";
- private final String prefix = "techreborn:blocks/machine/generators/";
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "generator_machine_side";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "generator_machine_side";
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "generator_machine_side";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "generator_machine_side" ;
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "gas_generator_top";
+ }
- @Override
- public String getTop(boolean isActive) {
- return prefix + "gas_generator_top";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "gas_generator_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "gas_generator_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/generator/BlockGenerator.java b/src/main/java/techreborn/blocks/generator/BlockGenerator.java
index 3c9b4a670..c2c70d3fb 100644
--- a/src/main/java/techreborn/blocks/generator/BlockGenerator.java
+++ b/src/main/java/techreborn/blocks/generator/BlockGenerator.java
@@ -17,58 +17,70 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.generator.TileGenerator;
-public class BlockGenerator extends BlockMachineBase implements IRotationTexture {
+public class BlockGenerator extends BlockMachineBase implements IRotationTexture
+{
- public BlockGenerator() {
+ public BlockGenerator()
+ {
super();
setUnlocalizedName("techreborn.generator");
- setCreativeTab(TechRebornCreativeTab.instance);
+ setCreativeTab(TechRebornCreativeTab.instance);
}
-
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileGenerator();
- }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking()){
- player.openGui(Core.INSTANCE, GuiHandler.generatorID, world, x, y, z);
- }
- return true;
- }
-
- @Override
- public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
- List items = new ArrayList();
- items.add(new ItemStack(this));
- return items;
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileGenerator();
+ }
- private final String prefix = "techreborn:blocks/machine/generators/";
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ {
+ player.openGui(Core.INSTANCE, GuiHandler.generatorID, world, x, y, z);
+ }
+ return true;
+ }
- @Override
- public String getFrontOff() {
- return prefix + "generator_front_off";
- }
+ @Override
+ public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
+ {
+ List items = new ArrayList();
+ items.add(new ItemStack(this));
+ return items;
+ }
- @Override
- public String getFrontOn() {
- return prefix + "generator_front_on";
- }
+ private final String prefix = "techreborn:blocks/machine/generators/";
- @Override
- public String getSide() {
- return prefix + "generator_machine_side" ;
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "generator_front_off";
+ }
- @Override
- public String getTop() {
- return prefix + "generator_machine_top";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "generator_front_on";
+ }
- @Override
- public String getBottom() {
- return prefix + "generator_machine_bottom";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "generator_machine_side";
+ }
+
+ @Override
+ public String getTop()
+ {
+ return prefix + "generator_machine_top";
+ }
+
+ @Override
+ public String getBottom()
+ {
+ return prefix + "generator_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/generator/BlockHeatGenerator.java b/src/main/java/techreborn/blocks/generator/BlockHeatGenerator.java
index f20367b6d..44605b7a5 100644
--- a/src/main/java/techreborn/blocks/generator/BlockHeatGenerator.java
+++ b/src/main/java/techreborn/blocks/generator/BlockHeatGenerator.java
@@ -8,42 +8,46 @@ import reborncore.common.blocks.IAdvancedRotationTexture;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.generator.TileHeatGenerator;
-public class BlockHeatGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockHeatGenerator extends BlockMachineBase implements IAdvancedRotationTexture
+{
+ public BlockHeatGenerator(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.heatgenerator");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- public BlockHeatGenerator(Material material) {
- super();
- setUnlocalizedName("techreborn.heatgenerator");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileHeatGenerator();
+ }
+ private final String prefix = "techreborn:blocks/machine/generators/";
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "heat_generator_side";
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileHeatGenerator();
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "heat_generator_side";
+ }
- private final String prefix = "techreborn:blocks/machine/generators/";
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "heat_generator_top";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "heat_generator_side";
- }
-
- @Override
- public String getSide(boolean isActive) {
- return prefix + "heat_generator_side" ;
- }
-
- @Override
- public String getTop(boolean isActive) {
- return prefix + "heat_generator_top";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "heat_generator_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "heat_generator_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/generator/BlockLightningRod.java b/src/main/java/techreborn/blocks/generator/BlockLightningRod.java
index 99568bda0..18405897b 100644
--- a/src/main/java/techreborn/blocks/generator/BlockLightningRod.java
+++ b/src/main/java/techreborn/blocks/generator/BlockLightningRod.java
@@ -5,33 +5,39 @@ import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IAdvancedRotationTexture;
import techreborn.client.TechRebornCreativeTab;
-public class BlockLightningRod extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockLightningRod extends BlockMachineBase implements IAdvancedRotationTexture
+{
- public BlockLightningRod(Material material) {
- super();
- setUnlocalizedName("techreborn.lightningrod");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockLightningRod(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.lightningrod");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- private final String prefix = "techreborn:blocks/machine/generators/";
+ private final String prefix = "techreborn:blocks/machine/generators/";
- @Override
- public String getFront(boolean isActive) {
- return prefix + "plasma_generator_side_off";
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "plasma_generator_side_off";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "plasma_generator_side_off" ;
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "plasma_generator_side_off";
+ }
- @Override
- public String getTop(boolean isActive) {
- return prefix + "plasma_generator_side_off";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "plasma_generator_side_off";
+ }
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "plasma_generator_side_off";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "plasma_generator_side_off";
+ }
}
diff --git a/src/main/java/techreborn/blocks/generator/BlockMagicEnergyAbsorber.java b/src/main/java/techreborn/blocks/generator/BlockMagicEnergyAbsorber.java
index c875db2c1..759743c51 100644
--- a/src/main/java/techreborn/blocks/generator/BlockMagicEnergyAbsorber.java
+++ b/src/main/java/techreborn/blocks/generator/BlockMagicEnergyAbsorber.java
@@ -5,35 +5,40 @@ import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IAdvancedRotationTexture;
import techreborn.client.TechRebornCreativeTab;
-public class BlockMagicEnergyAbsorber extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockMagicEnergyAbsorber extends BlockMachineBase implements IAdvancedRotationTexture
+{
- public BlockMagicEnergyAbsorber(Material material) {
- super();
- setUnlocalizedName("techreborn.magicenergyabsorber");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockMagicEnergyAbsorber(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.magicenergyabsorber");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
+ private final String prefix = "techreborn:blocks/machine/generators/";
- private final String prefix = "techreborn:blocks/machine/generators/";
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "magic_energy_absorber_side";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "magic_energy_absorber_side";
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "magic_energy_absorber_side";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "magic_energy_absorber_side" ;
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "magic_energy_absorber_top";
+ }
- @Override
- public String getTop(boolean isActive) {
- return prefix + "magic_energy_absorber_top";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "magic_energy_absorber_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "magic_energy_absorber_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/generator/BlockMagicEnergyConverter.java b/src/main/java/techreborn/blocks/generator/BlockMagicEnergyConverter.java
index 31417b778..3bd93fc86 100644
--- a/src/main/java/techreborn/blocks/generator/BlockMagicEnergyConverter.java
+++ b/src/main/java/techreborn/blocks/generator/BlockMagicEnergyConverter.java
@@ -5,36 +5,40 @@ import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IAdvancedRotationTexture;
import techreborn.client.TechRebornCreativeTab;
-public class BlockMagicEnergyConverter extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockMagicEnergyConverter extends BlockMachineBase implements IAdvancedRotationTexture
+{
- public BlockMagicEnergyConverter(Material material) {
- super();
- setUnlocalizedName("techreborn.magicenergyconverter");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockMagicEnergyConverter(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.magicenergyconverter");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
+ private final String prefix = "techreborn:blocks/machine/generators/";
- private final String prefix = "techreborn:blocks/machine/generators/";
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "magic_energy_converter_front_off";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "magic_energy_converter_front_off";
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "magic_energy_converter_side";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "magic_energy_converter_side" ;
- }
-
- @Override
- public String getTop(boolean isActive) {
- return prefix + "magic_energy_converter_top";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "magic_energy_converter_bottom";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "magic_energy_converter_top";
+ }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "magic_energy_converter_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/generator/BlockPlasmaGenerator.java b/src/main/java/techreborn/blocks/generator/BlockPlasmaGenerator.java
index a1046678b..97e66e102 100644
--- a/src/main/java/techreborn/blocks/generator/BlockPlasmaGenerator.java
+++ b/src/main/java/techreborn/blocks/generator/BlockPlasmaGenerator.java
@@ -5,33 +5,39 @@ import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IAdvancedRotationTexture;
import techreborn.client.TechRebornCreativeTab;
-public class BlockPlasmaGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockPlasmaGenerator extends BlockMachineBase implements IAdvancedRotationTexture
+{
- public BlockPlasmaGenerator(Material material) {
- super();
- setUnlocalizedName("techreborn.plasmagenerator");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockPlasmaGenerator(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.plasmagenerator");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- private final String prefix = "techreborn:blocks/machine/generators/";
+ private final String prefix = "techreborn:blocks/machine/generators/";
- @Override
- public String getFront(boolean isActive) {
- return prefix + "plasma_generator_front";
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "plasma_generator_front";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "plasma_generator_side_off" ;
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "plasma_generator_side_off";
+ }
- @Override
- public String getTop(boolean isActive) {
- return prefix + "plasma_generator_side_off";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "plasma_generator_side_off";
+ }
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "plasma_generator_side_off";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "plasma_generator_side_off";
+ }
}
diff --git a/src/main/java/techreborn/blocks/generator/BlockSemiFluidGenerator.java b/src/main/java/techreborn/blocks/generator/BlockSemiFluidGenerator.java
index 37556f5e0..07f7d8d40 100644
--- a/src/main/java/techreborn/blocks/generator/BlockSemiFluidGenerator.java
+++ b/src/main/java/techreborn/blocks/generator/BlockSemiFluidGenerator.java
@@ -12,53 +12,59 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.generator.TileSemifluidGenerator;
-public class BlockSemiFluidGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockSemiFluidGenerator extends BlockMachineBase implements IAdvancedRotationTexture
+{
+ public BlockSemiFluidGenerator(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.semifluidgenerator");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileSemifluidGenerator();
+ }
- public BlockSemiFluidGenerator(Material material) {
- super();
- setUnlocalizedName("techreborn.semifluidgenerator");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (fillBlockWithFluid(world, new BlockPos(x, y, z), player))
+ {
+ return true;
+ }
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.semifluidGeneratorID, world, x, y, z);
+ return true;
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileSemifluidGenerator();
- }
+ private final String prefix = "techreborn:blocks/machine/generators/";
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z,
- EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if(fillBlockWithFluid(world, new BlockPos(x, y, z), player)){
- return true;
- }
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.semifluidGeneratorID, world, x, y,
- z);
- return true;
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "semifluid_generator_side";
+ }
- private final String prefix = "techreborn:blocks/machine/generators/";
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "semifluid_generator_side";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "semifluid_generator_side";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "generator_machine_top";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "semifluid_generator_side" ;
- }
-
- @Override
- public String getTop(boolean isActive) {
- return prefix + "generator_machine_top";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "generator_machine_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "generator_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/generator/BlockSolarPanel.java b/src/main/java/techreborn/blocks/generator/BlockSolarPanel.java
index 0335fab5f..506952518 100644
--- a/src/main/java/techreborn/blocks/generator/BlockSolarPanel.java
+++ b/src/main/java/techreborn/blocks/generator/BlockSolarPanel.java
@@ -15,52 +15,62 @@ import techreborn.tiles.generator.TileSolarPanel;
/**
* Created by modmuss50 on 25/02/2016.
*/
-public class BlockSolarPanel extends BaseTileBlock implements ITexturedBlock {
+public class BlockSolarPanel extends BaseTileBlock implements ITexturedBlock
+{
- public static PropertyBool ACTIVE = PropertyBool.create("active");
+ public static PropertyBool ACTIVE = PropertyBool.create("active");
- public BlockSolarPanel() {
- super(Material.iron);
- setUnlocalizedName("techreborn.solarpanel");
- setCreativeTab(TechRebornCreativeTab.instance);
- this.setDefaultState(this.getDefaultState().withProperty(ACTIVE, false));
- }
+ public BlockSolarPanel()
+ {
+ super(Material.iron);
+ setUnlocalizedName("techreborn.solarpanel");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ this.setDefaultState(this.getDefaultState().withProperty(ACTIVE, false));
+ }
- protected BlockStateContainer createBlockState() {
- ACTIVE = PropertyBool.create("active");
- return new BlockStateContainer(this, ACTIVE);
- }
+ protected BlockStateContainer createBlockState()
+ {
+ ACTIVE = PropertyBool.create("active");
+ return new BlockStateContainer(this, ACTIVE);
+ }
- @Override
- public IBlockState getStateFromMeta(int meta) {
- return getDefaultState().withProperty(ACTIVE, meta == 0 ? false : true);
- }
+ @Override
+ public IBlockState getStateFromMeta(int meta)
+ {
+ return getDefaultState().withProperty(ACTIVE, meta == 0 ? false : true);
+ }
- @Override
- public int getMetaFromState(IBlockState state) {
- return state.getValue(ACTIVE) == true ? 1 : 0;
- }
+ @Override
+ public int getMetaFromState(IBlockState state)
+ {
+ return state.getValue(ACTIVE) == true ? 1 : 0;
+ }
- @Override
- public TileEntity createNewTileEntity(World worldIn, int meta) {
- return new TileSolarPanel();
- }
+ @Override
+ public TileEntity createNewTileEntity(World worldIn, int meta)
+ {
+ return new TileSolarPanel();
+ }
- private final String prefix = "techreborn:blocks/machine/generators/";
+ private final String prefix = "techreborn:blocks/machine/generators/";
- @Override
- public String getTextureNameFromState(IBlockState state, EnumFacing side) {
- boolean isActive = state.getValue(ACTIVE);
- if(side == EnumFacing.UP){
- return prefix + "solar_panel_top_" + (isActive ? "on" : "off");
- } else if(side==EnumFacing.DOWN){
- return prefix + "generator_machine_bottom";
- }
- return prefix + "solar_panel_side_" + (isActive ? "on" : "off");
- }
+ @Override
+ public String getTextureNameFromState(IBlockState state, EnumFacing side)
+ {
+ boolean isActive = state.getValue(ACTIVE);
+ if (side == EnumFacing.UP)
+ {
+ return prefix + "solar_panel_top_" + (isActive ? "on" : "off");
+ } else if (side == EnumFacing.DOWN)
+ {
+ return prefix + "generator_machine_bottom";
+ }
+ return prefix + "solar_panel_side_" + (isActive ? "on" : "off");
+ }
- @Override
- public int amountOfStates() {
- return 2;
- }
+ @Override
+ public int amountOfStates()
+ {
+ return 2;
+ }
}
diff --git a/src/main/java/techreborn/blocks/generator/BlockThermalGenerator.java b/src/main/java/techreborn/blocks/generator/BlockThermalGenerator.java
index 90c908665..0522e1401 100644
--- a/src/main/java/techreborn/blocks/generator/BlockThermalGenerator.java
+++ b/src/main/java/techreborn/blocks/generator/BlockThermalGenerator.java
@@ -11,53 +11,58 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.generator.TileThermalGenerator;
-public class BlockThermalGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockThermalGenerator extends BlockMachineBase implements IAdvancedRotationTexture
+{
+ public BlockThermalGenerator()
+ {
+ super();
+ setUnlocalizedName("techreborn.thermalGenerator");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileThermalGenerator();
+ }
- public BlockThermalGenerator() {
- super();
- setUnlocalizedName("techreborn.thermalGenerator");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (fillBlockWithFluid(world, new BlockPos(x, y, z), player))
+ {
+ return true;
+ }
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.thermalGeneratorID, world, x, y, z);
+ return true;
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileThermalGenerator();
- }
+ private final String prefix = "techreborn:blocks/machine/generators/";
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z,
- EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if(fillBlockWithFluid(world, new BlockPos(x, y, z), player)){
- return true;
- }
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.thermalGeneratorID, world, x, y,
- z);
- return true;
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return isActive ? prefix + "thermal_generator_side_on" : prefix + "thermal_generator_side_off";
+ }
- private final String prefix = "techreborn:blocks/machine/generators/";
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return isActive ? prefix + "thermal_generator_side_on" : prefix + "thermal_generator_side_off";
+ }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return isActive ? prefix + "thermal_generator_top_on" : prefix + "thermal_generator_top_off";
+ }
- @Override
- public String getFront(boolean isActive) {
- return isActive ? prefix + "thermal_generator_side_on" : prefix + "thermal_generator_side_off";
- }
-
- @Override
- public String getSide(boolean isActive) {
- return isActive ? prefix + "thermal_generator_side_on" : prefix + "thermal_generator_side_off";
- }
-
- @Override
- public String getTop(boolean isActive) {
- return isActive ? prefix + "thermal_generator_top_on" : prefix + "thermal_generator_top_off";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "generator_machine_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "generator_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/generator/BlockWaterMill.java b/src/main/java/techreborn/blocks/generator/BlockWaterMill.java
index 5a9c99ad1..df977ad18 100644
--- a/src/main/java/techreborn/blocks/generator/BlockWaterMill.java
+++ b/src/main/java/techreborn/blocks/generator/BlockWaterMill.java
@@ -14,35 +14,43 @@ import techreborn.tiles.generator.TileWaterMill;
/**
* Created by modmuss50 on 25/02/2016.
*/
-public class BlockWaterMill extends BaseTileBlock implements ITexturedBlock{
+public class BlockWaterMill extends BaseTileBlock implements ITexturedBlock
+{
- public BlockWaterMill() {
- super(Material.iron);
- setUnlocalizedName("techreborn.watermill");
- setCreativeTab(TechRebornCreativeTab.instance);
- RebornCore.jsonDestroyer.registerObject(this);
- }
+ public BlockWaterMill()
+ {
+ super(Material.iron);
+ setUnlocalizedName("techreborn.watermill");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ RebornCore.jsonDestroyer.registerObject(this);
+ }
- @Override
- public TileEntity createNewTileEntity(World worldIn, int meta) {
- return new TileWaterMill();
- }
-
- private final String prefix = "techreborn:blocks/machine/generators/";
+ @Override
+ public TileEntity createNewTileEntity(World worldIn, int meta)
+ {
+ return new TileWaterMill();
+ }
- @Override
- public String getTextureNameFromState(IBlockState state, EnumFacing side) {
- boolean isActive = false;
- if(side == EnumFacing.UP){
- return prefix + "generator_machine_bottom";// + (isActive ? "on" : "off");
- } else if(side==EnumFacing.DOWN){
- return prefix + "generator_machine_bottom";
- }
- return prefix + "solar_panel_side_" + (isActive ? "on" : "off");
- }
+ private final String prefix = "techreborn:blocks/machine/generators/";
- @Override
- public int amountOfStates() {
- return 2;
- }
+ @Override
+ public String getTextureNameFromState(IBlockState state, EnumFacing side)
+ {
+ boolean isActive = false;
+ if (side == EnumFacing.UP)
+ {
+ return prefix + "generator_machine_bottom";// + (isActive ? "on" :
+ // "off");
+ } else if (side == EnumFacing.DOWN)
+ {
+ return prefix + "generator_machine_bottom";
+ }
+ return prefix + "solar_panel_side_" + (isActive ? "on" : "off");
+ }
+
+ @Override
+ public int amountOfStates()
+ {
+ return 2;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/techreborn/blocks/generator/BlockWindMill.java b/src/main/java/techreborn/blocks/generator/BlockWindMill.java
index 271bd5c46..e9bb17248 100644
--- a/src/main/java/techreborn/blocks/generator/BlockWindMill.java
+++ b/src/main/java/techreborn/blocks/generator/BlockWindMill.java
@@ -8,42 +8,49 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import reborncore.RebornCore;
import reborncore.common.BaseTileBlock;
-import reborncore.common.blocks.IAdvancedRotationTexture;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.generator.TileWindMill;
/**
* Created by modmuss50 on 25/02/2016.
*/
-public class BlockWindMill extends BaseTileBlock implements ITexturedBlock {
+public class BlockWindMill extends BaseTileBlock implements ITexturedBlock
+{
- public BlockWindMill() {
- super(Material.iron);
- setUnlocalizedName("techreborn.windmill");
- setCreativeTab(TechRebornCreativeTab.instance);
- RebornCore.jsonDestroyer.registerObject(this);
- }
+ public BlockWindMill()
+ {
+ super(Material.iron);
+ setUnlocalizedName("techreborn.windmill");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ RebornCore.jsonDestroyer.registerObject(this);
+ }
- @Override
- public TileEntity createNewTileEntity(World worldIn, int meta) {
- return new TileWindMill();
- }
-
- private final String prefix = "techreborn:blocks/machine/generators/";
+ @Override
+ public TileEntity createNewTileEntity(World worldIn, int meta)
+ {
+ return new TileWindMill();
+ }
- @Override
- public String getTextureNameFromState(IBlockState state, EnumFacing side) {
- boolean isActive = false;
- if(side == EnumFacing.UP){
- return prefix + "generator_machine_bottom";// + (isActive ? "on" : "off");
- } else if(side==EnumFacing.DOWN){
- return prefix + "generator_machine_bottom";
- }
- return prefix + "solar_panel_side_" + (isActive ? "on" : "off");
- }
+ private final String prefix = "techreborn:blocks/machine/generators/";
- @Override
- public int amountOfStates() {
- return 2;
- }
+ @Override
+ public String getTextureNameFromState(IBlockState state, EnumFacing side)
+ {
+ boolean isActive = false;
+ if (side == EnumFacing.UP)
+ {
+ return prefix + "generator_machine_bottom";// + (isActive ? "on" :
+ // "off");
+ } else if (side == EnumFacing.DOWN)
+ {
+ return prefix + "generator_machine_bottom";
+ }
+ return prefix + "solar_panel_side_" + (isActive ? "on" : "off");
+ }
+
+ @Override
+ public int amountOfStates()
+ {
+ return 2;
+ }
}
diff --git a/src/main/java/techreborn/blocks/iron_machines/BlockAlloyFurnace.java b/src/main/java/techreborn/blocks/iron_machines/BlockAlloyFurnace.java
index 595facfbb..40b1f5981 100644
--- a/src/main/java/techreborn/blocks/iron_machines/BlockAlloyFurnace.java
+++ b/src/main/java/techreborn/blocks/iron_machines/BlockAlloyFurnace.java
@@ -1,5 +1,8 @@
package techreborn.blocks.iron_machines;
+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;
@@ -15,60 +18,68 @@ 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 class BlockAlloyFurnace extends BlockMachineBase implements IRotationTexture {
+ public BlockAlloyFurnace(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.alloyfurnace");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- public BlockAlloyFurnace(Material material) {
- super();
- setUnlocalizedName("techreborn.alloyfurnace");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileAlloyFurnace();
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileAlloyFurnace();
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.alloyFurnaceID, world, x, y, z);
+ return true;
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.alloyFurnaceID, world, x, y, z);
- return true;
- }
-
- @Override
- public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
- List items = new ArrayList();
- items.add(new ItemStack(this));
- return items;
- }
+ @Override
+ public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
+ {
+ List items = new ArrayList();
+ items.add(new ItemStack(this));
+ return items;
+ }
- private final String prefix = "techreborn:blocks/machine/iron_machines/";
+ private final String prefix = "techreborn:blocks/machine/iron_machines/";
- @Override
- public String getFrontOff() {
- return prefix + "alloy_furnace_front_off";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "alloy_furnace_front_off";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "alloy_furnace_front_on";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "alloy_furnace_front_on";
+ }
- @Override
- public String getSide() {
- return prefix + "iron_machine_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "iron_machine_side";
+ }
- @Override
- public String getTop() {
- return prefix + "iron_machine_top";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "iron_machine_top";
+ }
- @Override
- public String getBottom() {
- return prefix + "iron_machine_bottom";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "iron_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/iron_machines/BlockIronFurnace.java b/src/main/java/techreborn/blocks/iron_machines/BlockIronFurnace.java
index f02f45f07..d96b8a669 100644
--- a/src/main/java/techreborn/blocks/iron_machines/BlockIronFurnace.java
+++ b/src/main/java/techreborn/blocks/iron_machines/BlockIronFurnace.java
@@ -1,5 +1,9 @@
package techreborn.blocks.iron_machines;
+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;
@@ -18,95 +22,106 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileIronFurnace;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
+public class BlockIronFurnace extends BlockMachineBase implements IRotationTexture
+{
-public class BlockIronFurnace extends BlockMachineBase implements IRotationTexture {
-
- public BlockIronFurnace() {
+ public BlockIronFurnace()
+ {
super();
setUnlocalizedName("techreborn.ironfurnace");
- setCreativeTab(TechRebornCreativeTab.instance);
+ setCreativeTab(TechRebornCreativeTab.instance);
}
-
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileIronFurnace();
- }
-
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.ironFurnace, world, x, y, z);
- return true;
- }
-
- @Override
- public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
- List items = new ArrayList();
- items.add(new ItemStack(this));
- return items;
- }
-
- @SideOnly(Side.CLIENT)
- @SuppressWarnings("incomplete-switch")
- public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
- {
- if (this.isActive(state))
- {
- EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
- double d0 = (double)pos.getX() + 0.5D;
- double d1 = (double)pos.getY() + rand.nextDouble() * 6.0D / 16.0D;
- double d2 = (double)pos.getZ() + 0.5D;
- double d3 = 0.52D;
- double d4 = rand.nextDouble() * 0.6D - 0.3D;
- switch (enumfacing)
- {
- case WEST:
- worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
- worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
- break;
- case EAST:
- worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
- worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
- break;
- case NORTH:
- worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D, new int[0]);
- worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D, new int[0]);
- break;
- case SOUTH:
- worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D, new int[0]);
- worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D, new int[0]);
- }
- }
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileIronFurnace();
+ }
- private final String prefix = "techreborn:blocks/machine/iron_machines/";
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.ironFurnace, world, x, y, z);
+ return true;
+ }
- @Override
- public String getFrontOff() {
- return prefix + "iron_furnace_front_off";
- }
+ @Override
+ public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
+ {
+ List items = new ArrayList();
+ items.add(new ItemStack(this));
+ return items;
+ }
- @Override
- public String getFrontOn() {
- return prefix + "iron_furnace_front_on";
- }
+ @SideOnly(Side.CLIENT)
+ @SuppressWarnings("incomplete-switch")
+ public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
+ {
+ if (this.isActive(state))
+ {
+ EnumFacing enumfacing = (EnumFacing) state.getValue(FACING);
+ double d0 = (double) pos.getX() + 0.5D;
+ double d1 = (double) pos.getY() + rand.nextDouble() * 6.0D / 16.0D;
+ double d2 = (double) pos.getZ() + 0.5D;
+ double d3 = 0.52D;
+ double d4 = rand.nextDouble() * 0.6D - 0.3D;
- @Override
- public String getSide() {
- return prefix + "iron_machine_side";
- }
+ switch (enumfacing)
+ {
+ case WEST:
+ worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D,
+ new int[0]);
+ worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
+ break;
+ case EAST:
+ worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D,
+ new int[0]);
+ worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
+ break;
+ case NORTH:
+ worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D,
+ new int[0]);
+ worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D, new int[0]);
+ break;
+ case SOUTH:
+ worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D,
+ new int[0]);
+ worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D, new int[0]);
+ }
+ }
+ }
- @Override
- public String getTop() {
- return prefix + "iron_machine_top";
- }
+ private final String prefix = "techreborn:blocks/machine/iron_machines/";
- @Override
- public String getBottom() {
- return prefix + "iron_machine_bottom";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "iron_furnace_front_off";
+ }
+
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "iron_furnace_front_on";
+ }
+
+ @Override
+ public String getSide()
+ {
+ return prefix + "iron_machine_side";
+ }
+
+ @Override
+ public String getTop()
+ {
+ return prefix + "iron_machine_top";
+ }
+
+ @Override
+ public String getBottom()
+ {
+ return prefix + "iron_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/machine/BlockAssemblingMachine.java b/src/main/java/techreborn/blocks/machine/BlockAssemblingMachine.java
index 31f3357b4..5508979b8 100644
--- a/src/main/java/techreborn/blocks/machine/BlockAssemblingMachine.java
+++ b/src/main/java/techreborn/blocks/machine/BlockAssemblingMachine.java
@@ -11,51 +11,60 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileAssemblingMachine;
-public class BlockAssemblingMachine extends BlockMachineBase implements IRotationTexture {
+public class BlockAssemblingMachine extends BlockMachineBase implements IRotationTexture
+{
- public BlockAssemblingMachine(Material material) {
- super();
- setUnlocalizedName("techreborn.assemblingmachine");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockAssemblingMachine(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.assemblingmachine");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileAssemblingMachine();
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileAssemblingMachine();
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.assemblingmachineID, world, x, y, z);
+ return true;
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.assemblingmachineID, world, x, y, z);
- return true;
- }
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "assembling_machine_front_off";
+ }
- @Override
- public String getFrontOff() {
- return prefix + "assembling_machine_front_off";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "assembling_machine_front_on";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "assembling_machine_front_on";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "machine_side";
+ }
- @Override
- public String getSide() {
- return prefix + "machine_side";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "machine_top";
+ }
- @Override
- public String getTop() {
- return prefix + "machine_top";
- }
-
- @Override
- public String getBottom() {
- return prefix + "assembling_machine_top";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "assembling_machine_top";
+ }
}
diff --git a/src/main/java/techreborn/blocks/machine/BlockChargeBench.java b/src/main/java/techreborn/blocks/machine/BlockChargeBench.java
index fb56b6e35..a0f5036df 100644
--- a/src/main/java/techreborn/blocks/machine/BlockChargeBench.java
+++ b/src/main/java/techreborn/blocks/machine/BlockChargeBench.java
@@ -11,50 +11,60 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileChargeBench;
-public class BlockChargeBench extends BlockMachineBase implements IRotationTexture {
+public class BlockChargeBench extends BlockMachineBase implements IRotationTexture
+{
- public BlockChargeBench(Material material) {
- super();
- setUnlocalizedName("techreborn.chargebench");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockChargeBench(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.chargebench");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileChargeBench();
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileChargeBench();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.chargeBench, world, x, y, z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.chargeBench, world, x, y, z);
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- @Override
- public String getFrontOff() {
- return prefix + "chargeBench_side";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "chargeBench_side";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "chargeBench_side";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "chargeBench_side";
+ }
- @Override
- public String getSide() {
- return prefix + "chargeBench_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "chargeBench_side";
+ }
- @Override
- public String getTop() {
- return prefix + "chargeBench_side";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "chargeBench_side";
+ }
- @Override
- public String getBottom() {
- return prefix + "chargeBench_side";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "chargeBench_side";
+ }
}
diff --git a/src/main/java/techreborn/blocks/machine/BlockChemicalReactor.java b/src/main/java/techreborn/blocks/machine/BlockChemicalReactor.java
index 9574f2421..2aae084a2 100644
--- a/src/main/java/techreborn/blocks/machine/BlockChemicalReactor.java
+++ b/src/main/java/techreborn/blocks/machine/BlockChemicalReactor.java
@@ -11,51 +11,60 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileChemicalReactor;
-public class BlockChemicalReactor extends BlockMachineBase implements IRotationTexture {
+public class BlockChemicalReactor extends BlockMachineBase implements IRotationTexture
+{
- public BlockChemicalReactor(Material material) {
- super();
- setUnlocalizedName("techreborn.chemicalreactor");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockChemicalReactor(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.chemicalreactor");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileChemicalReactor();
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileChemicalReactor();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z,
- EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.chemicalReactorID, world, x, y, z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.chemicalReactorID, world, x, y, z);
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- @Override
- public String getFrontOff() {
- return prefix + "chemical_reactor_side_off";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "chemical_reactor_side_off";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "chemical_reactor_side_on";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "chemical_reactor_side_on";
+ }
- @Override
- public String getSide() {
- return prefix + "machine_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "machine_side";
+ }
- @Override
- public String getTop() {
- return prefix + "machine_top";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "machine_top";
+ }
- @Override
- public String getBottom() {
- return prefix + "chemical_reactor_bottom";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "chemical_reactor_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/machine/BlockChunkLoader.java b/src/main/java/techreborn/blocks/machine/BlockChunkLoader.java
index c0faae1fc..308fd5195 100644
--- a/src/main/java/techreborn/blocks/machine/BlockChunkLoader.java
+++ b/src/main/java/techreborn/blocks/machine/BlockChunkLoader.java
@@ -11,48 +11,54 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileChunkLoader;
-public class BlockChunkLoader extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockChunkLoader extends BlockMachineBase implements IAdvancedRotationTexture
+{
+ public BlockChunkLoader(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.chunkloader");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- public BlockChunkLoader(Material material) {
- super();
- setUnlocalizedName("techreborn.chunkloader");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileChunkLoader();
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileChunkLoader();
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.chunkloaderID, world, x, y, z);
+ return true;
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z,
- EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.chunkloaderID, world, x, y,
- z);
- return true;
- }
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "industrial_chunk_loader_side";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "industrial_chunk_loader_side";
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "industrial_chunk_loader_side";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "industrial_chunk_loader_side" ;
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "machine_top";
+ }
- @Override
- public String getTop(boolean isActive) {
- return prefix + "machine_top";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "machine_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/machine/BlockMatterFabricator.java b/src/main/java/techreborn/blocks/machine/BlockMatterFabricator.java
index 0ce91a44c..93fbc9f4e 100644
--- a/src/main/java/techreborn/blocks/machine/BlockMatterFabricator.java
+++ b/src/main/java/techreborn/blocks/machine/BlockMatterFabricator.java
@@ -11,50 +11,60 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileMatterFabricator;
-public class BlockMatterFabricator extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockMatterFabricator extends BlockMachineBase implements IAdvancedRotationTexture
+{
- public BlockMatterFabricator(Material material) {
- super();
- setUnlocalizedName("techreborn.matterfabricator");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockMatterFabricator(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.matterfabricator");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileMatterFabricator();
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileMatterFabricator();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.matterfabID, world, x, y, z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.matterfabID, world, x, y, z);
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- @Override
- public boolean isAdvanced() {
- return true;
- }
+ @Override
+ public boolean isAdvanced()
+ {
+ return true;
+ }
- @Override
- public String getFront(boolean isActive) {
- return isActive ? prefix + "matter_fabricator_on" : prefix + "matter_fabricator_off";
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return isActive ? prefix + "matter_fabricator_on" : prefix + "matter_fabricator_off";
+ }
- @Override
- public String getSide(boolean isActive) {
- return isActive ? prefix + "matter_fabricator_on" : prefix + "matter_fabricator_off";
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return isActive ? prefix + "matter_fabricator_on" : prefix + "matter_fabricator_off";
+ }
- @Override
- public String getTop(boolean isActive) {
- return isActive ? prefix + "matter_fabricator_on" : prefix + "matter_fabricator_off";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return isActive ? prefix + "matter_fabricator_on" : prefix + "matter_fabricator_off";
+ }
- @Override
- public String getBottom(boolean isActive) {
- return isActive ? prefix + "matter_fabricator_on" : prefix + "matter_fabricator_off";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return isActive ? prefix + "matter_fabricator_on" : prefix + "matter_fabricator_off";
+ }
}
diff --git a/src/main/java/techreborn/blocks/machine/BlockRollingMachine.java b/src/main/java/techreborn/blocks/machine/BlockRollingMachine.java
index 727241532..4b30e79e4 100644
--- a/src/main/java/techreborn/blocks/machine/BlockRollingMachine.java
+++ b/src/main/java/techreborn/blocks/machine/BlockRollingMachine.java
@@ -11,45 +11,54 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileRollingMachine;
-public class BlockRollingMachine extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockRollingMachine extends BlockMachineBase implements IAdvancedRotationTexture
+{
- public BlockRollingMachine(Material material) {
- super();
- setUnlocalizedName("techreborn.rollingmachine");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockRollingMachine(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.rollingmachine");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileRollingMachine();
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileRollingMachine();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.rollingMachineID, world, x, y, z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.rollingMachineID, world, x, y, z);
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- @Override
- public String getFront(boolean isActive) {
- return isActive ? prefix + "rolling_machine_side_on" : prefix + "rolling_machine_side_off";
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return isActive ? prefix + "rolling_machine_side_on" : prefix + "rolling_machine_side_off";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "machine_side";
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "machine_side";
+ }
- @Override
- public String getTop(boolean isActive) {
- return prefix + "machine_top";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "machine_top";
+ }
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "machine_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/machine/BlockScrapboxinator.java b/src/main/java/techreborn/blocks/machine/BlockScrapboxinator.java
index ac675ecc9..c2963b0ea 100644
--- a/src/main/java/techreborn/blocks/machine/BlockScrapboxinator.java
+++ b/src/main/java/techreborn/blocks/machine/BlockScrapboxinator.java
@@ -11,51 +11,62 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileScrapboxinator;
-public class BlockScrapboxinator extends BlockMachineBase implements IRotationTexture{
+public class BlockScrapboxinator extends BlockMachineBase implements IRotationTexture
+{
- public BlockScrapboxinator(Material material) {
- super();
- setUnlocalizedName("techreborn.scrapboxinator");
- setCreativeTab(TechRebornCreativeTab.instance);
+ public BlockScrapboxinator(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.scrapboxinator");
+ setCreativeTab(TechRebornCreativeTab.instance);
}
-
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileScrapboxinator();
- }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking()){
- player.openGui(Core.INSTANCE, GuiHandler.scrapboxinatorID, world, x, y, z);
- }
- return true;
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileScrapboxinator();
+ }
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ {
+ player.openGui(Core.INSTANCE, GuiHandler.scrapboxinatorID, world, x, y, z);
+ }
+ return true;
+ }
- @Override
- public String getFrontOff() {
- return prefix + "scrapboxinator_front_off";
- }
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- @Override
- public String getFrontOn() {
- return prefix + "scrapboxinator_front_on";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "scrapboxinator_front_off";
+ }
- @Override
- public String getSide() {
- return prefix + "machine_side";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "scrapboxinator_front_on";
+ }
- @Override
- public String getTop() {
- return prefix + "machine_top";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "machine_side";
+ }
- @Override
- public String getBottom() {
- return prefix + "machine_bottom";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "machine_top";
+ }
+
+ @Override
+ public String getBottom()
+ {
+ return prefix + "machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/machine/BlockVacuumFreezer.java b/src/main/java/techreborn/blocks/machine/BlockVacuumFreezer.java
index 93e88e3fc..58460e6c7 100644
--- a/src/main/java/techreborn/blocks/machine/BlockVacuumFreezer.java
+++ b/src/main/java/techreborn/blocks/machine/BlockVacuumFreezer.java
@@ -12,47 +12,56 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileVacuumFreezer;
-public class BlockVacuumFreezer extends BlockMachineBase implements IAdvancedRotationTexture{
+public class BlockVacuumFreezer extends BlockMachineBase implements IAdvancedRotationTexture
+{
- public BlockVacuumFreezer(Material material) {
- super();
- setUnlocalizedName("techreborn.vacuumfreezer");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockVacuumFreezer(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.vacuumfreezer");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileVacuumFreezer();
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileVacuumFreezer();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- TileVacuumFreezer tileVacuumFreezer = (TileVacuumFreezer) world.getTileEntity(new BlockPos(x, y, z));
- tileVacuumFreezer.multiBlockStatus = tileVacuumFreezer.checkMachine() ? 1 : 0;
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.vacuumFreezerID, world, x, y, z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ TileVacuumFreezer tileVacuumFreezer = (TileVacuumFreezer) world.getTileEntity(new BlockPos(x, y, z));
+ tileVacuumFreezer.multiBlockStatus = tileVacuumFreezer.checkMachine() ? 1 : 0;
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.vacuumFreezerID, world, x, y, z);
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/greg_machines/";
+ private final String prefix = "techreborn:blocks/machine/greg_machines/";
- @Override
- public String getFront(boolean isActive) {
- return prefix + "vacuum_freezer_front";
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "vacuum_freezer_front";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "machine_side" ;
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "machine_side";
+ }
- @Override
- public String getTop(boolean isActive) {
- return prefix + "vacuum_freezer_top";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "vacuum_freezer_top";
+ }
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "machine_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/storage/BlockAESU.java b/src/main/java/techreborn/blocks/storage/BlockAESU.java
index 1c78d39b7..01161ee51 100644
--- a/src/main/java/techreborn/blocks/storage/BlockAESU.java
+++ b/src/main/java/techreborn/blocks/storage/BlockAESU.java
@@ -11,53 +11,61 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileAesu;
-public class BlockAESU extends BlockMachineBase implements IRotationTexture {
+public class BlockAESU extends BlockMachineBase implements IRotationTexture
+{
- public BlockAESU(Material material) {
- super();
- setUnlocalizedName("techreborn.aesu");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockAESU(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.aesu");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileAesu();
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileAesu();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z,
- EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.aesuID, world, x, y,
- z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.aesuID, world, x, y, z);
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/storage/";
+ private final String prefix = "techreborn:blocks/machine/storage/";
- @Override
- public String getFrontOff() {
- return prefix + "aesu_front";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "aesu_front";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "aesu_front";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "aesu_front";
+ }
- @Override
- public String getSide() {
- return prefix + "aesu_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "aesu_side";
+ }
- @Override
- public String getTop() {
- return prefix + "aesu_top";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "aesu_top";
+ }
- @Override
- public String getBottom() {
- return prefix + "aesu_bottom";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "aesu_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/storage/BlockBatBox.java b/src/main/java/techreborn/blocks/storage/BlockBatBox.java
index e63752253..ac04308a4 100644
--- a/src/main/java/techreborn/blocks/storage/BlockBatBox.java
+++ b/src/main/java/techreborn/blocks/storage/BlockBatBox.java
@@ -1,303 +1,350 @@
package techreborn.blocks.storage;
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterators;
-import me.modmuss50.jsonDestroyer.api.ITexturedBlock;
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockDynamicLiquid;
-import net.minecraft.block.BlockStaticLiquid;
-import net.minecraft.block.material.Material;
-import net.minecraft.block.properties.PropertyDirection;
-import net.minecraft.block.state.BlockStateContainer;
+import java.util.ArrayList;
+import java.util.List;
+
import net.minecraft.block.state.IBlockState;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.EnumFacing;
-import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
-import net.minecraftforge.fluids.BlockFluidBase;
-import reborncore.common.BaseTileBlock;
-import reborncore.common.blocks.IAdvancedRotationTexture;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.storage.TileBatBox;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-
/**
* Created by modmuss50 on 14/03/2016.
*/
-public class BlockBatBox extends BaseTileBlock implements IRotationTexture , ITexturedBlock {
+public class BlockBatBox extends BaseTileBlock implements IRotationTexture, ITexturedBlock
+{
- public static PropertyDirection FACING = PropertyDirection.create("facing", Facings.ALL);
- protected final String prefix = "techreborn:blocks/machine/storage/";
+ public static PropertyDirection FACING = PropertyDirection.create("facing", Facings.ALL);
+ protected final String prefix = "techreborn:blocks/machine/storage/";
- public BlockBatBox() {
- super(Material.rock);
- setUnlocalizedName("techreborn.batBox");
- setCreativeTab(TechRebornCreativeTab.instance);
- this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
- }
+ public BlockBatBox()
+ {
+ super(Material.rock);
+ setUnlocalizedName("techreborn.batBox");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
+ }
- @Override
- public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.batboxID, world, pos.getX(), pos.getY(), pos.getZ());
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand,
+ ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.batboxID, world, pos.getX(), pos.getY(), pos.getZ());
+ return true;
+ }
- protected BlockStateContainer createBlockState() {
- FACING = PropertyDirection.create("facing", Facings.ALL);
- return new BlockStateContainer(this, FACING);
- }
+ protected BlockStateContainer createBlockState()
+ {
+ FACING = PropertyDirection.create("facing", Facings.ALL);
+ return new BlockStateContainer(this, FACING);
+ }
- @Override
- public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
- super.onBlockAdded(worldIn, pos, state);
- this.setDefaultFacing(worldIn, pos, state);
- }
+ @Override
+ public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
+ {
+ super.onBlockAdded(worldIn, pos, state);
+ this.setDefaultFacing(worldIn, pos, state);
+ }
- private void setDefaultFacing(World worldIn, BlockPos pos, IBlockState state) {
- if (!worldIn.isRemote) {
- IBlockState sate = worldIn.getBlockState(pos.north());
- Block block = sate.getBlock();
- IBlockState state1 = worldIn.getBlockState(pos.south());
- Block block1 = state1.getBlock();
- IBlockState state2 = worldIn.getBlockState(pos.west());
- Block block2 = state2.getBlock();
- IBlockState state3 = worldIn.getBlockState(pos.east());
- Block block3 = state3.getBlock();
- EnumFacing enumfacing = (EnumFacing) state.getValue(FACING);
+ private void setDefaultFacing(World worldIn, BlockPos pos, IBlockState state)
+ {
+ if (!worldIn.isRemote)
+ {
+ IBlockState sate = worldIn.getBlockState(pos.north());
+ Block block = sate.getBlock();
+ IBlockState state1 = worldIn.getBlockState(pos.south());
+ Block block1 = state1.getBlock();
+ IBlockState state2 = worldIn.getBlockState(pos.west());
+ Block block2 = state2.getBlock();
+ IBlockState state3 = worldIn.getBlockState(pos.east());
+ Block block3 = state3.getBlock();
+ EnumFacing enumfacing = (EnumFacing) state.getValue(FACING);
- if (enumfacing == EnumFacing.NORTH && block.isFullBlock(state) && !block1.isFullBlock(state1)) {
- enumfacing = EnumFacing.SOUTH;
- } else if (enumfacing == EnumFacing.SOUTH && block1.isFullBlock(state1) && !block.isFullBlock(state)) {
- enumfacing = EnumFacing.NORTH;
- } else if (enumfacing == EnumFacing.WEST && block2.isFullBlock(state2) && !block3.isFullBlock(state2)) {
- enumfacing = EnumFacing.EAST;
- } else if (enumfacing == EnumFacing.EAST && block3.isFullBlock(state3) && !block2.isFullBlock(state2)) {
- enumfacing = EnumFacing.WEST;
- }
+ if (enumfacing == EnumFacing.NORTH && block.isFullBlock(state) && !block1.isFullBlock(state1))
+ {
+ enumfacing = EnumFacing.SOUTH;
+ } else if (enumfacing == EnumFacing.SOUTH && block1.isFullBlock(state1) && !block.isFullBlock(state))
+ {
+ enumfacing = EnumFacing.NORTH;
+ } else if (enumfacing == EnumFacing.WEST && block2.isFullBlock(state2) && !block3.isFullBlock(state2))
+ {
+ enumfacing = EnumFacing.EAST;
+ } else if (enumfacing == EnumFacing.EAST && block3.isFullBlock(state3) && !block2.isFullBlock(state2))
+ {
+ enumfacing = EnumFacing.WEST;
+ }
- worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2);
- }
- }
+ worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2);
+ }
+ }
- @Override
- public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
- super.onBlockPlacedBy(worldIn, pos, state, placer, stack);
- EnumFacing facing = placer.getHorizontalFacing().getOpposite();
- if(placer.rotationPitch < -50){
- facing = EnumFacing.DOWN;
- } else if (placer.rotationPitch > 50){
- facing = EnumFacing.UP;
- }
- setFacing(facing, worldIn, pos);
- }
- @Override
- public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
- dropInventory(worldIn, pos);
- super.breakBlock(worldIn, pos, state);
- }
+ @Override
+ public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer,
+ ItemStack stack)
+ {
+ super.onBlockPlacedBy(worldIn, pos, state, placer, stack);
+ EnumFacing facing = placer.getHorizontalFacing().getOpposite();
+ if (placer.rotationPitch < -50)
+ {
+ facing = EnumFacing.DOWN;
+ } else if (placer.rotationPitch > 50)
+ {
+ facing = EnumFacing.UP;
+ }
+ setFacing(facing, worldIn, pos);
+ }
- protected void dropInventory(World world, BlockPos pos) {
- TileEntity tileEntity = world.getTileEntity(pos);
+ @Override
+ public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
+ {
+ dropInventory(worldIn, pos);
+ super.breakBlock(worldIn, pos, state);
+ }
- if(tileEntity == null){
- return;
- }
- if (!(tileEntity instanceof IInventory)) {
- return;
- }
+ protected void dropInventory(World world, BlockPos pos)
+ {
+ TileEntity tileEntity = world.getTileEntity(pos);
- IInventory inventory = (IInventory) tileEntity;
+ if (tileEntity == null)
+ {
+ return;
+ }
+ if (!(tileEntity instanceof IInventory))
+ {
+ return;
+ }
- List items = new ArrayList();
+ IInventory inventory = (IInventory) tileEntity;
- for (int i = 0; i < inventory.getSizeInventory(); i++) {
- ItemStack itemStack = inventory.getStackInSlot(i);
+ List items = new ArrayList();
- if(itemStack == null){
- continue;
- }
- if (itemStack != null && itemStack.stackSize > 0) {
- if (itemStack.getItem() instanceof ItemBlock) {
- if (((ItemBlock) itemStack.getItem()).block instanceof BlockFluidBase || ((ItemBlock) itemStack.getItem()).block instanceof BlockStaticLiquid || ((ItemBlock) itemStack.getItem()).block instanceof BlockDynamicLiquid) {
- continue;
- }
- }
- }
- items.add(itemStack.copy());
- }
+ for (int i = 0; i < inventory.getSizeInventory(); i++)
+ {
+ ItemStack itemStack = inventory.getStackInSlot(i);
- for (ItemStack itemStack : items){
- Random rand = new Random();
+ if (itemStack == null)
+ {
+ continue;
+ }
+ if (itemStack != null && itemStack.stackSize > 0)
+ {
+ if (itemStack.getItem() instanceof ItemBlock)
+ {
+ if (((ItemBlock) itemStack.getItem()).block instanceof BlockFluidBase
+ || ((ItemBlock) itemStack.getItem()).block instanceof BlockStaticLiquid
+ || ((ItemBlock) itemStack.getItem()).block instanceof BlockDynamicLiquid)
+ {
+ continue;
+ }
+ }
+ }
+ items.add(itemStack.copy());
+ }
- float dX = rand.nextFloat() * 0.8F + 0.1F;
- float dY = rand.nextFloat() * 0.8F + 0.1F;
- float dZ = rand.nextFloat() * 0.8F + 0.1F;
+ for (ItemStack itemStack : items)
+ {
+ Random rand = new Random();
- EntityItem entityItem = new EntityItem(world, pos.getX() + dX, pos.getY() + dY, pos.getZ() + dZ, itemStack.copy());
+ float dX = rand.nextFloat() * 0.8F + 0.1F;
+ float dY = rand.nextFloat() * 0.8F + 0.1F;
+ float dZ = rand.nextFloat() * 0.8F + 0.1F;
- if (itemStack.hasTagCompound()) {
- entityItem.getEntityItem().setTagCompound((NBTTagCompound) itemStack.getTagCompound().copy());
- }
+ EntityItem entityItem = new EntityItem(world, pos.getX() + dX, pos.getY() + dY, pos.getZ() + dZ,
+ itemStack.copy());
- float factor = 0.05F;
- entityItem.motionX = rand.nextGaussian() * factor;
- entityItem.motionY = rand.nextGaussian() * factor + 0.2F;
- entityItem.motionZ = rand.nextGaussian() * factor;
- world.spawnEntityInWorld(entityItem);
- itemStack.stackSize = 0;
- }
- }
+ if (itemStack.hasTagCompound())
+ {
+ entityItem.getEntityItem().setTagCompound((NBTTagCompound) itemStack.getTagCompound().copy());
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileBatBox();
- }
+ float factor = 0.05F;
+ entityItem.motionX = rand.nextGaussian() * factor;
+ entityItem.motionY = rand.nextGaussian() * factor + 0.2F;
+ entityItem.motionZ = rand.nextGaussian() * factor;
+ world.spawnEntityInWorld(entityItem);
+ itemStack.stackSize = 0;
+ }
+ }
- @Override
- public int getMetaFromState(IBlockState state) {
- int facingInt = getSideFromEnum(state.getValue(FACING));
- return facingInt;
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileBatBox();
+ }
- @Override
- public IBlockState getStateFromMeta(int meta) {
- boolean active = false;
- EnumFacing facing = getSideFromint(meta);
- return this.getDefaultState().withProperty(FACING, facing);
- }
+ @Override
+ public int getMetaFromState(IBlockState state)
+ {
+ int facingInt = getSideFromEnum(state.getValue(FACING));
+ return facingInt;
+ }
- public void setFacing(EnumFacing facing, World world, BlockPos pos){
- world.setBlockState(pos, world.getBlockState(pos).withProperty(FACING, facing));
- }
+ @Override
+ public IBlockState getStateFromMeta(int meta)
+ {
+ boolean active = false;
+ EnumFacing facing = getSideFromint(meta);
+ return this.getDefaultState().withProperty(FACING, facing);
+ }
- public EnumFacing getSideFromint(int i){
- if(i == 0){
- return EnumFacing.NORTH;
- } else if(i == 1){
- return EnumFacing.SOUTH;
- }else if(i == 2){
- return EnumFacing.EAST;
- }else if(i == 3){
- return EnumFacing.WEST;
- }else if(i == 4){
- return EnumFacing.UP;
- }else if(i == 5){
- return EnumFacing.DOWN;
- }
- return EnumFacing.NORTH;
- }
+ public void setFacing(EnumFacing facing, World world, BlockPos pos)
+ {
+ world.setBlockState(pos, world.getBlockState(pos).withProperty(FACING, facing));
+ }
- public int getSideFromEnum(EnumFacing facing){
- if(facing == EnumFacing.NORTH){
- return 0;
- } else if(facing == EnumFacing.SOUTH){
- return 1;
- }else if(facing == EnumFacing.EAST){
- return 2;
- }else if(facing == EnumFacing.WEST){
- return 3;
- }else if(facing == EnumFacing.UP){
- return 4;
- }else if(facing == EnumFacing.DOWN){
- return 5;
- }
- return 0;
- }
+ public EnumFacing getSideFromint(int i)
+ {
+ if (i == 0)
+ {
+ return EnumFacing.NORTH;
+ } else if (i == 1)
+ {
+ return EnumFacing.SOUTH;
+ } else if (i == 2)
+ {
+ return EnumFacing.EAST;
+ } else if (i == 3)
+ {
+ return EnumFacing.WEST;
+ } else if (i == 4)
+ {
+ return EnumFacing.UP;
+ } else if (i == 5)
+ {
+ return EnumFacing.DOWN;
+ }
+ return EnumFacing.NORTH;
+ }
- @Override
- public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
- List items = new ArrayList();
- items.add(new ItemStack(this));
- return items;
- }
+ public int getSideFromEnum(EnumFacing facing)
+ {
+ if (facing == EnumFacing.NORTH)
+ {
+ return 0;
+ } else if (facing == EnumFacing.SOUTH)
+ {
+ return 1;
+ } else if (facing == EnumFacing.EAST)
+ {
+ return 2;
+ } else if (facing == EnumFacing.WEST)
+ {
+ return 3;
+ } else if (facing == EnumFacing.UP)
+ {
+ return 4;
+ } else if (facing == EnumFacing.DOWN)
+ {
+ return 5;
+ }
+ return 0;
+ }
- @Override
- public String getFrontOff() {
- return prefix + "batbox_front";
- }
+ @Override
+ public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
+ {
+ List items = new ArrayList();
+ items.add(new ItemStack(this));
+ return items;
+ }
- @Override
- public String getFrontOn() {
- return prefix + "batbox_front";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "batbox_front";
+ }
- @Override
- public String getSide() {
- return prefix + "batbox_side";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "batbox_front";
+ }
- @Override
- public String getTop() {
- return prefix + "batbox_top";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "batbox_side";
+ }
- @Override
- public String getBottom() {
- return prefix + "batbox_bottom";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "batbox_top";
+ }
- @Override
- public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
- if(this instanceof IRotationTexture){
- IRotationTexture rotationTexture = (IRotationTexture) this;
- if(getFacing(blockState) == facing){
- return rotationTexture.getFrontOff();
- }
- if(facing == EnumFacing.UP){
- return rotationTexture.getTop();
- }
- if(facing == EnumFacing.DOWN){
- return rotationTexture.getBottom();
- }
- return rotationTexture.getSide();
- }
- return "techreborn:blocks/machine/machine_side";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "batbox_bottom";
+ }
- public EnumFacing getFacing(IBlockState state){
- return state.getValue(FACING);
- }
+ @Override
+ public String getTextureNameFromState(IBlockState blockState, EnumFacing facing)
+ {
+ if (this instanceof IRotationTexture)
+ {
+ IRotationTexture rotationTexture = (IRotationTexture) this;
+ if (getFacing(blockState) == facing)
+ {
+ return rotationTexture.getFrontOff();
+ }
+ if (facing == EnumFacing.UP)
+ {
+ return rotationTexture.getTop();
+ }
+ if (facing == EnumFacing.DOWN)
+ {
+ return rotationTexture.getBottom();
+ }
+ return rotationTexture.getSide();
+ }
+ return "techreborn:blocks/machine/machine_side";
+ }
- @Override
- public int amountOfStates() {
- return 6;
- }
+ public EnumFacing getFacing(IBlockState state)
+ {
+ return state.getValue(FACING);
+ }
- public enum Facings implements Predicate, Iterable {
- ALL;
+ @Override
+ public int amountOfStates()
+ {
+ return 6;
+ }
- public EnumFacing[] facings() {
- return new EnumFacing[]{EnumFacing.NORTH, EnumFacing.EAST, EnumFacing.SOUTH, EnumFacing.WEST, EnumFacing.UP, EnumFacing.DOWN};
- }
+ public enum Facings implements Predicate,Iterable
+ {
+ ALL;
- public EnumFacing random(Random rand) {
- EnumFacing[] aenumfacing = this.facings();
- return aenumfacing[rand.nextInt(aenumfacing.length)];
- }
+ public EnumFacing[] facings()
+ {
+ return new EnumFacing[] { EnumFacing.NORTH, EnumFacing.EAST, EnumFacing.SOUTH, EnumFacing.WEST,
+ EnumFacing.UP, EnumFacing.DOWN };
+ }
- public boolean apply(EnumFacing p_apply_1_) {
- return p_apply_1_ != null;
- }
+ public EnumFacing random(Random rand)
+ {
+ EnumFacing[] aenumfacing = this.facings();
+ return aenumfacing[rand.nextInt(aenumfacing.length)];
+ }
- public Iterator iterator() {
- return Iterators.forArray(this.facings());
- }
- }
+ public boolean apply(EnumFacing p_apply_1_)
+ {
+ return p_apply_1_ != null;
+ }
+
+ public Iterator iterator()
+ {
+ return Iterators.forArray(this.facings());
+ }
+ }
}
\ No newline at end of file
diff --git a/src/main/java/techreborn/blocks/storage/BlockIDSU.java b/src/main/java/techreborn/blocks/storage/BlockIDSU.java
index 86782a4cd..f0e357219 100644
--- a/src/main/java/techreborn/blocks/storage/BlockIDSU.java
+++ b/src/main/java/techreborn/blocks/storage/BlockIDSU.java
@@ -14,61 +14,66 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.idsu.TileIDSU;
-public class BlockIDSU extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockIDSU extends BlockMachineBase implements IAdvancedRotationTexture
+{
+ public BlockIDSU(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.idsu");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- public BlockIDSU(Material material) {
- super();
- setUnlocalizedName("techreborn.idsu");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileIDSU(5, 2048, 100000000);
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileIDSU(5, 2048, 100000000);
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.idsuID, world, x, y, z);
+ return true;
+ }
+ @Override
+ public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemstack)
+ {
+ super.onBlockPlacedBy(world, x, y, z, player, itemstack);
+ TileEntity tile = world.getTileEntity(new BlockPos(x, y, z));
+ if (tile instanceof TileIDSU)
+ {
+ ((TileIDSU) tile).ownerUdid = player.getUniqueID().toString();
+ }
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z,
- EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.idsuID, world, x, y,
- z);
- return true;
- }
+ private final String prefix = "techreborn:blocks/machine/storage/";
- @Override
- public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemstack) {
- super.onBlockPlacedBy(world, x, y, z, player, itemstack);
- TileEntity tile = world.getTileEntity(new BlockPos(x, y, z));
- if (tile instanceof TileIDSU) {
- ((TileIDSU) tile).ownerUdid = player.getUniqueID().toString();
- }
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "idsu_front";
+ }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "idsu_side";
+ }
- private final String prefix = "techreborn:blocks/machine/storage/";
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "idsu_top";
+ }
-
- @Override
- public String getFront(boolean isActive) {
- return prefix + "idsu_front";
- }
-
- @Override
- public String getSide(boolean isActive) {
- return prefix + "idsu_side" ;
- }
-
- @Override
- public String getTop(boolean isActive) {
- return prefix + "idsu_top";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "idsu_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "idsu_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/storage/BlockLESU.java b/src/main/java/techreborn/blocks/storage/BlockLESU.java
index 3f23d4457..468407757 100644
--- a/src/main/java/techreborn/blocks/storage/BlockLESU.java
+++ b/src/main/java/techreborn/blocks/storage/BlockLESU.java
@@ -11,51 +11,55 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.lesu.TileLesu;
-public class BlockLESU extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockLESU extends BlockMachineBase implements IAdvancedRotationTexture
+{
+ public BlockLESU(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.lesu");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- public BlockLESU(Material material) {
- super();
- setUnlocalizedName("techreborn.lesu");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileLesu();
+ }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.lesuID, world, x, y, z);
+ return true;
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileLesu();
- }
+ private final String prefix = "techreborn:blocks/machine/storage/";
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z,
- EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.lesuID, world, x, y,
- z);
- return true;
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "lesu_front";
+ }
- private final String prefix = "techreborn:blocks/machine/storage/";
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "lesu_side";
+ }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "lesu_top";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "lesu_front";
- }
-
- @Override
- public String getSide(boolean isActive) {
- return prefix + "lesu_side" ;
- }
-
- @Override
- public String getTop(boolean isActive) {
- return prefix + "lesu_top";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "lesu_bottom";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "lesu_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/storage/BlockLESUStorage.java b/src/main/java/techreborn/blocks/storage/BlockLESUStorage.java
index 4fd805849..c257ed146 100644
--- a/src/main/java/techreborn/blocks/storage/BlockLESUStorage.java
+++ b/src/main/java/techreborn/blocks/storage/BlockLESUStorage.java
@@ -13,60 +13,70 @@ import reborncore.common.blocks.IAdvancedRotationTexture;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.lesu.TileLesuStorage;
-public class BlockLESUStorage extends BlockMachineBase implements IAdvancedRotationTexture {
+public class BlockLESUStorage extends BlockMachineBase implements IAdvancedRotationTexture
+{
- public BlockLESUStorage(Material material) {
- super();
- setUnlocalizedName("techreborn.lesustorage");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockLESUStorage(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.lesustorage");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
+ @Override
+ public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemstack)
+ {
+ super.onBlockPlacedBy(world, x, y, z, player, itemstack);
+ if (world.getTileEntity(new BlockPos(x, y, z)) instanceof TileLesuStorage)
+ {
+ ((TileLesuStorage) world.getTileEntity(new BlockPos(x, y, z))).rebuildNetwork();
+ }
+ }
- @Override
- public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemstack) {
- super.onBlockPlacedBy(world, x, y, z, player, itemstack);
- if (world.getTileEntity(new BlockPos(x, y, z)) instanceof TileLesuStorage) {
- ((TileLesuStorage) world.getTileEntity(new BlockPos(x, y, z))).rebuildNetwork();
- }
- }
+ @Override
+ public void breakBlock(World world, int x, int y, int z, Block block, int meta)
+ {
+ if (world.getTileEntity(new BlockPos(x, y, z)) instanceof TileLesuStorage)
+ {
+ ((TileLesuStorage) world.getTileEntity(new BlockPos(x, y, z))).removeFromNetwork();
+ }
+ super.breakBlock(world, x, y, z, block, meta);
+ }
- @Override
- public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
- if (world.getTileEntity(new BlockPos(x, y, z)) instanceof TileLesuStorage) {
- ((TileLesuStorage) world.getTileEntity(new BlockPos(x, y, z))).removeFromNetwork();
- }
- super.breakBlock(world, x, y, z, block, meta);
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileLesuStorage();
+ }
+ public boolean shouldConnectToBlock(IBlockAccess blockAccess, int x, int y, int z, Block block, int meta)
+ {
+ return block == (Block) this;
+ }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileLesuStorage();
- }
+ private final String prefix = "techreborn:blocks/machine/storage/";
- public boolean shouldConnectToBlock(IBlockAccess blockAccess, int x, int y, int z, Block block, int meta) {
- return block == (Block) this;
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return prefix + "lesu_block";
+ }
- private final String prefix = "techreborn:blocks/machine/storage/";
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "lesu_block";
+ }
- @Override
- public String getFront(boolean isActive) {
- return prefix + "lesu_block";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return prefix + "lesu_block";
+ }
- @Override
- public String getSide(boolean isActive) {
- return prefix + "lesu_block" ;
- }
-
- @Override
- public String getTop(boolean isActive) {
- return prefix + "lesu_block";
- }
-
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "lesu_block";
- }
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "lesu_block";
+ }
}
diff --git a/src/main/java/techreborn/blocks/storage/BlockMFE.java b/src/main/java/techreborn/blocks/storage/BlockMFE.java
index edd6bae17..2215e0ba8 100644
--- a/src/main/java/techreborn/blocks/storage/BlockMFE.java
+++ b/src/main/java/techreborn/blocks/storage/BlockMFE.java
@@ -8,41 +8,49 @@ import techreborn.tiles.storage.TileMFE;
/**
* Created by modmuss50 on 14/03/2016.
*/
-public class BlockMFE extends BlockBatBox {
+public class BlockMFE extends BlockBatBox
+{
- public BlockMFE() {
- super();
- setUnlocalizedName("techreborn.mfe");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockMFE()
+ {
+ super();
+ setUnlocalizedName("techreborn.mfe");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileMFE();
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileMFE();
+ }
- @Override
- public String getFrontOff() {
- return prefix + "mfe_front";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "mfe_front";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "mfe_front";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "mfe_front";
+ }
- @Override
- public String getSide() {
- return prefix + "mfe_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "mfe_side";
+ }
- @Override
- public String getTop() {
- return prefix + "mfe_top";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "mfe_top";
+ }
- @Override
- public String getBottom() {
- return prefix + "mfe_bottom";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "mfe_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/storage/BlockMFSU.java b/src/main/java/techreborn/blocks/storage/BlockMFSU.java
index 96bfe9fb8..bab0055fe 100644
--- a/src/main/java/techreborn/blocks/storage/BlockMFSU.java
+++ b/src/main/java/techreborn/blocks/storage/BlockMFSU.java
@@ -8,41 +8,49 @@ import techreborn.tiles.storage.TileMFSU;
/**
* Created by modmuss50 on 14/03/2016.
*/
-public class BlockMFSU extends BlockBatBox {
+public class BlockMFSU extends BlockBatBox
+{
- public BlockMFSU() {
- super();
- setUnlocalizedName("techreborn.mfsu");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockMFSU()
+ {
+ super();
+ setUnlocalizedName("techreborn.mfsu");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileMFSU();
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileMFSU();
+ }
- @Override
- public String getFrontOff() {
- return prefix + "mfsu_front";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "mfsu_front";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "mfsu_front";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "mfsu_front";
+ }
- @Override
- public String getSide() {
- return prefix + "mfsu_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "mfsu_side";
+ }
- @Override
- public String getTop() {
- return prefix + "mfsu_top";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "mfsu_top";
+ }
- @Override
- public String getBottom() {
- return prefix + "mfsu_bottom";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "mfsu_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/tier1/BlockAlloySmelter.java b/src/main/java/techreborn/blocks/tier1/BlockAlloySmelter.java
index 32b9c1c04..b46cc5da2 100644
--- a/src/main/java/techreborn/blocks/tier1/BlockAlloySmelter.java
+++ b/src/main/java/techreborn/blocks/tier1/BlockAlloySmelter.java
@@ -11,50 +11,60 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileAlloySmelter;
-public class BlockAlloySmelter extends BlockMachineBase implements IRotationTexture {
+public class BlockAlloySmelter extends BlockMachineBase implements IRotationTexture
+{
- public BlockAlloySmelter(Material material) {
- super();
- setUnlocalizedName("techreborn.alloysmelter");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockAlloySmelter(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.alloysmelter");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileAlloySmelter();
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileAlloySmelter();
+ }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking())
- player.openGui(Core.INSTANCE, GuiHandler.alloySmelterID, world, x, y, z);
- return true;
- }
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ player.openGui(Core.INSTANCE, GuiHandler.alloySmelterID, world, x, y, z);
+ return true;
+ }
- private final String prefix = "techreborn:blocks/machine/tier1_machines/";
+ private final String prefix = "techreborn:blocks/machine/tier1_machines/";
- @Override
- public String getFrontOff() {
- return prefix + "electric_alloy_furnace_front_off";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "electric_alloy_furnace_front_off";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "electric_alloy_furnace_front_on";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "electric_alloy_furnace_front_on";
+ }
- @Override
- public String getSide() {
- return prefix + "tier1_machine_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "tier1_machine_side";
+ }
- @Override
- public String getTop() {
- return prefix + "tier1_machine_top";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "tier1_machine_top";
+ }
- @Override
- public String getBottom() {
- return prefix + "tier1_machine_bottom";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "tier1_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/tier1/BlockCompressor.java b/src/main/java/techreborn/blocks/tier1/BlockCompressor.java
index 4baf139e7..f924ada53 100644
--- a/src/main/java/techreborn/blocks/tier1/BlockCompressor.java
+++ b/src/main/java/techreborn/blocks/tier1/BlockCompressor.java
@@ -11,51 +11,62 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.teir1.TileCompressor;
-public class BlockCompressor extends BlockMachineBase implements IRotationTexture{
+public class BlockCompressor extends BlockMachineBase implements IRotationTexture
+{
- public BlockCompressor(Material material) {
- super();
- setUnlocalizedName("techreborn.compressor");
- setCreativeTab(TechRebornCreativeTab.instance);
+ public BlockCompressor(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.compressor");
+ setCreativeTab(TechRebornCreativeTab.instance);
}
-
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileCompressor();
- }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking()){
- player.openGui(Core.INSTANCE, GuiHandler.compressorID, world, x, y, z);
- }
- return true;
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileCompressor();
+ }
- private final String prefix = "techreborn:blocks/machine/tier1_machines/";
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ {
+ player.openGui(Core.INSTANCE, GuiHandler.compressorID, world, x, y, z);
+ }
+ return true;
+ }
- @Override
- public String getFrontOff() {
- return prefix + "compressor_front_off";
- }
+ private final String prefix = "techreborn:blocks/machine/tier1_machines/";
- @Override
- public String getFrontOn() {
- return prefix + "compressor_front_on";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "compressor_front_off";
+ }
- @Override
- public String getSide() {
- return prefix + "tier1_machine_side";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "compressor_front_on";
+ }
- @Override
- public String getTop() {
- return prefix + "tier1_machine_top";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "tier1_machine_side";
+ }
- @Override
- public String getBottom() {
- return prefix + "tier1_machine_bottom";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "tier1_machine_top";
+ }
+
+ @Override
+ public String getBottom()
+ {
+ return prefix + "tier1_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/tier1/BlockElectricFurnace.java b/src/main/java/techreborn/blocks/tier1/BlockElectricFurnace.java
index 528791efa..8c10dc2ff 100644
--- a/src/main/java/techreborn/blocks/tier1/BlockElectricFurnace.java
+++ b/src/main/java/techreborn/blocks/tier1/BlockElectricFurnace.java
@@ -11,51 +11,62 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.teir1.TileElectricFurnace;
-public class BlockElectricFurnace extends BlockMachineBase implements IRotationTexture{
+public class BlockElectricFurnace extends BlockMachineBase implements IRotationTexture
+{
- public BlockElectricFurnace(Material material) {
- super();
- setUnlocalizedName("techreborn.electricfurnace");
- setCreativeTab(TechRebornCreativeTab.instance);
+ public BlockElectricFurnace(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.electricfurnace");
+ setCreativeTab(TechRebornCreativeTab.instance);
}
-
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileElectricFurnace();
- }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking()){
- player.openGui(Core.INSTANCE, GuiHandler.electricFurnaceID, world, x, y, z);
- }
- return true;
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileElectricFurnace();
+ }
- private final String prefix = "techreborn:blocks/machine/tier1_machines/";
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ {
+ player.openGui(Core.INSTANCE, GuiHandler.electricFurnaceID, world, x, y, z);
+ }
+ return true;
+ }
- @Override
- public String getFrontOff() {
- return prefix + "electric_furnace_front_off";
- }
+ private final String prefix = "techreborn:blocks/machine/tier1_machines/";
- @Override
- public String getFrontOn() {
- return prefix + "electric_furnace_front_on";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "electric_furnace_front_off";
+ }
- @Override
- public String getSide() {
- return prefix + "tier1_machine_side" ;
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "electric_furnace_front_on";
+ }
- @Override
- public String getTop() {
- return prefix + "tier1_machine_top";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "tier1_machine_side";
+ }
- @Override
- public String getBottom() {
- return prefix + "tier1_machine_bottom";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "tier1_machine_top";
+ }
+
+ @Override
+ public String getBottom()
+ {
+ return prefix + "tier1_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/tier1/BlockExtractor.java b/src/main/java/techreborn/blocks/tier1/BlockExtractor.java
index c620d5599..eb5c3a080 100644
--- a/src/main/java/techreborn/blocks/tier1/BlockExtractor.java
+++ b/src/main/java/techreborn/blocks/tier1/BlockExtractor.java
@@ -11,51 +11,62 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.teir1.TileExtractor;
-public class BlockExtractor extends BlockMachineBase implements IRotationTexture{
+public class BlockExtractor extends BlockMachineBase implements IRotationTexture
+{
- public BlockExtractor(Material material) {
- super();
- setUnlocalizedName("techreborn.extractor");
- setCreativeTab(TechRebornCreativeTab.instance);
+ public BlockExtractor(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.extractor");
+ setCreativeTab(TechRebornCreativeTab.instance);
}
-
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileExtractor();
- }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking()){
- player.openGui(Core.INSTANCE, GuiHandler.extractorID, world, x, y, z);
- }
- return true;
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileExtractor();
+ }
- private final String prefix = "techreborn:blocks/machine/tier1_machines/";
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ {
+ player.openGui(Core.INSTANCE, GuiHandler.extractorID, world, x, y, z);
+ }
+ return true;
+ }
- @Override
- public String getFrontOff() {
- return prefix + "extractor_front_off";
- }
+ private final String prefix = "techreborn:blocks/machine/tier1_machines/";
- @Override
- public String getFrontOn() {
- return prefix + "extractor_front_on";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "extractor_front_off";
+ }
- @Override
- public String getSide() {
- return prefix + "tier1_machine_side";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "extractor_front_on";
+ }
- @Override
- public String getTop() {
- return prefix + "tier1_machine_top";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "tier1_machine_side";
+ }
- @Override
- public String getBottom() {
- return prefix + "tier1_machine_bottom";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "tier1_machine_top";
+ }
+
+ @Override
+ public String getBottom()
+ {
+ return prefix + "tier1_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/tier1/BlockGrinder.java b/src/main/java/techreborn/blocks/tier1/BlockGrinder.java
index fe40f878e..bd809596b 100644
--- a/src/main/java/techreborn/blocks/tier1/BlockGrinder.java
+++ b/src/main/java/techreborn/blocks/tier1/BlockGrinder.java
@@ -11,46 +11,56 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.teir1.TileGrinder;
-public class BlockGrinder extends BlockMachineBase implements IAdvancedRotationTexture{
+public class BlockGrinder extends BlockMachineBase implements IAdvancedRotationTexture
+{
- public BlockGrinder(Material material) {
- super();
- setUnlocalizedName("techreborn.grinder");
- setCreativeTab(TechRebornCreativeTab.instance);
+ public BlockGrinder(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.grinder");
+ setCreativeTab(TechRebornCreativeTab.instance);
}
-
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileGrinder();
- }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking()){
- player.openGui(Core.INSTANCE, GuiHandler.grinderID, world, x, y, z);
- }
- return true;
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileGrinder();
+ }
- private final String prefix = "techreborn:blocks/machine/tier1_machines/";
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ {
+ player.openGui(Core.INSTANCE, GuiHandler.grinderID, world, x, y, z);
+ }
+ return true;
+ }
- @Override
- public String getFront(boolean isActive) {
- return isActive ? prefix + "grinder_front_on" : prefix + "grinder_front_off";
- }
+ private final String prefix = "techreborn:blocks/machine/tier1_machines/";
- @Override
- public String getSide(boolean isActive) {
- return prefix + "tier1_machine_side";
- }
+ @Override
+ public String getFront(boolean isActive)
+ {
+ return isActive ? prefix + "grinder_front_on" : prefix + "grinder_front_off";
+ }
- @Override
- public String getTop(boolean isActive) {
- return isActive ? prefix + "grinder_top_on" : prefix + "grinder_top_off";
- }
+ @Override
+ public String getSide(boolean isActive)
+ {
+ return prefix + "tier1_machine_side";
+ }
- @Override
- public String getBottom(boolean isActive) {
- return prefix + "tier1_machine_bottom";
- }
+ @Override
+ public String getTop(boolean isActive)
+ {
+ return isActive ? prefix + "grinder_top_on" : prefix + "grinder_top_off";
+ }
+
+ @Override
+ public String getBottom(boolean isActive)
+ {
+ return prefix + "tier1_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/tier1/BlockRecycler.java b/src/main/java/techreborn/blocks/tier1/BlockRecycler.java
index f001fd3e2..9b346d1dc 100644
--- a/src/main/java/techreborn/blocks/tier1/BlockRecycler.java
+++ b/src/main/java/techreborn/blocks/tier1/BlockRecycler.java
@@ -11,51 +11,62 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.teir1.TileRecycler;
-public class BlockRecycler extends BlockMachineBase implements IRotationTexture{
+public class BlockRecycler extends BlockMachineBase implements IRotationTexture
+{
- public BlockRecycler(Material material) {
- super();
- setUnlocalizedName("techreborn.recycler");
- setCreativeTab(TechRebornCreativeTab.instance);
+ public BlockRecycler(Material material)
+ {
+ super();
+ setUnlocalizedName("techreborn.recycler");
+ setCreativeTab(TechRebornCreativeTab.instance);
}
-
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileRecycler();
- }
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking()){
- player.openGui(Core.INSTANCE, GuiHandler.recyclerID, world, x, y, z);
- }
- return true;
- }
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileRecycler();
+ }
- private final String prefix = "techreborn:blocks/machine/tier1_machines/";
+ @Override
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
+ float hitY, float hitZ)
+ {
+ if (!player.isSneaking())
+ {
+ player.openGui(Core.INSTANCE, GuiHandler.recyclerID, world, x, y, z);
+ }
+ return true;
+ }
- @Override
- public String getFrontOff() {
- return prefix + "recycler_front_off";
- }
+ private final String prefix = "techreborn:blocks/machine/tier1_machines/";
- @Override
- public String getFrontOn() {
- return prefix + "recycler_front_on";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "recycler_front_off";
+ }
- @Override
- public String getSide() {
- return prefix + "tier1_machine_side";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "recycler_front_on";
+ }
- @Override
- public String getTop() {
- return prefix + "tier1_machine_top";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "tier1_machine_side";
+ }
- @Override
- public String getBottom() {
- return prefix + "tier1_machine_bottom";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "tier1_machine_top";
+ }
+
+ @Override
+ public String getBottom()
+ {
+ return prefix + "tier1_machine_bottom";
+ }
}
diff --git a/src/main/java/techreborn/blocks/transformers/BlockHVTransformer.java b/src/main/java/techreborn/blocks/transformers/BlockHVTransformer.java
index 0aa5515db..e15a3b38c 100644
--- a/src/main/java/techreborn/blocks/transformers/BlockHVTransformer.java
+++ b/src/main/java/techreborn/blocks/transformers/BlockHVTransformer.java
@@ -2,50 +2,56 @@ package techreborn.blocks.transformers;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
-import techreborn.blocks.storage.BlockBatBox;
import techreborn.client.TechRebornCreativeTab;
-import techreborn.tiles.storage.TileMFE;
import techreborn.tiles.transformers.TileHVTransformer;
/**
* Created by modmuss50 on 16/03/2016.
*/
-public class BlockHVTransformer extends BlockLVTransformer {
+public class BlockHVTransformer extends BlockLVTransformer
+{
- public BlockHVTransformer() {
- super();
- setUnlocalizedName("techreborn.hvt");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockHVTransformer()
+ {
+ super();
+ setUnlocalizedName("techreborn.hvt");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileHVTransformer();
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileHVTransformer();
+ }
- @Override
- public String getFrontOff() {
- return prefix + "hv_transformer_front";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "hv_transformer_front";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "hv_transformer_front";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "hv_transformer_front";
+ }
- @Override
- public String getSide() {
- return prefix + "hv_transformer_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "hv_transformer_side";
+ }
- @Override
- public String getTop() {
- return prefix + "hv_transformer_side";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "hv_transformer_side";
+ }
+
+ @Override
+ public String getBottom()
+ {
+ return prefix + "hv_transformer_bottom";
+ }
- @Override
- public String getBottom() {
- return prefix + "hv_transformer_bottom";
- }
-
}
diff --git a/src/main/java/techreborn/blocks/transformers/BlockLVTransformer.java b/src/main/java/techreborn/blocks/transformers/BlockLVTransformer.java
index 8bb05d041..0e76b27d8 100644
--- a/src/main/java/techreborn/blocks/transformers/BlockLVTransformer.java
+++ b/src/main/java/techreborn/blocks/transformers/BlockLVTransformer.java
@@ -4,47 +4,54 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import techreborn.blocks.storage.BlockBatBox;
import techreborn.client.TechRebornCreativeTab;
-import techreborn.tiles.storage.TileMFE;
import techreborn.tiles.transformers.TileLVTransformer;
/**
* Created by modmuss50 on 16/03/2016.
*/
-public class BlockLVTransformer extends BlockBatBox {
+public class BlockLVTransformer extends BlockBatBox
+{
- public BlockLVTransformer() {
- super();
- setUnlocalizedName("techreborn.lvt");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockLVTransformer()
+ {
+ super();
+ setUnlocalizedName("techreborn.lvt");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileLVTransformer();
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileLVTransformer();
+ }
- @Override
- public String getFrontOff() {
- return prefix + "lv_transformer_front";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "lv_transformer_front";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "lv_transformer_front";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "lv_transformer_front";
+ }
- @Override
- public String getSide() {
- return prefix + "lv_transformer_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "lv_transformer_side";
+ }
- @Override
- public String getTop() {
- return prefix + "lv_transformer_side";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "lv_transformer_side";
+ }
- @Override
- public String getBottom() {
- return prefix + "lv_transformer_side";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "lv_transformer_side";
+ }
}
diff --git a/src/main/java/techreborn/blocks/transformers/BlockMVTransformer.java b/src/main/java/techreborn/blocks/transformers/BlockMVTransformer.java
index fd1df7e47..58b1b9037 100644
--- a/src/main/java/techreborn/blocks/transformers/BlockMVTransformer.java
+++ b/src/main/java/techreborn/blocks/transformers/BlockMVTransformer.java
@@ -2,49 +2,55 @@ package techreborn.blocks.transformers;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
-import techreborn.blocks.storage.BlockBatBox;
import techreborn.client.TechRebornCreativeTab;
-import techreborn.tiles.storage.TileMFE;
import techreborn.tiles.transformers.TileMVTransformer;
/**
* Created by modmuss50 on 16/03/2016.
*/
-public class BlockMVTransformer extends BlockLVTransformer {
+public class BlockMVTransformer extends BlockLVTransformer
+{
- public BlockMVTransformer() {
- super();
- setUnlocalizedName("techreborn.mvt");
- setCreativeTab(TechRebornCreativeTab.instance);
- }
+ public BlockMVTransformer()
+ {
+ super();
+ setUnlocalizedName("techreborn.mvt");
+ setCreativeTab(TechRebornCreativeTab.instance);
+ }
- @Override
- public TileEntity createNewTileEntity(World world, int p_149915_2_) {
- return new TileMVTransformer();
- }
+ @Override
+ public TileEntity createNewTileEntity(World world, int p_149915_2_)
+ {
+ return new TileMVTransformer();
+ }
- @Override
- public String getFrontOff() {
- return prefix + "mv_transformer_front";
- }
+ @Override
+ public String getFrontOff()
+ {
+ return prefix + "mv_transformer_front";
+ }
- @Override
- public String getFrontOn() {
- return prefix + "mv_transformer_front";
- }
+ @Override
+ public String getFrontOn()
+ {
+ return prefix + "mv_transformer_front";
+ }
- @Override
- public String getSide() {
- return prefix + "mv_transformer_side";
- }
+ @Override
+ public String getSide()
+ {
+ return prefix + "mv_transformer_side";
+ }
- @Override
- public String getTop() {
- return prefix + "mv_transformer_side";
- }
+ @Override
+ public String getTop()
+ {
+ return prefix + "mv_transformer_side";
+ }
- @Override
- public String getBottom() {
- return prefix + "mv_transformer_side";
- }
+ @Override
+ public String getBottom()
+ {
+ return prefix + "mv_transformer_side";
+ }
}
diff --git a/src/main/java/techreborn/client/ClientMultiBlocks.java b/src/main/java/techreborn/client/ClientMultiBlocks.java
index 9dcf21402..989b8dd23 100644
--- a/src/main/java/techreborn/client/ClientMultiBlocks.java
+++ b/src/main/java/techreborn/client/ClientMultiBlocks.java
@@ -1,70 +1,62 @@
package techreborn.client;
-
import net.minecraft.util.EnumFacing;
import reborncore.client.multiblock.Multiblock;
import techreborn.init.ModBlocks;
-public class ClientMultiBlocks {
+public class ClientMultiBlocks
+{
- public static Multiblock reactor;
- public static Multiblock frezzer;
+ public static Multiblock reactor;
+ public static Multiblock frezzer;
- public static void init(){
- reactor = new Multiblock();
- checkCoils();
+ public static void init()
+ {
+ reactor = new Multiblock();
+ checkCoils();
+ frezzer = new Multiblock();
+ checkMachine();
+ }
- frezzer = new Multiblock();
- checkMachine();
- }
+ public static void checkCoils()
+ {
+ if ((isCoil(3, 0, 1)) && (isCoil(3, 0, 0)) && (isCoil(3, 0, 0 - 1)) && (isCoil(0 - 3, 0, 1))
+ && (isCoil(0 - 3, 0, 0)) && (isCoil(0 - 3, 0, 0 - 1)) && (isCoil(2, 0, 2)) && (isCoil(2, 0, 1))
+ && (isCoil(2, 0, 0 - 1)) && (isCoil(2, 0, 0 - 2)) && (isCoil(0 - 2, 0, 2)) && (isCoil(0 - 2, 0, 1))
+ && (isCoil(0 - 2, 0, 0 - 1)) && (isCoil(0 - 2, 0, 0 - 2)) && (isCoil(1, 0, 3)) && (isCoil(1, 0, 2))
+ && (isCoil(1, 0, 0 - 2)) && (isCoil(1, 0, 0 - 3)) && (isCoil(0 - 1, 0, 3)) && (isCoil(0 - 1, 0, 2))
+ && (isCoil(0 - 1, 0, 0 - 2)) && (isCoil(0 - 1, 0, 0 - 3)) && (isCoil(0, 0, 3)) && (isCoil(0, 0, 0 - 3)))
+ {
+ }
+ }
- public static void checkCoils() {
- if ((isCoil(3, 0, 1)) &&
- (isCoil(3, 0, 0)) &&
- (isCoil(3, 0, 0 - 1)) &&
- (isCoil(0 - 3, 0, 1)) &&
- (isCoil(0 - 3, 0, 0)) &&
- (isCoil(0 - 3, 0, 0 - 1)) &&
- (isCoil(2, 0, 2)) &&
- (isCoil(2, 0, 1)) &&
- (isCoil(2, 0, 0 - 1)) &&
- (isCoil(2, 0, 0 - 2)) &&
- (isCoil(0 - 2, 0, 2)) &&
- (isCoil(0 - 2, 0, 1)) &&
- (isCoil(0 - 2, 0, 0 - 1)) &&
- (isCoil(0 - 2, 0, 0 - 2)) &&
- (isCoil(1, 0, 3)) &&
- (isCoil(1, 0, 2)) &&
- (isCoil(1, 0, 0 - 2)) &&
- (isCoil(1, 0, 0 - 3)) &&
- (isCoil(0 - 1, 0, 3)) &&
- (isCoil(0 - 1, 0, 2)) &&
- (isCoil(0 - 1, 0, 0 - 2)) &&
- (isCoil(0 - 1, 0, 0 - 3)) &&
- (isCoil(0, 0, 3)) &&
- (isCoil(0, 0, 0 - 3))) {
- }
- }
+ private static boolean isCoil(int x, int y, int z)
+ {
+ reactor.addComponent(x, y, z, ModBlocks.FusionCoil, 0);
+ return true;
+ }
- private static boolean isCoil(int x, int y, int z) {
- reactor.addComponent(x, y, z, ModBlocks.FusionCoil, 0);
- return true;
- }
+ public static void checkMachine()
+ {
+ int xDir = EnumFacing.UP.getFrontOffsetX() * 2;
+ int yDir = EnumFacing.UP.getFrontOffsetY() * 2;
+ int zDir = EnumFacing.UP.getFrontOffsetZ() * 2;
+ for (int i = -1; i < 2; i++)
+ {
+ for (int j = -1; j < 2; j++)
+ {
+ for (int k = -1; k < 2; k++)
+ {
+ if ((i != 0) || (j != 0) || (k != 0))
+ {
+ frezzer.addComponent(xDir + i, yDir + j, zDir + k, ModBlocks.MachineCasing,
+ (((i == 0) && (j == 0) && (k != 0)) || ((i == 0) && (j != 0) && (k == 0))
+ || ((i != 0) && (j == 0) && (k == 0)) ? 2 : 1));
+ }
+ }
+ }
+ }
+ }
- public static void checkMachine() {
- int xDir = EnumFacing.UP.getFrontOffsetX() * 2;
- int yDir = EnumFacing.UP.getFrontOffsetY() * 2;
- int zDir = EnumFacing.UP.getFrontOffsetZ() * 2;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- for (int k = -1; k < 2; k++) {
- if ((i != 0) || (j != 0) || (k != 0)) {
- frezzer.addComponent(xDir + i, yDir + j, zDir + k, ModBlocks.MachineCasing, (((i == 0) && (j == 0) && (k != 0)) || ((i == 0) && (j != 0) && (k == 0)) || ((i != 0) && (j == 0) && (k == 0)) ? 2 : 1));
- }
- }
- }
- }
- }
-
}
diff --git a/src/main/java/techreborn/client/GuiHandler.java b/src/main/java/techreborn/client/GuiHandler.java
index d854411db..694ed03e1 100644
--- a/src/main/java/techreborn/client/GuiHandler.java
+++ b/src/main/java/techreborn/client/GuiHandler.java
@@ -4,258 +4,405 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.IGuiHandler;
-import techreborn.client.container.*;
-import techreborn.client.gui.*;
+import techreborn.client.container.ContainerAesu;
+import techreborn.client.container.ContainerAlloyFurnace;
+import techreborn.client.container.ContainerAlloySmelter;
+import techreborn.client.container.ContainerAssemblingMachine;
+import techreborn.client.container.ContainerBatbox;
+import techreborn.client.container.ContainerBlastFurnace;
+import techreborn.client.container.ContainerCentrifuge;
+import techreborn.client.container.ContainerChargeBench;
+import techreborn.client.container.ContainerChemicalReactor;
+import techreborn.client.container.ContainerChunkloader;
+import techreborn.client.container.ContainerCompressor;
+import techreborn.client.container.ContainerDestructoPack;
+import techreborn.client.container.ContainerDieselGenerator;
+import techreborn.client.container.ContainerDigitalChest;
+import techreborn.client.container.ContainerElectricFurnace;
+import techreborn.client.container.ContainerExtractor;
+import techreborn.client.container.ContainerFusionReactor;
+import techreborn.client.container.ContainerGasTurbine;
+import techreborn.client.container.ContainerGenerator;
+import techreborn.client.container.ContainerGrinder;
+import techreborn.client.container.ContainerIDSU;
+import techreborn.client.container.ContainerImplosionCompressor;
+import techreborn.client.container.ContainerIndustrialElectrolyzer;
+import techreborn.client.container.ContainerIndustrialGrinder;
+import techreborn.client.container.ContainerIndustrialSawmill;
+import techreborn.client.container.ContainerIronFurnace;
+import techreborn.client.container.ContainerLesu;
+import techreborn.client.container.ContainerMatterFabricator;
+import techreborn.client.container.ContainerQuantumChest;
+import techreborn.client.container.ContainerQuantumTank;
+import techreborn.client.container.ContainerRecycler;
+import techreborn.client.container.ContainerRollingMachine;
+import techreborn.client.container.ContainerScrapboxinator;
+import techreborn.client.container.ContainerSemifluidGenerator;
+import techreborn.client.container.ContainerThermalGenerator;
+import techreborn.client.container.ContainerVacuumFreezer;
+import techreborn.client.gui.GuiAesu;
+import techreborn.client.gui.GuiAlloyFurnace;
+import techreborn.client.gui.GuiAlloySmelter;
+import techreborn.client.gui.GuiAssemblingMachine;
+import techreborn.client.gui.GuiBatbox;
+import techreborn.client.gui.GuiBlastFurnace;
+import techreborn.client.gui.GuiCentrifuge;
+import techreborn.client.gui.GuiChargeBench;
+import techreborn.client.gui.GuiChemicalReactor;
+import techreborn.client.gui.GuiChunkLoader;
+import techreborn.client.gui.GuiCompressor;
+import techreborn.client.gui.GuiDestructoPack;
+import techreborn.client.gui.GuiDieselGenerator;
+import techreborn.client.gui.GuiDigitalChest;
+import techreborn.client.gui.GuiElectricFurnace;
+import techreborn.client.gui.GuiExtractor;
+import techreborn.client.gui.GuiFusionReactor;
+import techreborn.client.gui.GuiGasTurbine;
+import techreborn.client.gui.GuiGenerator;
+import techreborn.client.gui.GuiGrinder;
+import techreborn.client.gui.GuiIDSU;
+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.GuiLesu;
+import techreborn.client.gui.GuiMatterFabricator;
+import techreborn.client.gui.GuiQuantumChest;
+import techreborn.client.gui.GuiQuantumTank;
+import techreborn.client.gui.GuiRecycler;
+import techreborn.client.gui.GuiRollingMachine;
+import techreborn.client.gui.GuiScrapboxinator;
+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.TileScrapboxinator;
+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.storage.TileBatBox;
-import techreborn.tiles.teir1.*;
+import techreborn.tiles.teir1.TileCompressor;
+import techreborn.tiles.teir1.TileElectricFurnace;
+import techreborn.tiles.teir1.TileExtractor;
+import techreborn.tiles.teir1.TileGrinder;
+import techreborn.tiles.teir1.TileRecycler;
-public class GuiHandler implements IGuiHandler {
+public class GuiHandler implements IGuiHandler
+{
- public static final int thermalGeneratorID = 0;
- public static final int quantumTankID = 1;
- public static final int quantumChestID = 2;
- public static final int centrifugeID = 3;
- public static final int rollingMachineID = 4;
- public static final int blastFurnaceID = 5;
- public static final int alloySmelterID = 6;
- public static final int industrialGrinderID = 7;
- public static final int implosionCompresserID = 8;
- public static final int matterfabID = 9;
- public static final int manuelID = 10;
- public static final int chunkloaderID = 11;
- public static final int assemblingmachineID = 12;
- public static final int dieselGeneratorID = 15;
- public static final int industrialElectrolyzerID = 16;
- public static final int aesuID = 17;
- public static final int alloyFurnaceID = 18;
- public static final int sawMillID = 19;
- public static final int chemicalReactorID = 20;
- public static final int semifluidGeneratorID = 21;
- public static final int gasTurbineID = 22;
- public static final int digitalChestID = 23;
- public static final int destructoPackID = 25;
- public static final int lesuID = 26;
- public static final int idsuID = 27;
- public static final int chargeBench = 28;
- public static final int fusionID = 29;
- public static final int vacuumFreezerID = 30;
- public static final int grinderID = 31;
- public static final int generatorID = 32;
- public static final int extractorID = 33;
- public static final int compressorID = 34;
- public static final int electricFurnaceID = 35;
- public static final int ironFurnace = 36;
- public static final int recyclerID = 37;
- public static final int scrapboxinatorID = 38;
- public static final int batboxID = 39;
+ public static final int thermalGeneratorID = 0;
+ public static final int quantumTankID = 1;
+ public static final int quantumChestID = 2;
+ public static final int centrifugeID = 3;
+ public static final int rollingMachineID = 4;
+ public static final int blastFurnaceID = 5;
+ public static final int alloySmelterID = 6;
+ public static final int industrialGrinderID = 7;
+ public static final int implosionCompresserID = 8;
+ public static final int matterfabID = 9;
+ public static final int manuelID = 10;
+ public static final int chunkloaderID = 11;
+ public static final int assemblingmachineID = 12;
+ public static final int dieselGeneratorID = 15;
+ public static final int industrialElectrolyzerID = 16;
+ public static final int aesuID = 17;
+ public static final int alloyFurnaceID = 18;
+ public static final int sawMillID = 19;
+ public static final int chemicalReactorID = 20;
+ public static final int semifluidGeneratorID = 21;
+ public static final int gasTurbineID = 22;
+ public static final int digitalChestID = 23;
+ public static final int destructoPackID = 25;
+ public static final int lesuID = 26;
+ public static final int idsuID = 27;
+ public static final int chargeBench = 28;
+ public static final int fusionID = 29;
+ public static final int vacuumFreezerID = 30;
+ public static final int grinderID = 31;
+ public static final int generatorID = 32;
+ public static final int extractorID = 33;
+ public static final int compressorID = 34;
+ public static final int electricFurnaceID = 35;
+ public static final int ironFurnace = 36;
+ public static final int recyclerID = 37;
+ public static final int scrapboxinatorID = 38;
+ public static final int batboxID = 39;
+ @Override
+ public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
+ {
+ if (ID == thermalGeneratorID)
+ {
+ return new ContainerThermalGenerator((TileThermalGenerator) world.getTileEntity(new BlockPos(x, y, z)),
+ player);
+ } else if (ID == semifluidGeneratorID)
+ {
+ return new ContainerSemifluidGenerator((TileSemifluidGenerator) world.getTileEntity(new BlockPos(x, y, z)),
+ player);
+ } else if (ID == gasTurbineID)
+ {
+ return new ContainerGasTurbine((TileGasTurbine) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == quantumTankID)
+ {
+ return new ContainerQuantumTank((TileQuantumTank) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == digitalChestID)
+ {
+ return new ContainerDigitalChest((TileDigitalChest) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == quantumChestID)
+ {
+ return new ContainerQuantumChest((TileQuantumChest) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == centrifugeID)
+ {
+ return new ContainerCentrifuge((TileCentrifuge) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == rollingMachineID)
+ {
+ return new ContainerRollingMachine((TileRollingMachine) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == blastFurnaceID)
+ {
+ return new ContainerBlastFurnace((TileBlastFurnace) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == alloySmelterID)
+ {
+ return new ContainerAlloySmelter((TileAlloySmelter) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == industrialGrinderID)
+ {
+ return new ContainerIndustrialGrinder((TileIndustrialGrinder) world.getTileEntity(new BlockPos(x, y, z)),
+ player);
+ } else if (ID == implosionCompresserID)
+ {
+ return new ContainerImplosionCompressor(
+ (TileImplosionCompressor) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == matterfabID)
+ {
+ return new ContainerMatterFabricator((TileMatterFabricator) world.getTileEntity(new BlockPos(x, y, z)),
+ player);
+ } else if (ID == chunkloaderID)
+ {
+ return new ContainerChunkloader((TileChunkLoader) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == assemblingmachineID)
+ {
+ return new ContainerAssemblingMachine((TileAssemblingMachine) world.getTileEntity(new BlockPos(x, y, z)),
+ player);
+ } else if (ID == dieselGeneratorID)
+ {
+ return new ContainerDieselGenerator((TileDieselGenerator) world.getTileEntity(new BlockPos(x, y, z)),
+ player);
+ } else if (ID == industrialElectrolyzerID)
+ {
+ return new ContainerIndustrialElectrolyzer(
+ (TileIndustrialElectrolyzer) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == aesuID)
+ {
+ return new ContainerAesu((TileAesu) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == alloyFurnaceID)
+ {
+ return new ContainerAlloyFurnace((TileAlloyFurnace) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == sawMillID)
+ {
+ return new ContainerIndustrialSawmill((TileIndustrialSawmill) world.getTileEntity(new BlockPos(x, y, z)),
+ player);
+ } else if (ID == chemicalReactorID)
+ {
+ return new ContainerChemicalReactor((TileChemicalReactor) world.getTileEntity(new BlockPos(x, y, z)),
+ player);
+ } else if (ID == manuelID)
+ {
+ return null;
+ } else if (ID == destructoPackID)
+ {
+ return new ContainerDestructoPack(player);
+ } else if (ID == lesuID)
+ {
+ return new ContainerLesu((TileLesu) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == idsuID)
+ {
+ return new ContainerIDSU((TileIDSU) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == chargeBench)
+ {
+ return new ContainerChargeBench((TileChargeBench) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == fusionID)
+ {
+ return new ContainerFusionReactor((TileEntityFusionController) world.getTileEntity(new BlockPos(x, y, z)),
+ player);
+ } else if (ID == vacuumFreezerID)
+ {
+ return new ContainerVacuumFreezer((TileVacuumFreezer) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == grinderID)
+ {
+ return new ContainerGrinder((TileGrinder) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == generatorID)
+ {
+ return new ContainerGenerator((TileGenerator) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == extractorID)
+ {
+ return new ContainerExtractor((TileExtractor) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == compressorID)
+ {
+ return new ContainerCompressor((TileCompressor) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == electricFurnaceID)
+ {
+ return new ContainerElectricFurnace((TileElectricFurnace) world.getTileEntity(new BlockPos(x, y, z)),
+ player);
+ } else if (ID == ironFurnace)
+ {
+ return new ContainerIronFurnace((TileIronFurnace) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == recyclerID)
+ {
+ return new ContainerRecycler((TileRecycler) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == scrapboxinatorID)
+ {
+ return new ContainerScrapboxinator((TileScrapboxinator) world.getTileEntity(new BlockPos(x, y, z)), player);
+ } else if (ID == batboxID)
+ {
+ return new ContainerBatbox((TileBatBox) world.getTileEntity(new BlockPos(x, y, z)), player);
+ }
+ return null;
+ }
- @Override
- public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- if (ID == thermalGeneratorID) {
- return new ContainerThermalGenerator(
- (TileThermalGenerator) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == semifluidGeneratorID) {
- return new ContainerSemifluidGenerator(
- (TileSemifluidGenerator) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == gasTurbineID) {
- return new ContainerGasTurbine(
- (TileGasTurbine) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == quantumTankID) {
- return new ContainerQuantumTank(
- (TileQuantumTank) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == digitalChestID) {
- return new ContainerDigitalChest(
- (TileDigitalChest) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == quantumChestID) {
- return new ContainerQuantumChest(
- (TileQuantumChest) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == centrifugeID) {
- return new ContainerCentrifuge(
- (TileCentrifuge) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == rollingMachineID) {
- return new ContainerRollingMachine(
- (TileRollingMachine) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == blastFurnaceID) {
- return new ContainerBlastFurnace(
- (TileBlastFurnace) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == alloySmelterID) {
- return new ContainerAlloySmelter(
- (TileAlloySmelter) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == industrialGrinderID) {
- return new ContainerIndustrialGrinder(
- (TileIndustrialGrinder) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == implosionCompresserID) {
- return new ContainerImplosionCompressor(
- (TileImplosionCompressor) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == matterfabID) {
- return new ContainerMatterFabricator(
- (TileMatterFabricator) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == chunkloaderID) {
- return new ContainerChunkloader(
- (TileChunkLoader) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == assemblingmachineID) {
- return new ContainerAssemblingMachine(
- (TileAssemblingMachine) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == dieselGeneratorID) {
- return new ContainerDieselGenerator(
- (TileDieselGenerator) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == industrialElectrolyzerID) {
- return new ContainerIndustrialElectrolyzer(
- (TileIndustrialElectrolyzer) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == aesuID) {
- return new ContainerAesu(
- (TileAesu) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == alloyFurnaceID) {
- return new ContainerAlloyFurnace(
- (TileAlloyFurnace) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == sawMillID) {
- return new ContainerIndustrialSawmill(
- (TileIndustrialSawmill) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == chemicalReactorID) {
- return new ContainerChemicalReactor(
- (TileChemicalReactor) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == manuelID) {
- return null;
- } else if (ID == destructoPackID) {
- return new ContainerDestructoPack(player);
- } else if (ID == lesuID) {
- return new ContainerLesu((TileLesu) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == idsuID) {
- return new ContainerIDSU((TileIDSU) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == chargeBench) {
- return new ContainerChargeBench((TileChargeBench) world.getTileEntity(new BlockPos(x, y, z)), player);
- } else if (ID == fusionID) {
- return new ContainerFusionReactor((TileEntityFusionController) world.getTileEntity(new BlockPos(x, y, z)), player);
- }else if (ID == vacuumFreezerID) {
- return new ContainerVacuumFreezer((TileVacuumFreezer) world.getTileEntity(new BlockPos(x, y, z)), player);
- }else if (ID == grinderID) {
- return new ContainerGrinder((TileGrinder) world.getTileEntity(new BlockPos(x, y, z)), player);
- }else if (ID == generatorID) {
- return new ContainerGenerator((TileGenerator) world.getTileEntity(new BlockPos(x, y, z)), player);
- }else if (ID == extractorID) {
- return new ContainerExtractor((TileExtractor) world.getTileEntity(new BlockPos(x, y, z)), player);
- }else if (ID == compressorID) {
- return new ContainerCompressor((TileCompressor) world.getTileEntity(new BlockPos(x, y, z)), player);
- }else if (ID == electricFurnaceID) {
- return new ContainerElectricFurnace((TileElectricFurnace) world.getTileEntity(new BlockPos(x, y, z)), player);
- }else if (ID == ironFurnace) {
- return new ContainerIronFurnace((TileIronFurnace) world.getTileEntity(new BlockPos(x, y, z)), player);
- }else if (ID == recyclerID) {
- return new ContainerRecycler((TileRecycler) world.getTileEntity(new BlockPos(x, y, z)), player);
- }else if (ID == scrapboxinatorID) {
- return new ContainerScrapboxinator((TileScrapboxinator) world.getTileEntity(new BlockPos(x, y, z)), player);
- }else if (ID == batboxID) {
- return new ContainerBatbox((TileBatBox) world.getTileEntity(new BlockPos(x, y, z)), player);
- }
- return null;
- }
-
- @Override
- public Object getClientGuiElement(int ID, EntityPlayer player, World world,
- int x, int y, int z) {
- if (ID == thermalGeneratorID) {
- return new GuiThermalGenerator(player,
- (TileThermalGenerator) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == semifluidGeneratorID) {
- return new GuiSemifluidGenerator(player,
- (TileSemifluidGenerator) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == gasTurbineID) {
- return new GuiGasTurbine(player,
- (TileGasTurbine) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == quantumTankID) {
- return new GuiQuantumTank(player,
- (TileQuantumTank) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == digitalChestID) {
- return new GuiDigitalChest(player,
- (TileDigitalChest) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == quantumChestID) {
- return new GuiQuantumChest(player,
- (TileQuantumChest) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == centrifugeID) {
- return new GuiCentrifuge(player,
- (TileCentrifuge) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == rollingMachineID) {
- return new GuiRollingMachine(player,
- (TileRollingMachine) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == blastFurnaceID) {
- return new GuiBlastFurnace(player,
- (TileBlastFurnace) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == alloySmelterID) {
- return new GuiAlloySmelter(player,
- (TileAlloySmelter) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == industrialGrinderID) {
- return new GuiIndustrialGrinder(player,
- (TileIndustrialGrinder) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == implosionCompresserID) {
- return new GuiImplosionCompressor(player,
- (TileImplosionCompressor) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == matterfabID) {
- return new GuiMatterFabricator(player,
- (TileMatterFabricator) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == chunkloaderID) {
- return new GuiChunkLoader(player,
- (TileChunkLoader) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == assemblingmachineID) {
- return new GuiAssemblingMachine(player,
- (TileAssemblingMachine) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == dieselGeneratorID) {
- return new GuiDieselGenerator(player,
- (TileDieselGenerator) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == industrialElectrolyzerID) {
- return new GuiIndustrialElectrolyzer(player,
- (TileIndustrialElectrolyzer) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == aesuID) {
- return new GuiAesu(player,
- (TileAesu) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == alloyFurnaceID) {
- return new GuiAlloyFurnace(player,
- (TileAlloyFurnace) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == sawMillID) {
- return new GuiIndustrialSawmill(player,
- (TileIndustrialSawmill) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == chemicalReactorID) {
- return new GuiChemicalReactor(player,
- (TileChemicalReactor) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == manuelID) {
- return new GuiManual();
- } else if (ID == destructoPackID) {
- return new GuiDestructoPack(new ContainerDestructoPack(player));
- } else if (ID == lesuID) {
- return new GuiLesu(player, (TileLesu) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == idsuID) {
- return new GuiIDSU(player, (TileIDSU) world.getTileEntity(new BlockPos(x, y, z)));
- } else if (ID == chargeBench) {
- return new GuiChargeBench(player, (TileChargeBench) world.getTileEntity(new BlockPos(x, y, z)));
- }else if (ID == fusionID) {
- return new GuiFusionReactor(player, (TileEntityFusionController) world.getTileEntity(new BlockPos(x, y, z)));
- }else if (ID == vacuumFreezerID) {
- return new GuiVacuumFreezer(player, (TileVacuumFreezer) world.getTileEntity(new BlockPos(x, y, z)));
- }else if (ID == grinderID) {
- return new GuiGrinder(player, (TileGrinder) world.getTileEntity(new BlockPos(x, y, z)));
- }else if (ID == generatorID) {
- return new GuiGenerator(player, (TileGenerator) world.getTileEntity(new BlockPos(x, y, z)));
- }else if (ID == extractorID) {
- return new GuiExtractor(player, (TileExtractor) world.getTileEntity(new BlockPos(x, y, z)));
- }else if (ID == compressorID) {
- return new GuiCompressor(player, (TileCompressor) world.getTileEntity(new BlockPos(x, y, z)));
- }else if (ID == electricFurnaceID) {
- return new GuiElectricFurnace(player, (TileElectricFurnace) world.getTileEntity(new BlockPos(x, y, z)));
- }else if (ID == ironFurnace) {
- return new GuiIronFurnace(player, (TileIronFurnace) world.getTileEntity(new BlockPos(x, y, z)));
- }else if (ID == recyclerID) {
- return new GuiRecycler(player, (TileRecycler) world.getTileEntity(new BlockPos(x, y, z)));
- }else if (ID == scrapboxinatorID) {
- return new GuiScrapboxinator(player, (TileScrapboxinator) world.getTileEntity(new BlockPos(x, y, z)));
- }else if (ID == batboxID) {
- return new GuiBatbox(player, (TileBatBox) world.getTileEntity(new BlockPos(x, y, z)));
- }
- return null;
- }
+ @Override
+ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
+ {
+ if (ID == thermalGeneratorID)
+ {
+ return new GuiThermalGenerator(player, (TileThermalGenerator) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == semifluidGeneratorID)
+ {
+ return new GuiSemifluidGenerator(player,
+ (TileSemifluidGenerator) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == gasTurbineID)
+ {
+ return new GuiGasTurbine(player, (TileGasTurbine) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == quantumTankID)
+ {
+ return new GuiQuantumTank(player, (TileQuantumTank) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == digitalChestID)
+ {
+ return new GuiDigitalChest(player, (TileDigitalChest) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == quantumChestID)
+ {
+ return new GuiQuantumChest(player, (TileQuantumChest) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == centrifugeID)
+ {
+ return new GuiCentrifuge(player, (TileCentrifuge) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == rollingMachineID)
+ {
+ return new GuiRollingMachine(player, (TileRollingMachine) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == blastFurnaceID)
+ {
+ return new GuiBlastFurnace(player, (TileBlastFurnace) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == alloySmelterID)
+ {
+ return new GuiAlloySmelter(player, (TileAlloySmelter) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == industrialGrinderID)
+ {
+ return new GuiIndustrialGrinder(player, (TileIndustrialGrinder) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == implosionCompresserID)
+ {
+ return new GuiImplosionCompressor(player,
+ (TileImplosionCompressor) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == matterfabID)
+ {
+ return new GuiMatterFabricator(player, (TileMatterFabricator) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == chunkloaderID)
+ {
+ return new GuiChunkLoader(player, (TileChunkLoader) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == assemblingmachineID)
+ {
+ return new GuiAssemblingMachine(player, (TileAssemblingMachine) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == dieselGeneratorID)
+ {
+ return new GuiDieselGenerator(player, (TileDieselGenerator) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == industrialElectrolyzerID)
+ {
+ return new GuiIndustrialElectrolyzer(player,
+ (TileIndustrialElectrolyzer) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == aesuID)
+ {
+ return new GuiAesu(player, (TileAesu) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == alloyFurnaceID)
+ {
+ return new GuiAlloyFurnace(player, (TileAlloyFurnace) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == sawMillID)
+ {
+ return new GuiIndustrialSawmill(player, (TileIndustrialSawmill) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == chemicalReactorID)
+ {
+ return new GuiChemicalReactor(player, (TileChemicalReactor) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == manuelID)
+ {
+ return new GuiManual();
+ } else if (ID == destructoPackID)
+ {
+ return new GuiDestructoPack(new ContainerDestructoPack(player));
+ } else if (ID == lesuID)
+ {
+ return new GuiLesu(player, (TileLesu) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == idsuID)
+ {
+ return new GuiIDSU(player, (TileIDSU) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == chargeBench)
+ {
+ return new GuiChargeBench(player, (TileChargeBench) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == fusionID)
+ {
+ return new GuiFusionReactor(player,
+ (TileEntityFusionController) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == vacuumFreezerID)
+ {
+ return new GuiVacuumFreezer(player, (TileVacuumFreezer) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == grinderID)
+ {
+ return new GuiGrinder(player, (TileGrinder) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == generatorID)
+ {
+ return new GuiGenerator(player, (TileGenerator) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == extractorID)
+ {
+ return new GuiExtractor(player, (TileExtractor) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == compressorID)
+ {
+ return new GuiCompressor(player, (TileCompressor) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == electricFurnaceID)
+ {
+ return new GuiElectricFurnace(player, (TileElectricFurnace) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == ironFurnace)
+ {
+ return new GuiIronFurnace(player, (TileIronFurnace) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == recyclerID)
+ {
+ return new GuiRecycler(player, (TileRecycler) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == scrapboxinatorID)
+ {
+ return new GuiScrapboxinator(player, (TileScrapboxinator) world.getTileEntity(new BlockPos(x, y, z)));
+ } else if (ID == batboxID)
+ {
+ return new GuiBatbox(player, (TileBatBox) world.getTileEntity(new BlockPos(x, y, z)));
+ }
+ return null;
+ }
}
diff --git a/src/main/java/techreborn/client/IconSupplier.java b/src/main/java/techreborn/client/IconSupplier.java
index f406996b7..b6802df9c 100644
--- a/src/main/java/techreborn/client/IconSupplier.java
+++ b/src/main/java/techreborn/client/IconSupplier.java
@@ -1,40 +1,51 @@
package techreborn.client;
//TODO recode for 1.8
-public class IconSupplier {
-// public static IIcon insulatedCopperCable;
-// public static IIcon copperCable;
-// public static IIcon goldCable;
-// public static IIcon insulatedGoldCable;
-// public static IIcon doubleInsulatedGoldCable;
-// public static IIcon ironCable;
-// public static IIcon insulatedIronCable;
-// public static IIcon doubleInsulatedIronCable;
-// public static IIcon trippleInsulatedIronCable;
-// public static IIcon glassFiberCable;
-// public static IIcon tinCable;
-// public static IIcon detectorCableBlock;
-// public static IIcon splitterCableBlock;
-// public static IIcon insulatedtinCableBlock;
+public class IconSupplier
+{
+ // public static IIcon insulatedCopperCable;
+ // public static IIcon copperCable;
+ // public static IIcon goldCable;
+ // public static IIcon insulatedGoldCable;
+ // public static IIcon doubleInsulatedGoldCable;
+ // public static IIcon ironCable;
+ // public static IIcon insulatedIronCable;
+ // public static IIcon doubleInsulatedIronCable;
+ // public static IIcon trippleInsulatedIronCable;
+ // public static IIcon glassFiberCable;
+ // public static IIcon tinCable;
+ // public static IIcon detectorCableBlock;
+ // public static IIcon splitterCableBlock;
+ // public static IIcon insulatedtinCableBlock;
-// @SubscribeEvent
-// public void onTextureStitch(TextureStitchEvent.Pre event) {
-// TextureMap reg = event.map;
-// if (reg.getTextureType() == 0) {
-// insulatedCopperCable = reg.registerIcon("ic2" + ":wiring/cable/blockCable");
-// copperCable = reg.registerIcon("ic2" + ":wiring/cable/blockCableO");
-// goldCable = reg.registerIcon("ic2" + ":wiring/cable/blockGoldCable");
-// insulatedGoldCable = reg.registerIcon("ic2" + ":wiring/cable/blockGoldCableI");
-// doubleInsulatedGoldCable = reg.registerIcon("ic2" + ":wiring/cable/blockGoldCableII");
-// ironCable = reg.registerIcon("ic2" + ":wiring/cable/blockIronCable");
-// insulatedIronCable = reg.registerIcon("ic2" + ":wiring/cable/blockIronCableI");
-// doubleInsulatedIronCable = reg.registerIcon("ic2" + ":wiring/cable/blockIronCableII");
-// trippleInsulatedIronCable = reg.registerIcon("ic2" + ":wiring/cable/blockIronCableIII");
-// glassFiberCable = reg.registerIcon("ic2" + ":wiring/cable/blockGlassCable");
-// tinCable = reg.registerIcon("ic2" + ":wiring/cable/blockTinCable");
-// detectorCableBlock = reg.registerIcon("ic2" + ":wiring/cable/blockDetectorCable");
-// splitterCableBlock = reg.registerIcon("ic2" + ":wiring/cable/blockSplitterCable");
-// insulatedtinCableBlock = reg.registerIcon("ic2" + ":wiring/cable/blockTinCableI");
-// }
-// }
+ // @SubscribeEvent
+ // public void onTextureStitch(TextureStitchEvent.Pre event) {
+ // TextureMap reg = event.map;
+ // if (reg.getTextureType() == 0) {
+ // insulatedCopperCable = reg.registerIcon("ic2" +
+ // ":wiring/cable/blockCable");
+ // copperCable = reg.registerIcon("ic2" + ":wiring/cable/blockCableO");
+ // goldCable = reg.registerIcon("ic2" + ":wiring/cable/blockGoldCable");
+ // insulatedGoldCable = reg.registerIcon("ic2" +
+ // ":wiring/cable/blockGoldCableI");
+ // doubleInsulatedGoldCable = reg.registerIcon("ic2" +
+ // ":wiring/cable/blockGoldCableII");
+ // ironCable = reg.registerIcon("ic2" + ":wiring/cable/blockIronCable");
+ // insulatedIronCable = reg.registerIcon("ic2" +
+ // ":wiring/cable/blockIronCableI");
+ // doubleInsulatedIronCable = reg.registerIcon("ic2" +
+ // ":wiring/cable/blockIronCableII");
+ // trippleInsulatedIronCable = reg.registerIcon("ic2" +
+ // ":wiring/cable/blockIronCableIII");
+ // glassFiberCable = reg.registerIcon("ic2" +
+ // ":wiring/cable/blockGlassCable");
+ // tinCable = reg.registerIcon("ic2" + ":wiring/cable/blockTinCable");
+ // detectorCableBlock = reg.registerIcon("ic2" +
+ // ":wiring/cable/blockDetectorCable");
+ // splitterCableBlock = reg.registerIcon("ic2" +
+ // ":wiring/cable/blockSplitterCable");
+ // insulatedtinCableBlock = reg.registerIcon("ic2" +
+ // ":wiring/cable/blockTinCableI");
+ // }
+ // }
}
diff --git a/src/main/java/techreborn/client/RegisterItemJsons.java b/src/main/java/techreborn/client/RegisterItemJsons.java
index c4fc8a503..463c0eaf4 100644
--- a/src/main/java/techreborn/client/RegisterItemJsons.java
+++ b/src/main/java/techreborn/client/RegisterItemJsons.java
@@ -5,16 +5,22 @@ import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import techreborn.init.ModBlocks;
-public class RegisterItemJsons {
- public static void registerModels() {
+public class RegisterItemJsons
+{
+ public static void registerModels()
+ {
registerItems();
registerBlocks();
}
- private static void registerItems() {
+ private static void registerItems()
+ {
}
- private static void registerBlocks() {
- Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(ModBlocks.ironFence), 0, new ModelResourceLocation("techreborn:ironFence", "inventory"));
+ private static void registerBlocks()
+ {
+ Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(
+ Item.getItemFromBlock(ModBlocks.ironFence), 0,
+ new ModelResourceLocation("techreborn:ironFence", "inventory"));
}
}
diff --git a/src/main/java/techreborn/client/StackToolTipEvent.java b/src/main/java/techreborn/client/StackToolTipEvent.java
index f5f810c71..c8cb99f34 100644
--- a/src/main/java/techreborn/client/StackToolTipEvent.java
+++ b/src/main/java/techreborn/client/StackToolTipEvent.java
@@ -1,61 +1,90 @@
package techreborn.client;
-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;
import reborncore.common.util.Color;
import techreborn.Core;
-public class StackToolTipEvent {
+import com.mojang.realmsclient.gui.ChatFormatting;
- @SubscribeEvent
- public void handleItemTooltipEvent(ItemTooltipEvent event) {
- if (event.itemStack.getItem() instanceof IListInfoProvider) {
- ((IListInfoProvider) event.itemStack.getItem()).addInfo(event.toolTip, false);
- } else if (event.itemStack.getItem() instanceof IEnergyInterfaceItem) {
- if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
- int percentage = percentage((int) ((IEnergyInterfaceItem) event.itemStack.getItem()).getMaxPower(event.itemStack), (int) ((IEnergyInterfaceItem) event.itemStack.getItem()).getEnergy(event.itemStack));
- ChatFormatting color;
- if (percentage <= 10) {
- color = ChatFormatting.RED;
- } else if (percentage >= 75) {
- color = ChatFormatting.GREEN;
- } else {
- color = ChatFormatting.YELLOW;
- }
- event.toolTip.add(color + "" + PowerSystem.getLocaliszedPower((int) ((IEnergyInterfaceItem) event.itemStack.getItem()).getEnergy(event.itemStack)) + ChatFormatting.LIGHT_PURPLE + " stored");
- event.toolTip.add(Color.GREEN + "" + PowerSystem.getLocaliszedPower((int) ((IEnergyInterfaceItem) event.itemStack.getItem()).getMaxPower(event.itemStack)) + ChatFormatting.LIGHT_PURPLE + " max");
- event.toolTip.add(ChatFormatting.GREEN + "" + percentage + "%" + ChatFormatting.LIGHT_PURPLE + " charged");
- event.toolTip.add(Color.GREEN + "" + PowerSystem.getLocaliszedPower((int) ((IEnergyInterfaceItem) event.itemStack.getItem()).getMaxTransfer(event.itemStack)) + ChatFormatting.LIGHT_PURPLE + " /tick in/out");
- }
- } else {
- try{
- Block block = Block.getBlockFromItem(event.itemStack.getItem());
- if (block != null && block instanceof BlockContainer && block.getClass().getCanonicalName().startsWith("techreborn.")) {
- TileEntity tile = block.createTileEntity(Minecraft.getMinecraft().theWorld, block.getDefaultState());
- if (tile instanceof IListInfoProvider) {
- ((IListInfoProvider) tile).addInfo(event.toolTip, false);
- }
- }
- } catch (NullPointerException e){
- Core.logHelper.debug("Failed to load info for " + event.itemStack.getDisplayName());
- }
- }
- }
+public class StackToolTipEvent
+{
+ @SubscribeEvent
+ public void handleItemTooltipEvent(ItemTooltipEvent event)
+ {
+ if (event.itemStack.getItem() instanceof IListInfoProvider)
+ {
+ ((IListInfoProvider) event.itemStack.getItem()).addInfo(event.toolTip, false);
+ } else if (event.itemStack.getItem() instanceof IEnergyInterfaceItem)
+ {
+ if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT))
+ {
+ int percentage = percentage(
+ (int) ((IEnergyInterfaceItem) event.itemStack.getItem()).getMaxPower(event.itemStack),
+ (int) ((IEnergyInterfaceItem) event.itemStack.getItem()).getEnergy(event.itemStack));
+ ChatFormatting color;
+ if (percentage <= 10)
+ {
+ color = ChatFormatting.RED;
+ } else if (percentage >= 75)
+ {
+ color = ChatFormatting.GREEN;
+ } else
+ {
+ color = ChatFormatting.YELLOW;
+ }
+ event.toolTip.add(color + ""
+ + PowerSystem.getLocaliszedPower(
+ (int) ((IEnergyInterfaceItem) event.itemStack.getItem()).getEnergy(event.itemStack))
+ + ChatFormatting.LIGHT_PURPLE + " stored");
+ event.toolTip.add(Color.GREEN + ""
+ + PowerSystem.getLocaliszedPower(
+ (int) ((IEnergyInterfaceItem) event.itemStack.getItem()).getMaxPower(event.itemStack))
+ + ChatFormatting.LIGHT_PURPLE + " max");
+ event.toolTip
+ .add(ChatFormatting.GREEN + "" + percentage + "%" + ChatFormatting.LIGHT_PURPLE + " charged");
+ event.toolTip.add(Color.GREEN + "" + PowerSystem.getLocaliszedPower(
+ (int) ((IEnergyInterfaceItem) event.itemStack.getItem()).getMaxTransfer(event.itemStack))
+ + ChatFormatting.LIGHT_PURPLE + " /tick in/out");
+ }
+ } else
+ {
+ try
+ {
+ Block block = Block.getBlockFromItem(event.itemStack.getItem());
+ if (block != null && block instanceof BlockContainer
+ && block.getClass().getCanonicalName().startsWith("techreborn."))
+ {
+ TileEntity tile = block.createTileEntity(Minecraft.getMinecraft().theWorld,
+ block.getDefaultState());
+ if (tile instanceof IListInfoProvider)
+ {
+ ((IListInfoProvider) tile).addInfo(event.toolTip, false);
+ }
+ }
+ } catch (NullPointerException e)
+ {
+ Core.logHelper.debug("Failed to load info for " + event.itemStack.getDisplayName());
+ }
+ }
+ }
- public int percentage(int MaxValue, int CurrentValue) {
- if (CurrentValue == 0)
- return 0;
- return (int) ((CurrentValue * 100.0f) / MaxValue);
- }
+ public int percentage(int MaxValue, int CurrentValue)
+ {
+ if (CurrentValue == 0)
+ return 0;
+ return (int) ((CurrentValue * 100.0f) / MaxValue);
+ }
}
diff --git a/src/main/java/techreborn/client/TechRebornCreativeTab.java b/src/main/java/techreborn/client/TechRebornCreativeTab.java
index c05e2a489..cb2e26e0b 100644
--- a/src/main/java/techreborn/client/TechRebornCreativeTab.java
+++ b/src/main/java/techreborn/client/TechRebornCreativeTab.java
@@ -4,16 +4,19 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import techreborn.init.ModBlocks;
-public class TechRebornCreativeTab extends CreativeTabs {
+public class TechRebornCreativeTab extends CreativeTabs
+{
- public static TechRebornCreativeTab instance = new TechRebornCreativeTab();
+ public static TechRebornCreativeTab instance = new TechRebornCreativeTab();
- public TechRebornCreativeTab() {
- super("techreborn");
- }
+ public TechRebornCreativeTab()
+ {
+ super("techreborn");
+ }
- @Override
- public Item getTabIconItem() {
- return Item.getItemFromBlock(ModBlocks.thermalGenerator);
- }
+ @Override
+ public Item getTabIconItem()
+ {
+ return Item.getItemFromBlock(ModBlocks.thermalGenerator);
+ }
}
diff --git a/src/main/java/techreborn/client/TechRebornCreativeTabMisc.java b/src/main/java/techreborn/client/TechRebornCreativeTabMisc.java
index f51eece6b..ff4925d92 100644
--- a/src/main/java/techreborn/client/TechRebornCreativeTabMisc.java
+++ b/src/main/java/techreborn/client/TechRebornCreativeTabMisc.java
@@ -4,17 +4,20 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import techreborn.init.ModItems;
-public class TechRebornCreativeTabMisc extends CreativeTabs {
+public class TechRebornCreativeTabMisc extends CreativeTabs
+{
- public static TechRebornCreativeTabMisc instance = new TechRebornCreativeTabMisc();
+ public static TechRebornCreativeTabMisc instance = new TechRebornCreativeTabMisc();
- public TechRebornCreativeTabMisc() {
- super("techreborn");
- }
+ public TechRebornCreativeTabMisc()
+ {
+ super("techreborn");
+ }
- @Override
- public Item getTabIconItem() {
- return ModItems.cells;
- }
+ @Override
+ public Item getTabIconItem()
+ {
+ return ModItems.cells;
+ }
}
diff --git a/src/main/java/techreborn/client/VersionCheckerClient.java b/src/main/java/techreborn/client/VersionCheckerClient.java
index 839e69d4e..e02a8fcdb 100644
--- a/src/main/java/techreborn/client/VersionCheckerClient.java
+++ b/src/main/java/techreborn/client/VersionCheckerClient.java
@@ -1,5 +1,8 @@
package techreborn.client;
+import java.awt.*;
+import java.util.ArrayList;
+
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.GuiScreenEvent;
import net.minecraftforge.fml.client.GuiModList;
@@ -7,39 +10,46 @@ 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;
-public class VersionCheckerClient {
- ResourceLocation texture;
+ public VersionCheckerClient()
+ {
+ texture = new ResourceLocation("textures/gui/demo_background.png");
+ }
- public VersionCheckerClient() {
- texture = new ResourceLocation("textures/gui/demo_background.png");
- }
-
- @SubscribeEvent
- public void drawGui(GuiScreenEvent.DrawScreenEvent event) {
- if (event.gui instanceof GuiModList) {
- ArrayList changeLog = Core.INSTANCE.versionChecker.getChangeLogSinceCurrentVersion();
- String s = "";
- if (Core.INSTANCE.versionChecker.isChecking) {
- s = "Checking for update...";
- } else if (Core.INSTANCE.versionChecker.isLatestVersion()) {
- s = "You have the latest version of TechReborn";
- } else {
- s = "There is an update for TechReborn with " + changeLog.size() + " changes.";
- }
- event.gui.drawString(event.gui.mc.fontRendererObj, s, 10, 5, Color.white.getRGB());
- if (!Core.INSTANCE.versionChecker.isLatestVersion()) {
- if (event.mouseY < 20) {
- GuiUtil.drawTooltipBox(5, 15, 330, changeLog.size() * 10 + 5);
- int y = 20;
- for (String change : changeLog) {
- event.gui.drawString(event.gui.mc.fontRendererObj, change, 10, y, Color.white.getRGB());
- y += 10;
- }
- }
- }
- }
- }
+ @SubscribeEvent
+ public void drawGui(GuiScreenEvent.DrawScreenEvent event)
+ {
+ if (event.gui instanceof GuiModList)
+ {
+ ArrayList changeLog = Core.INSTANCE.versionChecker.getChangeLogSinceCurrentVersion();
+ String s = "";
+ if (Core.INSTANCE.versionChecker.isChecking)
+ {
+ s = "Checking for update...";
+ } else if (Core.INSTANCE.versionChecker.isLatestVersion())
+ {
+ s = "You have the latest version of TechReborn";
+ } else
+ {
+ s = "There is an update for TechReborn with " + changeLog.size() + " changes.";
+ }
+ event.gui.drawString(event.gui.mc.fontRendererObj, s, 10, 5, Color.white.getRGB());
+ if (!Core.INSTANCE.versionChecker.isLatestVersion())
+ {
+ if (event.mouseY < 20)
+ {
+ GuiUtil.drawTooltipBox(5, 15, 330, changeLog.size() * 10 + 5);
+ int y = 20;
+ for (String change : changeLog)
+ {
+ event.gui.drawString(event.gui.mc.fontRendererObj, change, 10, y, Color.white.getRGB());
+ y += 10;
+ }
+ }
+ }
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerAlloyFurnace.java b/src/main/java/techreborn/client/container/ContainerAlloyFurnace.java
index cd0fb88a3..806d45acb 100644
--- a/src/main/java/techreborn/client/container/ContainerAlloyFurnace.java
+++ b/src/main/java/techreborn/client/container/ContainerAlloyFurnace.java
@@ -7,88 +7,101 @@ import reborncore.client.gui.SlotOutput;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.TileAlloyFurnace;
-public class ContainerAlloyFurnace extends RebornContainer {
+public class ContainerAlloyFurnace extends RebornContainer
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileAlloyFurnace tile;
+ TileAlloyFurnace tile;
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- public int tickTime;
+ public int tickTime;
- public ContainerAlloyFurnace(TileAlloyFurnace tileAlloyfurnace,
- EntityPlayer player) {
- tile = tileAlloyfurnace;
- this.player = player;
+ public ContainerAlloyFurnace(TileAlloyFurnace tileAlloyfurnace, EntityPlayer player)
+ {
+ tile = tileAlloyfurnace;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 0, 47, 17));
- this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 1, 65, 17));
- // outputs
- this.addSlotToContainer(new SlotOutput(tileAlloyfurnace.inventory, 2, 116, 35));
- // Fuel
- this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 3, 56, 53));
+ // input
+ this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 0, 47, 17));
+ this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 1, 65, 17));
+ // outputs
+ this.addSlotToContainer(new SlotOutput(tileAlloyfurnace.inventory, 2, 116, 35));
+ // Fuel
+ this.addSlotToContainer(new Slot(tileAlloyfurnace.inventory, 3, 56, 53));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- int currentItemBurnTime;
- int burnTime;
- int cookTime;
+ int currentItemBurnTime;
+ int burnTime;
+ int cookTime;
- @Override
- public void onCraftGuiOpened(ICrafting crafting) {
- super.onCraftGuiOpened(crafting);
- crafting.sendProgressBarUpdate(this, 0, tile.currentItemBurnTime);
- crafting.sendProgressBarUpdate(this, 1, tile.burnTime);
- crafting.sendProgressBarUpdate(this, 2, tile.cookTime);
- }
+ @Override
+ public void onCraftGuiOpened(ICrafting crafting)
+ {
+ super.onCraftGuiOpened(crafting);
+ crafting.sendProgressBarUpdate(this, 0, tile.currentItemBurnTime);
+ crafting.sendProgressBarUpdate(this, 1, tile.burnTime);
+ crafting.sendProgressBarUpdate(this, 2, tile.cookTime);
+ }
- @Override
- public void detectAndSendChanges() {
- for (int i = 0; i < this.crafters.size(); i++) {
- ICrafting crafting = (ICrafting) this.crafters.get(i);
- if (this.currentItemBurnTime != tile.currentItemBurnTime) {
- crafting.sendProgressBarUpdate(this, 0, tile.currentItemBurnTime);
- }
- if (this.burnTime != tile.burnTime) {
- crafting.sendProgressBarUpdate(this, 1, tile.burnTime);
- }
- if (this.cookTime != tile.cookTime) {
- crafting.sendProgressBarUpdate(this, 2, tile.cookTime);
- }
- }
- super.detectAndSendChanges();
- }
+ @Override
+ public void detectAndSendChanges()
+ {
+ for (int i = 0; i < this.crafters.size(); i++)
+ {
+ ICrafting crafting = (ICrafting) this.crafters.get(i);
+ if (this.currentItemBurnTime != tile.currentItemBurnTime)
+ {
+ crafting.sendProgressBarUpdate(this, 0, tile.currentItemBurnTime);
+ }
+ if (this.burnTime != tile.burnTime)
+ {
+ crafting.sendProgressBarUpdate(this, 1, tile.burnTime);
+ }
+ if (this.cookTime != tile.cookTime)
+ {
+ crafting.sendProgressBarUpdate(this, 2, tile.cookTime);
+ }
+ }
+ super.detectAndSendChanges();
+ }
- @Override
- public void updateProgressBar(int id, int value) {
- super.updateProgressBar(id, value);
- if (id == 0) {
- this.currentItemBurnTime = value;
- } else if (id == 1) {
- this.burnTime = value;
- } else if (id == 2) {
- this.cookTime = value;
- }
- this.tile.currentItemBurnTime = this.currentItemBurnTime;
- this.tile.burnTime = this.burnTime;
- this.tile.cookTime = this.cookTime;
- }
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ super.updateProgressBar(id, value);
+ if (id == 0)
+ {
+ this.currentItemBurnTime = value;
+ } else if (id == 1)
+ {
+ this.burnTime = value;
+ } else if (id == 2)
+ {
+ this.cookTime = value;
+ }
+ this.tile.currentItemBurnTime = this.currentItemBurnTime;
+ this.tile.burnTime = this.burnTime;
+ this.tile.cookTime = this.cookTime;
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerAlloySmelter.java b/src/main/java/techreborn/client/container/ContainerAlloySmelter.java
index 1556e9473..c3299a430 100644
--- a/src/main/java/techreborn/client/container/ContainerAlloySmelter.java
+++ b/src/main/java/techreborn/client/container/ContainerAlloySmelter.java
@@ -6,52 +6,54 @@ import reborncore.client.gui.SlotOutput;
import techreborn.api.SlotUpgrade;
import techreborn.tiles.TileAlloySmelter;
-public class ContainerAlloySmelter extends ContainerCrafting {
+public class ContainerAlloySmelter extends ContainerCrafting
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileAlloySmelter tile;
+ TileAlloySmelter tile;
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- public int tickTime;
+ public int tickTime;
- public ContainerAlloySmelter(TileAlloySmelter tileAlloysmelter,
- EntityPlayer player) {
- super(tileAlloysmelter.crafter);
- tile = tileAlloysmelter;
- this.player = player;
+ public ContainerAlloySmelter(TileAlloySmelter tileAlloysmelter, EntityPlayer player)
+ {
+ super(tileAlloysmelter.crafter);
+ tile = tileAlloysmelter;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 0, 47, 17));
- this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 1, 65, 17));
- // outputs
- this.addSlotToContainer(new SlotOutput(tileAlloysmelter.inventory, 2, 116, 35));
- // battery
- this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 3, 56, 53));
- // upgrades
- this.addSlotToContainer(new SlotUpgrade(tileAlloysmelter.inventory, 4, 152, 8));
- this.addSlotToContainer(new SlotUpgrade(tileAlloysmelter.inventory, 5, 152, 26));
- this.addSlotToContainer(new SlotUpgrade(tileAlloysmelter.inventory, 6, 152, 44));
- this.addSlotToContainer(new SlotUpgrade(tileAlloysmelter.inventory, 7, 152, 62));
+ // input
+ this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 0, 47, 17));
+ this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 1, 65, 17));
+ // outputs
+ this.addSlotToContainer(new SlotOutput(tileAlloysmelter.inventory, 2, 116, 35));
+ // battery
+ this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 3, 56, 53));
+ // upgrades
+ this.addSlotToContainer(new SlotUpgrade(tileAlloysmelter.inventory, 4, 152, 8));
+ this.addSlotToContainer(new SlotUpgrade(tileAlloysmelter.inventory, 5, 152, 26));
+ this.addSlotToContainer(new SlotUpgrade(tileAlloysmelter.inventory, 6, 152, 44));
+ this.addSlotToContainer(new SlotUpgrade(tileAlloysmelter.inventory, 7, 152, 62));
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
-
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerAssemblingMachine.java b/src/main/java/techreborn/client/container/ContainerAssemblingMachine.java
index 670c9dc24..8bc6c6e8a 100644
--- a/src/main/java/techreborn/client/container/ContainerAssemblingMachine.java
+++ b/src/main/java/techreborn/client/container/ContainerAssemblingMachine.java
@@ -6,51 +6,54 @@ import reborncore.client.gui.SlotOutput;
import techreborn.api.SlotUpgrade;
import techreborn.tiles.TileAssemblingMachine;
-public class ContainerAssemblingMachine extends ContainerCrafting {
+public class ContainerAssemblingMachine extends ContainerCrafting
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileAssemblingMachine tile;
+ TileAssemblingMachine tile;
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- public int tickTime;
+ public int tickTime;
- public ContainerAssemblingMachine(TileAssemblingMachine tileAssemblingMachine,
- EntityPlayer player) {
- super(tileAssemblingMachine.crafter);
- tile = tileAssemblingMachine;
- this.player = player;
+ public ContainerAssemblingMachine(TileAssemblingMachine tileAssemblingMachine, EntityPlayer player)
+ {
+ super(tileAssemblingMachine.crafter);
+ tile = tileAssemblingMachine;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 0, 47, 17));
- this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 1, 65, 17));
- // outputs
- this.addSlotToContainer(new SlotOutput(tileAssemblingMachine.inventory, 2, 116, 35));
- // power
- this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 3, 56, 53));
- // upgrades
- this.addSlotToContainer(new SlotUpgrade(tileAssemblingMachine.inventory, 4, 152, 8));
- this.addSlotToContainer(new SlotUpgrade(tileAssemblingMachine.inventory, 5, 152, 26));
- this.addSlotToContainer(new SlotUpgrade(tileAssemblingMachine.inventory, 6, 152, 44));
- this.addSlotToContainer(new SlotUpgrade(tileAssemblingMachine.inventory, 7, 152, 62));
+ // input
+ this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 0, 47, 17));
+ this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 1, 65, 17));
+ // outputs
+ this.addSlotToContainer(new SlotOutput(tileAssemblingMachine.inventory, 2, 116, 35));
+ // power
+ this.addSlotToContainer(new Slot(tileAssemblingMachine.inventory, 3, 56, 53));
+ // upgrades
+ this.addSlotToContainer(new SlotUpgrade(tileAssemblingMachine.inventory, 4, 152, 8));
+ this.addSlotToContainer(new SlotUpgrade(tileAssemblingMachine.inventory, 5, 152, 26));
+ this.addSlotToContainer(new SlotUpgrade(tileAssemblingMachine.inventory, 6, 152, 44));
+ this.addSlotToContainer(new SlotUpgrade(tileAssemblingMachine.inventory, 7, 152, 62));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerBatbox.java b/src/main/java/techreborn/client/container/ContainerBatbox.java
index 80b38d06b..1a7174473 100644
--- a/src/main/java/techreborn/client/container/ContainerBatbox.java
+++ b/src/main/java/techreborn/client/container/ContainerBatbox.java
@@ -3,82 +3,92 @@ package techreborn.client.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
-import net.minecraft.inventory.SlotFurnaceFuel;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.common.container.RebornContainer;
-import techreborn.tiles.generator.TileGenerator;
import techreborn.tiles.storage.TileBatBox;
-public class ContainerBatbox extends RebornContainer {
+public class ContainerBatbox extends RebornContainer
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileBatBox tile;
+ TileBatBox tile;
- public int burnTime = 0;
- public int totalBurnTime = 0;
- public int energy;
+ public int burnTime = 0;
+ public int totalBurnTime = 0;
+ public int energy;
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- public int tickTime;
+ public int tickTime;
- public ContainerBatbox(TileBatBox tile, EntityPlayer player) {
- super();
- this.tile = tile;
- this.player = player;
+ public ContainerBatbox(TileBatBox tile, EntityPlayer player)
+ {
+ super();
+ this.tile = tile;
+ this.player = player;
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ @Override
+ public void detectAndSendChanges()
+ {
+ super.detectAndSendChanges();
+ for (int i = 0; i < this.crafters.size(); i++)
+ {
+ ICrafting icrafting = (ICrafting) this.crafters.get(i);
+ if (this.energy != (int) tile.getEnergy())
+ {
+ icrafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
+ }
+ }
+ }
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- for (int i = 0; i < this.crafters.size(); i++) {
- ICrafting icrafting = (ICrafting) this.crafters.get(i);
- if (this.energy != (int) tile.getEnergy()) {
- icrafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
- }
- }
- }
+ @Override
+ public void onCraftGuiOpened(ICrafting crafting)
+ {
+ super.onCraftGuiOpened(crafting);
+ crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
+ }
- @Override
- public void onCraftGuiOpened(ICrafting crafting) {
- super.onCraftGuiOpened(crafting);
- crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 0)
+ {
+ this.burnTime = value;
+ } else if (id == 1)
+ {
+ this.totalBurnTime = value;
+ } else if (id == 2)
+ {
+ this.energy = value;
+ }
+ this.tile.setEnergy(energy);
+ }
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 0) {
- this.burnTime = value;
- } else if (id == 1) {
- this.totalBurnTime = value;
- } else if (id == 2) {
- this.energy = value;
- }
- this.tile.setEnergy(energy);
- }
-
- public int getScaledBurnTime(int i) {
- return (int) (((float) burnTime / (float) totalBurnTime) * i);
- }
+ public int getScaledBurnTime(int i)
+ {
+ return (int) (((float) burnTime / (float) totalBurnTime) * i);
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerBlastFurnace.java b/src/main/java/techreborn/client/container/ContainerBlastFurnace.java
index 32f95c522..0752d39bc 100644
--- a/src/main/java/techreborn/client/container/ContainerBlastFurnace.java
+++ b/src/main/java/techreborn/client/container/ContainerBlastFurnace.java
@@ -6,71 +6,84 @@ import net.minecraft.inventory.Slot;
import reborncore.client.gui.SlotOutput;
import techreborn.tiles.TileBlastFurnace;
-public class ContainerBlastFurnace extends ContainerCrafting {
+public class ContainerBlastFurnace extends ContainerCrafting
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileBlastFurnace tile;
+ TileBlastFurnace tile;
- public int heat;
+ public int heat;
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- public int tickTime;
+ public int tickTime;
- public ContainerBlastFurnace(TileBlastFurnace tileblastfurnace,
- EntityPlayer player) {
- super(tileblastfurnace.crafter);
- tile = tileblastfurnace;
- this.player = player;
+ public ContainerBlastFurnace(TileBlastFurnace tileblastfurnace, EntityPlayer player)
+ {
+ super(tileblastfurnace.crafter);
+ tile = tileblastfurnace;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileblastfurnace.inventory, 0, 40, 25));//Input 1
- this.addSlotToContainer(new Slot(tileblastfurnace.inventory, 1, 40, 43));//Input 2
- // outputs
- this.addSlotToContainer(new SlotOutput(tileblastfurnace.inventory, 2, 100, 35));//Output 1
- this.addSlotToContainer(new SlotOutput(tileblastfurnace.inventory, 3, 118, 35));//Output 2
+ // input
+ this.addSlotToContainer(new Slot(tileblastfurnace.inventory, 0, 40, 25));// Input
+ // 1
+ this.addSlotToContainer(new Slot(tileblastfurnace.inventory, 1, 40, 43));// Input
+ // 2
+ // outputs
+ this.addSlotToContainer(new SlotOutput(tileblastfurnace.inventory, 2, 100, 35));// Output
+ // 1
+ this.addSlotToContainer(new SlotOutput(tileblastfurnace.inventory, 3, 118, 35));// Output
+ // 2
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- for (int i = 0; i < this.crafters.size(); i++) {
- ICrafting icrafting = (ICrafting) this.crafters.get(i);
- if (this.heat != tile.getHeat()) {
- icrafting.sendProgressBarUpdate(this, 10, tile.getHeat());
- }
- }
- }
+ @Override
+ public void detectAndSendChanges()
+ {
+ super.detectAndSendChanges();
+ for (int i = 0; i < this.crafters.size(); i++)
+ {
+ ICrafting icrafting = (ICrafting) this.crafters.get(i);
+ if (this.heat != tile.getHeat())
+ {
+ icrafting.sendProgressBarUpdate(this, 10, tile.getHeat());
+ }
+ }
+ }
- @Override
- public void onCraftGuiOpened(ICrafting crafting) {
- super.onCraftGuiOpened(crafting);
- crafting.sendProgressBarUpdate(this, 10, tile.getHeat());
- }
+ @Override
+ public void onCraftGuiOpened(ICrafting crafting)
+ {
+ super.onCraftGuiOpened(crafting);
+ crafting.sendProgressBarUpdate(this, 10, tile.getHeat());
+ }
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 10) {
- this.heat = value;
- }
- super.updateProgressBar(id, value);
- }
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 10)
+ {
+ this.heat = value;
+ }
+ super.updateProgressBar(id, value);
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerCentrifuge.java b/src/main/java/techreborn/client/container/ContainerCentrifuge.java
index 589b71b25..52d773644 100644
--- a/src/main/java/techreborn/client/container/ContainerCentrifuge.java
+++ b/src/main/java/techreborn/client/container/ContainerCentrifuge.java
@@ -6,53 +6,57 @@ import reborncore.client.gui.SlotOutput;
import techreborn.api.SlotUpgrade;
import techreborn.tiles.TileCentrifuge;
-public class ContainerCentrifuge extends ContainerCrafting {
+public class ContainerCentrifuge extends ContainerCrafting
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileCentrifuge tile;
+ TileCentrifuge tile;
- public int tickTime;
+ public int tickTime;
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- public ContainerCentrifuge(TileCentrifuge tileCentrifuge, EntityPlayer player) {
- super(tileCentrifuge.crafter);
- tile = tileCentrifuge;
- this.player = player;
+ public ContainerCentrifuge(TileCentrifuge tileCentrifuge, EntityPlayer player)
+ {
+ super(tileCentrifuge.crafter);
+ tile = tileCentrifuge;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 0, 80, 35));
- this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 1, 50, 5));
- // outputs
- this.addSlotToContainer(new SlotOutput(tileCentrifuge.inventory, 2, 80, 5));
- this.addSlotToContainer(new SlotOutput(tileCentrifuge.inventory, 3, 110, 35));
- this.addSlotToContainer(new SlotOutput(tileCentrifuge.inventory, 4, 80, 65));
- this.addSlotToContainer(new SlotOutput(tileCentrifuge.inventory, 5, 50, 35));
- // battery
- this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 6, 8, 51));
- // upgrades
- this.addSlotToContainer(new SlotUpgrade(tileCentrifuge.inventory, 7, 152, 8));
- this.addSlotToContainer(new SlotUpgrade(tileCentrifuge.inventory, 8, 152, 26));
- this.addSlotToContainer(new SlotUpgrade(tileCentrifuge.inventory, 9, 152, 44));
- this.addSlotToContainer(new SlotUpgrade(tileCentrifuge.inventory, 10, 152, 62));
+ // input
+ this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 0, 80, 35));
+ this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 1, 50, 5));
+ // outputs
+ this.addSlotToContainer(new SlotOutput(tileCentrifuge.inventory, 2, 80, 5));
+ this.addSlotToContainer(new SlotOutput(tileCentrifuge.inventory, 3, 110, 35));
+ this.addSlotToContainer(new SlotOutput(tileCentrifuge.inventory, 4, 80, 65));
+ this.addSlotToContainer(new SlotOutput(tileCentrifuge.inventory, 5, 50, 35));
+ // battery
+ this.addSlotToContainer(new Slot(tileCentrifuge.inventory, 6, 8, 51));
+ // upgrades
+ this.addSlotToContainer(new SlotUpgrade(tileCentrifuge.inventory, 7, 152, 8));
+ this.addSlotToContainer(new SlotUpgrade(tileCentrifuge.inventory, 8, 152, 26));
+ this.addSlotToContainer(new SlotUpgrade(tileCentrifuge.inventory, 9, 152, 44));
+ this.addSlotToContainer(new SlotUpgrade(tileCentrifuge.inventory, 10, 152, 62));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerChargeBench.java b/src/main/java/techreborn/client/container/ContainerChargeBench.java
index 931b1ab99..52e391d8c 100644
--- a/src/main/java/techreborn/client/container/ContainerChargeBench.java
+++ b/src/main/java/techreborn/client/container/ContainerChargeBench.java
@@ -5,41 +5,47 @@ import net.minecraft.inventory.Slot;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.TileChargeBench;
-public class ContainerChargeBench extends RebornContainer {
+public class ContainerChargeBench extends RebornContainer
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileChargeBench tile;
+ TileChargeBench tile;
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- public int tickTime;
+ public int tickTime;
- public ContainerChargeBench(TileChargeBench tileChargeBench, EntityPlayer player) {
- tile = tileChargeBench;
- this.player = player;
+ public ContainerChargeBench(TileChargeBench tileChargeBench, EntityPlayer player)
+ {
+ tile = tileChargeBench;
+ this.player = player;
- this.addSlotToContainer(new Slot(tileChargeBench.inventory, 0, 62, 21));
- this.addSlotToContainer(new Slot(tileChargeBench.inventory, 1, 80, 21));
- this.addSlotToContainer(new Slot(tileChargeBench.inventory, 2, 98, 21));
- this.addSlotToContainer(new Slot(tileChargeBench.inventory, 3, 62, 39));
- this.addSlotToContainer(new Slot(tileChargeBench.inventory, 4, 80, 39));
- this.addSlotToContainer(new Slot(tileChargeBench.inventory, 5, 98, 39));
+ this.addSlotToContainer(new Slot(tileChargeBench.inventory, 0, 62, 21));
+ this.addSlotToContainer(new Slot(tileChargeBench.inventory, 1, 80, 21));
+ this.addSlotToContainer(new Slot(tileChargeBench.inventory, 2, 98, 21));
+ this.addSlotToContainer(new Slot(tileChargeBench.inventory, 3, 62, 39));
+ this.addSlotToContainer(new Slot(tileChargeBench.inventory, 4, 80, 39));
+ this.addSlotToContainer(new Slot(tileChargeBench.inventory, 5, 98, 39));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerChemicalReactor.java b/src/main/java/techreborn/client/container/ContainerChemicalReactor.java
index e61e44ded..05e6cb819 100644
--- a/src/main/java/techreborn/client/container/ContainerChemicalReactor.java
+++ b/src/main/java/techreborn/client/container/ContainerChemicalReactor.java
@@ -6,51 +6,54 @@ import reborncore.client.gui.SlotOutput;
import techreborn.api.SlotUpgrade;
import techreborn.tiles.TileChemicalReactor;
-public class ContainerChemicalReactor extends ContainerCrafting {
+public class ContainerChemicalReactor extends ContainerCrafting
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileChemicalReactor tile;
+ TileChemicalReactor tile;
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- public int tickTime;
+ public int tickTime;
- public ContainerChemicalReactor(TileChemicalReactor tilechemicalReactor,
- EntityPlayer player) {
- super(tilechemicalReactor.crafter);
- tile = tilechemicalReactor;
- this.player = player;
+ public ContainerChemicalReactor(TileChemicalReactor tilechemicalReactor, EntityPlayer player)
+ {
+ super(tilechemicalReactor.crafter);
+ tile = tilechemicalReactor;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 0, 70, 21));
- this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 1, 90, 21));
- // outputs
- this.addSlotToContainer(new SlotOutput(tilechemicalReactor.inventory, 2, 80, 51));
- // battery
- this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 3, 8, 51));
- // upgrades
- this.addSlotToContainer(new SlotUpgrade(tilechemicalReactor.inventory, 4, 152, 8));
- this.addSlotToContainer(new SlotUpgrade(tilechemicalReactor.inventory, 5, 152, 26));
- this.addSlotToContainer(new SlotUpgrade(tilechemicalReactor.inventory, 6, 152, 44));
- this.addSlotToContainer(new SlotUpgrade(tilechemicalReactor.inventory, 7, 152, 62));
+ // input
+ this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 0, 70, 21));
+ this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 1, 90, 21));
+ // outputs
+ this.addSlotToContainer(new SlotOutput(tilechemicalReactor.inventory, 2, 80, 51));
+ // battery
+ this.addSlotToContainer(new Slot(tilechemicalReactor.inventory, 3, 8, 51));
+ // upgrades
+ this.addSlotToContainer(new SlotUpgrade(tilechemicalReactor.inventory, 4, 152, 8));
+ this.addSlotToContainer(new SlotUpgrade(tilechemicalReactor.inventory, 5, 152, 26));
+ this.addSlotToContainer(new SlotUpgrade(tilechemicalReactor.inventory, 6, 152, 44));
+ this.addSlotToContainer(new SlotUpgrade(tilechemicalReactor.inventory, 7, 152, 62));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerChunkloader.java b/src/main/java/techreborn/client/container/ContainerChunkloader.java
index de27e9aeb..3042f220b 100644
--- a/src/main/java/techreborn/client/container/ContainerChunkloader.java
+++ b/src/main/java/techreborn/client/container/ContainerChunkloader.java
@@ -5,33 +5,36 @@ import net.minecraft.inventory.Slot;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.TileChunkLoader;
-public class ContainerChunkloader extends RebornContainer {
+public class ContainerChunkloader extends RebornContainer
+{
- EntityPlayer player;
+ EntityPlayer player;
+ public ContainerChunkloader(TileChunkLoader tilechunkloader, EntityPlayer player)
+ {
+ this.player = player;
- public ContainerChunkloader(TileChunkLoader tilechunkloader, EntityPlayer player) {
- this.player = player;
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
+ }
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer p_75145_1_)
+ {
+ return true;
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerCompressor.java b/src/main/java/techreborn/client/container/ContainerCompressor.java
index 427a85aa7..5fcee1e46 100644
--- a/src/main/java/techreborn/client/container/ContainerCompressor.java
+++ b/src/main/java/techreborn/client/container/ContainerCompressor.java
@@ -2,53 +2,54 @@ package techreborn.client.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Slot;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.client.gui.SlotOutput;
import techreborn.api.SlotUpgrade;
import techreborn.tiles.teir1.TileCompressor;
-public class ContainerCompressor extends ContainerCrafting {
+public class ContainerCompressor extends ContainerCrafting
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileCompressor tile;
+ TileCompressor tile;
- public int connectionStatus;
+ public int connectionStatus;
- public ContainerCompressor(TileCompressor tileGrinder, EntityPlayer player) {
- super(tileGrinder.crafter);
- tile = tileGrinder;
- this.player = player;
+ public ContainerCompressor(TileCompressor tileGrinder, EntityPlayer player)
+ {
+ super(tileGrinder.crafter);
+ tile = tileGrinder;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
- this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
+ // input
+ this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
+ this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
+ // upgrades
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 2, 152, 8));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 3, 152, 26));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 4, 152, 44));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 5, 152, 62));
- // upgrades
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 2, 152, 8));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 3, 152, 26));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 4, 152, 44));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 5, 152, 62));
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer p_75145_1_)
+ {
+ return true;
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerCrafting.java b/src/main/java/techreborn/client/container/ContainerCrafting.java
index 6eb909f3c..f4b54ed2f 100644
--- a/src/main/java/techreborn/client/container/ContainerCrafting.java
+++ b/src/main/java/techreborn/client/container/ContainerCrafting.java
@@ -6,58 +6,71 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.common.container.RebornContainer;
import techreborn.api.recipe.RecipeCrafter;
-public abstract class ContainerCrafting extends RebornContainer {
+public abstract class ContainerCrafting extends RebornContainer
+{
- RecipeCrafter crafter;
+ RecipeCrafter crafter;
- int currentTickTime = 0;
- int currentNeededTicks = 0;
- int energy;
+ int currentTickTime = 0;
+ int currentNeededTicks = 0;
+ int energy;
- public ContainerCrafting(RecipeCrafter crafter) {
- this.crafter = crafter;
- }
+ public ContainerCrafting(RecipeCrafter crafter)
+ {
+ this.crafter = crafter;
+ }
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- for (int i = 0; i < this.crafters.size(); i++) {
- ICrafting icrafting = (ICrafting) this.crafters.get(i);
- if (this.currentTickTime != crafter.currentTickTime || crafter.currentTickTime == -1) {
- icrafting.sendProgressBarUpdate(this, 0, crafter.currentTickTime);
- }
- if (this.currentNeededTicks != crafter.currentNeededTicks) {
- icrafting.sendProgressBarUpdate(this, 1, crafter.currentNeededTicks);
- }
- if (this.energy != (int) crafter.energy.getEnergy()) {
- icrafting.sendProgressBarUpdate(this, 2, (int) crafter.energy.getEnergy());
- }
- }
- }
+ @Override
+ public void detectAndSendChanges()
+ {
+ super.detectAndSendChanges();
+ for (int i = 0; i < this.crafters.size(); i++)
+ {
+ ICrafting icrafting = (ICrafting) this.crafters.get(i);
+ if (this.currentTickTime != crafter.currentTickTime || crafter.currentTickTime == -1)
+ {
+ icrafting.sendProgressBarUpdate(this, 0, crafter.currentTickTime);
+ }
+ if (this.currentNeededTicks != crafter.currentNeededTicks)
+ {
+ icrafting.sendProgressBarUpdate(this, 1, crafter.currentNeededTicks);
+ }
+ if (this.energy != (int) crafter.energy.getEnergy())
+ {
+ icrafting.sendProgressBarUpdate(this, 2, (int) crafter.energy.getEnergy());
+ }
+ }
+ }
- @Override
- public void onCraftGuiOpened(ICrafting crafting) {
- super.onCraftGuiOpened(crafting);
- crafting.sendProgressBarUpdate(this, 0, crafter.currentTickTime);
- crafting.sendProgressBarUpdate(this, 1, crafter.currentNeededTicks);
- crafting.sendProgressBarUpdate(this, 2, (int) crafter.energy.getEnergy());
- }
+ @Override
+ public void onCraftGuiOpened(ICrafting crafting)
+ {
+ super.onCraftGuiOpened(crafting);
+ crafting.sendProgressBarUpdate(this, 0, crafter.currentTickTime);
+ crafting.sendProgressBarUpdate(this, 1, crafter.currentNeededTicks);
+ crafting.sendProgressBarUpdate(this, 2, (int) crafter.energy.getEnergy());
+ }
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 0) {
- this.currentTickTime = value;
- if(this.currentTickTime == -1){
- this.currentTickTime = 0;
- }
- } else if (id == 1) {
- this.currentNeededTicks = value;
- } else if (id == 2) {
- this.energy = value;
- }
- this.crafter.currentTickTime = currentTickTime;
- this.crafter.currentNeededTicks = currentNeededTicks;
- this.crafter.energy.setEnergy(energy);
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 0)
+ {
+ this.currentTickTime = value;
+ if (this.currentTickTime == -1)
+ {
+ this.currentTickTime = 0;
+ }
+ } else if (id == 1)
+ {
+ this.currentNeededTicks = value;
+ } else if (id == 2)
+ {
+ this.energy = value;
+ }
+ this.crafter.currentTickTime = currentTickTime;
+ this.crafter.currentNeededTicks = currentNeededTicks;
+ this.crafter.energy.setEnergy(energy);
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerDestructoPack.java b/src/main/java/techreborn/client/container/ContainerDestructoPack.java
index 093e4a8e0..cb0b5eb0d 100644
--- a/src/main/java/techreborn/client/container/ContainerDestructoPack.java
+++ b/src/main/java/techreborn/client/container/ContainerDestructoPack.java
@@ -8,37 +8,42 @@ import reborncore.common.container.RebornContainer;
import reborncore.common.util.Inventory;
import techreborn.init.ModItems;
-public class ContainerDestructoPack extends RebornContainer {
+public class ContainerDestructoPack extends RebornContainer
+{
- private EntityPlayer player;
- private Inventory inv;
+ private EntityPlayer player;
+ private Inventory inv;
- public ContainerDestructoPack(EntityPlayer player) {
- this.player = player;
- inv = new Inventory(1, "destructopack", 64, null);
- buildContainer();
- }
+ public ContainerDestructoPack(EntityPlayer player)
+ {
+ this.player = player;
+ inv = new Inventory(1, "destructopack", 64, null);
+ buildContainer();
+ }
- @Override
- public boolean canInteractWith(EntityPlayer arg0) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer arg0)
+ {
+ return true;
+ }
+ private void buildContainer()
+ {
+ this.addSlotToContainer(
+ new SlotFilteredVoid(inv, 0, 80, 36, new ItemStack[] { new ItemStack(ModItems.parts, 1, 37) }));
+ int i;
- private void buildContainer() {
- this.addSlotToContainer(new SlotFilteredVoid(inv, 0, 80, 36, new ItemStack[]{new ItemStack(ModItems.parts, 1, 37)}));
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
-
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerDieselGenerator.java b/src/main/java/techreborn/client/container/ContainerDieselGenerator.java
index 0cb22f098..333b39434 100644
--- a/src/main/java/techreborn/client/container/ContainerDieselGenerator.java
+++ b/src/main/java/techreborn/client/container/ContainerDieselGenerator.java
@@ -10,73 +10,81 @@ import reborncore.client.gui.SlotOutput;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.generator.TileDieselGenerator;
-public class ContainerDieselGenerator extends RebornContainer {
- public TileDieselGenerator tiledieselGenerator;
- public EntityPlayer player;
- public int energy;
- public int fluid;
+public class ContainerDieselGenerator extends RebornContainer
+{
+ public TileDieselGenerator tiledieselGenerator;
+ public EntityPlayer player;
+ public int energy;
+ public int fluid;
- public ContainerDieselGenerator(TileDieselGenerator tiledieselGenerator,
- EntityPlayer player) {
- super();
- this.tiledieselGenerator = tiledieselGenerator;
- this.player = player;
+ public ContainerDieselGenerator(TileDieselGenerator tiledieselGenerator, EntityPlayer player)
+ {
+ super();
+ this.tiledieselGenerator = tiledieselGenerator;
+ this.player = player;
- this.addSlotToContainer(new Slot(tiledieselGenerator.inventory, 0, 80,
- 17));
- this.addSlotToContainer(new SlotOutput(tiledieselGenerator.inventory,
- 1, 80, 53));
- this.addSlotToContainer(new SlotFake(tiledieselGenerator.inventory, 2,
- 59, 42, false, false, 1));
+ this.addSlotToContainer(new Slot(tiledieselGenerator.inventory, 0, 80, 17));
+ this.addSlotToContainer(new SlotOutput(tiledieselGenerator.inventory, 1, 80, 53));
+ this.addSlotToContainer(new SlotFake(tiledieselGenerator.inventory, 2, 59, 42, false, false, 1));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- for (int i = 0; i < this.crafters.size(); i++) {
- ICrafting icrafting = (ICrafting) this.crafters.get(i);
- if (this.energy != (int) tiledieselGenerator.getEnergy()) {
- icrafting.sendProgressBarUpdate(this, 0, (int) tiledieselGenerator.getEnergy());
- }
- if (this.fluid != tiledieselGenerator.tank.getFluidAmount()) {
- icrafting.sendProgressBarUpdate(this, 1, tiledieselGenerator.tank.getFluidAmount());
- }
- }
- }
+ @Override
+ public void detectAndSendChanges()
+ {
+ super.detectAndSendChanges();
+ for (int i = 0; i < this.crafters.size(); i++)
+ {
+ ICrafting icrafting = (ICrafting) this.crafters.get(i);
+ if (this.energy != (int) tiledieselGenerator.getEnergy())
+ {
+ icrafting.sendProgressBarUpdate(this, 0, (int) tiledieselGenerator.getEnergy());
+ }
+ if (this.fluid != tiledieselGenerator.tank.getFluidAmount())
+ {
+ icrafting.sendProgressBarUpdate(this, 1, tiledieselGenerator.tank.getFluidAmount());
+ }
+ }
+ }
- @Override
- public void onCraftGuiOpened(ICrafting crafting) {
- super.onCraftGuiOpened(crafting);
- crafting.sendProgressBarUpdate(this, 0, (int) tiledieselGenerator.getEnergy());
- crafting.sendProgressBarUpdate(this, 1, tiledieselGenerator.tank.getFluidAmount());
- }
+ @Override
+ public void onCraftGuiOpened(ICrafting crafting)
+ {
+ super.onCraftGuiOpened(crafting);
+ crafting.sendProgressBarUpdate(this, 0, (int) tiledieselGenerator.getEnergy());
+ crafting.sendProgressBarUpdate(this, 1, tiledieselGenerator.tank.getFluidAmount());
+ }
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 0) {
- this.energy = value;
- } else if (id == 1) {
- this.fluid = value;
- }
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 0)
+ {
+ this.energy = value;
+ } else if (id == 1)
+ {
+ this.fluid = value;
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerDigitalChest.java b/src/main/java/techreborn/client/container/ContainerDigitalChest.java
index 80425ba0b..06991e675 100644
--- a/src/main/java/techreborn/client/container/ContainerDigitalChest.java
+++ b/src/main/java/techreborn/client/container/ContainerDigitalChest.java
@@ -7,40 +7,41 @@ import reborncore.client.gui.SlotOutput;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.TileDigitalChest;
-public class ContainerDigitalChest extends RebornContainer {
- public TileDigitalChest tileDigitalChest;
- public EntityPlayer player;
+public class ContainerDigitalChest extends RebornContainer
+{
+ public TileDigitalChest tileDigitalChest;
+ public EntityPlayer player;
- public ContainerDigitalChest(TileDigitalChest tileDigitalChest,
- EntityPlayer player) {
- super();
- this.tileDigitalChest = tileDigitalChest;
- this.player = player;
+ public ContainerDigitalChest(TileDigitalChest tileDigitalChest, EntityPlayer player)
+ {
+ super();
+ this.tileDigitalChest = tileDigitalChest;
+ this.player = player;
- this.addSlotToContainer(new Slot(tileDigitalChest.inventory, 0, 80, 17));
- this.addSlotToContainer(new SlotOutput(tileDigitalChest.inventory, 1,
- 80, 53));
- this.addSlotToContainer(new SlotFake(tileDigitalChest.inventory, 2, 59,
- 42, false, false, Integer.MAX_VALUE));
+ this.addSlotToContainer(new Slot(tileDigitalChest.inventory, 0, 80, 17));
+ this.addSlotToContainer(new SlotOutput(tileDigitalChest.inventory, 1, 80, 53));
+ this.addSlotToContainer(new SlotFake(tileDigitalChest.inventory, 2, 59, 42, false, false, Integer.MAX_VALUE));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/techreborn/client/container/ContainerElectricFurnace.java b/src/main/java/techreborn/client/container/ContainerElectricFurnace.java
index 5508b8d33..9f0ed2d20 100644
--- a/src/main/java/techreborn/client/container/ContainerElectricFurnace.java
+++ b/src/main/java/techreborn/client/container/ContainerElectricFurnace.java
@@ -9,56 +9,61 @@ import reborncore.common.container.RebornContainer;
import techreborn.api.SlotUpgrade;
import techreborn.tiles.teir1.TileElectricFurnace;
-public class ContainerElectricFurnace extends RebornContainer {
+public class ContainerElectricFurnace extends RebornContainer
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileElectricFurnace tile;
+ TileElectricFurnace tile;
- public int connectionStatus;
+ public int connectionStatus;
- public ContainerElectricFurnace(TileElectricFurnace tileGrinder, EntityPlayer player) {
- super();
- tile = tileGrinder;
- this.player = player;
+ public ContainerElectricFurnace(TileElectricFurnace tileGrinder, EntityPlayer player)
+ {
+ super();
+ tile = tileGrinder;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
- this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
+ // input
+ this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
+ this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
+ // upgrades
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 2, 152, 8));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 3, 152, 26));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 4, 152, 44));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 5, 152, 62));
- // upgrades
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 2, 152, 8));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 3, 152, 26));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 4, 152, 44));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 5, 152, 62));
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer p_75145_1_)
+ {
+ return true;
+ }
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 10) {
- this.connectionStatus = value;
- }
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 10)
+ {
+ this.connectionStatus = value;
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerExtractor.java b/src/main/java/techreborn/client/container/ContainerExtractor.java
index 7d0d16440..6e181fa8c 100644
--- a/src/main/java/techreborn/client/container/ContainerExtractor.java
+++ b/src/main/java/techreborn/client/container/ContainerExtractor.java
@@ -1,82 +1,82 @@
package techreborn.client.container;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.client.gui.SlotOutput;
import techreborn.api.SlotUpgrade;
import techreborn.tiles.teir1.TileExtractor;
-public class ContainerExtractor extends ContainerCrafting {
+public class ContainerExtractor extends ContainerCrafting
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileExtractor tile;
-
- public int connectionStatus;
+ TileExtractor tile;
- public ContainerExtractor(TileExtractor tileGrinder, EntityPlayer player) {
- super(tileGrinder.crafter);
- tile = tileGrinder;
- this.player = player;
+ public int connectionStatus;
- // input
- this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
- this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
+ public ContainerExtractor(TileExtractor tileGrinder, EntityPlayer player)
+ {
+ super(tileGrinder.crafter);
+ tile = tileGrinder;
+ this.player = player;
+ // input
+ this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
+ this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
- // upgrades
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 2, 152, 8));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 3, 152, 26));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 4, 152, 44));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 5, 152, 62));
+ // upgrades
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 2, 152, 8));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 3, 152, 26));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 4, 152, 44));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 5, 152, 62));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
-
-// @Override
-// public void onCraftGuiOpened(ICrafting crafting) {
-// super.onCraftGuiOpened(crafting);
-// crafting.sendProgressBarUpdate(this, 0, (int) tile.getProgressScaled(0));
-// crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
-// }
-//
-// @SideOnly(Side.CLIENT)
-// @Override
-// public void updateProgressBar(int id, int value) {
-// if (id == 0) {
-// this.progress = value;
-// }
-// else if (id == 2) {
-// this.energy = value;
-// }
-// this.tile.setEnergy(energy);
-// }
+ @Override
+ public boolean canInteractWith(EntityPlayer p_75145_1_)
+ {
+ return true;
+ }
-// @SideOnly(Side.CLIENT)
-// @Override
-// public void updateProgressBar(int id, int value) {
-// if (id == 10) {
-// this.connectionStatus = value;
-// }
-// }
+ // @Override
+ // public void onCraftGuiOpened(ICrafting crafting) {
+ // super.onCraftGuiOpened(crafting);
+ // crafting.sendProgressBarUpdate(this, 0, (int) tile.getProgressScaled(0));
+ // crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
+ // }
+ //
+ // @SideOnly(Side.CLIENT)
+ // @Override
+ // public void updateProgressBar(int id, int value) {
+ // if (id == 0) {
+ // this.progress = value;
+ // }
+ // else if (id == 2) {
+ // this.energy = value;
+ // }
+ // this.tile.setEnergy(energy);
+ // }
+
+ // @SideOnly(Side.CLIENT)
+ // @Override
+ // public void updateProgressBar(int id, int value) {
+ // if (id == 10) {
+ // this.connectionStatus = value;
+ // }
+ // }
}
diff --git a/src/main/java/techreborn/client/container/ContainerFusionReactor.java b/src/main/java/techreborn/client/container/ContainerFusionReactor.java
index 82285eca3..8d9181db5 100644
--- a/src/main/java/techreborn/client/container/ContainerFusionReactor.java
+++ b/src/main/java/techreborn/client/container/ContainerFusionReactor.java
@@ -9,106 +9,127 @@ import reborncore.client.gui.SlotOutput;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.fusionReactor.TileEntityFusionController;
+public class ContainerFusionReactor extends RebornContainer
+{
-public class ContainerFusionReactor extends RebornContainer {
+ public int coilStatus;
+ public int energy;
+ public int tickTime;
+ public int finalTickTime;
+ public int neededEU;
- public int coilStatus;
- public int energy;
- public int tickTime;
- public int finalTickTime;
- public int neededEU;
+ TileEntityFusionController fusionController;
- TileEntityFusionController fusionController;
+ public ContainerFusionReactor(TileEntityFusionController tileEntityFusionController, EntityPlayer player)
+ {
+ super();
+ this.fusionController = tileEntityFusionController;
- public ContainerFusionReactor(TileEntityFusionController tileEntityFusionController,
- EntityPlayer player) {
- super();
- this.fusionController = tileEntityFusionController;
+ addSlotToContainer(new Slot(tileEntityFusionController, 0, 88, 17));
+ addSlotToContainer(new Slot(tileEntityFusionController, 1, 88, 53));
+ addSlotToContainer(new SlotOutput(tileEntityFusionController, 2, 148, 35));
- addSlotToContainer(new Slot(tileEntityFusionController, 0, 88, 17));
- addSlotToContainer(new Slot(tileEntityFusionController, 1, 88, 53));
- addSlotToContainer(new SlotOutput(tileEntityFusionController, 2, 148, 35));
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
+ }
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public void detectAndSendChanges()
+ {
+ super.detectAndSendChanges();
+ for (int i = 0; i < this.crafters.size(); i++)
+ {
+ ICrafting icrafting = (ICrafting) this.crafters.get(i);
+ if (this.coilStatus != fusionController.coilStatus)
+ {
+ icrafting.sendProgressBarUpdate(this, 0, fusionController.coilStatus);
+ }
+ if (this.energy != (int) fusionController.getEnergy())
+ {
+ icrafting.sendProgressBarUpdate(this, 1, (int) fusionController.getEnergy());
+ }
+ if (this.tickTime != fusionController.crafingTickTime)
+ {
+ icrafting.sendProgressBarUpdate(this, 2, fusionController.crafingTickTime);
+ }
+ if (this.finalTickTime != fusionController.finalTickTime)
+ {
+ icrafting.sendProgressBarUpdate(this, 3, fusionController.finalTickTime);
+ }
+ if (this.neededEU != fusionController.neededPower)
+ {
+ icrafting.sendProgressBarUpdate(this, 4, fusionController.neededPower);
+ }
+ }
+ }
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- for (int i = 0; i < this.crafters.size(); i++) {
- ICrafting icrafting = (ICrafting) this.crafters.get(i);
- if (this.coilStatus != fusionController.coilStatus) {
- icrafting.sendProgressBarUpdate(this, 0, fusionController.coilStatus);
- }
- if (this.energy != (int) fusionController.getEnergy()) {
- icrafting.sendProgressBarUpdate(this, 1, (int) fusionController.getEnergy());
- }
- if (this.tickTime != fusionController.crafingTickTime) {
- icrafting.sendProgressBarUpdate(this, 2, fusionController.crafingTickTime);
- }
- if (this.finalTickTime != fusionController.finalTickTime) {
- icrafting.sendProgressBarUpdate(this, 3, fusionController.finalTickTime);
- }
- if (this.neededEU != fusionController.neededPower) {
- icrafting.sendProgressBarUpdate(this, 4, fusionController.neededPower);
- }
- }
- }
+ @Override
+ public void onCraftGuiOpened(ICrafting crafting)
+ {
+ super.onCraftGuiOpened(crafting);
+ crafting.sendProgressBarUpdate(this, 0, fusionController.coilStatus);
+ crafting.sendProgressBarUpdate(this, 1, (int) fusionController.getEnergy());
+ crafting.sendProgressBarUpdate(this, 2, fusionController.crafingTickTime);
+ crafting.sendProgressBarUpdate(this, 3, fusionController.finalTickTime);
+ crafting.sendProgressBarUpdate(this, 4, fusionController.neededPower);
+ }
- @Override
- public void onCraftGuiOpened(ICrafting crafting) {
- super.onCraftGuiOpened(crafting);
- crafting.sendProgressBarUpdate(this, 0, fusionController.coilStatus);
- crafting.sendProgressBarUpdate(this, 1, (int) fusionController.getEnergy());
- crafting.sendProgressBarUpdate(this, 2, fusionController.crafingTickTime);
- crafting.sendProgressBarUpdate(this, 3, fusionController.finalTickTime);
- crafting.sendProgressBarUpdate(this, 4, fusionController.neededPower);
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 0)
+ {
+ this.coilStatus = value;
+ } else if (id == 1)
+ {
+ this.energy = value;
+ } else if (id == 2)
+ {
+ this.tickTime = value;
+ } else if (id == 3)
+ {
+ this.finalTickTime = value;
+ } else if (id == 4)
+ {
+ this.neededEU = value;
+ }
+ if (tickTime == -1)
+ {
+ tickTime = 0;
+ }
+ if (finalTickTime == -1)
+ {
+ finalTickTime = 0;
+ }
+ if (neededEU == -1)
+ {
+ neededEU = 0;
+ }
+ }
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 0) {
- this.coilStatus = value;
- } else if (id == 1) {
- this.energy = value;
- } else if(id == 2){
- this.tickTime = value;
- } else if(id == 3){
- this.finalTickTime = value;
- } else if(id == 4){
- this.neededEU = value;
- }
- if(tickTime == -1){
- tickTime = 0;
- }
- if(finalTickTime == -1){
- finalTickTime = 0;
- }
- if(neededEU == -1){
- neededEU = 0;
- }
- }
-
- public int getProgressScaled(){
- return Math.max(0, Math.min(24, (this.tickTime > 0 ? 1 : 0) + this.tickTime * 24 / (this.finalTickTime < 1 ? 1 : this.finalTickTime)));
- }
+ public int getProgressScaled()
+ {
+ return Math.max(0, Math.min(24,
+ (this.tickTime > 0 ? 1 : 0) + this.tickTime * 24 / (this.finalTickTime < 1 ? 1 : this.finalTickTime)));
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerGasTurbine.java b/src/main/java/techreborn/client/container/ContainerGasTurbine.java
index 363ba56b0..bbc13b26d 100644
--- a/src/main/java/techreborn/client/container/ContainerGasTurbine.java
+++ b/src/main/java/techreborn/client/container/ContainerGasTurbine.java
@@ -7,40 +7,40 @@ import reborncore.client.gui.SlotOutput;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.generator.TileGasTurbine;
-public class ContainerGasTurbine extends RebornContainer {
- public TileGasTurbine tileGasTurbine;
- public EntityPlayer player;
+public class ContainerGasTurbine extends RebornContainer
+{
+ public TileGasTurbine tileGasTurbine;
+ public EntityPlayer player;
- public ContainerGasTurbine(TileGasTurbine tileGasTurbine,
- EntityPlayer player) {
- super();
- this.tileGasTurbine = tileGasTurbine;
- this.player = player;
+ public ContainerGasTurbine(TileGasTurbine tileGasTurbine, EntityPlayer player)
+ {
+ super();
+ this.tileGasTurbine = tileGasTurbine;
+ this.player = player;
- this.addSlotToContainer(new Slot(tileGasTurbine.inventory, 0, 80,
- 17));
- this.addSlotToContainer(new SlotOutput(tileGasTurbine.inventory,
- 1, 80, 53));
- this.addSlotToContainer(new SlotFake(tileGasTurbine.inventory, 2,
- 59, 42, false, false, 1));
+ this.addSlotToContainer(new Slot(tileGasTurbine.inventory, 0, 80, 17));
+ this.addSlotToContainer(new SlotOutput(tileGasTurbine.inventory, 1, 80, 53));
+ this.addSlotToContainer(new SlotFake(tileGasTurbine.inventory, 2, 59, 42, false, false, 1));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerGenerator.java b/src/main/java/techreborn/client/container/ContainerGenerator.java
index b54ff51d3..acd1fcc07 100644
--- a/src/main/java/techreborn/client/container/ContainerGenerator.java
+++ b/src/main/java/techreborn/client/container/ContainerGenerator.java
@@ -9,89 +9,103 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.generator.TileGenerator;
-public class ContainerGenerator extends RebornContainer {
+public class ContainerGenerator extends RebornContainer
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileGenerator tile;
+ TileGenerator tile;
- public int burnTime = 0;
- public int totalBurnTime = 0;
- public int energy;
+ public int burnTime = 0;
+ public int totalBurnTime = 0;
+ public int energy;
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- public int tickTime;
+ public int tickTime;
- public ContainerGenerator(TileGenerator tile, EntityPlayer player) {
- super();
- this.tile = tile;
- this.player = player;
+ public ContainerGenerator(TileGenerator tile, EntityPlayer player)
+ {
+ super();
+ this.tile = tile;
+ this.player = player;
- // fuel
- this.addSlotToContainer(new Slot(tile.inventory, 0, 80, 53));
- // charge
- this.addSlotToContainer(new SlotFurnaceFuel(tile.inventory, 1, 80, 17));
+ // fuel
+ this.addSlotToContainer(new Slot(tile.inventory, 0, 80, 53));
+ // charge
+ this.addSlotToContainer(new SlotFurnaceFuel(tile.inventory, 1, 80, 17));
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ @Override
+ public void detectAndSendChanges()
+ {
+ super.detectAndSendChanges();
+ for (int i = 0; i < this.crafters.size(); i++)
+ {
+ ICrafting icrafting = (ICrafting) this.crafters.get(i);
+ if (this.burnTime != tile.burnTime)
+ {
+ icrafting.sendProgressBarUpdate(this, 0, tile.burnTime);
+ }
+ if (this.totalBurnTime != tile.totalBurnTime)
+ {
+ icrafting.sendProgressBarUpdate(this, 1, tile.totalBurnTime);
+ }
+ if (this.energy != (int) tile.getEnergy())
+ {
+ icrafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
+ }
+ }
+ }
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- for (int i = 0; i < this.crafters.size(); i++) {
- ICrafting icrafting = (ICrafting) this.crafters.get(i);
- if (this.burnTime != tile.burnTime) {
- icrafting.sendProgressBarUpdate(this, 0, tile.burnTime);
- }
- if (this.totalBurnTime != tile.totalBurnTime) {
- icrafting.sendProgressBarUpdate(this, 1, tile.totalBurnTime);
- }
- if (this.energy != (int) tile.getEnergy()) {
- icrafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
- }
- }
- }
+ @Override
+ public void onCraftGuiOpened(ICrafting crafting)
+ {
+ super.onCraftGuiOpened(crafting);
+ crafting.sendProgressBarUpdate(this, 0, tile.burnTime);
+ crafting.sendProgressBarUpdate(this, 1, tile.totalBurnTime);
+ crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
+ }
- @Override
- public void onCraftGuiOpened(ICrafting crafting) {
- super.onCraftGuiOpened(crafting);
- crafting.sendProgressBarUpdate(this, 0, tile.burnTime);
- crafting.sendProgressBarUpdate(this, 1, tile.totalBurnTime);
- crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 0)
+ {
+ this.burnTime = value;
+ } else if (id == 1)
+ {
+ this.totalBurnTime = value;
+ } else if (id == 2)
+ {
+ this.energy = value;
+ }
+ this.tile.setEnergy(energy);
+ }
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 0) {
- this.burnTime = value;
- } else if (id == 1) {
- this.totalBurnTime = value;
- } else if (id == 2) {
- this.energy = value;
- }
- this.tile.setEnergy(energy);
- }
-
- public int getScaledBurnTime(int i) {
- return (int) (((float) burnTime / (float) totalBurnTime) * i);
- }
+ public int getScaledBurnTime(int i)
+ {
+ return (int) (((float) burnTime / (float) totalBurnTime) * i);
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerGrinder.java b/src/main/java/techreborn/client/container/ContainerGrinder.java
index 773ac0f60..c0c539a7f 100644
--- a/src/main/java/techreborn/client/container/ContainerGrinder.java
+++ b/src/main/java/techreborn/client/container/ContainerGrinder.java
@@ -2,53 +2,54 @@ package techreborn.client.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Slot;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.client.gui.SlotOutput;
import techreborn.api.SlotUpgrade;
import techreborn.tiles.teir1.TileGrinder;
-public class ContainerGrinder extends ContainerCrafting {
+public class ContainerGrinder extends ContainerCrafting
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileGrinder tile;
+ TileGrinder tile;
- public int connectionStatus;
+ public int connectionStatus;
- public ContainerGrinder(TileGrinder tileGrinder, EntityPlayer player) {
- super(tileGrinder.crafter);
- tile = tileGrinder;
- this.player = player;
+ public ContainerGrinder(TileGrinder tileGrinder, EntityPlayer player)
+ {
+ super(tileGrinder.crafter);
+ tile = tileGrinder;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
- this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
+ // input
+ this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
+ this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
+ // upgrades
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 2, 152, 8));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 3, 152, 26));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 4, 152, 44));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 5, 152, 62));
- // upgrades
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 2, 152, 8));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 3, 152, 26));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 4, 152, 44));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 5, 152, 62));
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer p_75145_1_)
+ {
+ return true;
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerIDSU.java b/src/main/java/techreborn/client/container/ContainerIDSU.java
index 5bc326a57..d57045654 100644
--- a/src/main/java/techreborn/client/container/ContainerIDSU.java
+++ b/src/main/java/techreborn/client/container/ContainerIDSU.java
@@ -8,80 +8,93 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.idsu.TileIDSU;
+public class ContainerIDSU extends RebornContainer
+{
-public class ContainerIDSU extends RebornContainer {
+ EntityPlayer player;
- EntityPlayer player;
+ TileIDSU tile;
- TileIDSU tile;
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ public int euOut;
+ public int storedEu;
+ public int euChange;
+ public int channel;
- public int euOut;
- public int storedEu;
- public int euChange;
- public int channel;
+ public ContainerIDSU(TileIDSU tileIDSU, EntityPlayer player)
+ {
+ tile = tileIDSU;
+ this.player = player;
- public ContainerIDSU(TileIDSU tileIDSU,
- EntityPlayer player) {
- tile = tileIDSU;
- this.player = player;
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ @Override
+ public void detectAndSendChanges()
+ {
+ super.detectAndSendChanges();
+ for (int i = 0; i < this.crafters.size(); i++)
+ {
+ ICrafting icrafting = (ICrafting) this.crafters.get(i);
+ if (this.euOut != tile.output)
+ {
+ icrafting.sendProgressBarUpdate(this, 0, tile.output);
+ }
+ if (this.storedEu != (int) tile.getEnergy())
+ {
+ icrafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
+ }
+ if (this.euChange != tile.getEuChange() && tile.getEuChange() != -1)
+ {
+ icrafting.sendProgressBarUpdate(this, 2, (int) tile.getEuChange());
+ }
+ }
+ }
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- for (int i = 0; i < this.crafters.size(); i++) {
- ICrafting icrafting = (ICrafting) this.crafters.get(i);
- if (this.euOut != tile.output) {
- icrafting.sendProgressBarUpdate(this, 0, tile.output);
- }
- if (this.storedEu != (int) tile.getEnergy()) {
- icrafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
- }
- if (this.euChange != tile.getEuChange() && tile.getEuChange() != -1) {
- icrafting.sendProgressBarUpdate(this, 2, (int) tile.getEuChange());
- }
- }
- }
+ @Override
+ public void onCraftGuiOpened(ICrafting crafting)
+ {
+ super.onCraftGuiOpened(crafting);
+ crafting.sendProgressBarUpdate(this, 0, tile.output);
+ crafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
+ crafting.sendProgressBarUpdate(this, 2, (int) tile.getEuChange());
+ }
- @Override
- public void onCraftGuiOpened(ICrafting crafting) {
- super.onCraftGuiOpened(crafting);
- crafting.sendProgressBarUpdate(this, 0, tile.output);
- crafting.sendProgressBarUpdate(this, 1, (int) tile.getEnergy());
- crafting.sendProgressBarUpdate(this, 2, (int) tile.getEuChange());
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 0) {
- this.euOut = value;
- } else if (id == 1) {
- this.storedEu = value;
- } else if (id == 2) {
- this.euChange = value;
- } else if (id == 3) {
- this.channel = value;
- }
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 0)
+ {
+ this.euOut = value;
+ } else if (id == 1)
+ {
+ this.storedEu = value;
+ } else if (id == 2)
+ {
+ this.euChange = value;
+ } else if (id == 3)
+ {
+ this.channel = value;
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerImplosionCompressor.java b/src/main/java/techreborn/client/container/ContainerImplosionCompressor.java
index c0d12d13c..c1aaa19dc 100644
--- a/src/main/java/techreborn/client/container/ContainerImplosionCompressor.java
+++ b/src/main/java/techreborn/client/container/ContainerImplosionCompressor.java
@@ -8,77 +8,85 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.client.gui.SlotOutput;
import techreborn.tiles.TileImplosionCompressor;
-public class ContainerImplosionCompressor extends ContainerCrafting {
+public class ContainerImplosionCompressor extends ContainerCrafting
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileImplosionCompressor tile;
+ TileImplosionCompressor tile;
- public int tickTime;
- public int multIBlockState = 0;
+ public int tickTime;
+ public int multIBlockState = 0;
- public ContainerImplosionCompressor(TileImplosionCompressor tilecompressor,
- EntityPlayer player) {
- super(tilecompressor.crafter);
- tile = tilecompressor;
- this.player = player;
+ public ContainerImplosionCompressor(TileImplosionCompressor tilecompressor, EntityPlayer player)
+ {
+ super(tilecompressor.crafter);
+ tile = tilecompressor;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tilecompressor.inventory, 0, 37, 26));
- this.addSlotToContainer(new Slot(tilecompressor.inventory, 1, 37, 44));
- // outputs
- this.addSlotToContainer(new SlotOutput(tilecompressor.inventory, 2, 93, 35));
- this.addSlotToContainer(new SlotOutput(tilecompressor.inventory, 3, 111, 35));
+ // input
+ this.addSlotToContainer(new Slot(tilecompressor.inventory, 0, 37, 26));
+ this.addSlotToContainer(new Slot(tilecompressor.inventory, 1, 37, 44));
+ // outputs
+ this.addSlotToContainer(new SlotOutput(tilecompressor.inventory, 2, 93, 35));
+ this.addSlotToContainer(new SlotOutput(tilecompressor.inventory, 3, 111, 35));
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer p_75145_1_)
+ {
+ return true;
+ }
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
+ @Override
+ public void detectAndSendChanges()
+ {
+ super.detectAndSendChanges();
+ for (int i = 0; i < this.crafters.size(); i++)
+ {
+ ICrafting icrafting = (ICrafting) this.crafters.get(i);
+ if (this.multIBlockState != getMultIBlockStateint())
+ {
+ icrafting.sendProgressBarUpdate(this, 3, getMultIBlockStateint());
+ }
+ }
+ }
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- for (int i = 0; i < this.crafters.size(); i++) {
- ICrafting icrafting = (ICrafting) this.crafters.get(i);
- if (this.multIBlockState != getMultIBlockStateint()) {
- icrafting.sendProgressBarUpdate(this, 3, getMultIBlockStateint());
- }
- }
- }
+ @Override
+ public void onCraftGuiOpened(ICrafting crafting)
+ {
+ super.onCraftGuiOpened(crafting);
+ crafting.sendProgressBarUpdate(this, 3, getMultIBlockStateint());
+ }
- @Override
- public void onCraftGuiOpened(ICrafting crafting) {
- super.onCraftGuiOpened(crafting);
- crafting.sendProgressBarUpdate(this, 3, getMultIBlockStateint());
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 3) {
- this.multIBlockState = value;
- }
- }
-
- public int getMultIBlockStateint(){
- return tile.getMutliBlock() ? 1 : 0;
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 3)
+ {
+ this.multIBlockState = value;
+ }
+ }
+ public int getMultIBlockStateint()
+ {
+ return tile.getMutliBlock() ? 1 : 0;
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerIndustrialElectrolyzer.java b/src/main/java/techreborn/client/container/ContainerIndustrialElectrolyzer.java
index 79f2f7343..4bfdae45d 100644
--- a/src/main/java/techreborn/client/container/ContainerIndustrialElectrolyzer.java
+++ b/src/main/java/techreborn/client/container/ContainerIndustrialElectrolyzer.java
@@ -5,48 +5,52 @@ import net.minecraft.inventory.Slot;
import reborncore.client.gui.SlotOutput;
import techreborn.tiles.TileIndustrialElectrolyzer;
-public class ContainerIndustrialElectrolyzer extends ContainerCrafting {
+public class ContainerIndustrialElectrolyzer extends ContainerCrafting
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileIndustrialElectrolyzer tile;
+ TileIndustrialElectrolyzer tile;
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- public int tickTime;
+ public int tickTime;
- public ContainerIndustrialElectrolyzer(TileIndustrialElectrolyzer electrolyzer, EntityPlayer player) {
- super(electrolyzer.crafter);
- tile = electrolyzer;
- this.player = player;
+ public ContainerIndustrialElectrolyzer(TileIndustrialElectrolyzer electrolyzer, EntityPlayer player)
+ {
+ super(electrolyzer.crafter);
+ tile = electrolyzer;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(electrolyzer.inventory, 0, 80, 51));
- this.addSlotToContainer(new Slot(electrolyzer.inventory, 1, 50, 51));
- // outputs
- this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 2, 50, 19));
- this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 3, 70, 19));
- this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 4, 90, 19));
- this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 5, 110, 19));
-
- // battery
- this.addSlotToContainer(new Slot(electrolyzer.inventory, 6, 18, 51));
+ // input
+ this.addSlotToContainer(new Slot(electrolyzer.inventory, 0, 80, 51));
+ this.addSlotToContainer(new Slot(electrolyzer.inventory, 1, 50, 51));
+ // outputs
+ this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 2, 50, 19));
+ this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 3, 70, 19));
+ this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 4, 90, 19));
+ this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 5, 110, 19));
- int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ // battery
+ this.addSlotToContainer(new Slot(electrolyzer.inventory, 6, 18, 51));
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
+
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerIndustrialGrinder.java b/src/main/java/techreborn/client/container/ContainerIndustrialGrinder.java
index 543736871..593367390 100644
--- a/src/main/java/techreborn/client/container/ContainerIndustrialGrinder.java
+++ b/src/main/java/techreborn/client/container/ContainerIndustrialGrinder.java
@@ -8,74 +8,82 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.client.gui.SlotOutput;
import techreborn.tiles.TileIndustrialGrinder;
-public class ContainerIndustrialGrinder extends ContainerCrafting {
+public class ContainerIndustrialGrinder extends ContainerCrafting
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileIndustrialGrinder tile;
+ TileIndustrialGrinder tile;
- public int connectionStatus;
+ public int connectionStatus;
- public ContainerIndustrialGrinder(TileIndustrialGrinder tileGrinder,
- EntityPlayer player) {
- super(tileGrinder.crafter);
- tile = tileGrinder;
- this.player = player;
+ public ContainerIndustrialGrinder(TileIndustrialGrinder tileGrinder, EntityPlayer player)
+ {
+ super(tileGrinder.crafter);
+ tile = tileGrinder;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 32, 26));
- this.addSlotToContainer(new Slot(tileGrinder.inventory, 1, 32, 44));
+ // input
+ this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 32, 26));
+ this.addSlotToContainer(new Slot(tileGrinder.inventory, 1, 32, 44));
+ // outputs
+ this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 2, 77, 35));
+ this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 3, 95, 35));
+ this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 4, 113, 35));
+ this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 5, 131, 35));
- // outputs
- this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 2, 77, 35));
- this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 3, 95, 35));
- this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 4, 113, 35));
- this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 5, 131, 35));
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer p_75145_1_)
+ {
+ return true;
+ }
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
+ @Override
+ public void detectAndSendChanges()
+ {
+ super.detectAndSendChanges();
+ for (int i = 0; i < this.crafters.size(); i++)
+ {
+ ICrafting icrafting = (ICrafting) this.crafters.get(i);
+ if (this.connectionStatus != tile.connectionStatus)
+ {
+ icrafting.sendProgressBarUpdate(this, 10, tile.connectionStatus);
+ }
+ }
+ }
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- for (int i = 0; i < this.crafters.size(); i++) {
- ICrafting icrafting = (ICrafting) this.crafters.get(i);
- if (this.connectionStatus != tile.connectionStatus) {
- icrafting.sendProgressBarUpdate(this, 10, tile.connectionStatus);
- }
- }
- }
+ @Override
+ public void onCraftGuiOpened(ICrafting crafting)
+ {
+ super.onCraftGuiOpened(crafting);
+ crafting.sendProgressBarUpdate(this, 10, tile.connectionStatus);
+ }
- @Override
- public void onCraftGuiOpened(ICrafting crafting) {
- super.onCraftGuiOpened(crafting);
- crafting.sendProgressBarUpdate(this, 10, tile.connectionStatus);
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 10) {
- this.connectionStatus = value;
- }
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 10)
+ {
+ this.connectionStatus = value;
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerIndustrialSawmill.java b/src/main/java/techreborn/client/container/ContainerIndustrialSawmill.java
index 3fd31a3c4..6979ca6c2 100644
--- a/src/main/java/techreborn/client/container/ContainerIndustrialSawmill.java
+++ b/src/main/java/techreborn/client/container/ContainerIndustrialSawmill.java
@@ -5,47 +5,49 @@ import net.minecraft.inventory.Slot;
import reborncore.client.gui.SlotOutput;
import techreborn.tiles.TileIndustrialSawmill;
-public class ContainerIndustrialSawmill extends ContainerCrafting {
+public class ContainerIndustrialSawmill extends ContainerCrafting
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileIndustrialSawmill tile;
+ TileIndustrialSawmill tile;
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- public int tickTime;
+ public int tickTime;
- public ContainerIndustrialSawmill(TileIndustrialSawmill tileIndustrialSawmill,
- EntityPlayer player) {
- super(tileIndustrialSawmill.crafter);
- tile = tileIndustrialSawmill;
- this.player = player;
+ public ContainerIndustrialSawmill(TileIndustrialSawmill tileIndustrialSawmill, EntityPlayer player)
+ {
+ super(tileIndustrialSawmill.crafter);
+ tile = tileIndustrialSawmill;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileIndustrialSawmill.inventory, 0, 32, 26));
- this.addSlotToContainer(new Slot(tileIndustrialSawmill.inventory, 1, 32, 44));
- // outputs
- this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 2, 84, 35));
- this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 3, 102, 35));
- this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 4, 120, 35));
+ // input
+ this.addSlotToContainer(new Slot(tileIndustrialSawmill.inventory, 0, 32, 26));
+ this.addSlotToContainer(new Slot(tileIndustrialSawmill.inventory, 1, 32, 44));
+ // outputs
+ this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 2, 84, 35));
+ this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 3, 102, 35));
+ this.addSlotToContainer(new SlotOutput(tileIndustrialSawmill.inventory, 4, 120, 35));
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
-
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerIronFurnace.java b/src/main/java/techreborn/client/container/ContainerIronFurnace.java
index 199a64e41..3a7b931f7 100644
--- a/src/main/java/techreborn/client/container/ContainerIronFurnace.java
+++ b/src/main/java/techreborn/client/container/ContainerIronFurnace.java
@@ -9,50 +9,56 @@ import reborncore.client.gui.SlotOutput;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.TileIronFurnace;
-public class ContainerIronFurnace extends RebornContainer {
+public class ContainerIronFurnace extends RebornContainer
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileIronFurnace tile;
+ TileIronFurnace tile;
- public int connectionStatus;
+ public int connectionStatus;
- public ContainerIronFurnace(TileIronFurnace tileGrinder, EntityPlayer player) {
- super();
- tile = tileGrinder;
- this.player = player;
+ public ContainerIronFurnace(TileIronFurnace tileGrinder, EntityPlayer player)
+ {
+ super();
+ tile = tileGrinder;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 17));
- this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
- //Fuel
- this.addSlotToContainer(new SlotFurnaceFuel(tileGrinder.inventory, 2, 56, 53));
+ // input
+ this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 17));
+ this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
+ // Fuel
+ this.addSlotToContainer(new SlotFurnaceFuel(tileGrinder.inventory, 2, 56, 53));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 10) {
- this.connectionStatus = value;
- }
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 10)
+ {
+ this.connectionStatus = value;
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerMatterFabricator.java b/src/main/java/techreborn/client/container/ContainerMatterFabricator.java
index 8786ed4b7..8e9e65042 100644
--- a/src/main/java/techreborn/client/container/ContainerMatterFabricator.java
+++ b/src/main/java/techreborn/client/container/ContainerMatterFabricator.java
@@ -9,81 +9,91 @@ import reborncore.client.gui.SlotOutput;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.TileMatterFabricator;
-public class ContainerMatterFabricator extends RebornContainer {
+public class ContainerMatterFabricator extends RebornContainer
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileMatterFabricator tile;
+ TileMatterFabricator tile;
- public int progressTime;
+ public int progressTime;
- public ContainerMatterFabricator(TileMatterFabricator tileMatterfab,
- EntityPlayer player) {
- tile = tileMatterfab;
- this.player = player;
+ public ContainerMatterFabricator(TileMatterFabricator tileMatterfab, EntityPlayer player)
+ {
+ tile = tileMatterfab;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileMatterfab.inventory, 0, 33, 17));
- this.addSlotToContainer(new Slot(tileMatterfab.inventory, 1, 33, 35));
- this.addSlotToContainer(new Slot(tileMatterfab.inventory, 2, 33, 53));
- this.addSlotToContainer(new Slot(tileMatterfab.inventory, 3, 51, 17));
- this.addSlotToContainer(new Slot(tileMatterfab.inventory, 4, 51, 35));
- this.addSlotToContainer(new Slot(tileMatterfab.inventory, 5, 51, 53));
+ // input
+ this.addSlotToContainer(new Slot(tileMatterfab.inventory, 0, 33, 17));
+ this.addSlotToContainer(new Slot(tileMatterfab.inventory, 1, 33, 35));
+ this.addSlotToContainer(new Slot(tileMatterfab.inventory, 2, 33, 53));
+ this.addSlotToContainer(new Slot(tileMatterfab.inventory, 3, 51, 17));
+ this.addSlotToContainer(new Slot(tileMatterfab.inventory, 4, 51, 35));
+ this.addSlotToContainer(new Slot(tileMatterfab.inventory, 5, 51, 53));
- // outputs
- this.addSlotToContainer(new SlotOutput(tileMatterfab.inventory, 6,
- 116, 35));
+ // outputs
+ this.addSlotToContainer(new SlotOutput(tileMatterfab.inventory, 6, 116, 35));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer p_75145_1_)
+ {
+ return true;
+ }
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- for (int i = 0; i < this.crafters.size(); i++) {
- ICrafting icrafting = (ICrafting) this.crafters.get(i);
- if (this.progressTime != tile.progresstime) {
- icrafting.sendProgressBarUpdate(this, 0, tile.progresstime);
- }
- }
- }
+ @Override
+ public void detectAndSendChanges()
+ {
+ super.detectAndSendChanges();
+ for (int i = 0; i < this.crafters.size(); i++)
+ {
+ ICrafting icrafting = (ICrafting) this.crafters.get(i);
+ if (this.progressTime != tile.progresstime)
+ {
+ icrafting.sendProgressBarUpdate(this, 0, tile.progresstime);
+ }
+ }
+ }
- @Override
- public void onCraftGuiOpened(ICrafting crafting) {
- super.onCraftGuiOpened(crafting);
- crafting.sendProgressBarUpdate(this, 0, tile.progresstime);
- }
+ @Override
+ public void onCraftGuiOpened(ICrafting crafting)
+ {
+ super.onCraftGuiOpened(crafting);
+ crafting.sendProgressBarUpdate(this, 0, tile.progresstime);
+ }
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 0) {
- this.progressTime = value;
- }
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 0)
+ {
+ this.progressTime = value;
+ }
+ }
- public int getProgressScaled(int scale) {
- if (progressTime != 0) {
- return progressTime * scale / tile.maxProgresstime();
- }
- return 0;
- }
+ public int getProgressScaled(int scale)
+ {
+ if (progressTime != 0)
+ {
+ return progressTime * scale / tile.maxProgresstime();
+ }
+ return 0;
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerPda.java b/src/main/java/techreborn/client/container/ContainerPda.java
index f5c62ef52..525acaa37 100644
--- a/src/main/java/techreborn/client/container/ContainerPda.java
+++ b/src/main/java/techreborn/client/container/ContainerPda.java
@@ -3,17 +3,20 @@ package techreborn.client.container;
import net.minecraft.entity.player.EntityPlayer;
import reborncore.common.container.RebornContainer;
-public class ContainerPda extends RebornContainer {
+public class ContainerPda extends RebornContainer
+{
- EntityPlayer player;
+ EntityPlayer player;
- public ContainerPda(EntityPlayer player) {
+ public ContainerPda(EntityPlayer player)
+ {
- }
+ }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerQuantumChest.java b/src/main/java/techreborn/client/container/ContainerQuantumChest.java
index 9aa2798be..a3a2d4759 100644
--- a/src/main/java/techreborn/client/container/ContainerQuantumChest.java
+++ b/src/main/java/techreborn/client/container/ContainerQuantumChest.java
@@ -7,40 +7,41 @@ import reborncore.client.gui.SlotOutput;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.TileQuantumChest;
-public class ContainerQuantumChest extends RebornContainer {
- public TileQuantumChest tileQuantumChest;
- public EntityPlayer player;
+public class ContainerQuantumChest extends RebornContainer
+{
+ public TileQuantumChest tileQuantumChest;
+ public EntityPlayer player;
- public ContainerQuantumChest(TileQuantumChest tileQuantumChest,
- EntityPlayer player) {
- super();
- this.tileQuantumChest = tileQuantumChest;
- this.player = player;
+ public ContainerQuantumChest(TileQuantumChest tileQuantumChest, EntityPlayer player)
+ {
+ super();
+ this.tileQuantumChest = tileQuantumChest;
+ this.player = player;
- this.addSlotToContainer(new Slot(tileQuantumChest.inventory, 0, 80, 17));
- this.addSlotToContainer(new SlotOutput(tileQuantumChest.inventory, 1,
- 80, 53));
- this.addSlotToContainer(new SlotFake(tileQuantumChest.inventory, 2, 59,
- 42, false, false, Integer.MAX_VALUE));
+ this.addSlotToContainer(new Slot(tileQuantumChest.inventory, 0, 80, 17));
+ this.addSlotToContainer(new SlotOutput(tileQuantumChest.inventory, 1, 80, 53));
+ this.addSlotToContainer(new SlotFake(tileQuantumChest.inventory, 2, 59, 42, false, false, Integer.MAX_VALUE));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerQuantumTank.java b/src/main/java/techreborn/client/container/ContainerQuantumTank.java
index 497df43a2..78f9e667f 100644
--- a/src/main/java/techreborn/client/container/ContainerQuantumTank.java
+++ b/src/main/java/techreborn/client/container/ContainerQuantumTank.java
@@ -8,39 +8,40 @@ import reborncore.client.gui.SlotOutput;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.TileQuantumTank;
-public class ContainerQuantumTank extends RebornContainer {
- public TileQuantumTank tileQuantumTank;
- public EntityPlayer player;
+public class ContainerQuantumTank extends RebornContainer
+{
+ public TileQuantumTank tileQuantumTank;
+ public EntityPlayer player;
- public ContainerQuantumTank(TileQuantumTank tileQuantumTank,
- EntityPlayer player) {
- super();
- this.tileQuantumTank = tileQuantumTank;
- this.player = player;
+ public ContainerQuantumTank(TileQuantumTank tileQuantumTank, EntityPlayer player)
+ {
+ super();
+ this.tileQuantumTank = tileQuantumTank;
+ this.player = player;
- this.addSlotToContainer(new SlotFluid(tileQuantumTank.inventory, 0, 80, 17));
- this.addSlotToContainer(new SlotOutput(tileQuantumTank.inventory, 1,
- 80, 53));
- this.addSlotToContainer(new SlotFake(tileQuantumTank.inventory, 2, 59,
- 42, false, false, 1));
+ this.addSlotToContainer(new SlotFluid(tileQuantumTank.inventory, 0, 80, 17));
+ this.addSlotToContainer(new SlotOutput(tileQuantumTank.inventory, 1, 80, 53));
+ this.addSlotToContainer(new SlotFake(tileQuantumTank.inventory, 2, 59, 42, false, false, 1));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerRecycler.java b/src/main/java/techreborn/client/container/ContainerRecycler.java
index 437c0ef4e..db2ff3299 100644
--- a/src/main/java/techreborn/client/container/ContainerRecycler.java
+++ b/src/main/java/techreborn/client/container/ContainerRecycler.java
@@ -9,55 +9,60 @@ import reborncore.common.container.RebornContainer;
import techreborn.api.SlotUpgrade;
import techreborn.tiles.teir1.TileRecycler;
-public class ContainerRecycler extends RebornContainer {
+public class ContainerRecycler extends RebornContainer
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileRecycler tile;
+ TileRecycler tile;
- public int connectionStatus;
+ public int connectionStatus;
- public ContainerRecycler(TileRecycler tileGrinder, EntityPlayer player) {
- super();
- tile = tileGrinder;
- this.player = player;
+ public ContainerRecycler(TileRecycler tileGrinder, EntityPlayer player)
+ {
+ super();
+ tile = tileGrinder;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
- this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
+ // input
+ this.addSlotToContainer(new Slot(tileGrinder.inventory, 0, 56, 34));
+ this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
+ // upgrades
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 2, 152, 8));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 3, 152, 26));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 4, 152, 44));
+ this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 5, 152, 62));
- // upgrades
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 2, 152, 8));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 3, 152, 26));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 4, 152, 44));
- this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 5, 152, 62));
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer p_75145_1_)
+ {
+ return true;
+ }
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 10) {
- this.connectionStatus = value;
- }
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 10)
+ {
+ this.connectionStatus = value;
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerRollingMachine.java b/src/main/java/techreborn/client/container/ContainerRollingMachine.java
index 2876a969c..1b4b22c2c 100644
--- a/src/main/java/techreborn/client/container/ContainerRollingMachine.java
+++ b/src/main/java/techreborn/client/container/ContainerRollingMachine.java
@@ -10,107 +10,125 @@ import reborncore.common.container.RebornContainer;
import techreborn.api.RollingMachineRecipe;
import techreborn.tiles.TileRollingMachine;
-public class ContainerRollingMachine extends RebornContainer {
+public class ContainerRollingMachine extends RebornContainer
+{
- EntityPlayer player;
- TileRollingMachine tile;
+ EntityPlayer player;
+ TileRollingMachine tile;
- public ContainerRollingMachine(TileRollingMachine tileRollingmachine, EntityPlayer player) {
- tile = tileRollingmachine;
- this.player = player;
+ public ContainerRollingMachine(TileRollingMachine tileRollingmachine, EntityPlayer player)
+ {
+ tile = tileRollingmachine;
+ this.player = player;
- for (int l = 0; l < 3; l++) {
- for (int k1 = 0; k1 < 3; k1++) {
- this.addSlotToContainer(new Slot(
- tileRollingmachine.craftMatrix, k1 + l * 3,
- 30 + k1 * 18, 17 + l * 18));
- }
- }
+ for (int l = 0; l < 3; l++)
+ {
+ for (int k1 = 0; k1 < 3; k1++)
+ {
+ this.addSlotToContainer(
+ new Slot(tileRollingmachine.craftMatrix, k1 + l * 3, 30 + k1 * 18, 17 + l * 18));
+ }
+ }
- // output
- this.addSlotToContainer(new SlotOutput(tileRollingmachine.inventory, 0, 124, 35));
- // battery
- this.addSlotToContainer(new Slot(tileRollingmachine.inventory, 2, 8, 51));
+ // output
+ this.addSlotToContainer(new SlotOutput(tileRollingmachine.inventory, 0, 124, 35));
+ // battery
+ this.addSlotToContainer(new Slot(tileRollingmachine.inventory, 2, 8, 51));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- @Override
- public final void onCraftMatrixChanged(IInventory inv) {
- ItemStack output = RollingMachineRecipe.instance.findMatchingRecipe(
- tile.craftMatrix, tile.getWorld());
- tile.inventory.setInventorySlotContents(1, output);
- }
+ @Override
+ public final void onCraftMatrixChanged(IInventory inv)
+ {
+ ItemStack output = RollingMachineRecipe.instance.findMatchingRecipe(tile.craftMatrix, tile.getWorld());
+ tile.inventory.setInventorySlotContents(1, output);
+ }
- int currentItemBurnTime;
- int burnTime;
- int energy;
+ int currentItemBurnTime;
+ int burnTime;
+ int energy;
- @Override
- public void onCraftGuiOpened(ICrafting crafting) {
- super.onCraftGuiOpened(crafting);
- crafting.sendProgressBarUpdate(this, 0, tile.runTime);
- crafting.sendProgressBarUpdate(this, 1, tile.tickTime);
- crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
- }
+ @Override
+ public void onCraftGuiOpened(ICrafting crafting)
+ {
+ super.onCraftGuiOpened(crafting);
+ crafting.sendProgressBarUpdate(this, 0, tile.runTime);
+ crafting.sendProgressBarUpdate(this, 1, tile.tickTime);
+ crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
+ }
- @Override
- public void detectAndSendChanges() {
- for (int i = 0; i < this.crafters.size(); i++) {
- ICrafting crafting = (ICrafting) this.crafters.get(i);
- if (this.currentItemBurnTime != tile.runTime) {
- crafting.sendProgressBarUpdate(this, 0, tile.runTime);
- }
- if (this.burnTime != tile.tickTime || tile.tickTime == -1) {
- crafting.sendProgressBarUpdate(this, 1, tile.tickTime);
- }
- if (this.energy != (int) tile.getEnergy()) {
- crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
- }
- }
- super.detectAndSendChanges();
- }
+ @Override
+ public void detectAndSendChanges()
+ {
+ for (int i = 0; i < this.crafters.size(); i++)
+ {
+ ICrafting crafting = (ICrafting) this.crafters.get(i);
+ if (this.currentItemBurnTime != tile.runTime)
+ {
+ crafting.sendProgressBarUpdate(this, 0, tile.runTime);
+ }
+ if (this.burnTime != tile.tickTime || tile.tickTime == -1)
+ {
+ crafting.sendProgressBarUpdate(this, 1, tile.tickTime);
+ }
+ if (this.energy != (int) tile.getEnergy())
+ {
+ crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
+ }
+ }
+ super.detectAndSendChanges();
+ }
- @Override
- public void updateProgressBar(int id, int value) {
- super.updateProgressBar(id, value);
- if (id == 0) {
- this.currentItemBurnTime = value;
- } else if (id == 1) {
- this.burnTime = value;
- } else if (id == 2) {
- this.energy = value;
- }
- this.tile.runTime = this.currentItemBurnTime;
- if(this.burnTime == -1){
- this.burnTime = 0;
- }
- this.tile.tickTime = this.burnTime;
- this.tile.setEnergy(this.energy);
- }
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ super.updateProgressBar(id, value);
+ if (id == 0)
+ {
+ this.currentItemBurnTime = value;
+ } else if (id == 1)
+ {
+ this.burnTime = value;
+ } else if (id == 2)
+ {
+ this.energy = value;
+ }
+ this.tile.runTime = this.currentItemBurnTime;
+ if (this.burnTime == -1)
+ {
+ this.burnTime = 0;
+ }
+ this.tile.tickTime = this.burnTime;
+ this.tile.setEnergy(this.energy);
+ }
- public int getBurnTimeRemainingScaled(int scale) {
- if (burnTime == 0 || this.currentItemBurnTime == 0) {
- return 0;
- }
- return this.burnTime * scale / this.currentItemBurnTime;
- }
+ public int getBurnTimeRemainingScaled(int scale)
+ {
+ if (burnTime == 0 || this.currentItemBurnTime == 0)
+ {
+ return 0;
+ }
+ return this.burnTime * scale / this.currentItemBurnTime;
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerScrapboxinator.java b/src/main/java/techreborn/client/container/ContainerScrapboxinator.java
index 13c6f76ca..61f5e4b57 100644
--- a/src/main/java/techreborn/client/container/ContainerScrapboxinator.java
+++ b/src/main/java/techreborn/client/container/ContainerScrapboxinator.java
@@ -9,55 +9,60 @@ import reborncore.common.container.RebornContainer;
import techreborn.api.SlotUpgrade;
import techreborn.tiles.TileScrapboxinator;
-public class ContainerScrapboxinator extends RebornContainer {
+public class ContainerScrapboxinator extends RebornContainer
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileScrapboxinator tile;
+ TileScrapboxinator tile;
- public int connectionStatus;
+ public int connectionStatus;
- public ContainerScrapboxinator(TileScrapboxinator tileScrapboxinator, EntityPlayer player) {
- super();
- tile = tileScrapboxinator;
- this.player = player;
+ public ContainerScrapboxinator(TileScrapboxinator tileScrapboxinator, EntityPlayer player)
+ {
+ super();
+ tile = tileScrapboxinator;
+ this.player = player;
- // input
- this.addSlotToContainer(new SlotScrapbox(tileScrapboxinator.inventory, 0, 56, 34));
- this.addSlotToContainer(new SlotOutput(tileScrapboxinator.inventory, 1, 116, 34));
+ // input
+ this.addSlotToContainer(new SlotScrapbox(tileScrapboxinator.inventory, 0, 56, 34));
+ this.addSlotToContainer(new SlotOutput(tileScrapboxinator.inventory, 1, 116, 34));
+ // upgrades
+ this.addSlotToContainer(new SlotUpgrade(tileScrapboxinator.inventory, 2, 152, 8));
+ this.addSlotToContainer(new SlotUpgrade(tileScrapboxinator.inventory, 3, 152, 26));
+ this.addSlotToContainer(new SlotUpgrade(tileScrapboxinator.inventory, 4, 152, 44));
+ this.addSlotToContainer(new SlotUpgrade(tileScrapboxinator.inventory, 5, 152, 62));
- // upgrades
- this.addSlotToContainer(new SlotUpgrade(tileScrapboxinator.inventory, 2, 152, 8));
- this.addSlotToContainer(new SlotUpgrade(tileScrapboxinator.inventory, 3, 152, 26));
- this.addSlotToContainer(new SlotUpgrade(tileScrapboxinator.inventory, 4, 152, 44));
- this.addSlotToContainer(new SlotUpgrade(tileScrapboxinator.inventory, 5, 152, 62));
+ int i;
- int i;
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer p_75145_1_)
+ {
+ return true;
+ }
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- if (id == 10) {
- this.connectionStatus = value;
- }
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ if (id == 10)
+ {
+ this.connectionStatus = value;
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerSemifluidGenerator.java b/src/main/java/techreborn/client/container/ContainerSemifluidGenerator.java
index 89fa81c5f..301d01530 100644
--- a/src/main/java/techreborn/client/container/ContainerSemifluidGenerator.java
+++ b/src/main/java/techreborn/client/container/ContainerSemifluidGenerator.java
@@ -7,40 +7,40 @@ import reborncore.client.gui.SlotOutput;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.generator.TileSemifluidGenerator;
-public class ContainerSemifluidGenerator extends RebornContainer {
- public TileSemifluidGenerator tileSemifluidGenerator;
- public EntityPlayer player;
+public class ContainerSemifluidGenerator extends RebornContainer
+{
+ public TileSemifluidGenerator tileSemifluidGenerator;
+ public EntityPlayer player;
- public ContainerSemifluidGenerator(TileSemifluidGenerator tileSemifluidGenerator,
- EntityPlayer player) {
- super();
- this.tileSemifluidGenerator = tileSemifluidGenerator;
- this.player = player;
+ public ContainerSemifluidGenerator(TileSemifluidGenerator tileSemifluidGenerator, EntityPlayer player)
+ {
+ super();
+ this.tileSemifluidGenerator = tileSemifluidGenerator;
+ this.player = player;
- this.addSlotToContainer(new Slot(tileSemifluidGenerator.inventory, 0, 80,
- 17));
- this.addSlotToContainer(new SlotOutput(tileSemifluidGenerator.inventory,
- 1, 80, 53));
- this.addSlotToContainer(new SlotFake(tileSemifluidGenerator.inventory, 2,
- 59, 42, false, false, 1));
+ this.addSlotToContainer(new Slot(tileSemifluidGenerator.inventory, 0, 80, 17));
+ this.addSlotToContainer(new SlotOutput(tileSemifluidGenerator.inventory, 1, 80, 53));
+ this.addSlotToContainer(new SlotFake(tileSemifluidGenerator.inventory, 2, 59, 42, false, false, 1));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerThermalGenerator.java b/src/main/java/techreborn/client/container/ContainerThermalGenerator.java
index 0f35d2213..0fe9e0bb9 100644
--- a/src/main/java/techreborn/client/container/ContainerThermalGenerator.java
+++ b/src/main/java/techreborn/client/container/ContainerThermalGenerator.java
@@ -8,40 +8,40 @@ import reborncore.client.gui.SlotOutput;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.generator.TileThermalGenerator;
-public class ContainerThermalGenerator extends RebornContainer {
- public TileThermalGenerator tileThermalGenerator;
- public EntityPlayer player;
+public class ContainerThermalGenerator extends RebornContainer
+{
+ public TileThermalGenerator tileThermalGenerator;
+ public EntityPlayer player;
- public ContainerThermalGenerator(TileThermalGenerator tileThermalGenerator,
- EntityPlayer player) {
- super();
- this.tileThermalGenerator = tileThermalGenerator;
- this.player = player;
+ public ContainerThermalGenerator(TileThermalGenerator tileThermalGenerator, EntityPlayer player)
+ {
+ super();
+ this.tileThermalGenerator = tileThermalGenerator;
+ this.player = player;
- this.addSlotToContainer(new SlotFluid(tileThermalGenerator.inventory, 0, 80,
- 17));
- this.addSlotToContainer(new SlotOutput(tileThermalGenerator.inventory,
- 1, 80, 53));
- this.addSlotToContainer(new SlotFake(tileThermalGenerator.inventory, 2,
- 59, 42, false, false, 1));
+ this.addSlotToContainer(new SlotFluid(tileThermalGenerator.inventory, 0, 80, 17));
+ this.addSlotToContainer(new SlotOutput(tileThermalGenerator.inventory, 1, 80, 53));
+ this.addSlotToContainer(new SlotFake(tileThermalGenerator.inventory, 2, 59, 42, false, false, 1));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
}
diff --git a/src/main/java/techreborn/client/container/ContainerVacuumFreezer.java b/src/main/java/techreborn/client/container/ContainerVacuumFreezer.java
index f085e7b94..d32446259 100644
--- a/src/main/java/techreborn/client/container/ContainerVacuumFreezer.java
+++ b/src/main/java/techreborn/client/container/ContainerVacuumFreezer.java
@@ -8,70 +8,79 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.client.gui.SlotOutput;
import techreborn.tiles.TileVacuumFreezer;
-public class ContainerVacuumFreezer extends ContainerCrafting {
+public class ContainerVacuumFreezer extends ContainerCrafting
+{
- EntityPlayer player;
+ EntityPlayer player;
- TileVacuumFreezer tile;
+ TileVacuumFreezer tile;
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return true;
- }
+ @Override
+ public boolean canInteractWith(EntityPlayer player)
+ {
+ return true;
+ }
- public int tickTime;
- public int machineStatus;
+ public int tickTime;
+ public int machineStatus;
- public ContainerVacuumFreezer(TileVacuumFreezer tileAlloysmelter,
- EntityPlayer player) {
- super(tileAlloysmelter.crafter);
- tile = tileAlloysmelter;
- this.player = player;
+ public ContainerVacuumFreezer(TileVacuumFreezer tileAlloysmelter, EntityPlayer player)
+ {
+ super(tileAlloysmelter.crafter);
+ tile = tileAlloysmelter;
+ this.player = player;
- // input
- this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 0, 56, 34));
- // outputs
- this.addSlotToContainer(new SlotOutput(tileAlloysmelter.inventory, 1, 116, 35));
+ // input
+ this.addSlotToContainer(new Slot(tileAlloysmelter.inventory, 0, 56, 34));
+ // outputs
+ this.addSlotToContainer(new SlotOutput(tileAlloysmelter.inventory, 1, 116, 35));
- int i;
+ int i;
- for (i = 0; i < 3; ++i) {
- for (int j = 0; j < 9; ++j) {
- this.addSlotToContainer(new Slot(player.inventory, j + i * 9
- + 9, 8 + j * 18, 84 + i * 18));
- }
- }
+ for (i = 0; i < 3; ++i)
+ {
+ for (int j = 0; j < 9; ++j)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+ }
+ }
- for (i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
- 142));
- }
- }
+ for (i = 0; i < 9; ++i)
+ {
+ this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
+ }
+ }
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- for (int i = 0; i < this.crafters.size(); i++) {
- ICrafting icrafting = (ICrafting) this.crafters.get(i);
- if (this.machineStatus != tile.multiBlockStatus) {
- icrafting.sendProgressBarUpdate(this, 3, tile.multiBlockStatus);
- }
- }
- }
+ @Override
+ public void detectAndSendChanges()
+ {
+ super.detectAndSendChanges();
+ for (int i = 0; i < this.crafters.size(); i++)
+ {
+ ICrafting icrafting = (ICrafting) this.crafters.get(i);
+ if (this.machineStatus != tile.multiBlockStatus)
+ {
+ icrafting.sendProgressBarUpdate(this, 3, tile.multiBlockStatus);
+ }
+ }
+ }
- @Override
- public void onCraftGuiOpened(ICrafting crafting) {
- super.onCraftGuiOpened(crafting);
- crafting.sendProgressBarUpdate(this, 3, tile.multiBlockStatus);
- }
+ @Override
+ public void onCraftGuiOpened(ICrafting crafting)
+ {
+ super.onCraftGuiOpened(crafting);
+ crafting.sendProgressBarUpdate(this, 3, tile.multiBlockStatus);
+ }
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- super.updateProgressBar(id, value);
- if (id == 3) {
- machineStatus = value;
- }
- }
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void updateProgressBar(int id, int value)
+ {
+ super.updateProgressBar(id, value);
+ if (id == 3)
+ {
+ machineStatus = value;
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/container/SlotScrapbox.java b/src/main/java/techreborn/client/container/SlotScrapbox.java
index 04b0bfd69..82882b9a4 100644
--- a/src/main/java/techreborn/client/container/SlotScrapbox.java
+++ b/src/main/java/techreborn/client/container/SlotScrapbox.java
@@ -5,20 +5,25 @@ import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import techreborn.init.ModItems;
-public class SlotScrapbox extends Slot {
+public class SlotScrapbox extends Slot
+{
- public SlotScrapbox(IInventory par1iInventory, int par2, int par3, int par4) {
- super(par1iInventory, par2, par3, par4);
- }
+ public SlotScrapbox(IInventory par1iInventory, int par2, int par3, int par4)
+ {
+ super(par1iInventory, par2, par3, par4);
+ }
- public boolean isItemValid(ItemStack par1ItemStack) {
- if(par1ItemStack.getItem()==ModItems.scrapBox){
- return true;
- }
- return false;
- }
+ public boolean isItemValid(ItemStack par1ItemStack)
+ {
+ if (par1ItemStack.getItem() == ModItems.scrapBox)
+ {
+ return true;
+ }
+ return false;
+ }
- public int getSlotStackLimit() {
- return 64;
- }
+ public int getSlotStackLimit()
+ {
+ return 64;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/techreborn/client/gui/GuiAesu.java b/src/main/java/techreborn/client/gui/GuiAesu.java
index b23d64d4d..7dd0c79ed 100644
--- a/src/main/java/techreborn/client/gui/GuiAesu.java
+++ b/src/main/java/techreborn/client/gui/GuiAesu.java
@@ -1,5 +1,8 @@
package techreborn.client.gui;
+import java.awt.*;
+import java.io.IOException;
+
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
@@ -12,54 +15,61 @@ 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
+{
-public class GuiAesu extends GuiContainer {
+ private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/aesu.png");
+ TileAesu aesu;
+ ContainerAesu containerAesu;
- private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/aesu.png");
- TileAesu aesu;
- ContainerAesu containerAesu;
+ public GuiAesu(EntityPlayer player, TileAesu tileaesu)
+ {
+ super(new ContainerAesu(tileaesu, player));
+ this.xSize = 176;
+ this.ySize = 197;
+ aesu = tileaesu;
+ this.containerAesu = (ContainerAesu) this.inventorySlots;
+ }
- public GuiAesu(EntityPlayer player, TileAesu tileaesu) {
- super(new ContainerAesu(tileaesu, player));
- this.xSize = 176;
- this.ySize = 197;
- aesu = tileaesu;
- this.containerAesu = (ContainerAesu) this.inventorySlots;
- }
+ @Override
+ public void initGui()
+ {
+ super.initGui();
+ this.buttonList.clear();
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.buttonList.add(new GuiButton(0, k + 117, l + 20, 15, 15, "++"));
+ this.buttonList.add(new GuiButton(1, k + 117, l + 20 + 20, 15, 15, "+"));
+ this.buttonList.add(new GuiButton(2, k + 117, l + 20 + (20 * 2), 15, 15, "-"));
+ this.buttonList.add(new GuiButton(3, k + 117, l + 20 + (20 * 3), 15, 15, "--"));
+ }
- @Override
- public void initGui() {
- super.initGui();
- this.buttonList.clear();
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.buttonList.add(new GuiButton(0, k + 117, l + 20, 15, 15, "++"));
- this.buttonList.add(new GuiButton(1, k + 117, l + 20 + 20, 15, 15, "+"));
- this.buttonList.add(new GuiButton(2, k + 117, l + 20 + (20 * 2), 15, 15, "-"));
- this.buttonList.add(new GuiButton(3, k + 117, l + 20 + (20 * 3), 15, 15, "--"));
- }
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ this.fontRendererObj.drawString(I18n.translateToLocal("tile.techreborn.aesu.name"), 40, 10,
+ Color.WHITE.getRGB());
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerAesu.euOut) + " /tick", 10, 20,
+ Color.WHITE.getRGB());
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerAesu.storedEu) + " ", 10, 30,
+ Color.WHITE.getRGB());
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerAesu.euChange) + " change", 10, 40,
+ Color.WHITE.getRGB());
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- this.fontRendererObj.drawString(I18n.translateToLocal("tile.techreborn.aesu.name"), 40, 10, Color.WHITE.getRGB());
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerAesu.euOut) + " /tick", 10, 20, Color.WHITE.getRGB());
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerAesu.storedEu) + " ", 10, 30, Color.WHITE.getRGB());
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerAesu.euChange) + " change", 10, 40, Color.WHITE.getRGB());
- }
-
- @Override
- protected void actionPerformed(GuiButton button) throws IOException {
- super.actionPerformed(button);
- PacketHandler.sendPacketToServer(new PacketAesu(button.id, aesu));
- }
+ @Override
+ protected void actionPerformed(GuiButton button) throws IOException
+ {
+ super.actionPerformed(button);
+ PacketHandler.sendPacketToServer(new PacketAesu(button.id, aesu));
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java b/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java
index 23c105d8f..07ac3f977 100644
--- a/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java
+++ b/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java
@@ -8,56 +8,58 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerAlloyFurnace;
import techreborn.tiles.TileAlloyFurnace;
-public class GuiAlloyFurnace extends GuiContainer {
+public class GuiAlloyFurnace extends GuiContainer
+{
- private static final ResourceLocation texture = new ResourceLocation(
- "techreborn", "textures/gui/alloy_furnace.png");
+ private static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/alloy_furnace.png");
- TileAlloyFurnace alloyfurnace;
+ TileAlloyFurnace alloyfurnace;
- ContainerAlloyFurnace containerAlloyFurnace;
+ ContainerAlloyFurnace containerAlloyFurnace;
- public GuiAlloyFurnace(EntityPlayer player,
- TileAlloyFurnace tileAlloyFurnace) {
- super(new ContainerAlloyFurnace(tileAlloyFurnace, player));
- this.xSize = 176;
- this.ySize = 167;
- this.alloyfurnace = tileAlloyFurnace;
- this.containerAlloyFurnace = (ContainerAlloyFurnace) this.inventorySlots;
- }
+ public GuiAlloyFurnace(EntityPlayer player, TileAlloyFurnace tileAlloyFurnace)
+ {
+ super(new ContainerAlloyFurnace(tileAlloyFurnace, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ this.alloyfurnace = tileAlloyFurnace;
+ this.containerAlloyFurnace = (ContainerAlloyFurnace) this.inventorySlots;
+ }
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- super.initGui();
- }
+ @Override
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ super.initGui();
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
- int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- if (this.alloyfurnace.isBurning()) {
- int i1 = this.alloyfurnace.getBurnTimeRemainingScaled(13);
- this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 1);
- i1 = this.alloyfurnace.getCookProgressScaled(24);
- this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16);
- }
- }
+ if (this.alloyfurnace.isBurning())
+ {
+ int i1 = this.alloyfurnace.getBurnTimeRemainingScaled(13);
+ this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 1);
+ i1 = this.alloyfurnace.getCookProgressScaled(24);
+ this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16);
+ }
+ }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.alloyfurnace.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
- protected void drawGuiContainerForegroundLayer(int p_146979_1_,
- int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.alloyfurnace.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(
- I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
- this.ySize - 96 + 2, 4210752);
-
- }
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiAlloySmelter.java b/src/main/java/techreborn/client/gui/GuiAlloySmelter.java
index b6a6feb7f..9889fba1c 100644
--- a/src/main/java/techreborn/client/gui/GuiAlloySmelter.java
+++ b/src/main/java/techreborn/client/gui/GuiAlloySmelter.java
@@ -8,50 +8,60 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerAlloySmelter;
import techreborn.tiles.TileAlloySmelter;
-public class GuiAlloySmelter extends GuiContainer {
+public class GuiAlloySmelter extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/electric_alloy_furnace.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/electric_alloy_furnace.png");
- TileAlloySmelter alloysmelter;
+ TileAlloySmelter alloysmelter;
- public GuiAlloySmelter(EntityPlayer player, TileAlloySmelter tilealloysmelter) {
- super(new ContainerAlloySmelter(tilealloysmelter, player));
- this.xSize = 176;
- this.ySize = 167;
- alloysmelter = tilealloysmelter;
- }
+ public GuiAlloySmelter(EntityPlayer player, TileAlloySmelter tilealloysmelter)
+ {
+ super(new ContainerAlloySmelter(tilealloysmelter, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ alloysmelter = tilealloysmelter;
+ }
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- super.initGui();
- }
+ @Override
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ super.initGui();
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = alloysmelter.getProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 79, l + 34, 176, 14, j + 1, 16);
- }
+ j = alloysmelter.getProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 79, l + 34, 176, 14, j + 1, 16);
+ }
- j = alloysmelter.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ j = alloysmelter.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.alloysmelter.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.alloysmelter.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java b/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java
index e0e7ab450..7b6db4ceb 100644
--- a/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java
+++ b/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java
@@ -8,52 +8,62 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerAssemblingMachine;
import techreborn.tiles.TileAssemblingMachine;
-public class GuiAssemblingMachine extends GuiContainer {
+public class GuiAssemblingMachine extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/assembling_machine.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/assembling_machine.png");
- TileAssemblingMachine assemblingmachine;
- ContainerAssemblingMachine containerAssemblingMachine;
+ TileAssemblingMachine assemblingmachine;
+ ContainerAssemblingMachine containerAssemblingMachine;
- public GuiAssemblingMachine(EntityPlayer player, TileAssemblingMachine tileassemblinmachine) {
- super(new ContainerAssemblingMachine(tileassemblinmachine, player));
- containerAssemblingMachine = (ContainerAssemblingMachine) this.inventorySlots;
- this.xSize = 176;
- this.ySize = 167;
- assemblingmachine = tileassemblinmachine;
- }
+ public GuiAssemblingMachine(EntityPlayer player, TileAssemblingMachine tileassemblinmachine)
+ {
+ super(new ContainerAssemblingMachine(tileassemblinmachine, player));
+ containerAssemblingMachine = (ContainerAssemblingMachine) this.inventorySlots;
+ this.xSize = 176;
+ this.ySize = 167;
+ assemblingmachine = tileassemblinmachine;
+ }
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- super.initGui();
- }
+ @Override
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ super.initGui();
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = assemblingmachine.getProgressScaled(20);
- if (j > 0) {
- this.drawTexturedModalRect(k + 86, l + 34, 176, 14, j + 1, 16);
- }
+ j = assemblingmachine.getProgressScaled(20);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 86, l + 34, 176, 14, j + 1, 16);
+ }
- j = assemblingmachine.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ j = assemblingmachine.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.assemblinmachine.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.assemblinmachine.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiBatbox.java b/src/main/java/techreborn/client/gui/GuiBatbox.java
index 4fdcd6dbb..04cc28e71 100644
--- a/src/main/java/techreborn/client/gui/GuiBatbox.java
+++ b/src/main/java/techreborn/client/gui/GuiBatbox.java
@@ -6,60 +6,69 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.powerSystem.PowerSystem;
import techreborn.client.container.ContainerBatbox;
-import techreborn.client.container.ContainerGenerator;
-import techreborn.tiles.generator.TileGenerator;
import techreborn.tiles.storage.TileBatBox;
-public class GuiBatbox extends GuiContainer {
+public class GuiBatbox extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/batbox.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/batbox.png");
- TileBatBox generator;
+ TileBatBox generator;
- ContainerBatbox containerGenerator;
+ ContainerBatbox containerGenerator;
- public GuiBatbox(EntityPlayer player, TileBatBox generator) {
- super(new ContainerBatbox(generator, player));
- this.xSize = 176;
- this.ySize = 167;
- this.generator = generator;
- this.containerGenerator = (ContainerBatbox) this.inventorySlots;
- }
+ public GuiBatbox(EntityPlayer player, TileBatBox generator)
+ {
+ super(new ContainerBatbox(generator, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ this.generator = generator;
+ this.containerGenerator = (ContainerBatbox) this.inventorySlots;
+ }
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- super.initGui();
- }
+ @Override
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ super.initGui();
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = generator.getEnergyScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 109, l + 21 + 12, 176, 0, j + 1, 16);
- }
-//
-// if (containerGenerator.burnTime != 0)
-// {
-// j = containerGenerator.getScaledBurnTime(13);
-// this.drawTexturedModalRect(k + 80, l + 38 + 12 - j, 176, 30 - j, 14, j + 1);
-// }
- }
+ j = generator.getEnergyScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 109, l + 21 + 12, 176, 0, j + 1, 16);
+ }
+ //
+ // if (containerGenerator.burnTime != 0)
+ // {
+ // j = containerGenerator.getScaledBurnTime(13);
+ // this.drawTexturedModalRect(k + 80, l + 38 + 12 - j, 176, 30 - j, 14,
+ // j + 1);
+ // }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.batbox.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.batbox.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(generator.getMaxPower()), 25, this.ySize- 140, 4210752);
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerGenerator.energy), 25, this.ySize- 150, 4210752);
- }
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(generator.getMaxPower()), 25, this.ySize - 140,
+ 4210752);
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerGenerator.energy), 25, this.ySize - 150,
+ 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiBlastFurnace.java b/src/main/java/techreborn/client/gui/GuiBlastFurnace.java
index 17af1866b..694079e3d 100644
--- a/src/main/java/techreborn/client/gui/GuiBlastFurnace.java
+++ b/src/main/java/techreborn/client/gui/GuiBlastFurnace.java
@@ -1,5 +1,7 @@
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;
@@ -17,84 +19,103 @@ import techreborn.init.ModBlocks;
import techreborn.proxies.ClientProxy;
import techreborn.tiles.TileBlastFurnace;
-import java.io.IOException;
+public class GuiBlastFurnace extends GuiContainer
+{
+ public static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/industrial_blast_furnace.png");
-public class GuiBlastFurnace extends GuiContainer {
+ TileBlastFurnace blastfurnace;
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_blast_furnace.png");
+ ContainerBlastFurnace containerBlastFurnace;
- TileBlastFurnace blastfurnace;
-
- ContainerBlastFurnace containerBlastFurnace;
-
- public GuiBlastFurnace(EntityPlayer player, TileBlastFurnace tileblastfurnace) {
- super(new ContainerBlastFurnace(tileblastfurnace, player));
- this.xSize = 176;
- this.ySize = 167;
- blastfurnace = tileblastfurnace;
- this.containerBlastFurnace = (ContainerBlastFurnace) this.inventorySlots;
- }
-
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- GuiButton button = new GuiButton(212, k + 4, l + 6, 20, 20, "");
- buttonList.add(button);
- super.initGui();
- CoordTriplet coordinates = new CoordTriplet(blastfurnace.getPos().getX() - (EnumFacing.getFront(blastfurnace.getFacingInt()).getFrontOffsetX() * 2), blastfurnace.getPos().getY() - 1, blastfurnace.getPos().getZ() - (EnumFacing.getFront(blastfurnace.getFacingInt()).getFrontOffsetZ() * 2));
- if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor) && blastfurnace.getHeat() != 0){
- ClientProxy.multiblockRenderEvent.setMultiblock(null);
- button.displayString = "B";
- } else {
- button.displayString = "A";
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
-
- if (containerBlastFurnace.heat == 0) {
- GuiUtil.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
- this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38, l + 52 + 12 - 0, -1);
- }
-
- int j = 0;
- this.mc.getTextureManager().bindTexture(texture);
- j = blastfurnace.getProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 64, l + 37, 176, 14, j + 1, 16);
- }
-
- j = blastfurnace.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 9, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
- }
-
- }
-
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- super.drawGuiContainerForegroundLayer(p_146979_1_, p_146979_2_);
- String name = I18n.translateToLocal("tile.techreborn.blastfurnace.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- if (containerBlastFurnace.heat != 0) {
- this.fontRendererObj.drawString("Current Heat: " + containerBlastFurnace.heat, 40, 60, 4210752);
- }
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ public GuiBlastFurnace(EntityPlayer player, TileBlastFurnace tileblastfurnace)
+ {
+ super(new ContainerBlastFurnace(tileblastfurnace, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ blastfurnace = tileblastfurnace;
+ this.containerBlastFurnace = (ContainerBlastFurnace) this.inventorySlots;
+ }
@Override
- public void actionPerformed(GuiButton button) throws IOException {
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ GuiButton button = new GuiButton(212, k + 4, l + 6, 20, 20, "");
+ buttonList.add(button);
+ super.initGui();
+ CoordTriplet coordinates = new CoordTriplet(
+ blastfurnace.getPos().getX() - (EnumFacing.getFront(blastfurnace.getFacingInt()).getFrontOffsetX() * 2),
+ blastfurnace.getPos().getY() - 1, blastfurnace.getPos().getZ()
+ - (EnumFacing.getFront(blastfurnace.getFacingInt()).getFrontOffsetZ() * 2));
+ if (coordinates.equals(ClientProxy.multiblockRenderEvent.anchor) && blastfurnace.getHeat() != 0)
+ {
+ ClientProxy.multiblockRenderEvent.setMultiblock(null);
+ button.displayString = "B";
+ } else
+ {
+ button.displayString = "A";
+ }
+ }
+
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+
+ if (containerBlastFurnace.heat == 0)
+ {
+ GuiUtil.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
+ this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38,
+ l + 52 + 12 - 0, -1);
+ }
+
+ int j = 0;
+ this.mc.getTextureManager().bindTexture(texture);
+ j = blastfurnace.getProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 64, l + 37, 176, 14, j + 1, 16);
+ }
+
+ j = blastfurnace.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 9, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+
+ }
+
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ super.drawGuiContainerForegroundLayer(p_146979_1_, p_146979_2_);
+ String name = I18n.translateToLocal("tile.techreborn.blastfurnace.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ if (containerBlastFurnace.heat != 0)
+ {
+ this.fontRendererObj.drawString("Current Heat: " + containerBlastFurnace.heat, 40, 60, 4210752);
+ }
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
+
+ @Override
+ public void actionPerformed(GuiButton button) throws IOException
+ {
super.actionPerformed(button);
- if(button.id == 212){
- if(ClientProxy.multiblockRenderEvent.currentMultiblock == null){
- {//This code here makes a basic multiblock and then sets to the selected one.
+ if (button.id == 212)
+ {
+ if (ClientProxy.multiblockRenderEvent.currentMultiblock == null)
+ {
+ {// This code here makes a basic multiblock and then sets to the
+ // selected one.
Multiblock multiblock = new Multiblock();
multiblock.addComponent(0, 0, 0, ModBlocks.MachineCasing, 0);
multiblock.addComponent(1, 0, 0, ModBlocks.MachineCasing, 0);
@@ -105,7 +126,7 @@ public class GuiBlastFurnace extends GuiContainer {
multiblock.addComponent(-1, 0, 1, ModBlocks.MachineCasing, 0);
multiblock.addComponent(1, 0, -1, ModBlocks.MachineCasing, 0);
multiblock.addComponent(1, 0, 1, ModBlocks.MachineCasing, 0);
-
+
multiblock.addComponent(1, 1, 0, ModBlocks.MachineCasing, 0);
multiblock.addComponent(0, 1, 1, ModBlocks.MachineCasing, 0);
multiblock.addComponent(-1, 1, 0, ModBlocks.MachineCasing, 0);
@@ -114,7 +135,7 @@ public class GuiBlastFurnace extends GuiContainer {
multiblock.addComponent(-1, 1, 1, ModBlocks.MachineCasing, 0);
multiblock.addComponent(1, 1, -1, ModBlocks.MachineCasing, 0);
multiblock.addComponent(1, 1, 1, ModBlocks.MachineCasing, 0);
-
+
multiblock.addComponent(1, 2, 0, ModBlocks.MachineCasing, 0);
multiblock.addComponent(0, 2, 1, ModBlocks.MachineCasing, 0);
multiblock.addComponent(-1, 2, 0, ModBlocks.MachineCasing, 0);
@@ -133,14 +154,20 @@ public class GuiBlastFurnace extends GuiContainer {
multiblock.addComponent(-1, 3, 1, ModBlocks.MachineCasing, 0);
multiblock.addComponent(1, 3, -1, ModBlocks.MachineCasing, 0);
multiblock.addComponent(1, 3, 1, ModBlocks.MachineCasing, 0);
-
+
MultiblockSet set = new MultiblockSet(multiblock);
ClientProxy.multiblockRenderEvent.setMultiblock(set);
- ClientProxy.multiblockRenderEvent.partent = new Location(blastfurnace.getPos().getX(), blastfurnace.getPos().getY(), blastfurnace.getPos().getZ(), blastfurnace.getWorld());
- ClientProxy.multiblockRenderEvent.anchor = new CoordTriplet(blastfurnace.getPos().getX() - (EnumFacing.getFront(blastfurnace.getFacingInt()).getFrontOffsetX() * 2), blastfurnace.getPos().getY() - 1, blastfurnace.getPos().getZ() - (EnumFacing.getFront(blastfurnace.getFacingInt()).getFrontOffsetZ() * 2));
+ ClientProxy.multiblockRenderEvent.partent = new Location(blastfurnace.getPos().getX(),
+ blastfurnace.getPos().getY(), blastfurnace.getPos().getZ(), blastfurnace.getWorld());
+ ClientProxy.multiblockRenderEvent.anchor = new CoordTriplet(
+ blastfurnace.getPos().getX()
+ - (EnumFacing.getFront(blastfurnace.getFacingInt()).getFrontOffsetX() * 2),
+ blastfurnace.getPos().getY() - 1, blastfurnace.getPos().getZ()
+ - (EnumFacing.getFront(blastfurnace.getFacingInt()).getFrontOffsetZ() * 2));
}
button.displayString = "A";
- } else {
+ } else
+ {
ClientProxy.multiblockRenderEvent.setMultiblock(null);
button.displayString = "B";
}
diff --git a/src/main/java/techreborn/client/gui/GuiCentrifuge.java b/src/main/java/techreborn/client/gui/GuiCentrifuge.java
index 11f84130e..19f7f1cad 100644
--- a/src/main/java/techreborn/client/gui/GuiCentrifuge.java
+++ b/src/main/java/techreborn/client/gui/GuiCentrifuge.java
@@ -8,57 +8,66 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerCentrifuge;
import techreborn.tiles.TileCentrifuge;
-public class GuiCentrifuge extends GuiContainer {
+public class GuiCentrifuge extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_centrifuge.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/industrial_centrifuge.png");
- TileCentrifuge centrifuge;
+ TileCentrifuge centrifuge;
- public GuiCentrifuge(EntityPlayer player, TileCentrifuge tileCentrifuge) {
- super(new ContainerCentrifuge(tileCentrifuge, player));
- this.xSize = 176;
- this.ySize = 167;
- centrifuge = tileCentrifuge;
- }
+ public GuiCentrifuge(EntityPlayer player, TileCentrifuge tileCentrifuge)
+ {
+ super(new ContainerCentrifuge(tileCentrifuge, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ centrifuge = tileCentrifuge;
+ }
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- super.initGui();
- }
+ @Override
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ super.initGui();
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = centrifuge.getProgressScaled(11);
- if (j > 0) {
- this.drawTexturedModalRect(k + 83, l + 23 + 10 - j, 177, 15 + 10 - j, 10, j);
- this.drawTexturedModalRect(k + 98, l + 38, 177, 51, j, 10);
- this.drawTexturedModalRect(k + 83, l + 53, 177, 39, 10, j);
- this.drawTexturedModalRect(k + 68 + 10 - j, l + 38, 177 + 10 - j, 27, j, 10);
- }
+ j = centrifuge.getProgressScaled(11);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 83, l + 23 + 10 - j, 177, 15 + 10 - j, 10, j);
+ this.drawTexturedModalRect(k + 98, l + 38, 177, 51, j, 10);
+ this.drawTexturedModalRect(k + 83, l + 53, 177, 39, 10, j);
+ this.drawTexturedModalRect(k + 68 + 10 - j, l + 38, 177 + 10 - j, 27, j, 10);
+ }
- j = centrifuge.getEnergyScaled(12);
+ j = centrifuge.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String namePt1 = I18n.translateToLocal("tile.techreborn.industrialBlock.name");
- String namePt2 = I18n.translateToLocal("tile.techreborn.centrifuge.name").replace(namePt1 + " ", "");
- this.fontRendererObj.drawString(namePt1, 98, 6, 4210752);
- this.fontRendererObj.drawString(namePt2, 98, 14, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- this.fontRendererObj.drawString(centrifuge.getProgressScaled(100) + "%", 98, this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String namePt1 = I18n.translateToLocal("tile.techreborn.industrialBlock.name");
+ String namePt2 = I18n.translateToLocal("tile.techreborn.centrifuge.name").replace(namePt1 + " ", "");
+ this.fontRendererObj.drawString(namePt1, 98, 6, 4210752);
+ this.fontRendererObj.drawString(namePt2, 98, 14, 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ this.fontRendererObj.drawString(centrifuge.getProgressScaled(100) + "%", 98, this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiChargeBench.java b/src/main/java/techreborn/client/gui/GuiChargeBench.java
index 471459415..022d60435 100644
--- a/src/main/java/techreborn/client/gui/GuiChargeBench.java
+++ b/src/main/java/techreborn/client/gui/GuiChargeBench.java
@@ -8,45 +8,53 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerChargeBench;
import techreborn.tiles.TileChargeBench;
-public class GuiChargeBench extends GuiContainer {
+public class GuiChargeBench extends GuiContainer
+{
- private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/chargebench.png");
+ private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/chargebench.png");
- TileChargeBench chargebench;
+ TileChargeBench chargebench;
- public GuiChargeBench(EntityPlayer player, TileChargeBench tile) {
- super(new ContainerChargeBench(tile, player));
- this.xSize = 176;
- this.ySize = 167;
- chargebench = tile;
- }
+ public GuiChargeBench(EntityPlayer player, TileChargeBench tile)
+ {
+ super(new ContainerChargeBench(tile, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ chargebench = tile;
+ }
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- super.initGui();
- }
+ @Override
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ super.initGui();
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = chargebench.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 10, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ j = chargebench.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 10, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.chargebench.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.chargebench.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiChemicalReactor.java b/src/main/java/techreborn/client/gui/GuiChemicalReactor.java
index 6e35ce35a..19e1f3740 100644
--- a/src/main/java/techreborn/client/gui/GuiChemicalReactor.java
+++ b/src/main/java/techreborn/client/gui/GuiChemicalReactor.java
@@ -8,53 +8,63 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerChemicalReactor;
import techreborn.tiles.TileChemicalReactor;
-public class GuiChemicalReactor extends GuiContainer {
+public class GuiChemicalReactor extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/chemical_reactor.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/chemical_reactor.png");
- TileChemicalReactor chemicalReactor;
- ContainerChemicalReactor containerChemicalReactor;
+ TileChemicalReactor chemicalReactor;
+ ContainerChemicalReactor containerChemicalReactor;
- public GuiChemicalReactor(EntityPlayer player, TileChemicalReactor tilechemicalReactor) {
- super(new ContainerChemicalReactor(tilechemicalReactor, player));
- containerChemicalReactor = (ContainerChemicalReactor) this.inventorySlots;
- this.xSize = 176;
- this.ySize = 167;
- chemicalReactor = tilechemicalReactor;
- }
+ public GuiChemicalReactor(EntityPlayer player, TileChemicalReactor tilechemicalReactor)
+ {
+ super(new ContainerChemicalReactor(tilechemicalReactor, player));
+ containerChemicalReactor = (ContainerChemicalReactor) this.inventorySlots;
+ this.xSize = 176;
+ this.ySize = 167;
+ chemicalReactor = tilechemicalReactor;
+ }
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- super.initGui();
- }
+ @Override
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ super.initGui();
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = chemicalReactor.getProgressScaled(11);
- if (j > 0) {
- this.drawTexturedModalRect(k + 73, l + 39, 177, 15, 30, j);
- }
+ j = chemicalReactor.getProgressScaled(11);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 73, l + 39, 177, 15, 30, j);
+ }
- j = chemicalReactor.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
- }
+ j = chemicalReactor.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
- }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.chemicalreactor.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.chemicalreactor.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiChunkLoader.java b/src/main/java/techreborn/client/gui/GuiChunkLoader.java
index f05920c65..b18d58b22 100644
--- a/src/main/java/techreborn/client/gui/GuiChunkLoader.java
+++ b/src/main/java/techreborn/client/gui/GuiChunkLoader.java
@@ -9,59 +9,62 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerChunkloader;
import techreborn.tiles.TileChunkLoader;
-public class GuiChunkLoader extends GuiContainer {
+public class GuiChunkLoader extends GuiContainer
+{
- private GuiButton plusOneButton;
- private GuiButton plusTenButton;
- private GuiButton minusOneButton;
- private GuiButton minusTenButton;
+ private GuiButton plusOneButton;
+ private GuiButton plusTenButton;
+ private GuiButton minusOneButton;
+ private GuiButton minusTenButton;
- private static final ResourceLocation texture = new ResourceLocation(
- "techreborn", "textures/gui/industrial_chunkloader.png");
+ private static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/industrial_chunkloader.png");
- TileChunkLoader chunkloader;
+ TileChunkLoader chunkloader;
- public GuiChunkLoader(EntityPlayer player, TileChunkLoader tilechunkloader) {
- super(new ContainerChunkloader(tilechunkloader, player));
- this.xSize = 176;
- this.ySize = 167;
- chunkloader = tilechunkloader;
- }
+ public GuiChunkLoader(EntityPlayer player, TileChunkLoader tilechunkloader)
+ {
+ super(new ContainerChunkloader(tilechunkloader, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ chunkloader = tilechunkloader;
+ }
- @Override
- public void initGui() {
- super.initGui();
- this.guiLeft = this.width / 2 - this.xSize / 2;
- this.guiTop = this.height / 2 - this.ySize / 2;
- plusOneButton = new GuiButton(0, guiLeft + 5, guiTop + 37, 40, 20, "+1");
- plusTenButton = new GuiButton(0, guiLeft + 45, guiTop + 37, 40, 20, "+10");
+ @Override
+ public void initGui()
+ {
+ super.initGui();
+ this.guiLeft = this.width / 2 - this.xSize / 2;
+ this.guiTop = this.height / 2 - this.ySize / 2;
+ plusOneButton = new GuiButton(0, guiLeft + 5, guiTop + 37, 40, 20, "+1");
+ plusTenButton = new GuiButton(0, guiLeft + 45, guiTop + 37, 40, 20, "+10");
- minusOneButton = new GuiButton(0, guiLeft + 90, guiTop + 37, 40, 20, "-1");
- minusTenButton = new GuiButton(0, guiLeft + 130, guiTop + 37, 40, 20, "-10");
+ minusOneButton = new GuiButton(0, guiLeft + 90, guiTop + 37, 40, 20, "-1");
+ minusTenButton = new GuiButton(0, guiLeft + 130, guiTop + 37, 40, 20, "-10");
- buttonList.add(plusOneButton);
- buttonList.add(plusTenButton);
- buttonList.add(minusOneButton);
- buttonList.add(minusTenButton);
- }
+ buttonList.add(plusOneButton);
+ buttonList.add(plusTenButton);
+ buttonList.add(minusOneButton);
+ buttonList.add(minusTenButton);
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
- int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- }
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_,
- int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.chunkloader.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(
- I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
- this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.chunkloader.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiCompressor.java b/src/main/java/techreborn/client/gui/GuiCompressor.java
index 385c1bac3..9a3c41382 100644
--- a/src/main/java/techreborn/client/gui/GuiCompressor.java
+++ b/src/main/java/techreborn/client/gui/GuiCompressor.java
@@ -8,45 +8,53 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerCompressor;
import techreborn.tiles.teir1.TileCompressor;
-public class GuiCompressor extends GuiContainer {
+public class GuiCompressor extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/compressor.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/compressor.png");
- TileCompressor compressor;
- ContainerCompressor containerGrinder;
+ TileCompressor compressor;
+ ContainerCompressor containerGrinder;
- public GuiCompressor(EntityPlayer player, TileCompressor tilegrinder) {
- super(new ContainerCompressor(tilegrinder, player));
- this.xSize = 176;
- this.ySize = 167;
- compressor = tilegrinder;
- containerGrinder = (ContainerCompressor) this.inventorySlots;
- }
+ public GuiCompressor(EntityPlayer player, TileCompressor tilegrinder)
+ {
+ super(new ContainerCompressor(tilegrinder, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ compressor = tilegrinder;
+ containerGrinder = (ContainerCompressor) this.inventorySlots;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = compressor.getProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
- }
+ j = compressor.getProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
+ }
- j = compressor.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ j = compressor.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.compressor.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.compressor.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiDestructoPack.java b/src/main/java/techreborn/client/gui/GuiDestructoPack.java
index a11b4ec5f..b3ef36381 100644
--- a/src/main/java/techreborn/client/gui/GuiDestructoPack.java
+++ b/src/main/java/techreborn/client/gui/GuiDestructoPack.java
@@ -7,30 +7,34 @@ import net.minecraft.inventory.Container;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
-public class GuiDestructoPack extends GuiContainer {
+public class GuiDestructoPack extends GuiContainer
+{
- private static final ResourceLocation texture = new ResourceLocation(
- "techreborn", "textures/gui/destructopack.png");
+ private static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/destructopack.png");
- public GuiDestructoPack(Container container) {
- super(container);
- this.xSize = 176;
- this.ySize = 166;
- }
+ public GuiDestructoPack(Container container)
+ {
+ super(container);
+ this.xSize = 176;
+ this.ySize = 166;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float arg0, int arg1, int arg2) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- Minecraft.getMinecraft().renderEngine.bindTexture(texture);
- drawTexturedModalRect(guiLeft, guiTop, 0, 0, 176, 166);
- }
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float arg0, int arg1, int arg2)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+ drawTexturedModalRect(guiLeft, guiTop, 0, 0, 176, 166);
+ }
- @Override
- protected void drawGuiContainerForegroundLayer(int arg0, int arg1) {
- String name = I18n.translateToLocal("item.techreborn.part.destructoPack.name");
- fontRendererObj.drawString(name, xSize / 2 - fontRendererObj.getStringWidth(name) / 2, 5, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory"), 8,
- this.ySize - 96 + 2, 4210752);
- super.drawGuiContainerForegroundLayer(arg0, arg1);
- }
+ @Override
+ protected void drawGuiContainerForegroundLayer(int arg0, int arg1)
+ {
+ String name = I18n.translateToLocal("item.techreborn.part.destructoPack.name");
+ fontRendererObj.drawString(name, xSize / 2 - fontRendererObj.getStringWidth(name) / 2, 5, 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory"), 8, this.ySize - 96 + 2,
+ 4210752);
+ super.drawGuiContainerForegroundLayer(arg0, arg1);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiElectricFurnace.java b/src/main/java/techreborn/client/gui/GuiElectricFurnace.java
index 11b549a2b..27a600140 100644
--- a/src/main/java/techreborn/client/gui/GuiElectricFurnace.java
+++ b/src/main/java/techreborn/client/gui/GuiElectricFurnace.java
@@ -8,46 +8,54 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerElectricFurnace;
import techreborn.tiles.teir1.TileElectricFurnace;
-public class GuiElectricFurnace extends GuiContainer {
+public class GuiElectricFurnace extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/compressor.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/compressor.png");
- TileElectricFurnace furnace;
- ContainerElectricFurnace containerGrinder;
+ TileElectricFurnace furnace;
+ ContainerElectricFurnace containerGrinder;
- public GuiElectricFurnace(EntityPlayer player, TileElectricFurnace tilegrinder) {
- super(new ContainerElectricFurnace(tilegrinder, player));
- this.xSize = 176;
- this.ySize = 167;
- furnace = tilegrinder;
- containerGrinder = (ContainerElectricFurnace) this.inventorySlots;
- }
+ public GuiElectricFurnace(EntityPlayer player, TileElectricFurnace tilegrinder)
+ {
+ super(new ContainerElectricFurnace(tilegrinder, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ furnace = tilegrinder;
+ containerGrinder = (ContainerElectricFurnace) this.inventorySlots;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = furnace.gaugeProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 78, l + 34, 176, 14, j + 1, 16);
- }
+ j = furnace.gaugeProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 78, l + 34, 176, 14, j + 1, 16);
+ }
- j = furnace.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ j = furnace.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.electricfurnace.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.electricfurnace.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiExtractor.java b/src/main/java/techreborn/client/gui/GuiExtractor.java
index da9031c0f..1fab87035 100644
--- a/src/main/java/techreborn/client/gui/GuiExtractor.java
+++ b/src/main/java/techreborn/client/gui/GuiExtractor.java
@@ -8,45 +8,53 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerExtractor;
import techreborn.tiles.teir1.TileExtractor;
-public class GuiExtractor extends GuiContainer {
+public class GuiExtractor extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/compressor.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/compressor.png");
- TileExtractor extractor;
- ContainerExtractor containerGrinder;
+ TileExtractor extractor;
+ ContainerExtractor containerGrinder;
- public GuiExtractor(EntityPlayer player, TileExtractor tilegrinder) {
- super(new ContainerExtractor(tilegrinder, player));
- this.xSize = 176;
- this.ySize = 167;
- extractor = tilegrinder;
- containerGrinder = (ContainerExtractor) this.inventorySlots;
- }
+ public GuiExtractor(EntityPlayer player, TileExtractor tilegrinder)
+ {
+ super(new ContainerExtractor(tilegrinder, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ extractor = tilegrinder;
+ containerGrinder = (ContainerExtractor) this.inventorySlots;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = extractor.getProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
- }
+ j = extractor.getProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
+ }
- j = extractor.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ j = extractor.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.extractor.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.extractor.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiFusionReactor.java b/src/main/java/techreborn/client/gui/GuiFusionReactor.java
index fdc42c902..f4da4e551 100644
--- a/src/main/java/techreborn/client/gui/GuiFusionReactor.java
+++ b/src/main/java/techreborn/client/gui/GuiFusionReactor.java
@@ -1,5 +1,7 @@
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;
@@ -10,88 +12,110 @@ import reborncore.common.powerSystem.PowerSystem;
import techreborn.client.container.ContainerFusionReactor;
import techreborn.tiles.fusionReactor.TileEntityFusionController;
-import java.io.IOException;
+public class GuiFusionReactor extends GuiContainer
+{
+ public static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/fusion_reactor.png");
-public class GuiFusionReactor extends GuiContainer {
+ ContainerFusionReactor containerFusionReactor;
+ TileEntityFusionController fusionController;
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/fusion_reactor.png");
+ public GuiFusionReactor(EntityPlayer player, TileEntityFusionController tileaesu)
+ {
+ super(new ContainerFusionReactor(tileaesu, player));
+ containerFusionReactor = (ContainerFusionReactor) this.inventorySlots;
+ this.fusionController = tileaesu;
+ }
- ContainerFusionReactor containerFusionReactor;
- TileEntityFusionController fusionController;
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.fusioncontrolcomputer.name");
+ this.fontRendererObj.drawString(name, 87, 6, 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
- public GuiFusionReactor(EntityPlayer player,
- TileEntityFusionController tileaesu) {
- super(new ContainerFusionReactor(tileaesu, player));
- containerFusionReactor = (ContainerFusionReactor) this.inventorySlots;
- this.fusionController = tileaesu;
- }
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerFusionReactor.energy), 11, 8, 16448255);
+ this.fontRendererObj.drawString("Coils: " + (containerFusionReactor.coilStatus == 1 ? "Yes" : "No"), 11, 16,
+ 16448255);
+ if (containerFusionReactor.neededEU > 1 && containerFusionReactor.tickTime < 1)
+ this.fontRendererObj.drawString(
+ "Start: " + percentage(containerFusionReactor.neededEU, containerFusionReactor.energy) + "%", 11,
+ 24, 16448255);
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.fusioncontrolcomputer.name");
- this.fontRendererObj.drawString(name, 87, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
+ }
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerFusionReactor.energy), 11, 8, 16448255);
- this.fontRendererObj.drawString("Coils: " + (containerFusionReactor.coilStatus == 1 ? "Yes" : "No"), 11, 16, 16448255);
- if(containerFusionReactor.neededEU > 1 && containerFusionReactor.tickTime < 1)
- this.fontRendererObj.drawString("Start: " + percentage(containerFusionReactor.neededEU, containerFusionReactor.energy) + "%", 11, 24, 16448255);
+ @Override
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ // GuiButton button = new GuiButton(212, k + this.xSize - 24, l + 4, 20,
+ // 20, "");
+ // buttonList.add(button);
+ super.initGui();
+ // CoordTriplet coordinates = new
+ // CoordTriplet(fusionController.getPos().getX() -
+ // (EnumFacing.getFront(fusionController.getFacingInt()).getFrontOffsetX()
+ // * 2), fusionController.getPos().getY() - 1,
+ // fusionController.getPos().getZ() -
+ // (EnumFacing.getFront(fusionController.getFacingInt()).getFrontOffsetZ()
+ // * 2));
+ // if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor)){
+ // ClientProxy.multiblockRenderEvent.setMultiblock(null);
+ // button.displayString = "B";
+ // } else {
+ // button.displayString = "A";
+ // }
+ }
- }
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- //GuiButton button = new GuiButton(212, k + this.xSize - 24, l + 4, 20, 20, "");
- //buttonList.add(button);
- super.initGui();
- // CoordTriplet coordinates = new CoordTriplet(fusionController.getPos().getX() - (EnumFacing.getFront(fusionController.getFacingInt()).getFrontOffsetX() * 2), fusionController.getPos().getY() - 1, fusionController.getPos().getZ() - (EnumFacing.getFront(fusionController.getFacingInt()).getFrontOffsetZ() * 2));
-// if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor)){
-// ClientProxy.multiblockRenderEvent.setMultiblock(null);
-// button.displayString = "B";
-// } else {
-// button.displayString = "A";
-// }
- }
+ drawTexturedModalRect(k + 88, l + 36, 176, 0, 14, 14);
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ // progressBar
+ drawTexturedModalRect(k + 111, l + 34, 176, 14, containerFusionReactor.getProgressScaled(), 16);
- drawTexturedModalRect(k + 88, l + 36, 176, 0, 14, 14);
+ }
- //progressBar
- drawTexturedModalRect(k + 111, l + 34, 176, 14, containerFusionReactor.getProgressScaled(), 16);
+ public int percentage(int MaxValue, int CurrentValue)
+ {
+ if (CurrentValue == 0)
+ return 0;
+ return (int) ((CurrentValue * 100.0f) / MaxValue);
+ }
- }
-
- public int percentage(int MaxValue, int CurrentValue) {
- if (CurrentValue == 0)
- return 0;
- return (int) ((CurrentValue * 100.0f) / MaxValue);
- }
-
- @Override
- public void actionPerformed(GuiButton button) throws IOException {
- super.actionPerformed(button);
-// if(button.id == 212){
-// if(ClientProxy.multiblockRenderEvent.currentMultiblock == null){
-// {//This code here makes a basic multiblock and then sets to the selected one.
-// MultiblockSet set = new MultiblockSet(ClientMultiBlocks.reactor);
-// ClientProxy.multiblockRenderEvent.setMultiblock(set);
-// ClientProxy.multiblockRenderEvent.partent = new Location(fusionController.getPos().getX(), fusionController.getPos().getY(), fusionController.getPos().getZ(), fusionController.getWorld());
-// ClientProxy.multiblockRenderEvent.anchor = new CoordTriplet(fusionController.getPos().getX() , fusionController.getPos().getY() -1 , fusionController.getPos().getZ());
-// }
-// button.displayString = "A";
-// } else {
-// ClientProxy.multiblockRenderEvent.setMultiblock(null);
-// button.displayString = "B";
-// }
-// }
- }
+ @Override
+ public void actionPerformed(GuiButton button) throws IOException
+ {
+ super.actionPerformed(button);
+ // if(button.id == 212){
+ // if(ClientProxy.multiblockRenderEvent.currentMultiblock == null){
+ // {//This code here makes a basic multiblock and then sets to the
+ // selected one.
+ // MultiblockSet set = new MultiblockSet(ClientMultiBlocks.reactor);
+ // ClientProxy.multiblockRenderEvent.setMultiblock(set);
+ // ClientProxy.multiblockRenderEvent.partent = new
+ // Location(fusionController.getPos().getX(),
+ // fusionController.getPos().getY(), fusionController.getPos().getZ(),
+ // fusionController.getWorld());
+ // ClientProxy.multiblockRenderEvent.anchor = new
+ // CoordTriplet(fusionController.getPos().getX() ,
+ // fusionController.getPos().getY() -1 ,
+ // fusionController.getPos().getZ());
+ // }
+ // button.displayString = "A";
+ // } else {
+ // ClientProxy.multiblockRenderEvent.setMultiblock(null);
+ // button.displayString = "B";
+ // }
+ // }
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiGasTurbine.java b/src/main/java/techreborn/client/gui/GuiGasTurbine.java
index 4538407bd..f4f156546 100644
--- a/src/main/java/techreborn/client/gui/GuiGasTurbine.java
+++ b/src/main/java/techreborn/client/gui/GuiGasTurbine.java
@@ -8,39 +8,41 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerGasTurbine;
import techreborn.tiles.generator.TileGasTurbine;
-public class GuiGasTurbine extends GuiContainer {
+public class GuiGasTurbine extends GuiContainer
+{
- //TODO: use semifluid generator texture
- private static final ResourceLocation texture = new ResourceLocation(
- "techreborn", "textures/gui/ThermalGenerator.png");
+ // TODO: use semifluid generator texture
+ private static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/ThermalGenerator.png");
- TileGasTurbine tile;
+ TileGasTurbine tile;
- public GuiGasTurbine(EntityPlayer player, TileGasTurbine tile) {
- super(new ContainerGasTurbine(tile, player));
- this.xSize = 176;
- this.ySize = 167;
- this.tile = tile;
- }
+ public GuiGasTurbine(EntityPlayer player, TileGasTurbine tile)
+ {
+ super(new ContainerGasTurbine(tile, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ this.tile = tile;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- }
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_,
- int p_146979_2_) {
- String name = "Gas Turbine";
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(
- I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
- this.ySize - 96 + 2, 4210752);
- this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
- this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10,
- 30, 16448255);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = "Gas Turbine";
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
+ this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10, 30, 16448255);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiGenerator.java b/src/main/java/techreborn/client/gui/GuiGenerator.java
index 7f8a0d367..cb3a5432b 100644
--- a/src/main/java/techreborn/client/gui/GuiGenerator.java
+++ b/src/main/java/techreborn/client/gui/GuiGenerator.java
@@ -8,55 +8,64 @@ import reborncore.common.powerSystem.PowerSystem;
import techreborn.client.container.ContainerGenerator;
import techreborn.tiles.generator.TileGenerator;
-public class GuiGenerator extends GuiContainer {
+public class GuiGenerator extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/generator.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/generator.png");
- TileGenerator generator;
+ TileGenerator generator;
- ContainerGenerator containerGenerator;
+ ContainerGenerator containerGenerator;
- public GuiGenerator(EntityPlayer player, TileGenerator generator) {
- super(new ContainerGenerator(generator, player));
- this.xSize = 176;
- this.ySize = 167;
- this.generator = generator;
- this.containerGenerator = (ContainerGenerator) this.inventorySlots;
- }
+ public GuiGenerator(EntityPlayer player, TileGenerator generator)
+ {
+ super(new ContainerGenerator(generator, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ this.generator = generator;
+ this.containerGenerator = (ContainerGenerator) this.inventorySlots;
+ }
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- super.initGui();
- }
+ @Override
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ super.initGui();
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = generator.getEnergyScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 109, l + 21 + 12, 176, 0, j + 1, 16);
- }
+ j = generator.getEnergyScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 109, l + 21 + 12, 176, 0, j + 1, 16);
+ }
- if (containerGenerator.burnTime != 0)
- {
- j = containerGenerator.getScaledBurnTime(13);
- this.drawTexturedModalRect(k + 80, l + 38 + 12 - j, 176, 30 - j, 14, j + 1);
- }
- }
+ if (containerGenerator.burnTime != 0)
+ {
+ j = containerGenerator.getScaledBurnTime(13);
+ this.drawTexturedModalRect(k + 80, l + 38 + 12 - j, 176, 30 - j, 14, j + 1);
+ }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.generator.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.generator.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerGenerator.energy), 25, this.ySize- 150, 4210752);
- }
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerGenerator.energy), 25, this.ySize - 150,
+ 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiGrinder.java b/src/main/java/techreborn/client/gui/GuiGrinder.java
index 7ba5752f4..03cbe310e 100644
--- a/src/main/java/techreborn/client/gui/GuiGrinder.java
+++ b/src/main/java/techreborn/client/gui/GuiGrinder.java
@@ -8,46 +8,54 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerGrinder;
import techreborn.tiles.teir1.TileGrinder;
-public class GuiGrinder extends GuiContainer {
+public class GuiGrinder extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/grinder.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/grinder.png");
- TileGrinder grinder;
- ContainerGrinder containerGrinder;
+ TileGrinder grinder;
+ ContainerGrinder containerGrinder;
- public GuiGrinder(EntityPlayer player, TileGrinder tilegrinder) {
- super(new ContainerGrinder(tilegrinder, player));
- this.xSize = 176;
- this.ySize = 167;
- grinder = tilegrinder;
- containerGrinder = (ContainerGrinder) this.inventorySlots;
- }
+ public GuiGrinder(EntityPlayer player, TileGrinder tilegrinder)
+ {
+ super(new ContainerGrinder(tilegrinder, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ grinder = tilegrinder;
+ containerGrinder = (ContainerGrinder) this.inventorySlots;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = grinder.getProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 79, l + 37, 176, 14, j + 1, 16);
- }
+ j = grinder.getProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 79, l + 37, 176, 14, j + 1, 16);
+ }
- j = grinder.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ j = grinder.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.grinder.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.grinder.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiIDSU.java b/src/main/java/techreborn/client/gui/GuiIDSU.java
index ef4121ec8..2213b28ee 100644
--- a/src/main/java/techreborn/client/gui/GuiIDSU.java
+++ b/src/main/java/techreborn/client/gui/GuiIDSU.java
@@ -1,5 +1,8 @@
package techreborn.client.gui;
+import java.awt.*;
+import java.io.IOException;
+
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
@@ -12,80 +15,90 @@ 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
+{
-public class GuiIDSU extends GuiContainer {
+ private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/aesu.png");
- private static final ResourceLocation texture = new ResourceLocation(
- "techreborn", "textures/gui/aesu.png");
+ TileIDSU idsu;
+ ContainerIDSU containerIDSU;
- TileIDSU idsu;
+ public GuiIDSU(EntityPlayer player, TileIDSU tileIDSU)
+ {
+ super(new ContainerIDSU(tileIDSU, player));
+ this.xSize = 176;
+ this.ySize = 165;
+ idsu = tileIDSU;
+ this.containerIDSU = (ContainerIDSU) this.inventorySlots;
+ }
- ContainerIDSU containerIDSU;
+ @Override
+ public void initGui()
+ {
+ super.initGui();
+ this.buttonList.clear();
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.buttonList.add(new GuiButton(0, k + 128, l + 5, 15, 15, "++"));
+ this.buttonList.add(new GuiButton(1, k + 128, l + 5 + 20, 15, 15, "+"));
+ this.buttonList.add(new GuiButton(2, k + 128, l + 5 + (20 * 2), 15, 15, "-"));
+ this.buttonList.add(new GuiButton(3, k + 128, l + 5 + (20 * 3), 15, 15, "--"));
+ this.buttonList.add(new GuiButton(4, k + 40, l + 10, 10, 10, "+"));
+ }
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ }
- public GuiIDSU(EntityPlayer player, TileIDSU tileIDSU) {
- super(new ContainerIDSU(tileIDSU, player));
- this.xSize = 176;
- this.ySize = 165;
- idsu = tileIDSU;
- this.containerIDSU = (ContainerIDSU) this.inventorySlots;
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ this.fontRendererObj.drawString(I18n.translateToLocal("tile.techreborn.idsu.name"), 40, 10,
+ Color.WHITE.getRGB());
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerIDSU.euOut) + "/tick", 10, 20,
+ Color.WHITE.getRGB());
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerIDSU.storedEu), 10, 30,
+ Color.WHITE.getRGB());
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerIDSU.euChange) + " change", 10, 40,
+ Color.WHITE.getRGB());
+ }
- @Override
- public void initGui() {
- super.initGui();
- this.buttonList.clear();
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.buttonList.add(new GuiButton(0, k + 128, l + 5, 15, 15, "++"));
- this.buttonList.add(new GuiButton(1, k + 128, l + 5 + 20, 15, 15, "+"));
- this.buttonList.add(new GuiButton(2, k + 128, l + 5 + (20 * 2), 15, 15, "-"));
- this.buttonList.add(new GuiButton(3, k + 128, l + 5 + (20 * 3), 15, 15, "--"));
- this.buttonList.add(new GuiButton(4, k + 40, l + 10, 10, 10, "+"));
- }
+ @Override
+ protected void actionPerformed(GuiButton button) throws IOException
+ {
+ super.actionPerformed(button);
+ PacketHandler.sendPacketToServer(new PacketIdsu(button.id, idsu));
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
- int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_,
- int p_146979_2_) {
- this.fontRendererObj.drawString(I18n.translateToLocal("tile.techreborn.idsu.name"), 40, 10, Color.WHITE.getRGB());
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerIDSU.euOut) + "/tick", 10, 20, Color.WHITE.getRGB());
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerIDSU.storedEu), 10, 30, Color.WHITE.getRGB());
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerIDSU.euChange) + " change", 10, 40, Color.WHITE.getRGB());
- }
+ public static boolean isInteger(String s)
+ {
+ return isInteger(s, 10);
+ }
- @Override
- protected void actionPerformed(GuiButton button) throws IOException {
- super.actionPerformed(button);
- PacketHandler.sendPacketToServer(new PacketIdsu(button.id, idsu));
-
- }
-
- public static boolean isInteger(String s) {
- return isInteger(s, 10);
- }
-
- public static boolean isInteger(String s, int radix) {
- if (s.isEmpty()) return false;
- for (int i = 0; i < s.length(); i++) {
- if (i == 0 && s.charAt(i) == '-') {
- if (s.length() == 1) return false;
- else continue;
- }
- if (Character.digit(s.charAt(i), radix) < 0) return false;
- }
- return true;
- }
+ public static boolean isInteger(String s, int radix)
+ {
+ if (s.isEmpty())
+ return false;
+ for (int i = 0; i < s.length(); i++)
+ {
+ if (i == 0 && s.charAt(i) == '-')
+ {
+ if (s.length() == 1)
+ return false;
+ else
+ continue;
+ }
+ if (Character.digit(s.charAt(i), radix) < 0)
+ return false;
+ }
+ return true;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java b/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java
index b36cadd05..2a9701059 100644
--- a/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java
+++ b/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java
@@ -8,58 +8,70 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerImplosionCompressor;
import techreborn.tiles.TileImplosionCompressor;
-public class GuiImplosionCompressor extends GuiContainer {
+public class GuiImplosionCompressor extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/implosion_compressor.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/implosion_compressor.png");
- TileImplosionCompressor compresser;
- ContainerImplosionCompressor containerImplosionCompressor;
+ TileImplosionCompressor compresser;
+ ContainerImplosionCompressor containerImplosionCompressor;
- public GuiImplosionCompressor(EntityPlayer player, TileImplosionCompressor tilecompresser) {
- super(new ContainerImplosionCompressor(tilecompresser, player));
- containerImplosionCompressor = (ContainerImplosionCompressor) this.inventorySlots;
- this.xSize = 176;
- this.ySize = 167;
- compresser = tilecompresser;
- }
+ public GuiImplosionCompressor(EntityPlayer player, TileImplosionCompressor tilecompresser)
+ {
+ super(new ContainerImplosionCompressor(tilecompresser, player));
+ containerImplosionCompressor = (ContainerImplosionCompressor) this.inventorySlots;
+ this.xSize = 176;
+ this.ySize = 167;
+ compresser = tilecompresser;
+ }
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- super.initGui();
- }
+ @Override
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ super.initGui();
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- if (containerImplosionCompressor.multIBlockState == 0) {
- // GuiDraw.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
- this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38, l + 52 + 12 - 0, -1);
- }
-
- int j = 0;
- this.mc.getTextureManager().bindTexture(texture);
- j = compresser.getProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 60, l + 37, 176, 14, j + 1, 16);
- }
+ if (containerImplosionCompressor.multIBlockState == 0)
+ {
+ // GuiDraw.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
+ this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38,
+ l + 52 + 12 - 0, -1);
+ }
- j = compresser.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 14, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ int j = 0;
+ this.mc.getTextureManager().bindTexture(texture);
+ j = compresser.getProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 60, l + 37, 176, 14, j + 1, 16);
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.implosioncompressor.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ j = compresser.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 14, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
+
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.implosioncompressor.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java b/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java
index 2ec53585e..c605b050e 100644
--- a/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java
+++ b/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java
@@ -8,54 +8,63 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerIndustrialElectrolyzer;
import techreborn.tiles.TileIndustrialElectrolyzer;
-public class GuiIndustrialElectrolyzer extends GuiContainer {
+public class GuiIndustrialElectrolyzer extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_electrolyzer.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/industrial_electrolyzer.png");
- TileIndustrialElectrolyzer eletrolyzer;
+ TileIndustrialElectrolyzer eletrolyzer;
- ContainerIndustrialElectrolyzer containerIndustrialElectrolyzer;
+ ContainerIndustrialElectrolyzer containerIndustrialElectrolyzer;
- public GuiIndustrialElectrolyzer(EntityPlayer player, TileIndustrialElectrolyzer tileeletrolyzer) {
- super(new ContainerIndustrialElectrolyzer(tileeletrolyzer, player));
- this.xSize = 176;
- this.ySize = 167;
- eletrolyzer = tileeletrolyzer;
- containerIndustrialElectrolyzer = (ContainerIndustrialElectrolyzer) this.inventorySlots;
- }
+ public GuiIndustrialElectrolyzer(EntityPlayer player, TileIndustrialElectrolyzer tileeletrolyzer)
+ {
+ super(new ContainerIndustrialElectrolyzer(tileeletrolyzer, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ eletrolyzer = tileeletrolyzer;
+ containerIndustrialElectrolyzer = (ContainerIndustrialElectrolyzer) this.inventorySlots;
+ }
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- super.initGui();
- }
+ @Override
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ super.initGui();
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = eletrolyzer.getProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 72, l + 38, 176, 14, j + 1, 16);
- }
+ j = eletrolyzer.getProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 72, l + 38, 176, 14, j + 1, 16);
+ }
- j = eletrolyzer.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 134, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ j = eletrolyzer.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 134, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.industrialelectrolyzer.name");
- this.fontRendererObj.drawString(name, (this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2), 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
- this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.industrialelectrolyzer.name");
+ this.fontRendererObj.drawString(name, (this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2), 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java b/src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java
index de44c0558..424c4f3b9 100644
--- a/src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java
+++ b/src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java
@@ -8,71 +8,82 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerIndustrialGrinder;
import techreborn.tiles.TileIndustrialGrinder;
-public class GuiIndustrialGrinder extends GuiContainer {
+public class GuiIndustrialGrinder extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_grinder.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/industrial_grinder.png");
- TileIndustrialGrinder grinder;
- ContainerIndustrialGrinder containerGrinder;
+ TileIndustrialGrinder grinder;
+ ContainerIndustrialGrinder containerGrinder;
- public GuiIndustrialGrinder(EntityPlayer player, TileIndustrialGrinder tilegrinder) {
- super(new ContainerIndustrialGrinder(tilegrinder, player));
- this.xSize = 176;
- this.ySize = 167;
- grinder = tilegrinder;
- containerGrinder = (ContainerIndustrialGrinder) this.inventorySlots;
- }
+ public GuiIndustrialGrinder(EntityPlayer player, TileIndustrialGrinder tilegrinder)
+ {
+ super(new ContainerIndustrialGrinder(tilegrinder, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ grinder = tilegrinder;
+ containerGrinder = (ContainerIndustrialGrinder) this.inventorySlots;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = grinder.getProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 50, l + 36, 176, 14, j + 1, 16);
- }
+ j = grinder.getProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 50, l + 36, 176, 14, j + 1, 16);
+ }
- j = grinder.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 132, l + 63 + 12 - j, 176, 12 - j, 14, j + 2);
- }
+ j = grinder.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 132, l + 63 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
- if (containerGrinder.connectionStatus != 1) {
- // GuiDraw.drawTooltipBox(k + 30, l + 50 + 12 - j, 114, 10);
- this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38, l + 52 + 12 - j, -1);
- }
+ if (containerGrinder.connectionStatus != 1)
+ {
+ // GuiDraw.drawTooltipBox(k + 30, l + 50 + 12 - j, 114, 10);
+ this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38,
+ l + 52 + 12 - j, -1);
+ }
- //TODO 1.8 nope
-// if (grinder.tank.getFluidAmount() != 0) {
-// IIcon fluidIcon = grinder.tank.getFluid().getFluid().getIcon();
-// if (fluidIcon != null) {
-// this.mc.renderEngine.bindTexture(texture);
-// drawTexturedModalRect(k + 7, l + 15, 176, 31, 20, 55);
-//
-// this.mc.renderEngine
-// .bindTexture(TextureMap.locationBlocksTexture);
-// int liquidHeight = grinder.tank.getFluidAmount() * 47
-// / grinder.tank.getCapacity();
-// GuiUtil.drawRepeated(fluidIcon, k + 11, l + 19 + 47
-// - liquidHeight, 12.0D, liquidHeight, this.zLevel);
-//
-// this.mc.renderEngine.bindTexture(texture);
-//
-// drawTexturedModalRect(k + 11, l + 19, 176, 86, 12, 47);
-// }
-// }
- }
+ // TODO 1.8 nope
+ // if (grinder.tank.getFluidAmount() != 0) {
+ // IIcon fluidIcon = grinder.tank.getFluid().getFluid().getIcon();
+ // if (fluidIcon != null) {
+ // this.mc.renderEngine.bindTexture(texture);
+ // drawTexturedModalRect(k + 7, l + 15, 176, 31, 20, 55);
+ //
+ // this.mc.renderEngine
+ // .bindTexture(TextureMap.locationBlocksTexture);
+ // int liquidHeight = grinder.tank.getFluidAmount() * 47
+ // / grinder.tank.getCapacity();
+ // GuiUtil.drawRepeated(fluidIcon, k + 11, l + 19 + 47
+ // - liquidHeight, 12.0D, liquidHeight, this.zLevel);
+ //
+ // this.mc.renderEngine.bindTexture(texture);
+ //
+ // drawTexturedModalRect(k + 11, l + 19, 176, 86, 12, 47);
+ // }
+ // }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.industrialgrinder.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.industrialgrinder.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java b/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java
index f961d3149..708c8cfc4 100644
--- a/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java
+++ b/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java
@@ -9,80 +9,86 @@ import reborncore.client.gui.GuiUtil;
import techreborn.client.container.ContainerIndustrialSawmill;
import techreborn.tiles.TileIndustrialSawmill;
-public class GuiIndustrialSawmill extends GuiContainer {
+public class GuiIndustrialSawmill extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation(
- "techreborn", "textures/gui/industrial_sawmill.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/industrial_sawmill.png");
- TileIndustrialSawmill sawmill;
+ TileIndustrialSawmill sawmill;
- public GuiIndustrialSawmill(EntityPlayer player,
- TileIndustrialSawmill tilesawmill) {
- super(new ContainerIndustrialSawmill(tilesawmill, player));
- this.xSize = 176;
- this.ySize = 167;
- sawmill = tilesawmill;
- }
+ public GuiIndustrialSawmill(EntityPlayer player, TileIndustrialSawmill tilesawmill)
+ {
+ super(new ContainerIndustrialSawmill(tilesawmill, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ sawmill = tilesawmill;
+ }
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- super.initGui();
- }
+ @Override
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ super.initGui();
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
- int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = sawmill.getProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 56, l + 38, 176, 14, j - 1, 11);
- }
+ j = sawmill.getProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 56, l + 38, 176, 14, j - 1, 11);
+ }
+ j = sawmill.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 33, l + 65 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ // TODO 1.8
+ // if (sawmill.tank.getFluidAmount() != 0) {
+ // IIcon fluidIcon = sawmill.tank.getFluid().getFluid().getIcon();
+ // if (fluidIcon != null) {
+ // this.mc.renderEngine.bindTexture(texture);
+ //
+ //
+ // this.mc.renderEngine
+ // .bindTexture(TextureMap.locationBlocksTexture);
+ // int liquidHeight = sawmill.tank.getFluidAmount() * 47
+ // / sawmill.tank.getCapacity();
+ // GuiUtil.drawRepeated(fluidIcon, k + 11, l + 19 + 47
+ // - liquidHeight, 12.0D, liquidHeight, this.zLevel);
+ //
+ // this.mc.renderEngine.bindTexture(texture);
+ // // drawTexturedModalRect(k + 7, l + 15, 176, 31, 20, 55);
+ // }
+ // }
+ drawTexturedModalRect(k + 11, l + 19, 176, 86, 12, 47);
+ if (sawmill.getMutliBlock() != true)
+ {
+ GuiUtil.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
+ this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38,
+ l + 52 + 12 - 0, -1);
+ }
- j = sawmill.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 33, l + 65 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- //TODO 1.8
-// if (sawmill.tank.getFluidAmount() != 0) {
-// IIcon fluidIcon = sawmill.tank.getFluid().getFluid().getIcon();
-// if (fluidIcon != null) {
-// this.mc.renderEngine.bindTexture(texture);
-//
-//
-// this.mc.renderEngine
-// .bindTexture(TextureMap.locationBlocksTexture);
-// int liquidHeight = sawmill.tank.getFluidAmount() * 47
-// / sawmill.tank.getCapacity();
-// GuiUtil.drawRepeated(fluidIcon, k + 11, l + 19 + 47
-// - liquidHeight, 12.0D, liquidHeight, this.zLevel);
-//
-// this.mc.renderEngine.bindTexture(texture);
-// // drawTexturedModalRect(k + 7, l + 15, 176, 31, 20, 55);
-// }
-// }
- drawTexturedModalRect(k + 11, l + 19, 176, 86, 12, 47);
- if (sawmill.getMutliBlock() != true) {
- GuiUtil.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
- this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38, l + 52 + 12 - 0, -1);
- }
+ }
- }
-
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.industrialsawmill.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(
- I18n.translateToLocalFormatted("container.inventory", new Object[0]), 58,
- this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.industrialsawmill.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 58,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiIronFurnace.java b/src/main/java/techreborn/client/gui/GuiIronFurnace.java
index 98528fe99..4d0410d5e 100644
--- a/src/main/java/techreborn/client/gui/GuiIronFurnace.java
+++ b/src/main/java/techreborn/client/gui/GuiIronFurnace.java
@@ -8,46 +8,55 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerIronFurnace;
import techreborn.tiles.TileIronFurnace;
-public class GuiIronFurnace extends GuiContainer {
+public class GuiIronFurnace extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("minecraft", "textures/gui/container/furnace.png");
+ public static final ResourceLocation texture = new ResourceLocation("minecraft",
+ "textures/gui/container/furnace.png");
- TileIronFurnace furnace;
- ContainerIronFurnace containerGrinder;
+ TileIronFurnace furnace;
+ ContainerIronFurnace containerGrinder;
- public GuiIronFurnace(EntityPlayer player, TileIronFurnace tilegrinder) {
- super(new ContainerIronFurnace(tilegrinder, player));
- this.xSize = 176;
- this.ySize = 167;
- furnace = tilegrinder;
- containerGrinder = (ContainerIronFurnace) this.inventorySlots;
- }
+ public GuiIronFurnace(EntityPlayer player, TileIronFurnace tilegrinder)
+ {
+ super(new ContainerIronFurnace(tilegrinder, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ furnace = tilegrinder;
+ containerGrinder = (ContainerIronFurnace) this.inventorySlots;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
+ int j = 0;
- j = furnace.gaugeProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
- }
+ j = furnace.gaugeProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
+ }
- j = furnace.gaugeFuelScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 57, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ j = furnace.gaugeFuelScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 57, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.ironfurnace.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.ironfurnace.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiLesu.java b/src/main/java/techreborn/client/gui/GuiLesu.java
index 00ccd00c3..acf8a5f7e 100644
--- a/src/main/java/techreborn/client/gui/GuiLesu.java
+++ b/src/main/java/techreborn/client/gui/GuiLesu.java
@@ -1,5 +1,7 @@
package techreborn.client.gui;
+import java.awt.*;
+
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
@@ -9,37 +11,47 @@ import reborncore.common.powerSystem.PowerSystem;
import techreborn.client.container.ContainerLesu;
import techreborn.tiles.lesu.TileLesu;
-import java.awt.*;
+public class GuiLesu extends GuiContainer
+{
-public class GuiLesu extends GuiContainer {
+ private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/aesu.png");
- private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/aesu.png");
- TileLesu aesu;
- ContainerLesu containerLesu;
+ TileLesu aesu;
- public GuiLesu(EntityPlayer player, TileLesu tileaesu) {
- super(new ContainerLesu(tileaesu, player));
- this.xSize = 176;
- this.ySize = 197;
- aesu = tileaesu;
- this.containerLesu = (ContainerLesu) this.inventorySlots;
- }
+ ContainerLesu containerLesu;
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- }
+ public GuiLesu(EntityPlayer player, TileLesu tileaesu)
+ {
+ super(new ContainerLesu(tileaesu, player));
+ this.xSize = 176;
+ this.ySize = 165;
+ aesu = tileaesu;
+ this.containerLesu = (ContainerLesu) this.inventorySlots;
+ }
+
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ }
+
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ this.fontRendererObj.drawString(I18n.translateToLocal("tile.techreborn.lesu.name"), 40, 10,
+ Color.WHITE.getRGB());
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerLesu.euOut) + "/t", 10, 20,
+ Color.WHITE.getRGB());
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerLesu.storedEu), 10, 30,
+ Color.WHITE.getRGB());
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerLesu.euChange) + " change", 10, 40,
+ Color.WHITE.getRGB());
+ this.fontRendererObj.drawString(containerLesu.connectedBlocks + " blocks", 10, 50, Color.WHITE.getRGB());
+ this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerLesu.euStorage) + " max", 10, 60,
+ Color.WHITE.getRGB());
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- this.fontRendererObj.drawString(I18n.translateToLocal("tile.techreborn.lesu.name"), 40, 10, Color.WHITE.getRGB());
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerLesu.euOut) + "/t", 10, 20, Color.WHITE.getRGB());
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerLesu.storedEu), 10, 30, Color.WHITE.getRGB());
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerLesu.euChange) + " change", 10, 40, Color.WHITE.getRGB());
- this.fontRendererObj.drawString(containerLesu.connectedBlocks + " blocks", 10, 50, Color.WHITE.getRGB());
- this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerLesu.euStorage) + " max", 10, 60, Color.WHITE.getRGB());
- }
}
diff --git a/src/main/java/techreborn/client/gui/GuiMatterFabricator.java b/src/main/java/techreborn/client/gui/GuiMatterFabricator.java
index 44514d5f9..521ac1048 100644
--- a/src/main/java/techreborn/client/gui/GuiMatterFabricator.java
+++ b/src/main/java/techreborn/client/gui/GuiMatterFabricator.java
@@ -8,48 +8,51 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerMatterFabricator;
import techreborn.tiles.TileMatterFabricator;
-public class GuiMatterFabricator extends GuiContainer {
+public class GuiMatterFabricator extends GuiContainer
+{
- private static final ResourceLocation texture = new ResourceLocation(
- "techreborn", "textures/gui/matterfabricator.png");
+ private static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/matterfabricator.png");
- TileMatterFabricator matterfab;
+ TileMatterFabricator matterfab;
- ContainerMatterFabricator containerMatterFabricator;
+ ContainerMatterFabricator containerMatterFabricator;
- public GuiMatterFabricator(EntityPlayer player, TileMatterFabricator tilematterfab) {
- super(new ContainerMatterFabricator(tilematterfab, player));
- this.xSize = 176;
- this.ySize = 167;
- matterfab = tilematterfab;
- containerMatterFabricator = (ContainerMatterFabricator) this.inventorySlots;
- }
+ public GuiMatterFabricator(EntityPlayer player, TileMatterFabricator tilematterfab)
+ {
+ super(new ContainerMatterFabricator(tilematterfab, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ matterfab = tilematterfab;
+ containerMatterFabricator = (ContainerMatterFabricator) this.inventorySlots;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
- int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = containerMatterFabricator.getProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 79, l + 34, 176, 14, j + 1, 16);
- }
- }
+ int j = containerMatterFabricator.getProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 79, l + 34, 176, 14, j + 1, 16);
+ }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_,
- int p_146979_2_) {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- String name = I18n.translateToLocal("tile.techreborn.matterfabricator.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(
- I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
- this.ySize - 96 + 2, 4210752);
- this.fontRendererObj.drawString(containerMatterFabricator.getProgressScaled(100) + "%", 80, 50, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ String name = I18n.translateToLocal("tile.techreborn.matterfabricator.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ this.fontRendererObj.drawString(containerMatterFabricator.getProgressScaled(100) + "%", 80, 50, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiQuantumTank.java b/src/main/java/techreborn/client/gui/GuiQuantumTank.java
index c764857f3..4d0317365 100644
--- a/src/main/java/techreborn/client/gui/GuiQuantumTank.java
+++ b/src/main/java/techreborn/client/gui/GuiQuantumTank.java
@@ -8,39 +8,40 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerQuantumTank;
import techreborn.tiles.TileQuantumTank;
-public class GuiQuantumTank extends GuiContainer {
+public class GuiQuantumTank extends GuiContainer
+{
- private static final ResourceLocation texture = new ResourceLocation(
- "techreborn", "textures/gui/thermal_generator.png");
+ private static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/thermal_generator.png");
- TileQuantumTank tile;
+ TileQuantumTank tile;
- public GuiQuantumTank(EntityPlayer player, TileQuantumTank tile) {
- super(new ContainerQuantumTank(tile, player));
- this.xSize = 176;
- this.ySize = 167;
- this.tile = tile;
- }
+ public GuiQuantumTank(EntityPlayer player, TileQuantumTank tile)
+ {
+ super(new ContainerQuantumTank(tile, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ this.tile = tile;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
- int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- }
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_,
- int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.quantumTank.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(
- I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
- this.ySize - 96 + 2, 4210752);
- this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
- this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10,
- 30, 16448255);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.quantumTank.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
+ this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10, 30, 16448255);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiRecycler.java b/src/main/java/techreborn/client/gui/GuiRecycler.java
index 3969442df..41a6aa932 100644
--- a/src/main/java/techreborn/client/gui/GuiRecycler.java
+++ b/src/main/java/techreborn/client/gui/GuiRecycler.java
@@ -8,45 +8,53 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerRecycler;
import techreborn.tiles.teir1.TileRecycler;
-public class GuiRecycler extends GuiContainer {
+public class GuiRecycler extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/compressor.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/compressor.png");
- TileRecycler compressor;
- ContainerRecycler containerGrinder;
+ TileRecycler compressor;
+ ContainerRecycler containerGrinder;
- public GuiRecycler(EntityPlayer player, TileRecycler tilegrinder) {
- super(new ContainerRecycler(tilegrinder, player));
- this.xSize = 176;
- this.ySize = 167;
- compressor = tilegrinder;
- containerGrinder = (ContainerRecycler) this.inventorySlots;
- }
+ public GuiRecycler(EntityPlayer player, TileRecycler tilegrinder)
+ {
+ super(new ContainerRecycler(tilegrinder, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ compressor = tilegrinder;
+ containerGrinder = (ContainerRecycler) this.inventorySlots;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
-
- j = compressor.gaugeProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
- }
+ int j = 0;
- j = compressor.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ j = compressor.gaugeProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.recycler.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ j = compressor.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
+
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.recycler.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiRollingMachine.java b/src/main/java/techreborn/client/gui/GuiRollingMachine.java
index 24774525c..56ec84af5 100644
--- a/src/main/java/techreborn/client/gui/GuiRollingMachine.java
+++ b/src/main/java/techreborn/client/gui/GuiRollingMachine.java
@@ -9,54 +9,59 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerRollingMachine;
import techreborn.tiles.TileRollingMachine;
-public class GuiRollingMachine extends GuiContainer {
+public class GuiRollingMachine extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation(
- "techreborn", "textures/gui/rolling_machine.png");
- TileRollingMachine rollingMachine;
- ContainerRollingMachine containerRollingMachine;
+ public static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/rolling_machine.png");
+ TileRollingMachine rollingMachine;
+ ContainerRollingMachine containerRollingMachine;
- public GuiRollingMachine(EntityPlayer player, TileRollingMachine tileRollingmachine) {
- super(new ContainerRollingMachine(tileRollingmachine, player));
- this.xSize = 176;
- this.ySize = 167;
- rollingMachine = tileRollingmachine;
- containerRollingMachine = (ContainerRollingMachine) this.inventorySlots;
- }
+ public GuiRollingMachine(EntityPlayer player, TileRollingMachine tileRollingmachine)
+ {
+ super(new ContainerRollingMachine(tileRollingmachine, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ rollingMachine = tileRollingmachine;
+ containerRollingMachine = (ContainerRollingMachine) this.inventorySlots;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = this.containerRollingMachine.getBurnTimeRemainingScaled(24);
- this.drawTexturedModalRect(k + 91, l + 34, 176, 14, j + 1, 19);
+ int j = this.containerRollingMachine.getBurnTimeRemainingScaled(24);
+ this.drawTexturedModalRect(k + 91, l + 34, 176, 14, j + 1, 19);
- j = this.rollingMachine.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 7, l + 33 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ j = this.rollingMachine.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 7, l + 33 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_,
- int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.rollingmachine.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(
- I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
- this.ySize - 96 + 2, 4210752);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.rollingmachine.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
- @Override
- public void initGui() {
- this.buttonList.clear();
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
- super.initGui();
- }
+ @Override
+ public void initGui()
+ {
+ this.buttonList.clear();
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R"));
+ super.initGui();
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiScrapboxinator.java b/src/main/java/techreborn/client/gui/GuiScrapboxinator.java
index 03fa03681..c642c2948 100644
--- a/src/main/java/techreborn/client/gui/GuiScrapboxinator.java
+++ b/src/main/java/techreborn/client/gui/GuiScrapboxinator.java
@@ -8,46 +8,55 @@ import net.minecraft.util.ResourceLocation;
import techreborn.client.container.ContainerScrapboxinator;
import techreborn.tiles.TileScrapboxinator;
-public class GuiScrapboxinator extends GuiContainer {
+public class GuiScrapboxinator extends GuiContainer
+{
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/scrapboxinator.png");
+ public static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/scrapboxinator.png");
- TileScrapboxinator tile;
- ContainerScrapboxinator containerScrapboxinator;
+ TileScrapboxinator tile;
+ ContainerScrapboxinator containerScrapboxinator;
- public GuiScrapboxinator(EntityPlayer player, TileScrapboxinator tileScrapboxinator) {
- super(new ContainerScrapboxinator(tileScrapboxinator, player));
- this.xSize = 176;
- this.ySize = 167;
- tile = tileScrapboxinator;
- containerScrapboxinator = (ContainerScrapboxinator) this.inventorySlots;
- }
+ public GuiScrapboxinator(EntityPlayer player, TileScrapboxinator tileScrapboxinator)
+ {
+ super(new ContainerScrapboxinator(tileScrapboxinator, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ tile = tileScrapboxinator;
+ containerScrapboxinator = (ContainerScrapboxinator) this.inventorySlots;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- int j = 0;
-
- j = tile.gaugeProgressScaled(24);
-// System.out.println(compressor.gaugeProgressScaled(10));
- if (j > 0) {
- this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
- }
+ int j = 0;
- j = tile.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
- }
- }
+ j = tile.gaugeProgressScaled(24);
+ // System.out.println(compressor.gaugeProgressScaled(10));
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = net.minecraft.util.text.translation.I18n.translateToLocal("tile.techreborn.scrapboxinator.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
+ j = tile.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
+ }
+
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = net.minecraft.util.text.translation.I18n.translateToLocal("tile.techreborn.scrapboxinator.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2,
+ 4210752);
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiSemifluidGenerator.java b/src/main/java/techreborn/client/gui/GuiSemifluidGenerator.java
index ca101b271..a5b3ae896 100644
--- a/src/main/java/techreborn/client/gui/GuiSemifluidGenerator.java
+++ b/src/main/java/techreborn/client/gui/GuiSemifluidGenerator.java
@@ -8,39 +8,41 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerSemifluidGenerator;
import techreborn.tiles.generator.TileSemifluidGenerator;
-public class GuiSemifluidGenerator extends GuiContainer {
+public class GuiSemifluidGenerator extends GuiContainer
+{
- //TODO: use semifluid generator texture
- private static final ResourceLocation texture = new ResourceLocation(
- "techreborn", "textures/gui/ThermalGenerator.png");
+ // TODO: use semifluid generator texture
+ private static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/ThermalGenerator.png");
- TileSemifluidGenerator tile;
+ TileSemifluidGenerator tile;
- public GuiSemifluidGenerator(EntityPlayer player, TileSemifluidGenerator tile) {
- super(new ContainerSemifluidGenerator(tile, player));
- this.xSize = 176;
- this.ySize = 167;
- this.tile = tile;
- }
+ public GuiSemifluidGenerator(EntityPlayer player, TileSemifluidGenerator tile)
+ {
+ super(new ContainerSemifluidGenerator(tile, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ this.tile = tile;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- }
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_,
- int p_146979_2_) {
- String name = "Semifluid Generator";
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(
- I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
- this.ySize - 96 + 2, 4210752);
- this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
- this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10,
- 30, 16448255);
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = "Semifluid Generator";
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
+ this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10, 30, 16448255);
+ }
}
\ No newline at end of file
diff --git a/src/main/java/techreborn/client/gui/GuiThermalGenerator.java b/src/main/java/techreborn/client/gui/GuiThermalGenerator.java
index 74d605d15..bfc18b76e 100644
--- a/src/main/java/techreborn/client/gui/GuiThermalGenerator.java
+++ b/src/main/java/techreborn/client/gui/GuiThermalGenerator.java
@@ -8,40 +8,42 @@ import net.minecraft.util.text.translation.I18n;
import techreborn.client.container.ContainerThermalGenerator;
import techreborn.tiles.generator.TileThermalGenerator;
-public class GuiThermalGenerator extends GuiContainer {
+public class GuiThermalGenerator extends GuiContainer
+{
- private static final ResourceLocation texture = new ResourceLocation(
- "techreborn", "textures/gui/thermal_generator.png");
+ private static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/thermal_generator.png");
- TileThermalGenerator tile;
+ TileThermalGenerator tile;
- public GuiThermalGenerator(EntityPlayer player, TileThermalGenerator tile) {
- super(new ContainerThermalGenerator(tile, player));
- this.xSize = 176;
- this.ySize = 167;
- this.tile = tile;
- }
+ public GuiThermalGenerator(EntityPlayer player, TileThermalGenerator tile)
+ {
+ super(new ContainerThermalGenerator(tile, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ this.tile = tile;
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_,
- int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- }
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_,
- int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.thermalGenerator.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(
- I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
- this.ySize - 96 + 2, 4210752);
- this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
- this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10, 30, 16448255);
- this.fontRendererObj.drawString(tile.getEnergy() + "", 10, 40, 16448255);
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.thermalGenerator.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
+ this.fontRendererObj.drawString(tile.tank.getFluidAmount() + "", 10, 30, 16448255);
+ this.fontRendererObj.drawString(tile.getEnergy() + "", 10, 40, 16448255);
- }
+ }
}
diff --git a/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java b/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java
index c68b120d8..710ebbf2b 100644
--- a/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java
+++ b/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java
@@ -1,5 +1,7 @@
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;
@@ -15,87 +17,107 @@ import techreborn.client.container.ContainerVacuumFreezer;
import techreborn.proxies.ClientProxy;
import techreborn.tiles.TileVacuumFreezer;
-import java.io.IOException;
+public class GuiVacuumFreezer extends GuiContainer
+{
-public class GuiVacuumFreezer extends GuiContainer {
+ public static final ResourceLocation texture = new ResourceLocation("techreborn",
+ "textures/gui/vacuum_freezer.png");
- public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/vacuum_freezer.png");
+ TileVacuumFreezer crafter;
+ ContainerVacuumFreezer containerVacuumFreezer;
- TileVacuumFreezer crafter;
- ContainerVacuumFreezer containerVacuumFreezer;
+ public GuiVacuumFreezer(EntityPlayer player, TileVacuumFreezer tilealloysmelter)
+ {
+ super(new ContainerVacuumFreezer(tilealloysmelter, player));
+ this.xSize = 176;
+ this.ySize = 167;
+ crafter = tilealloysmelter;
+ this.containerVacuumFreezer = (ContainerVacuumFreezer) this.inventorySlots;
+ }
- public GuiVacuumFreezer(EntityPlayer player, TileVacuumFreezer tilealloysmelter) {
- super(new ContainerVacuumFreezer(tilealloysmelter, player));
- this.xSize = 176;
- this.ySize = 167;
- crafter = tilealloysmelter;
- this.containerVacuumFreezer = (ContainerVacuumFreezer) this.inventorySlots;
- }
+ @Override
+ public void initGui()
+ {
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ GuiButton button = new GuiButton(212, k + this.xSize - 24, l + 4, 20, 20, "");
+ buttonList.add(button);
+ super.initGui();
+ CoordTriplet coordinates = new CoordTriplet(crafter.getPos().getX(), crafter.getPos().getY() - 5,
+ crafter.getPos().getZ());
+ if (coordinates.equals(ClientProxy.multiblockRenderEvent.anchor))
+ {
+ ClientProxy.multiblockRenderEvent.setMultiblock(null);
+ button.displayString = "B";
+ } else
+ {
+ button.displayString = "A";
+ }
+ }
- @Override
- public void initGui() {
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- GuiButton button = new GuiButton(212, k + this.xSize - 24, l + 4, 20, 20, "");
- buttonList.add(button);
- super.initGui();
- CoordTriplet coordinates = new CoordTriplet(crafter.getPos().getX(), crafter.getPos().getY() - 5, crafter.getPos().getZ());
- if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor)){
- ClientProxy.multiblockRenderEvent.setMultiblock(null);
- button.displayString = "B";
- } else {
- button.displayString = "A";
- }
- }
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
+ {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(texture);
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(texture);
- int k = (this.width - this.xSize) / 2;
- int l = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ int j = 0;
- int j = 0;
+ j = crafter.getProgressScaled(24);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 79, l + 37, 176, 14, j + 1, 16);
+ }
- j = crafter.getProgressScaled(24);
- if (j > 0) {
- this.drawTexturedModalRect(k + 79, l + 37, 176, 14, j + 1, 16);
- }
+ j = crafter.getEnergyScaled(12);
+ if (j > 0)
+ {
+ this.drawTexturedModalRect(k + 26, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
+ }
- j = crafter.getEnergyScaled(12);
- if (j > 0) {
- this.drawTexturedModalRect(k + 26, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
- }
+ if (containerVacuumFreezer.machineStatus == 0)
+ {
+ GuiUtil.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
+ this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38,
+ l + 52 + 12 - 0, -1);
+ }
+ }
- if (containerVacuumFreezer.machineStatus == 0) {
- GuiUtil.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
- this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38, l + 52 + 12 - 0, -1);
- }
- }
+ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
+ {
+ String name = I18n.translateToLocal("tile.techreborn.vacuumfreezer.name");
+ this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6,
+ 4210752);
+ this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
+ this.ySize - 96 + 2, 4210752);
+ }
- protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
- String name = I18n.translateToLocal("tile.techreborn.vacuumfreezer.name");
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
- }
-
- @Override
- public void actionPerformed(GuiButton button) throws IOException {
- super.actionPerformed(button);
- if(button.id == 212){
- if(ClientProxy.multiblockRenderEvent.currentMultiblock == null){
- {//This code here makes a basic multiblock and then sets to the selected one.
- MultiblockSet set = new MultiblockSet(ClientMultiBlocks.frezzer);
- ClientProxy.multiblockRenderEvent.setMultiblock(set);
- ClientProxy.multiblockRenderEvent.partent = new Location(crafter.getPos().getX(), crafter.getPos().getY(), crafter.getPos().getZ(), crafter.getWorld());
- ClientProxy.multiblockRenderEvent.anchor = new CoordTriplet(crafter.getPos().getX() , crafter.getPos().getY() -5 , crafter.getPos().getZ());
- }
- button.displayString = "A";
- } else {
- ClientProxy.multiblockRenderEvent.setMultiblock(null);
- button.displayString = "B";
- }
- }
- }
+ @Override
+ public void actionPerformed(GuiButton button) throws IOException
+ {
+ super.actionPerformed(button);
+ if (button.id == 212)
+ {
+ if (ClientProxy.multiblockRenderEvent.currentMultiblock == null)
+ {
+ {// This code here makes a basic multiblock and then sets to the
+ // selected one.
+ MultiblockSet set = new MultiblockSet(ClientMultiBlocks.frezzer);
+ ClientProxy.multiblockRenderEvent.setMultiblock(set);
+ ClientProxy.multiblockRenderEvent.partent = new Location(crafter.getPos().getX(),
+ crafter.getPos().getY(), crafter.getPos().getZ(), crafter.getWorld());
+ ClientProxy.multiblockRenderEvent.anchor = new CoordTriplet(crafter.getPos().getX(),
+ crafter.getPos().getY() - 5, crafter.getPos().getZ());
+ }
+ button.displayString = "A";
+ } else
+ {
+ ClientProxy.multiblockRenderEvent.setMultiblock(null);
+ button.displayString = "B";
+ }
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/hud/ChargeHud.java b/src/main/java/techreborn/client/hud/ChargeHud.java
index c2b4c3d4a..3c140b42d 100644
--- a/src/main/java/techreborn/client/hud/ChargeHud.java
+++ b/src/main/java/techreborn/client/hud/ChargeHud.java
@@ -13,103 +13,119 @@ 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;
import techreborn.client.keybindings.KeyBindings;
import techreborn.config.ConfigTechReborn;
-public class ChargeHud {
- public static final ChargeHud instance = new ChargeHud();
- private static Minecraft mc = Minecraft.getMinecraft();
- public static KeyBindings key;
- public static boolean showHud = true;
+public class ChargeHud
+{
+ public static final ChargeHud instance = new ChargeHud();
+ private static Minecraft mc = Minecraft.getMinecraft();
+ public static KeyBindings key;
+ public static boolean showHud = true;
+ @SideOnly(Side.CLIENT)
+ @SubscribeEvent(priority = EventPriority.LOW)
+ public void onRenderExperienceBar(RenderGameOverlayEvent event)
+ {
+ if (key.config.isPressed())
+ {
+ showHud = !showHud;
+ }
- @SideOnly(Side.CLIENT)
- @SubscribeEvent(priority = EventPriority.LOW)
- public void onRenderExperienceBar(RenderGameOverlayEvent event) {
- if (key.config.isPressed()) {
- showHud = !showHud;
- }
+ if (event.isCancelable() || event.type != ElementType.ALL)
+ return;
- if (event.isCancelable() || event.type != ElementType.ALL)
- return;
+ if (mc.inGameHasFocus || (mc.currentScreen != null && mc.gameSettings.showDebugInfo))
+ {
+ if (ConfigTechReborn.ShowChargeHud)
+ drawChargeHud(event.resolution);
+ }
+ }
- if (mc.inGameHasFocus || (mc.currentScreen != null && mc.gameSettings.showDebugInfo)) {
- if (ConfigTechReborn.ShowChargeHud)
- drawChargeHud(event.resolution);
- }
- }
+ public void drawChargeHud(ScaledResolution res)
+ {
+ EntityPlayer player = mc.thePlayer;
+ ItemStack armorstack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
+ ItemStack stack = mc.thePlayer.inventory.getCurrentItem();
- public void drawChargeHud(ScaledResolution res) {
- EntityPlayer player = mc.thePlayer;
- ItemStack armorstack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
- ItemStack stack = mc.thePlayer.inventory.getCurrentItem();
+ int y = 5;
- int y = 5;
+ if (armorstack != null && ConfigTechReborn.ShowChargeHud
+ && armorstack.getItem() instanceof IEnergyInterfaceItem)
+ {
+ double MaxCharge = ((IEnergyInterfaceItem) armorstack.getItem()).getMaxPower(armorstack);
+ double CurrentCharge = ((IEnergyInterfaceItem) armorstack.getItem()).getEnergy(armorstack);
+ Color color = Color.GREEN;
+ double quarter = MaxCharge / 4;
+ double half = MaxCharge / 2;
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glEnable(32826);
+ RenderHelper.enableStandardItemLighting();
+ RenderHelper.enableGUIStandardItemLighting();
+ // Render the stack
+ renderItemStack(armorstack, 0, y - 5);
+ // Get the color depending on current charge
+ if (CurrentCharge <= half)
+ {
+ color = Color.YELLOW;
+ }
+ if (CurrentCharge <= quarter)
+ {
+ color = Color.DARK_RED;
+ }
+ mc.fontRendererObj.drawString(color + PowerSystem.getLocaliszedPower(CurrentCharge) + "/"
+ + PowerSystem.getLocaliszedPower(MaxCharge), 20, y, 0);
+ y += 20;
+ }
- if (armorstack != null && ConfigTechReborn.ShowChargeHud && armorstack.getItem() instanceof IEnergyInterfaceItem) {
- double MaxCharge = ((IEnergyInterfaceItem) armorstack.getItem()).getMaxPower(armorstack);
- double CurrentCharge = ((IEnergyInterfaceItem) armorstack.getItem()).getEnergy(armorstack);
- Color color = Color.GREEN;
- double quarter = MaxCharge / 4;
- double half = MaxCharge / 2;
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- GL11.glEnable(32826);
- RenderHelper.enableStandardItemLighting();
- RenderHelper.enableGUIStandardItemLighting();
- //Render the stack
- renderItemStack(armorstack, 0, y - 5);
- //Get the color depending on current charge
- if (CurrentCharge <= half) {
- color = Color.YELLOW;
- }
- if (CurrentCharge <= quarter) {
- color = Color.DARK_RED;
- }
- mc.fontRendererObj.drawString(color + PowerSystem.getLocaliszedPower(CurrentCharge) + "/" + PowerSystem.getLocaliszedPower(MaxCharge), 20, y, 0);
- y += 20;
- }
+ if (showHud)
+ {
+ if (stack != null && stack.getItem() instanceof IEnergyInterfaceItem)
+ {
+ double MaxCharge = ((IEnergyInterfaceItem) stack.getItem()).getMaxPower(stack);
+ double CurrentCharge = ((IEnergyInterfaceItem) stack.getItem()).getEnergy(stack);
+ Color color = Color.GREEN;
+ double quarter = MaxCharge / 4;
+ double half = MaxCharge / 2;
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glEnable(32826);
+ RenderHelper.enableStandardItemLighting();
+ RenderHelper.enableGUIStandardItemLighting();
+ renderItemStack(stack, 0, y - 5);
+ if (CurrentCharge <= half)
+ {
+ color = Color.YELLOW;
+ }
+ if (CurrentCharge <= quarter)
+ {
+ color = Color.DARK_RED;
+ }
+ mc.fontRendererObj.drawString(color + PowerSystem.getLocaliszedPower(CurrentCharge) + "/"
+ + PowerSystem.getLocaliszedPower(MaxCharge), 20, y, 0);
+ }
+ }
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ }
- if (showHud) {
- if (stack != null && stack.getItem() instanceof IEnergyInterfaceItem) {
- double MaxCharge = ((IEnergyInterfaceItem) stack.getItem()).getMaxPower(stack);
- double CurrentCharge = ((IEnergyInterfaceItem) stack.getItem()).getEnergy(stack);
- Color color = Color.GREEN;
- double quarter = MaxCharge / 4;
- double half = MaxCharge / 2;
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- GL11.glEnable(32826);
- RenderHelper.enableStandardItemLighting();
- RenderHelper.enableGUIStandardItemLighting();
- renderItemStack(stack, 0, y - 5);
- if (CurrentCharge <= half) {
- color = Color.YELLOW;
- }
- if (CurrentCharge <= quarter) {
- color = Color.DARK_RED;
- }
- mc.fontRendererObj.drawString(color + PowerSystem.getLocaliszedPower(CurrentCharge) + "/" + PowerSystem.getLocaliszedPower(MaxCharge), 20, y, 0);
- }
- }
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- }
+ public void renderItemStack(ItemStack stack, int x, int y)
+ {
+ if (stack != null)
+ {
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ RenderHelper.enableGUIStandardItemLighting();
- public void renderItemStack(ItemStack stack, int x, int y)
- {
- if (stack != null)
- {
- GL11.glEnable(GL11.GL_BLEND);
- GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- RenderHelper.enableGUIStandardItemLighting();
+ RenderItem itemRenderer = Minecraft.getMinecraft().getRenderItem();
+ itemRenderer.renderItemAndEffectIntoGUI(stack, x, y);
- RenderItem itemRenderer = Minecraft.getMinecraft().getRenderItem();
- itemRenderer.renderItemAndEffectIntoGUI(stack, x, y);
-
- GL11.glDisable(GL11.GL_LIGHTING);
- }
- }
+ GL11.glDisable(GL11.GL_LIGHTING);
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/keybindings/KeyBindings.java b/src/main/java/techreborn/client/keybindings/KeyBindings.java
index 65eae60d0..07bfa8f66 100644
--- a/src/main/java/techreborn/client/keybindings/KeyBindings.java
+++ b/src/main/java/techreborn/client/keybindings/KeyBindings.java
@@ -1,12 +1,14 @@
package techreborn.client.keybindings;
import net.minecraft.client.settings.KeyBinding;
+
import org.lwjgl.input.Keyboard;
+
import techreborn.lib.ModInfo;
-public class KeyBindings {
+public class KeyBindings
+{
- public static KeyBinding config = new KeyBinding(ModInfo.Keys.CONFIG,
- Keyboard.KEY_P, ModInfo.Keys.CATEGORY);
+ public static KeyBinding config = new KeyBinding(ModInfo.Keys.CONFIG, Keyboard.KEY_P, ModInfo.Keys.CATEGORY);
}
diff --git a/src/main/java/techreborn/client/keybindings/KeyInputEventHandler.java b/src/main/java/techreborn/client/keybindings/KeyInputEventHandler.java
index d5fc2dd1c..061bdac43 100644
--- a/src/main/java/techreborn/client/keybindings/KeyInputEventHandler.java
+++ b/src/main/java/techreborn/client/keybindings/KeyInputEventHandler.java
@@ -5,18 +5,22 @@ import net.minecraftforge.fml.common.gameevent.InputEvent;
import techreborn.Core;
import techreborn.lib.Key;
-public class KeyInputEventHandler {
- private static Key getPressedKeybinding() {
- if (KeyBindings.config.isPressed()) {
- return Key.CONFIG;
- }
+public class KeyInputEventHandler
+{
+ private static Key getPressedKeybinding()
+ {
+ if (KeyBindings.config.isPressed())
+ {
+ return Key.CONFIG;
+ }
- return Key.UNKNOWN;
- }
+ return Key.UNKNOWN;
+ }
- @SubscribeEvent
- public void handleKeyInputEvent(InputEvent.KeyInputEvent event) {
- Core.logHelper.info(getPressedKeybinding());
- }
+ @SubscribeEvent
+ public void handleKeyInputEvent(InputEvent.KeyInputEvent event)
+ {
+ Core.logHelper.info(getPressedKeybinding());
+ }
}
diff --git a/src/main/java/techreborn/client/render/entitys/RenderNukePrimed.java b/src/main/java/techreborn/client/render/entitys/RenderNukePrimed.java
index e730d46be..b43423694 100644
--- a/src/main/java/techreborn/client/render/entitys/RenderNukePrimed.java
+++ b/src/main/java/techreborn/client/render/entitys/RenderNukePrimed.java
@@ -6,10 +6,8 @@ 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.ResourceLocation;
import net.minecraft.util.math.MathHelper;
-import org.lwjgl.opengl.GL11;
import techreborn.blocks.BlockNuke;
import techreborn.entitys.EntityNukePrimed;
import techreborn.init.ModBlocks;
@@ -17,51 +15,59 @@ import techreborn.init.ModBlocks;
/**
* Created by Mark on 13/03/2016.
*/
-public class RenderNukePrimed extends Render {
+public class RenderNukePrimed extends Render
+{
- public RenderNukePrimed(RenderManager renderManager) {
- super(renderManager);
- this.shadowSize = 0.5F;
- }
+ 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.disableLighting();
- GlStateManager.enableBlend();
- GlStateManager.blendFunc(770, 772);
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1F);
- GlStateManager.doPolygonOffset(-3.0F, -3.0F);
- GlStateManager.enablePolygonOffset();
- blockrendererdispatcher.renderBlockBrightness(ModBlocks.nuke.getDefaultState().withProperty(BlockNuke.OVERLAY, true), 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.popMatrix();
- super.doRender(entity, x, y, z, entityYaw, partialTicks);
- }
+ @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.disableLighting();
+ GlStateManager.enableBlend();
+ GlStateManager.blendFunc(770, 772);
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1F);
+ GlStateManager.doPolygonOffset(-3.0F, -3.0F);
+ GlStateManager.enablePolygonOffset();
+ blockrendererdispatcher.renderBlockBrightness(
+ ModBlocks.nuke.getDefaultState().withProperty(BlockNuke.OVERLAY, true), 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.popMatrix();
+ super.doRender(entity, x, y, z, entityYaw, partialTicks);
+ }
- @Override
- protected ResourceLocation getEntityTexture(EntityNukePrimed entity) {
- return TextureMap.locationBlocksTexture;
- }
+ @Override
+ protected ResourceLocation getEntityTexture(EntityNukePrimed entity)
+ {
+ return TextureMap.locationBlocksTexture;
+ }
}
diff --git a/src/main/java/techreborn/client/render/parts/ClientPartLoader.java b/src/main/java/techreborn/client/render/parts/ClientPartLoader.java
index 00acf3ff0..3a25e62ae 100644
--- a/src/main/java/techreborn/client/render/parts/ClientPartLoader.java
+++ b/src/main/java/techreborn/client/render/parts/ClientPartLoader.java
@@ -10,25 +10,30 @@ import techreborn.compat.ICompatModule;
/**
* Created by modmuss50 on 05/03/2016.
*/
-public class ClientPartLoader implements ICompatModule {
+public class ClientPartLoader implements ICompatModule
+{
- @Override
- public void preInit(FMLPreInitializationEvent event) {
- MinecraftForge.EVENT_BUS.register(new ClientPartModelBakery());
- }
+ @Override
+ public void preInit(FMLPreInitializationEvent event)
+ {
+ MinecraftForge.EVENT_BUS.register(new ClientPartModelBakery());
+ }
- @Override
- public void init(FMLInitializationEvent event) {
+ @Override
+ public void init(FMLInitializationEvent event)
+ {
- }
+ }
- @Override
- public void postInit(FMLPostInitializationEvent event) {
+ @Override
+ public void postInit(FMLPostInitializationEvent event)
+ {
- }
+ }
- @Override
- public void serverStarting(FMLServerStartingEvent event) {
+ @Override
+ public void serverStarting(FMLServerStartingEvent event)
+ {
- }
+ }
}
diff --git a/src/main/java/techreborn/client/render/parts/ClientPartModelBakery.java b/src/main/java/techreborn/client/render/parts/ClientPartModelBakery.java
index 4c1a59049..8cad7917a 100644
--- a/src/main/java/techreborn/client/render/parts/ClientPartModelBakery.java
+++ b/src/main/java/techreborn/client/render/parts/ClientPartModelBakery.java
@@ -13,23 +13,28 @@ import techreborn.parts.EnumCableType;
/**
* Created by modmuss50 on 04/03/2016.
*/
-public class ClientPartModelBakery {
-
- @SideOnly(Side.CLIENT)
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public void onModelBake(ModelBakeEvent event){
- for(EnumCableType type : EnumCableType.values()){
- event.getModelRegistry().putObject(new ModelResourceLocation("techreborn:cable#type=" + type.getName().toLowerCase()), new RenderCablePart(type));
- }
- }
-
- @SubscribeEvent
- public void textureStichEvent(TextureStitchEvent event){
- for(EnumCableType type : EnumCableType.values()){
- event.map.registerSprite(new ResourceLocation(type.textureName));
- }
- }
+public class ClientPartModelBakery
+{
+ @SideOnly(Side.CLIENT)
+ @SubscribeEvent(priority = EventPriority.LOWEST)
+ public void onModelBake(ModelBakeEvent event)
+ {
+ for (EnumCableType type : EnumCableType.values())
+ {
+ event.getModelRegistry().putObject(
+ new ModelResourceLocation("techreborn:cable#type=" + type.getName().toLowerCase()),
+ new RenderCablePart(type));
+ }
+ }
+ @SubscribeEvent
+ public void textureStichEvent(TextureStitchEvent event)
+ {
+ for (EnumCableType type : EnumCableType.values())
+ {
+ event.map.registerSprite(new ResourceLocation(type.textureName));
+ }
+ }
}
diff --git a/src/main/java/techreborn/client/render/parts/RenderCablePart.java b/src/main/java/techreborn/client/render/parts/RenderCablePart.java
index 9e17774af..04b942017 100644
--- a/src/main/java/techreborn/client/render/parts/RenderCablePart.java
+++ b/src/main/java/techreborn/client/render/parts/RenderCablePart.java
@@ -1,106 +1,152 @@
package techreborn.client.render.parts;
-import net.minecraft.block.state.IBlockState;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.block.model.*;
-import net.minecraft.client.renderer.texture.TextureAtlasSprite;
-import net.minecraft.util.EnumFacing;
-import net.minecraftforge.common.property.IExtendedBlockState;
-import org.lwjgl.util.vector.Vector3f;
-import reborncore.common.misc.vecmath.Vecs3dCube;
-import techreborn.parts.CableMultipart;
-import techreborn.parts.EnumCableType;
-
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-public class RenderCablePart implements IBakedModel {
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.texture.TextureAtlasSprite;
+import net.minecraft.util.EnumFacing;
+import net.minecraftforge.common.property.IExtendedBlockState;
- private FaceBakery faceBakery = new FaceBakery();
+import org.lwjgl.util.vector.Vector3f;
- private TextureAtlasSprite texture;
+import reborncore.common.misc.vecmath.Vecs3dCube;
+import techreborn.parts.CableMultipart;
+import techreborn.parts.EnumCableType;
- EnumCableType type;
+public class RenderCablePart implements IBakedModel
+{
- public RenderCablePart(EnumCableType type) {
- texture = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(type.textureName);
- this.type = type;
- }
+ private FaceBakery faceBakery = new FaceBakery();
- public void addCubeToList(Vecs3dCube cube, ArrayList list, BlockPartFace face, ModelRotation modelRotation, TextureAtlasSprite cubeTexture) {
- BlockFaceUV uv = new BlockFaceUV(new float[]{(float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMaxX(), (float) cube.getMaxY()}, 0);
- face = new BlockPartFace(null, 0, "", uv);
- list.add(faceBakery.makeBakedQuad(new Vector3f((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMinZ()), new Vector3f((float) cube.getMaxX(), (float) cube.getMinY(), (float) cube.getMaxZ()), face, cubeTexture, EnumFacing.DOWN, modelRotation, null, true, true));//down
- list.add(faceBakery.makeBakedQuad(new Vector3f((float) cube.getMinX(), (float) cube.getMaxY(), (float) cube.getMinZ()), new Vector3f((float) cube.getMaxX(), (float) cube.getMaxY(), (float) cube.getMaxZ()), face, cubeTexture, EnumFacing.UP, modelRotation, null, true, true));//up
- list.add(faceBakery.makeBakedQuad(new Vector3f((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMinZ()), new Vector3f((float) cube.getMaxX(), (float) cube.getMaxY(), (float) cube.getMaxZ()), face, cubeTexture, EnumFacing.NORTH, modelRotation, null, true, true));//north
- list.add(faceBakery.makeBakedQuad(new Vector3f((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMaxZ()), new Vector3f((float) cube.getMaxX(), (float) cube.getMaxY(), (float) cube.getMaxZ()), face, cubeTexture, EnumFacing.SOUTH, modelRotation, null, true, true));//south
- list.add(faceBakery.makeBakedQuad(new Vector3f((float) cube.getMaxX(), (float) cube.getMinY(), (float) cube.getMinZ()), new Vector3f((float) cube.getMaxX(), (float) cube.getMaxY(), (float) cube.getMaxZ()), face, cubeTexture, EnumFacing.EAST, modelRotation, null, true, true));//east
- list.add(faceBakery.makeBakedQuad(new Vector3f((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMinZ()), new Vector3f((float) cube.getMinX(), (float) cube.getMaxY(), (float) cube.getMaxZ()), face, cubeTexture, EnumFacing.WEST, modelRotation, null, true, true));//west
- }
+ private TextureAtlasSprite texture;
- @Override
- public List getQuads(IBlockState blockState, EnumFacing side, long rand) {
- ArrayList list = new ArrayList();
- BlockFaceUV uv = new BlockFaceUV(new float[]{0.0F, 0.0F, 16.0F, 16.0F}, 0);
- BlockPartFace face = new BlockPartFace(null, 0, "", uv);
- double thickness = type.cableThickness;
- double lastThickness = 16 - thickness;
- IExtendedBlockState state = (IExtendedBlockState) blockState;
- if(side != null){
- return Collections.emptyList();
- }
- addCubeToList(new Vecs3dCube(thickness, thickness, thickness, lastThickness, lastThickness, lastThickness), list, face, ModelRotation.X0_Y0, texture);
- if (state != null) {
- if (state.getValue(CableMultipart.UP)) {
- addCubeToList(new Vecs3dCube(thickness, lastThickness, thickness, lastThickness, 16.0, lastThickness), list, face, ModelRotation.X0_Y0, texture);
- }
- if (state.getValue(CableMultipart.DOWN)) {
- addCubeToList(new Vecs3dCube(thickness, 0.0, thickness, lastThickness, thickness, lastThickness), list, face, ModelRotation.X0_Y0, texture);
- }
- if (state.getValue(CableMultipart.NORTH)) {
- addCubeToList(new Vecs3dCube(thickness, thickness, 0.0, lastThickness, lastThickness, thickness), list, face, ModelRotation.X0_Y0, texture);
- }
- if (state.getValue(CableMultipart.SOUTH)) {
- addCubeToList(new Vecs3dCube(thickness, thickness, lastThickness, lastThickness, lastThickness, 16.0), list, face, ModelRotation.X0_Y0, texture);
- }
- if (state.getValue(CableMultipart.EAST)) {
- addCubeToList(new Vecs3dCube(lastThickness, thickness, thickness, 16.0, lastThickness, lastThickness), list, face, ModelRotation.X0_Y0, texture);
- }
- if (state.getValue(CableMultipart.WEST)) {
- addCubeToList(new Vecs3dCube(0.0, thickness, thickness, thickness, lastThickness, lastThickness), list, face, ModelRotation.X0_Y0, texture);
- }
- }
- return list;
- }
+ EnumCableType type;
- @Override
- public boolean isAmbientOcclusion() {
- return false;
- }
+ public RenderCablePart(EnumCableType type)
+ {
+ texture = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(type.textureName);
+ this.type = type;
+ }
- @Override
- public boolean isGui3d() {
- return true;
- }
+ public void addCubeToList(Vecs3dCube cube, ArrayList list, BlockPartFace face,
+ ModelRotation modelRotation, TextureAtlasSprite cubeTexture)
+ {
+ BlockFaceUV uv = new BlockFaceUV(new float[] { (float) cube.getMinX(), (float) cube.getMinY(),
+ (float) cube.getMaxX(), (float) cube.getMaxY() }, 0);
+ face = new BlockPartFace(null, 0, "", uv);
+ list.add(faceBakery.makeBakedQuad(
+ new Vector3f((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMinZ()),
+ new Vector3f((float) cube.getMaxX(), (float) cube.getMinY(), (float) cube.getMaxZ()), face, cubeTexture,
+ EnumFacing.DOWN, modelRotation, null, true, true));// down
+ list.add(faceBakery.makeBakedQuad(
+ new Vector3f((float) cube.getMinX(), (float) cube.getMaxY(), (float) cube.getMinZ()),
+ new Vector3f((float) cube.getMaxX(), (float) cube.getMaxY(), (float) cube.getMaxZ()), face, cubeTexture,
+ EnumFacing.UP, modelRotation, null, true, true));// up
+ list.add(faceBakery.makeBakedQuad(
+ new Vector3f((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMinZ()),
+ new Vector3f((float) cube.getMaxX(), (float) cube.getMaxY(), (float) cube.getMaxZ()), face, cubeTexture,
+ EnumFacing.NORTH, modelRotation, null, true, true));// north
+ list.add(faceBakery.makeBakedQuad(
+ new Vector3f((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMaxZ()),
+ new Vector3f((float) cube.getMaxX(), (float) cube.getMaxY(), (float) cube.getMaxZ()), face, cubeTexture,
+ EnumFacing.SOUTH, modelRotation, null, true, true));// south
+ list.add(faceBakery.makeBakedQuad(
+ new Vector3f((float) cube.getMaxX(), (float) cube.getMinY(), (float) cube.getMinZ()),
+ new Vector3f((float) cube.getMaxX(), (float) cube.getMaxY(), (float) cube.getMaxZ()), face, cubeTexture,
+ EnumFacing.EAST, modelRotation, null, true, true));// east
+ list.add(faceBakery.makeBakedQuad(
+ new Vector3f((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMinZ()),
+ new Vector3f((float) cube.getMinX(), (float) cube.getMaxY(), (float) cube.getMaxZ()), face, cubeTexture,
+ EnumFacing.WEST, modelRotation, null, true, true));// west
+ }
- @Override
- public boolean isBuiltInRenderer() {
- return false;
- }
+ @Override
+ public List getQuads(IBlockState blockState, EnumFacing side, long rand)
+ {
+ ArrayList list = new ArrayList();
+ BlockFaceUV uv = new BlockFaceUV(new float[] { 0.0F, 0.0F, 16.0F, 16.0F }, 0);
+ BlockPartFace face = new BlockPartFace(null, 0, "", uv);
+ double thickness = type.cableThickness;
+ double lastThickness = 16 - thickness;
+ IExtendedBlockState state = (IExtendedBlockState) blockState;
+ if (side != null)
+ {
+ return Collections.emptyList();
+ }
+ addCubeToList(new Vecs3dCube(thickness, thickness, thickness, lastThickness, lastThickness, lastThickness),
+ list, face, ModelRotation.X0_Y0, texture);
+ if (state != null)
+ {
+ if (state.getValue(CableMultipart.UP))
+ {
+ addCubeToList(new Vecs3dCube(thickness, lastThickness, thickness, lastThickness, 16.0, lastThickness),
+ list, face, ModelRotation.X0_Y0, texture);
+ }
+ if (state.getValue(CableMultipart.DOWN))
+ {
+ addCubeToList(new Vecs3dCube(thickness, 0.0, thickness, lastThickness, thickness, lastThickness), list,
+ face, ModelRotation.X0_Y0, texture);
+ }
+ if (state.getValue(CableMultipart.NORTH))
+ {
+ addCubeToList(new Vecs3dCube(thickness, thickness, 0.0, lastThickness, lastThickness, thickness), list,
+ face, ModelRotation.X0_Y0, texture);
+ }
+ if (state.getValue(CableMultipart.SOUTH))
+ {
+ addCubeToList(new Vecs3dCube(thickness, thickness, lastThickness, lastThickness, lastThickness, 16.0),
+ list, face, ModelRotation.X0_Y0, texture);
+ }
+ if (state.getValue(CableMultipart.EAST))
+ {
+ addCubeToList(new Vecs3dCube(lastThickness, thickness, thickness, 16.0, lastThickness, lastThickness),
+ list, face, ModelRotation.X0_Y0, texture);
+ }
+ if (state.getValue(CableMultipart.WEST))
+ {
+ addCubeToList(new Vecs3dCube(0.0, thickness, thickness, thickness, lastThickness, lastThickness), list,
+ face, ModelRotation.X0_Y0, texture);
+ }
+ }
+ return list;
+ }
- @Override
- public TextureAtlasSprite getParticleTexture() {
- return texture;
- }
+ @Override
+ public boolean isAmbientOcclusion()
+ {
+ return false;
+ }
- @Override
- public ItemCameraTransforms getItemCameraTransforms() {
- return ItemCameraTransforms.DEFAULT;
- }
+ @Override
+ public boolean isGui3d()
+ {
+ return true;
+ }
- @Override
- public ItemOverrideList getOverrides() {
- return null;
- }
+ @Override
+ public boolean isBuiltInRenderer()
+ {
+ return false;
+ }
+
+ @Override
+ public TextureAtlasSprite getParticleTexture()
+ {
+ return texture;
+ }
+
+ @Override
+ public ItemCameraTransforms getItemCameraTransforms()
+ {
+ return ItemCameraTransforms.DEFAULT;
+ }
+
+ @Override
+ public ItemOverrideList getOverrides()
+ {
+ return null;
+ }
}
diff --git a/src/main/java/techreborn/client/texture/CasingConnectedTextureGenerator.java b/src/main/java/techreborn/client/texture/CasingConnectedTextureGenerator.java
index 0a9acdc7c..4b9cbd73a 100644
--- a/src/main/java/techreborn/client/texture/CasingConnectedTextureGenerator.java
+++ b/src/main/java/techreborn/client/texture/CasingConnectedTextureGenerator.java
@@ -1,5 +1,10 @@
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;
@@ -9,129 +14,150 @@ 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 {
+public class CasingConnectedTextureGenerator extends TextureAtlasSprite
+{
- public BufferedImage output_image = null;
- String type;
- ConnectedTexture connectedTexture;
+ public BufferedImage output_image = null;
+ String type;
+ ConnectedTexture connectedTexture;
- public CasingConnectedTextureGenerator(String name, String type, ConnectedTexture connectedTexture) {
- super(name);
- this.type = type;
- this.connectedTexture = connectedTexture;
- }
+ public CasingConnectedTextureGenerator(String name, String type, ConnectedTexture connectedTexture)
+ {
+ super(name);
+ this.type = type;
+ this.connectedTexture = connectedTexture;
+ }
- public static String getDerivedName(String s2) {
- return ModInfo.MOD_ID + ":machine/casing/" + s2;
- }
+ public static String getDerivedName(String s2)
+ {
+ return ModInfo.MOD_ID + ":machine/casing/" + s2;
+ }
- public static ResourceLocation getTypeResource(String type) {
- return new ResourceLocation("techreborn", "textures/blocks/machine/casing" + type + ".png");
- }
+ public static ResourceLocation getTypeResource(String type)
+ {
+ return new ResourceLocation("techreborn", "textures/blocks/machine/casing" + type + ".png");
+ }
- private static int[] createTexture(int w, int[] type_data, int[] edge_data, ConnectedTexture connectedTexture) {
- int[] new_data = type_data;
- for (int i = 0; i < type_data.length; i += 1) {
- int x = (i % w);
- int y = (i - x) / w;
- if (getAlpha(edge_data[i]) != 0) {
- if (y <= 1 && connectedTexture.isUp()) {
- new_data[i] = edge_data[i];
- }
- if (y >= 14 && connectedTexture.isDown()) {
- new_data[i] = edge_data[i];
- }
- if (x <= 1 && connectedTexture.isRight()) {
- new_data[i] = edge_data[i];
- }
- if (x >= 14 && connectedTexture.isLeft()) {
- new_data[i] = edge_data[i];
- }
- }
- }
- return new_data;
- }
+ private static int[] createTexture(int w, int[] type_data, int[] edge_data, ConnectedTexture connectedTexture)
+ {
+ int[] new_data = type_data;
+ for (int i = 0; i < type_data.length; i += 1)
+ {
+ int x = (i % w);
+ int y = (i - x) / w;
+ if (getAlpha(edge_data[i]) != 0)
+ {
+ if (y <= 1 && connectedTexture.isUp())
+ {
+ new_data[i] = edge_data[i];
+ }
+ if (y >= 14 && connectedTexture.isDown())
+ {
+ new_data[i] = edge_data[i];
+ }
+ if (x <= 1 && connectedTexture.isRight())
+ {
+ new_data[i] = edge_data[i];
+ }
+ if (x >= 14 && connectedTexture.isLeft())
+ {
+ new_data[i] = edge_data[i];
+ }
+ }
+ }
+ return new_data;
+ }
- public static int makeCol(int red, int green, int blue, int alpha) {
- return (alpha << 24) | (red << 16) | (green << 8) | blue;
- }
+ public static int makeCol(int red, int green, int blue, int alpha)
+ {
+ return (alpha << 24) | (red << 16) | (green << 8) | blue;
+ }
- public static int getAlpha(int col) {
- return (col & 0xff000000) >> 24;
- }
+ public static int getAlpha(int col)
+ {
+ return (col & 0xff000000) >> 24;
+ }
- public static int getRed(int col) {
- return (col & 0x00ff0000) >> 16;
- }
+ public static int getRed(int col)
+ {
+ return (col & 0x00ff0000) >> 16;
+ }
- public static int getGreen(int col) {
- return (col & 0x0000ff00) >> 8;
- }
+ public static int getGreen(int col)
+ {
+ return (col & 0x0000ff00) >> 8;
+ }
- public static int getBlue(int col) {
- return col & 0x000000ff;
- }
+ public static int getBlue(int col)
+ {
+ return col & 0x000000ff;
+ }
- @Override
- public boolean hasCustomLoader(IResourceManager manager, ResourceLocation location) {
- return true;
- }
+ @Override
+ public boolean hasCustomLoader(IResourceManager manager, ResourceLocation location)
+ {
+ return true;
+ }
- @Override
- public boolean load(IResourceManager manager, ResourceLocation location) {
- int mp = Minecraft.getMinecraft().gameSettings.mipmapLevels;
- BufferedImage[] type_image = new BufferedImage[1 + mp];
- BufferedImage[] edge_image = new BufferedImage[1 + mp];
+ @Override
+ public boolean load(IResourceManager manager, ResourceLocation location)
+ {
+ int mp = Minecraft.getMinecraft().gameSettings.mipmapLevels;
+ BufferedImage[] type_image = new BufferedImage[1 + mp];
+ BufferedImage[] edge_image = new BufferedImage[1 + mp];
- AnimationMetadataSection animation = null;
+ AnimationMetadataSection animation = null;
- try {
- IResource typeResource = manager.getResource(getTypeResource(type));
- type_image[0] = ImageIO.read(typeResource.getInputStream());
- animation = (AnimationMetadataSection) typeResource.getMetadata("animation");
+ try
+ {
+ IResource typeResource = manager.getResource(getTypeResource(type));
+ type_image[0] = ImageIO.read(typeResource.getInputStream());
+ animation = (AnimationMetadataSection) typeResource.getMetadata("animation");
- IResource edgeResource = manager.getResource(getTypeResource(type + "_edge"));
- edge_image[0] = ImageIO.read(edgeResource.getInputStream());
- } catch (IOException e) {
- e.printStackTrace();
- }
- int w = type_image[0].getWidth();
- int h = type_image[0].getHeight();
+ IResource edgeResource = manager.getResource(getTypeResource(type + "_edge"));
+ edge_image[0] = ImageIO.read(edgeResource.getInputStream());
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ int w = type_image[0].getWidth();
+ int h = type_image[0].getHeight();
- output_image = new BufferedImage(w, h, 2);
- int[] type_data = new int[w * w];
- int[] edge_data = new int[w * w];
+ output_image = new BufferedImage(w, h, 2);
+ int[] type_data = new int[w * w];
+ int[] edge_data = new int[w * w];
- for (int y = 0; y < h; y += w) {
- type_image[0].getRGB(0, y, w, w, type_data, 0, w);
- edge_image[0].getRGB(0, y, w, w, edge_data, 0, w);
- int[] new_data = createTexture(w, type_data, edge_data, connectedTexture);
- output_image.setRGB(0, y, w, w, new_data, 0, w);
- }
+ for (int y = 0; y < h; y += w)
+ {
+ type_image[0].getRGB(0, y, w, w, type_data, 0, w);
+ edge_image[0].getRGB(0, y, w, w, edge_data, 0, w);
+ int[] new_data = createTexture(w, type_data, edge_data, connectedTexture);
+ output_image.setRGB(0, y, w, w, new_data, 0, w);
+ }
- type_image[0] = output_image;
- // this.loadSprite(type_image, animation, (float) Minecraft.getMinecraft().gameSettings.anisotropicFiltering > 1.0F);
- return false;
- }
+ type_image[0] = output_image;
+ // this.loadSprite(type_image, animation, (float)
+ // Minecraft.getMinecraft().gameSettings.anisotropicFiltering > 1.0F);
+ return false;
+ }
-// @SideOnly(Side.CLIENT)
-// public static IIcon genIcon(ConnectedTexture connectedTexture, IIconRegister iconRegister, int texNum, int meta, String[] types) {
-// if (iconRegister instanceof TextureMap) {
-// TextureMap map = (TextureMap) iconRegister;
-// String name = CasingConnectedTextureGenerator.getDerivedName(types[meta] + "." + texNum);
-// TextureAtlasSprite texture = map.getTextureExtry(name);
-// if (texture == null) {
-// texture = new CasingConnectedTextureGenerator(name, types[meta], connectedTexture);
-// map.setTextureEntry(name, texture);
-// }
-// return map.getTextureExtry(name);
-// } else {
-// return null;
-// }
-// }
+ // @SideOnly(Side.CLIENT)
+ // public static IIcon genIcon(ConnectedTexture connectedTexture,
+ // IIconRegister iconRegister, int texNum, int meta, String[] types) {
+ // if (iconRegister instanceof TextureMap) {
+ // TextureMap map = (TextureMap) iconRegister;
+ // String name = CasingConnectedTextureGenerator.getDerivedName(types[meta]
+ // + "." + texNum);
+ // TextureAtlasSprite texture = map.getTextureExtry(name);
+ // if (texture == null) {
+ // texture = new CasingConnectedTextureGenerator(name, types[meta],
+ // connectedTexture);
+ // map.setTextureEntry(name, texture);
+ // }
+ // return map.getTextureExtry(name);
+ // } else {
+ // return null;
+ // }
+ // }
}
diff --git a/src/main/java/techreborn/client/texture/LesuConnectedTextureGenerator.java b/src/main/java/techreborn/client/texture/LesuConnectedTextureGenerator.java
index 5f9a3c3c3..a765b2637 100644
--- a/src/main/java/techreborn/client/texture/LesuConnectedTextureGenerator.java
+++ b/src/main/java/techreborn/client/texture/LesuConnectedTextureGenerator.java
@@ -1,5 +1,10 @@
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;
@@ -9,138 +14,160 @@ 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 {
+public class LesuConnectedTextureGenerator extends TextureAtlasSprite
+{
- public BufferedImage output_image = null;
- String type;
- ConnectedTexture connectedTexture;
+ public BufferedImage output_image = null;
+ String type;
+ ConnectedTexture connectedTexture;
- public LesuConnectedTextureGenerator(String name, String type, ConnectedTexture connectedTexture) {
- super(name);
- this.type = type;
- this.connectedTexture = connectedTexture;
- }
+ public LesuConnectedTextureGenerator(String name, String type, ConnectedTexture connectedTexture)
+ {
+ super(name);
+ this.type = type;
+ this.connectedTexture = connectedTexture;
+ }
- public static String getDerivedName(String s2) {
- return ModInfo.MOD_ID + ":machine/casing/" + s2;
- }
+ public static String getDerivedName(String s2)
+ {
+ return ModInfo.MOD_ID + ":machine/casing/" + s2;
+ }
- public static ResourceLocation getTypeResource(String type) {
- return new ResourceLocation("techreborn", "textures/blocks/machine/" + type + ".png");
- }
+ public static ResourceLocation getTypeResource(String type)
+ {
+ return new ResourceLocation("techreborn", "textures/blocks/machine/" + type + ".png");
+ }
- public static ResourceLocation getLapisResource() {
- return new ResourceLocation("minecraft", "textures/blocks/lapis_block.png");
- }
+ public static ResourceLocation getLapisResource()
+ {
+ return new ResourceLocation("minecraft", "textures/blocks/lapis_block.png");
+ }
+ private static int[] createTexture(int w, int[] type_data, int[] edge_data, ConnectedTexture connectedTexture)
+ {
+ int[] new_data = type_data;
+ for (int i = 0; i < type_data.length; i += 1)
+ {
+ int x = (i % w);
+ int y = (i - x) / w;
+ if (getAlpha(edge_data[i]) != 0)
+ {
+ if (y <= 1 && connectedTexture.isUp())
+ {
+ new_data[i] = edge_data[i];
+ }
+ if (y >= 14 && connectedTexture.isDown())
+ {
+ new_data[i] = edge_data[i];
+ }
+ if (x <= 1 && connectedTexture.isRight())
+ {
+ new_data[i] = edge_data[i];
+ }
+ if (x >= 14 && connectedTexture.isLeft())
+ {
+ new_data[i] = edge_data[i];
+ }
+ }
+ }
+ return new_data;
+ }
- private static int[] createTexture(int w, int[] type_data, int[] edge_data, ConnectedTexture connectedTexture) {
- int[] new_data = type_data;
- for (int i = 0; i < type_data.length; i += 1) {
- int x = (i % w);
- int y = (i - x) / w;
- if (getAlpha(edge_data[i]) != 0) {
- if (y <= 1 && connectedTexture.isUp()) {
- new_data[i] = edge_data[i];
- }
- if (y >= 14 && connectedTexture.isDown()) {
- new_data[i] = edge_data[i];
- }
- if (x <= 1 && connectedTexture.isRight()) {
- new_data[i] = edge_data[i];
- }
- if (x >= 14 && connectedTexture.isLeft()) {
- new_data[i] = edge_data[i];
- }
- }
- }
- return new_data;
- }
+ public static int makeCol(int red, int green, int blue, int alpha)
+ {
+ return (alpha << 24) | (red << 16) | (green << 8) | blue;
+ }
- public static int makeCol(int red, int green, int blue, int alpha) {
- return (alpha << 24) | (red << 16) | (green << 8) | blue;
- }
+ public static int getAlpha(int col)
+ {
+ return (col & 0xff000000) >> 24;
+ }
- public static int getAlpha(int col) {
- return (col & 0xff000000) >> 24;
- }
+ public static int getRed(int col)
+ {
+ return (col & 0x00ff0000) >> 16;
+ }
- public static int getRed(int col) {
- return (col & 0x00ff0000) >> 16;
- }
+ public static int getGreen(int col)
+ {
+ return (col & 0x0000ff00) >> 8;
+ }
- public static int getGreen(int col) {
- return (col & 0x0000ff00) >> 8;
- }
+ public static int getBlue(int col)
+ {
+ return col & 0x000000ff;
+ }
- public static int getBlue(int col) {
- return col & 0x000000ff;
- }
+ @Override
+ public boolean hasCustomLoader(IResourceManager manager, ResourceLocation location)
+ {
+ return true;
+ }
- @Override
- public boolean hasCustomLoader(IResourceManager manager, ResourceLocation location) {
- return true;
- }
+ @Override
+ public boolean load(IResourceManager manager, ResourceLocation location)
+ {
+ int mp = Minecraft.getMinecraft().gameSettings.mipmapLevels;
+ BufferedImage[] type_image = new BufferedImage[1 + mp];
+ BufferedImage[] edge_image = new BufferedImage[1 + mp];
- @Override
- public boolean load(IResourceManager manager, ResourceLocation location) {
- int mp = Minecraft.getMinecraft().gameSettings.mipmapLevels;
- BufferedImage[] type_image = new BufferedImage[1 + mp];
- BufferedImage[] edge_image = new BufferedImage[1 + mp];
+ AnimationMetadataSection animation = null;
- AnimationMetadataSection animation = null;
+ try
+ {
+ IResource typeResource = manager.getResource(getLapisResource());
+ type_image[0] = ImageIO.read(typeResource.getInputStream());
+ animation = (AnimationMetadataSection) typeResource.getMetadata("animation");
- try {
- IResource typeResource = manager.getResource(getLapisResource());
- type_image[0] = ImageIO.read(typeResource.getInputStream());
- animation = (AnimationMetadataSection) typeResource.getMetadata("animation");
+ IResource edgeResource = manager.getResource(getTypeResource("lesu_block"));
+ edge_image[0] = ImageIO.read(edgeResource.getInputStream());
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ int w = type_image[0].getWidth();
+ int h = type_image[0].getHeight();
- IResource edgeResource = manager.getResource(getTypeResource("lesu_block"));
- edge_image[0] = ImageIO.read(edgeResource.getInputStream());
- } catch (IOException e) {
- e.printStackTrace();
- }
- int w = type_image[0].getWidth();
- int h = type_image[0].getHeight();
+ output_image = new BufferedImage(w, h, 2);
+ int[] type_data = new int[w * w];
+ int[] edge_data = new int[w * w];
- output_image = new BufferedImage(w, h, 2);
- int[] type_data = new int[w * w];
- int[] edge_data = new int[w * w];
+ for (int y = 0; y < h; y += w)
+ {
+ try
+ {
+ type_image[0].getRGB(0, y, w, w, type_data, 0, w);
+ edge_image[0].getRGB(0, y, w, w, edge_data, 0, w);
+ } catch (Exception e)
+ {
+ e.fillInStackTrace();
+ }
+ int[] new_data = createTexture(w, type_data, edge_data, connectedTexture);
+ output_image.setRGB(0, y, w, w, new_data, 0, w);
+ }
- for (int y = 0; y < h; y += w) {
- try {
- type_image[0].getRGB(0, y, w, w, type_data, 0, w);
- edge_image[0].getRGB(0, y, w, w, edge_data, 0, w);
- } catch (Exception e) {
- e.fillInStackTrace();
- }
- int[] new_data = createTexture(w, type_data, edge_data, connectedTexture);
- output_image.setRGB(0, y, w, w, new_data, 0, w);
- }
+ type_image[0] = output_image;
+ // this.loadSprite(type_image, animation, (float)
+ // Minecraft.getMinecraft().gameSettings.anisotropicFiltering > 1.0F);
+ return false;
+ }
- type_image[0] = output_image;
- // this.loadSprite(type_image, animation, (float) Minecraft.getMinecraft().gameSettings.anisotropicFiltering > 1.0F);
- return false;
- }
-
-// public static IIcon genIcon(ConnectedTexture connectedTexture, IIconRegister iconRegister, int texNum, int meta) {
-// if (iconRegister instanceof TextureMap) {
-// TextureMap map = (TextureMap) iconRegister;
-// String name = LesuConnectedTextureGenerator.getDerivedName("lesu." + texNum);
-// TextureAtlasSprite texture = map.getTextureExtry(name);
-// if (texture == null) {
-// texture = new LesuConnectedTextureGenerator(name, "lesu", connectedTexture);
-// map.setTextureEntry(name, texture);
-// }
-// return map.getTextureExtry(name);
-// } else {
-// return null;
-// }
-// }
+ // public static IIcon genIcon(ConnectedTexture connectedTexture,
+ // IIconRegister iconRegister, int texNum, int meta) {
+ // if (iconRegister instanceof TextureMap) {
+ // TextureMap map = (TextureMap) iconRegister;
+ // String name = LesuConnectedTextureGenerator.getDerivedName("lesu." +
+ // texNum);
+ // TextureAtlasSprite texture = map.getTextureExtry(name);
+ // if (texture == null) {
+ // texture = new LesuConnectedTextureGenerator(name, "lesu",
+ // connectedTexture);
+ // map.setTextureEntry(name, texture);
+ // }
+ // return map.getTextureExtry(name);
+ // } else {
+ // return null;
+ // }
+ // }
}
diff --git a/src/main/java/techreborn/command/TechRebornDevCommand.java b/src/main/java/techreborn/command/TechRebornDevCommand.java
index 22dc50371..49d1cea16 100644
--- a/src/main/java/techreborn/command/TechRebornDevCommand.java
+++ b/src/main/java/techreborn/command/TechRebornDevCommand.java
@@ -1,5 +1,7 @@
package techreborn.command;
+import java.util.ArrayList;
+import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.command.CommandBase;
@@ -12,65 +14,77 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentString;
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
+{
-public class TechRebornDevCommand extends CommandBase {
+ @Override
+ public String getCommandName()
+ {
+ return "trdev";
+ }
- @Override
- public String getCommandName() {
- return "trdev";
- }
+ @Override
+ public String getCommandUsage(ICommandSender icommandsender)
+ {
+ return "commands.forge.usage";
+ }
- @Override
- public String getCommandUsage(ICommandSender icommandsender) {
- return "commands.forge.usage";
- }
+ @Override
+ public int getRequiredPermissionLevel()
+ {
+ return 2;
+ }
- @Override
- public int getRequiredPermissionLevel() {
- return 2;
- }
-
- @Override
- public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
- if (args.length == 0) {
- sender.addChatMessage(new TextComponentString("You need to use arguments, see /trdev help"));
- } else if ("help".equals(args[0])) {
- sender.addChatMessage(new TextComponentString("recipes - Shows size of the recipe array"));
- sender.addChatMessage(new TextComponentString("fluid - Lists the fluid power values"));
- } else if ("recipes".equals(args[0])) {
- sender.addChatMessage(new TextComponentString(RecipeHandler.recipeList.size() + " recipes loaded"));
- } else if ("fluid".equals(args[0])) {
- for (Object object : FluidPowerManager.fluidPowerValues.keySet().toArray()) {
- if (object instanceof Fluid) {
- Fluid fluid = (Fluid) object;
- sender.addChatMessage(new TextComponentString(fluid.getUnlocalizedName() + " : " + FluidPowerManager.fluidPowerValues.get(fluid)));
- } else {
- sender.addChatMessage(new TextComponentString("Found invalid fluid entry"));
- }
- }
- } 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);
- }
- }
- }
- }
- }
- }
+ @Override
+ public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException
+ {
+ if (args.length == 0)
+ {
+ sender.addChatMessage(new TextComponentString("You need to use arguments, see /trdev help"));
+ } else if ("help".equals(args[0]))
+ {
+ sender.addChatMessage(new TextComponentString("recipes - Shows size of the recipe array"));
+ sender.addChatMessage(new TextComponentString("fluid - Lists the fluid power values"));
+ } else if ("recipes".equals(args[0]))
+ {
+ sender.addChatMessage(new TextComponentString(RecipeHandler.recipeList.size() + " recipes loaded"));
+ } else if ("fluid".equals(args[0]))
+ {
+ for (Object object : FluidPowerManager.fluidPowerValues.keySet().toArray())
+ {
+ if (object instanceof Fluid)
+ {
+ Fluid fluid = (Fluid) object;
+ sender.addChatMessage(new TextComponentString(
+ fluid.getUnlocalizedName() + " : " + FluidPowerManager.fluidPowerValues.get(fluid)));
+ } else
+ {
+ sender.addChatMessage(new TextComponentString("Found invalid fluid entry"));
+ }
+ }
+ } 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);
+ }
+ }
+ }
+ }
+ }
+ }
}
-
-
diff --git a/src/main/java/techreborn/compat/CompatManager.java b/src/main/java/techreborn/compat/CompatManager.java
index 1edbc0bd2..c01c33a93 100644
--- a/src/main/java/techreborn/compat/CompatManager.java
+++ b/src/main/java/techreborn/compat/CompatManager.java
@@ -1,5 +1,7 @@
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;
@@ -10,90 +12,115 @@ import techreborn.parts.StandalonePartCompact;
import techreborn.parts.TechRebornParts;
import techreborn.parts.walia.WailaMcMultiPartCompact;
-import java.util.ArrayList;
+public class CompatManager
+{
-public class CompatManager {
+ public ArrayList compatModules = new ArrayList();
- public ArrayList compatModules = new ArrayList();
+ public static CompatManager INSTANCE = new CompatManager();
- public static CompatManager INSTANCE = new CompatManager();
+ public static boolean isIC2Loaded = false;
+ public static boolean isIC2ClassicLoaded = false;
+ public static boolean isClassicEnet = false;
+ public static boolean isGregTechLoaded = false;
- public static boolean isIC2Loaded = false;
- public static boolean isIC2ClassicLoaded = false;
- public static boolean isClassicEnet = false;
- public static boolean isGregTechLoaded = false;
+ public CompatManager()
+ {
+ isIC2Loaded = Loader.isModLoaded("IC2");
+ isIC2ClassicLoaded = false;
+ if (isIC2ClassicLoaded)
+ {
+ isClassicEnet = true;
+ }
+ if (Loader.isModLoaded("Uncomplication"))
+ {
+ isClassicEnet = true;
+ }
+ if (Loader.isModLoaded("gregtech"))
+ {
+ isGregTechLoaded = true;
+ }
+ registerCompact(CompatModuleWaila.class, "Waila");
+ // registerCompact(MinetweakerCompat.class, "MineTweaker3");
+ // registerCompact(RecipesBiomesOPlenty.class, "BiomesOPlenty");
+ // registerCompact(RecipesBuildcraft.class, "BuildCraft|Builders");
+ // registerCompact(RecipesThaumcraft.class, "Thaumcraft");
+ registerCompact(TechRebornParts.class, "mcmultipart");
+ registerCompact(ClientPartLoader.class, "mcmultipart", "@client");
+ registerCompact(StandalonePartCompact.class, "!mcmultipart");
+ registerCompact(WailaMcMultiPartCompact.class, "mcmultipart", "Waila");
+ }
- public CompatManager() {
- isIC2Loaded = Loader.isModLoaded("IC2");
- isIC2ClassicLoaded = false;
- if (isIC2ClassicLoaded) {
- isClassicEnet = true;
- }
- if (Loader.isModLoaded("Uncomplication")) {
- isClassicEnet = true;
- }
- if (Loader.isModLoaded("gregtech")) {
- isGregTechLoaded = true;
- }
- registerCompact(CompatModuleWaila.class, "Waila");
-// registerCompact(MinetweakerCompat.class, "MineTweaker3");
-// registerCompact(RecipesBiomesOPlenty.class, "BiomesOPlenty");
-// registerCompact(RecipesBuildcraft.class, "BuildCraft|Builders");
-// registerCompact(RecipesThaumcraft.class, "Thaumcraft");
- registerCompact(TechRebornParts.class, "mcmultipart");
- registerCompact(ClientPartLoader.class, "mcmultipart", "@client");
- registerCompact(StandalonePartCompact.class, "!mcmultipart");
- registerCompact(WailaMcMultiPartCompact.class, "mcmultipart", "Waila");
- }
+ public void registerCompact(Class extends ICompatModule> moduleClass, Object... objs)
+ {
+ boolean shouldLoad = ConfigTechReborn.config
+ .get(ConfigTechReborn.CATEGORY_INTEGRATION, "Compat:" + moduleClass.getSimpleName(), true,
+ "Should the " + moduleClass.getSimpleName() + " be loaded?")
+ .getBoolean(true);
+ if (ConfigTechReborn.config.hasChanged())
+ ConfigTechReborn.config.save();
+ if (!shouldLoad)
+ {
+ return;
+ }
+ for (Object obj : objs)
+ {
+ if (obj instanceof String)
+ {
+ String modid = (String) obj;
+ if (modid.startsWith("@"))
+ {
+ if (modid.equals("@client"))
+ {
+ if (FMLCommonHandler.instance().getSide() != Side.CLIENT)
+ {
+ return;
+ }
+ }
+ } else if (modid.startsWith("!"))
+ {
+ if (Loader.isModLoaded(modid.replaceAll("!", "")))
+ {
+ return;
+ }
+ } else
+ {
+ if (!Loader.isModLoaded(modid))
+ {
+ return;
+ }
+ }
+ } else if (obj instanceof Boolean)
+ {
+ Boolean boo = (Boolean) obj;
+ if (boo == false)
+ {
+ }
+ return;
+ }
+ }
+ try
+ {
+ compatModules.add((ICompatModule) moduleClass.newInstance());
+ } catch (InstantiationException e)
+ {
+ e.printStackTrace();
+ } catch (IllegalAccessException e)
+ {
+ e.printStackTrace();
+ }
+ }
- public void registerCompact(Class extends ICompatModule> moduleClass, Object... objs) {
- boolean shouldLoad = ConfigTechReborn.config.get(ConfigTechReborn.CATEGORY_INTEGRATION, "Compat:" + moduleClass.getSimpleName(), true, "Should the " + moduleClass.getSimpleName() + " be loaded?").getBoolean(true);
- if (ConfigTechReborn.config.hasChanged())
- ConfigTechReborn.config.save();
- if(!shouldLoad){
- return;
- }
- for (Object obj : objs) {
- if (obj instanceof String) {
- String modid = (String) obj;
- if(modid.startsWith("@")){
- if(modid.equals("@client")){
- if(FMLCommonHandler.instance().getSide() != Side.CLIENT){
- return;
- }
- }
- } else if (modid.startsWith("!")) {
- if (Loader.isModLoaded(modid.replaceAll("!", ""))) {
- return;
- }
- } else {
- if (!Loader.isModLoaded(modid)) {
- return;
- }
- }
- } else if (obj instanceof Boolean) {
- Boolean boo = (Boolean) obj;
- if (boo == false) {
- }
- return;
- }
- }
- try {
- compatModules.add((ICompatModule) moduleClass.newInstance());
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- }
-
- public boolean isForestry4() {
- try {
- Class.forName("forestry.api.arboriculture.EnumWoodType");
- return true;
- } catch (ClassNotFoundException e) {
- return false;
- }
- }
+ public boolean isForestry4()
+ {
+ try
+ {
+ Class.forName("forestry.api.arboriculture.EnumWoodType");
+ return true;
+ } catch (ClassNotFoundException e)
+ {
+ return false;
+ }
+ }
}
diff --git a/src/main/java/techreborn/compat/ICompatModule.java b/src/main/java/techreborn/compat/ICompatModule.java
index 69a180ca5..037e94ab3 100644
--- a/src/main/java/techreborn/compat/ICompatModule.java
+++ b/src/main/java/techreborn/compat/ICompatModule.java
@@ -5,13 +5,14 @@ import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
-public interface ICompatModule {
+public interface ICompatModule
+{
- public void preInit(FMLPreInitializationEvent event);
+ public void preInit(FMLPreInitializationEvent event);
- public void init(FMLInitializationEvent event);
+ public void init(FMLInitializationEvent event);
- public void postInit(FMLPostInitializationEvent event);
+ public void postInit(FMLPostInitializationEvent event);
- public void serverStarting(FMLServerStartingEvent event);
+ public void serverStarting(FMLServerStartingEvent event);
}
diff --git a/src/main/java/techreborn/compat/jei/BaseRecipeWrapper.java b/src/main/java/techreborn/compat/jei/BaseRecipeWrapper.java
index 6697f9809..1917f5f48 100644
--- a/src/main/java/techreborn/compat/jei/BaseRecipeWrapper.java
+++ b/src/main/java/techreborn/compat/jei/BaseRecipeWrapper.java
@@ -1,52 +1,64 @@
package techreborn.compat.jei;
-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 {
+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;
+
+public abstract class BaseRecipeWrapper extends BlankRecipeWrapper
+{
protected final T baseRecipe;
@Nonnull
private final List> inputs;
- public BaseRecipeWrapper(T baseRecipe) {
+ public BaseRecipeWrapper(T baseRecipe)
+ {
this.baseRecipe = baseRecipe;
inputs = new ArrayList<>();
- for (ItemStack input : baseRecipe.getInputs()) {
- if (baseRecipe.useOreDic()) {
+ for (ItemStack input : baseRecipe.getInputs())
+ {
+ if (baseRecipe.useOreDic())
+ {
List oreDictInputs = expandOreDict(input);
inputs.add(oreDictInputs);
- } else {
+ } else
+ {
inputs.add(Collections.singletonList(input));
}
}
}
- private static List expandOreDict(ItemStack itemStack) {
+ private static List expandOreDict(ItemStack itemStack)
+ {
int[] oreIds = OreDictionary.getOreIDs(itemStack);
- if (oreIds.length == 0) {
+ if (oreIds.length == 0)
+ {
return Collections.singletonList(itemStack);
}
Set itemStackSet = new HashSet<>();
- for (int oreId : oreIds) {
+ for (int oreId : oreIds)
+ {
String oreName = OreDictionary.getOreName(oreId);
List ores = OreDictionary.getOres(oreName);
- for (ItemStack ore : ores) {
- if (ore.stackSize != itemStack.stackSize) {
+ for (ItemStack ore : ores)
+ {
+ if (ore.stackSize != itemStack.stackSize)
+ {
ItemStack oreCopy = ore.copy();
oreCopy.stackSize = itemStack.stackSize;
itemStackSet.add(oreCopy);
- } else {
+ } else
+ {
itemStackSet.add(ore);
}
}
@@ -56,13 +68,15 @@ public abstract class BaseRecipeWrapper extends BlankRecip
@Nonnull
@Override
- public List> getInputs() {
+ public List> getInputs()
+ {
return inputs;
}
@Nonnull
@Override
- public List getOutputs() {
+ public List getOutputs()
+ {
return baseRecipe.getOutputs();
}
}
diff --git a/src/main/java/techreborn/compat/jei/RecipeCategoryUids.java b/src/main/java/techreborn/compat/jei/RecipeCategoryUids.java
index ac0a7236b..9fad00206 100644
--- a/src/main/java/techreborn/compat/jei/RecipeCategoryUids.java
+++ b/src/main/java/techreborn/compat/jei/RecipeCategoryUids.java
@@ -1,7 +1,9 @@
package techreborn.compat.jei;
-public class RecipeCategoryUids {
- private RecipeCategoryUids() {
+public class RecipeCategoryUids
+{
+ private RecipeCategoryUids()
+ {
}
public static final String ALLOY_SMELTER = "TechReborn.AlloySmelter";
diff --git a/src/main/java/techreborn/compat/jei/RecipeUtil.java b/src/main/java/techreborn/compat/jei/RecipeUtil.java
index 60b25936b..59ece810e 100644
--- a/src/main/java/techreborn/compat/jei/RecipeUtil.java
+++ b/src/main/java/techreborn/compat/jei/RecipeUtil.java
@@ -1,5 +1,12 @@
package techreborn.compat.jei;
+import java.awt.*;
+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;
@@ -9,19 +16,17 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.text.translation.I18n;
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 {
+public class RecipeUtil
+{
private static final int color = Color.darkGray.getRGB();
- private RecipeUtil() {
+ private RecipeUtil()
+ {
}
- public static void drawInfo(@Nonnull Minecraft minecraft, int x, int y, final double startCost, final double euPerTick, final int tickTime) {
+ public static void drawInfo(@Nonnull Minecraft minecraft, int x, int y, final double startCost,
+ final double euPerTick, final int tickTime)
+ {
FontRenderer fontRendererObj = minecraft.fontRendererObj;
int lineSpacing = fontRendererObj.FONT_HEIGHT + 1;
@@ -34,7 +39,8 @@ public class RecipeUtil {
drawInfo(minecraft, x, y, euPerTick, tickTime);
}
- public static void drawInfo(@Nonnull Minecraft minecraft, int x, int y, final double euPerTick, final int tickTime) {
+ public static void drawInfo(@Nonnull Minecraft minecraft, int x, int y, final double euPerTick, final int tickTime)
+ {
FontRenderer fontRendererObj = minecraft.fontRendererObj;
int lineSpacing = fontRendererObj.FONT_HEIGHT + 1;
@@ -42,46 +48,59 @@ public class RecipeUtil {
fontRendererObj.drawString(runningCostString, x, y, color);
y += lineSpacing;
- String processingTimeString1 = I18n.translateToLocalFormatted("techreborn.jei.recipe.processing.time.1", tickTime);
+ String processingTimeString1 = I18n.translateToLocalFormatted("techreborn.jei.recipe.processing.time.1",
+ tickTime);
fontRendererObj.drawString(processingTimeString1, x, y, color);
y += lineSpacing;
int seconds = tickTime / 20;
- String processingTimeString2 = I18n.translateToLocalFormatted("techreborn.jei.recipe.processing.time.2", seconds);
+ String processingTimeString2 = I18n.translateToLocalFormatted("techreborn.jei.recipe.processing.time.2",
+ seconds);
fontRendererObj.drawString(processingTimeString2, x + 10, y, color);
}
- public static void setRecipeItems(@Nonnull IRecipeLayout recipeLayout, @Nonnull BaseRecipeWrapper> recipe, @Nullable int[] itemInputSlots, @Nullable int[] itemOutputSlots, @Nullable int[] fluidInputSlots, @Nullable int[] fluidOutputSlots) {
+ public static void setRecipeItems(@Nonnull IRecipeLayout recipeLayout, @Nonnull BaseRecipeWrapper> recipe,
+ @Nullable int[] itemInputSlots, @Nullable int[] itemOutputSlots, @Nullable int[] fluidInputSlots,
+ @Nullable int[] fluidOutputSlots)
+ {
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();
- if (itemInputSlots != null) {
+ if (itemInputSlots != null)
+ {
List> inputs = recipe.getInputs();
- for (int i = 0; i < inputs.size() && i < itemInputSlots.length; i++) {
+ for (int i = 0; i < inputs.size() && i < itemInputSlots.length; i++)
+ {
int inputSlot = itemInputSlots[i];
guiItemStacks.set(inputSlot, inputs.get(i));
}
}
- if (itemOutputSlots != null) {
+ if (itemOutputSlots != null)
+ {
List outputs = recipe.getOutputs();
- for (int i = 0; i < outputs.size() && i < itemOutputSlots.length; i++) {
+ for (int i = 0; i < outputs.size() && i < itemOutputSlots.length; i++)
+ {
int outputSlot = itemOutputSlots[i];
guiItemStacks.set(outputSlot, outputs.get(i));
}
}
- if (fluidInputSlots != null) {
+ if (fluidInputSlots != null)
+ {
List fluidInputs = recipe.getFluidInputs();
- for (int i = 0; i < fluidInputs.size() && i < fluidInputSlots.length; i++) {
+ for (int i = 0; i < fluidInputs.size() && i < fluidInputSlots.length; i++)
+ {
int inputTank = fluidInputSlots[i];
guiFluidStacks.set(inputTank, fluidInputs.get(i));
}
}
- if (fluidOutputSlots != null) {
+ if (fluidOutputSlots != null)
+ {
List fluidOutputs = recipe.getFluidOutputs();
- for (int i = 0; i < fluidOutputs.size() && i < fluidOutputSlots.length; i++) {
+ for (int i = 0; i < fluidOutputs.size() && i < fluidOutputSlots.length; i++)
+ {
int outputTank = fluidOutputSlots[i];
guiFluidStacks.set(outputTank, fluidOutputs.get(i));
}
diff --git a/src/main/java/techreborn/compat/jei/TechRebornJeiPlugin.java b/src/main/java/techreborn/compat/jei/TechRebornJeiPlugin.java
index 9343f82dc..50f8e0211 100644
--- a/src/main/java/techreborn/compat/jei/TechRebornJeiPlugin.java
+++ b/src/main/java/techreborn/compat/jei/TechRebornJeiPlugin.java
@@ -1,5 +1,10 @@
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;
@@ -88,137 +93,150 @@ 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
- public void register(@Nonnull IModRegistry registry) {
- IJeiHelpers jeiHelpers = registry.getJeiHelpers();
- IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
+public class TechRebornJeiPlugin extends BlankModPlugin
+{
+ @Override
+ public void register(@Nonnull IModRegistry registry)
+ {
+ IJeiHelpers jeiHelpers = registry.getJeiHelpers();
+ IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
- registry.addRecipeCategories(
- new AlloySmelterRecipeCategory(guiHelper),
- new AssemblingMachineRecipeCategory(guiHelper),
- new BlastFurnaceRecipeCategory(guiHelper),
- new CentrifugeRecipeCategory(guiHelper),
- new ChemicalReactorRecipeCategory(guiHelper),
- new FusionReactorRecipeCategory(guiHelper),
- new IndustrialGrinderRecipeCategory(guiHelper),
- new ImplosionCompressorRecipeCategory(guiHelper),
- new IndustrialElectrolyzerRecipeCategory(guiHelper),
- new IndustrialSawmillRecipeCategory(guiHelper),
- new RollingMachineRecipeCategory(guiHelper),
- new VacuumFreezerRecipeCategory(guiHelper),
- new GrinderRecipeCategory(guiHelper),
- new ExtractorRecipeCategory(guiHelper),
- new CompressorRecipeCategory(guiHelper),
- new ScrapboxRecipeCategory(guiHelper),
- new RecyclerRecipeCategory(guiHelper)
- );
+ registry.addRecipeCategories(new AlloySmelterRecipeCategory(guiHelper),
+ new AssemblingMachineRecipeCategory(guiHelper), new BlastFurnaceRecipeCategory(guiHelper),
+ new CentrifugeRecipeCategory(guiHelper), new ChemicalReactorRecipeCategory(guiHelper),
+ new FusionReactorRecipeCategory(guiHelper), new IndustrialGrinderRecipeCategory(guiHelper),
+ new ImplosionCompressorRecipeCategory(guiHelper), new IndustrialElectrolyzerRecipeCategory(guiHelper),
+ new IndustrialSawmillRecipeCategory(guiHelper), new RollingMachineRecipeCategory(guiHelper),
+ new VacuumFreezerRecipeCategory(guiHelper), new GrinderRecipeCategory(guiHelper),
+ new ExtractorRecipeCategory(guiHelper), new CompressorRecipeCategory(guiHelper),
+ new ScrapboxRecipeCategory(guiHelper), new RecyclerRecipeCategory(guiHelper));
- registry.addRecipeHandlers(
- new AlloySmelterRecipeHandler(jeiHelpers),
- new AssemblingMachineRecipeHandler(jeiHelpers),
- new BlastFurnaceRecipeHandler(jeiHelpers),
- new CentrifugeRecipeHandler(jeiHelpers),
- new ChemicalReactorRecipeHandler(jeiHelpers),
- new FusionReactorRecipeHandler(),
- new IndustrialGrinderRecipeHandler(jeiHelpers),
- new ImplosionCompressorRecipeHandler(jeiHelpers),
- new IndustrialElectrolyzerRecipeHandler(jeiHelpers),
- new IndustrialSawmillRecipeHandler(jeiHelpers),
- new RollingMachineRecipeHandler(),
- new VacuumFreezerRecipeHandler(jeiHelpers),
- new GrinderRecipeHandler(jeiHelpers),
- new ExtractorRecipeHandler(jeiHelpers),
- new CompressorRecipeHandler(jeiHelpers),
- new ScrapboxRecipeHandler(jeiHelpers),
- new RecyclerRecipeHandler(jeiHelpers)
- );
+ registry.addRecipeHandlers(new AlloySmelterRecipeHandler(jeiHelpers),
+ new AssemblingMachineRecipeHandler(jeiHelpers), new BlastFurnaceRecipeHandler(jeiHelpers),
+ new CentrifugeRecipeHandler(jeiHelpers), new ChemicalReactorRecipeHandler(jeiHelpers),
+ new FusionReactorRecipeHandler(), new IndustrialGrinderRecipeHandler(jeiHelpers),
+ new ImplosionCompressorRecipeHandler(jeiHelpers), new IndustrialElectrolyzerRecipeHandler(jeiHelpers),
+ new IndustrialSawmillRecipeHandler(jeiHelpers), new RollingMachineRecipeHandler(),
+ new VacuumFreezerRecipeHandler(jeiHelpers), new GrinderRecipeHandler(jeiHelpers),
+ new ExtractorRecipeHandler(jeiHelpers), new CompressorRecipeHandler(jeiHelpers),
+ new ScrapboxRecipeHandler(jeiHelpers), new RecyclerRecipeHandler(jeiHelpers));
- registry.addRecipes(RecipeHandler.recipeList);
- registry.addRecipes(FusionReactorRecipeHelper.reactorRecipes);
+ registry.addRecipes(RecipeHandler.recipeList);
+ registry.addRecipes(FusionReactorRecipeHelper.reactorRecipes);
- try {
- registry.addRecipes(RollingMachineRecipeMaker.getRecipes());
- } catch (RuntimeException e) {
- Core.logHelper.error("Could not register rolling machine recipes. JEI may have changed its internal recipe wrapper locations.");
- e.printStackTrace();
- }
+ try
+ {
+ registry.addRecipes(RollingMachineRecipeMaker.getRecipes());
+ } catch (RuntimeException e)
+ {
+ Core.logHelper.error(
+ "Could not register rolling machine recipes. JEI may have changed its internal recipe wrapper locations.");
+ e.printStackTrace();
+ }
- if (mezz.jei.config.Config.isDebugModeEnabled()) {
- addDebugRecipes(registry);
- }
+ if (mezz.jei.config.Config.isDebugModeEnabled())
+ {
+ addDebugRecipes(registry);
+ }
- registry.addDescription(ItemParts.getPartByName("rubberSap"), I18n.translateToLocal("techreborn.desc.rubberSap"));
- if(!ConfigTechReborn.scrapboxDispenser){
- registry.addDescription(new ItemStack(ModItems.scrapBox), I18n.translateToLocal("techreborn.desc.scrapBoxNoDispenser"));
- } else {
- registry.addDescription(new ItemStack(ModItems.scrapBox), I18n.translateToLocal("techreborn.desc.scrapBox"));
- }
-
- registry.addRecipeClickArea(GuiAlloyFurnace.class, 80, 35, 26, 20, RecipeCategoryUids.ALLOY_SMELTER, VanillaRecipeCategoryUid.FUEL);
- registry.addRecipeClickArea(GuiAlloySmelter.class, 80, 35, 26, 20, RecipeCategoryUids.ALLOY_SMELTER);
- registry.addRecipeClickArea(GuiAssemblingMachine.class, 85, 34, 24, 20, RecipeCategoryUids.ASSEMBLING_MACHINE);
- registry.addRecipeClickArea(GuiBlastFurnace.class, 63, 36, 24, 15, RecipeCategoryUids.BLAST_FURNACE);
- registry.addRecipeClickArea(GuiCentrifuge.class, 98, 37, 9, 12, RecipeCategoryUids.CENTRIFUGE);
- registry.addRecipeClickArea(GuiCentrifuge.class, 68, 37, 9, 12, RecipeCategoryUids.CENTRIFUGE);
- registry.addRecipeClickArea(GuiCentrifuge.class, 83, 23, 12, 9, RecipeCategoryUids.CENTRIFUGE);
- registry.addRecipeClickArea(GuiCentrifuge.class, 83, 53, 12, 9, RecipeCategoryUids.CENTRIFUGE);
- registry.addRecipeClickArea(GuiChemicalReactor.class, 73, 39, 32, 12, RecipeCategoryUids.CHEMICAL_REACTOR);
- registry.addRecipeClickArea(GuiFusionReactor.class, 111, 34, 27, 19, RecipeCategoryUids.FUSION_REACTOR);
- registry.addRecipeClickArea(GuiIndustrialGrinder.class, 50, 35, 25, 16, RecipeCategoryUids.INDUSTRIAL_GRINDER);
- registry.addRecipeClickArea(GuiImplosionCompressor.class, 60, 37, 24, 15, RecipeCategoryUids.IMPLOSION_COMPRESSOR);
- registry.addRecipeClickArea(GuiIndustrialElectrolyzer.class, 72, 37, 33, 14, RecipeCategoryUids.INDUSTRIAL_ELECTROLYZER);
- registry.addRecipeClickArea(GuiIndustrialSawmill.class, 55, 36, 24, 16, RecipeCategoryUids.INDUSTRIAL_SAWMILL);
- registry.addRecipeClickArea(GuiRollingMachine.class, 89, 32, 26, 25, RecipeCategoryUids.ROLLING_MACHINE);
- registry.addRecipeClickArea(GuiVacuumFreezer.class, 78, 36, 24, 16, RecipeCategoryUids.VACUUM_FREEZER);
- registry.addRecipeClickArea(GuiGrinder.class, 78, 36, 24, 16, RecipeCategoryUids.GRINDER);
- registry.addRecipeClickArea(GuiExtractor.class, 78, 36, 24, 16, RecipeCategoryUids.EXTRACTOR);
- registry.addRecipeClickArea(GuiCompressor.class, 78, 36, 24, 16, RecipeCategoryUids.COMPRESSOR);
- registry.addRecipeClickArea(GuiIronFurnace.class, 78, 36, 24, 16, VanillaRecipeCategoryUid.SMELTING, VanillaRecipeCategoryUid.FUEL);
- registry.addRecipeClickArea(GuiElectricFurnace.class, 78, 36, 24, 16, VanillaRecipeCategoryUid.SMELTING, VanillaRecipeCategoryUid.FUEL);
- registry.addRecipeClickArea(GuiRecycler.class, 78, 36, 24, 16, RecipeCategoryUids.RECYCLER);
+ registry.addDescription(ItemParts.getPartByName("rubberSap"),
+ I18n.translateToLocal("techreborn.desc.rubberSap"));
+ if (!ConfigTechReborn.scrapboxDispenser)
+ {
+ registry.addDescription(new ItemStack(ModItems.scrapBox),
+ I18n.translateToLocal("techreborn.desc.scrapBoxNoDispenser"));
+ } else
+ {
+ registry.addDescription(new ItemStack(ModItems.scrapBox),
+ I18n.translateToLocal("techreborn.desc.scrapBox"));
+ }
+ registry.addRecipeClickArea(GuiAlloyFurnace.class, 80, 35, 26, 20, RecipeCategoryUids.ALLOY_SMELTER,
+ VanillaRecipeCategoryUid.FUEL);
+ registry.addRecipeClickArea(GuiAlloySmelter.class, 80, 35, 26, 20, RecipeCategoryUids.ALLOY_SMELTER);
+ registry.addRecipeClickArea(GuiAssemblingMachine.class, 85, 34, 24, 20, RecipeCategoryUids.ASSEMBLING_MACHINE);
+ registry.addRecipeClickArea(GuiBlastFurnace.class, 63, 36, 24, 15, RecipeCategoryUids.BLAST_FURNACE);
+ registry.addRecipeClickArea(GuiCentrifuge.class, 98, 37, 9, 12, RecipeCategoryUids.CENTRIFUGE);
+ registry.addRecipeClickArea(GuiCentrifuge.class, 68, 37, 9, 12, RecipeCategoryUids.CENTRIFUGE);
+ registry.addRecipeClickArea(GuiCentrifuge.class, 83, 23, 12, 9, RecipeCategoryUids.CENTRIFUGE);
+ registry.addRecipeClickArea(GuiCentrifuge.class, 83, 53, 12, 9, RecipeCategoryUids.CENTRIFUGE);
+ registry.addRecipeClickArea(GuiChemicalReactor.class, 73, 39, 32, 12, RecipeCategoryUids.CHEMICAL_REACTOR);
+ registry.addRecipeClickArea(GuiFusionReactor.class, 111, 34, 27, 19, RecipeCategoryUids.FUSION_REACTOR);
+ registry.addRecipeClickArea(GuiIndustrialGrinder.class, 50, 35, 25, 16, RecipeCategoryUids.INDUSTRIAL_GRINDER);
+ registry.addRecipeClickArea(GuiImplosionCompressor.class, 60, 37, 24, 15,
+ RecipeCategoryUids.IMPLOSION_COMPRESSOR);
+ registry.addRecipeClickArea(GuiIndustrialElectrolyzer.class, 72, 37, 33, 14,
+ RecipeCategoryUids.INDUSTRIAL_ELECTROLYZER);
+ registry.addRecipeClickArea(GuiIndustrialSawmill.class, 55, 36, 24, 16, RecipeCategoryUids.INDUSTRIAL_SAWMILL);
+ registry.addRecipeClickArea(GuiRollingMachine.class, 89, 32, 26, 25, RecipeCategoryUids.ROLLING_MACHINE);
+ registry.addRecipeClickArea(GuiVacuumFreezer.class, 78, 36, 24, 16, RecipeCategoryUids.VACUUM_FREEZER);
+ registry.addRecipeClickArea(GuiGrinder.class, 78, 36, 24, 16, RecipeCategoryUids.GRINDER);
+ registry.addRecipeClickArea(GuiExtractor.class, 78, 36, 24, 16, RecipeCategoryUids.EXTRACTOR);
+ registry.addRecipeClickArea(GuiCompressor.class, 78, 36, 24, 16, RecipeCategoryUids.COMPRESSOR);
+ registry.addRecipeClickArea(GuiIronFurnace.class, 78, 36, 24, 16, VanillaRecipeCategoryUid.SMELTING,
+ VanillaRecipeCategoryUid.FUEL);
+ registry.addRecipeClickArea(GuiElectricFurnace.class, 78, 36, 24, 16, VanillaRecipeCategoryUid.SMELTING,
+ VanillaRecipeCategoryUid.FUEL);
+ registry.addRecipeClickArea(GuiRecycler.class, 78, 36, 24, 16, RecipeCategoryUids.RECYCLER);
- IRecipeTransferRegistry recipeTransferRegistry = registry.getRecipeTransferRegistry();
- recipeTransferRegistry.addRecipeTransferHandler(ContainerAlloyFurnace.class, RecipeCategoryUids.ALLOY_SMELTER, 0, 2, 4, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerAlloySmelter.class, RecipeCategoryUids.ALLOY_SMELTER, 0, 2, 8, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerAlloyFurnace.class, VanillaRecipeCategoryUid.FUEL, 3, 1, 4, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerAssemblingMachine.class, RecipeCategoryUids.ASSEMBLING_MACHINE, 0, 2, 8, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerBlastFurnace.class, RecipeCategoryUids.BLAST_FURNACE, 0, 2, 4, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerCentrifuge.class, RecipeCategoryUids.CENTRIFUGE, 0, 2, 11, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerChemicalReactor.class, RecipeCategoryUids.CHEMICAL_REACTOR, 0, 2, 8, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerFusionReactor.class, RecipeCategoryUids.FUSION_REACTOR, 0, 2, 3, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerIndustrialGrinder.class, RecipeCategoryUids.GRINDER, 0, 2, 6, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerImplosionCompressor.class, RecipeCategoryUids.IMPLOSION_COMPRESSOR, 0, 2, 4, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerIndustrialElectrolyzer.class, RecipeCategoryUids.INDUSTRIAL_ELECTROLYZER, 0, 2, 7, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerIndustrialSawmill.class, RecipeCategoryUids.INDUSTRIAL_SAWMILL, 0, 2, 5, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerRollingMachine.class, RecipeCategoryUids.ROLLING_MACHINE, 0, 9, 11, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerVacuumFreezer.class, RecipeCategoryUids.VACUUM_FREEZER, 0, 1, 2, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerGrinder.class, RecipeCategoryUids.GRINDER, 0, 1, 2, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerExtractor.class, RecipeCategoryUids.EXTRACTOR, 0, 1, 2, 36);
- recipeTransferRegistry.addRecipeTransferHandler(ContainerCompressor.class, RecipeCategoryUids.COMPRESSOR, 0, 1, 2, 36);
+ IRecipeTransferRegistry recipeTransferRegistry = registry.getRecipeTransferRegistry();
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerAlloyFurnace.class, RecipeCategoryUids.ALLOY_SMELTER,
+ 0, 2, 4, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerAlloySmelter.class, RecipeCategoryUids.ALLOY_SMELTER,
+ 0, 2, 8, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerAlloyFurnace.class, VanillaRecipeCategoryUid.FUEL, 3,
+ 1, 4, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerAssemblingMachine.class,
+ RecipeCategoryUids.ASSEMBLING_MACHINE, 0, 2, 8, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerBlastFurnace.class, RecipeCategoryUids.BLAST_FURNACE,
+ 0, 2, 4, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerCentrifuge.class, RecipeCategoryUids.CENTRIFUGE, 0, 2,
+ 11, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerChemicalReactor.class,
+ RecipeCategoryUids.CHEMICAL_REACTOR, 0, 2, 8, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerFusionReactor.class, RecipeCategoryUids.FUSION_REACTOR,
+ 0, 2, 3, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerIndustrialGrinder.class, RecipeCategoryUids.GRINDER, 0,
+ 2, 6, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerImplosionCompressor.class,
+ RecipeCategoryUids.IMPLOSION_COMPRESSOR, 0, 2, 4, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerIndustrialElectrolyzer.class,
+ RecipeCategoryUids.INDUSTRIAL_ELECTROLYZER, 0, 2, 7, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerIndustrialSawmill.class,
+ RecipeCategoryUids.INDUSTRIAL_SAWMILL, 0, 2, 5, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerRollingMachine.class,
+ RecipeCategoryUids.ROLLING_MACHINE, 0, 9, 11, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerVacuumFreezer.class, RecipeCategoryUids.VACUUM_FREEZER,
+ 0, 1, 2, 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerGrinder.class, RecipeCategoryUids.GRINDER, 0, 1, 2,
+ 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerExtractor.class, RecipeCategoryUids.EXTRACTOR, 0, 1, 2,
+ 36);
+ recipeTransferRegistry.addRecipeTransferHandler(ContainerCompressor.class, RecipeCategoryUids.COMPRESSOR, 0, 1,
+ 2, 36);
- }
+ }
- private static void addDebugRecipes(IModRegistry registry) {
- ItemStack diamondBlock = new ItemStack(Blocks.diamond_block);
- ItemStack dirtBlock = new ItemStack(Blocks.dirt);
- List