Reformatted all the code using the default intelji formatting options.
This commit is contained in:
parent
2f63a24070
commit
e0ab0af822
363 changed files with 20524 additions and 23016 deletions
|
@ -17,18 +17,13 @@ import net.minecraftforge.common.MinecraftForge;
|
||||||
import org.apache.commons.lang3.time.StopWatch;
|
import org.apache.commons.lang3.time.StopWatch;
|
||||||
import techreborn.achievement.TRAchievements;
|
import techreborn.achievement.TRAchievements;
|
||||||
import techreborn.api.recipe.RecipeHandler;
|
import techreborn.api.recipe.RecipeHandler;
|
||||||
import techreborn.api.recipe.recipeConfig.RecipeConfig;
|
|
||||||
import techreborn.api.recipe.recipeConfig.RecipeConfigManager;
|
import techreborn.api.recipe.recipeConfig.RecipeConfigManager;
|
||||||
import techreborn.client.GuiHandler;
|
import techreborn.client.GuiHandler;
|
||||||
import techreborn.command.TechRebornDevCommand;
|
import techreborn.command.TechRebornDevCommand;
|
||||||
import techreborn.compat.CompatManager;
|
import techreborn.compat.CompatManager;
|
||||||
import techreborn.compat.ICompatModule;
|
import techreborn.compat.ICompatModule;
|
||||||
import techreborn.config.ConfigTechReborn;
|
import techreborn.config.ConfigTechReborn;
|
||||||
import techreborn.init.ModBlocks;
|
import techreborn.init.*;
|
||||||
import techreborn.init.ModFluids;
|
|
||||||
import techreborn.init.ModItems;
|
|
||||||
import techreborn.init.ModParts;
|
|
||||||
import techreborn.init.ModRecipes;
|
|
||||||
import techreborn.lib.ModInfo;
|
import techreborn.lib.ModInfo;
|
||||||
import techreborn.packets.PacketHandler;
|
import techreborn.packets.PacketHandler;
|
||||||
import techreborn.packets.PacketPipeline;
|
import techreborn.packets.PacketPipeline;
|
||||||
|
|
|
@ -13,8 +13,7 @@ public class AchievementMod extends Achievement {
|
||||||
public static List<Achievement> achievements = new ArrayList();
|
public static List<Achievement> achievements = new ArrayList();
|
||||||
|
|
||||||
public AchievementMod(String name, int x, int y, ItemStack icon,
|
public AchievementMod(String name, int x, int y, ItemStack icon,
|
||||||
Achievement parent)
|
Achievement parent) {
|
||||||
{
|
|
||||||
super("achievement.techreborn:" + name, "TechReborn:" + name, x, y,
|
super("achievement.techreborn:" + name, "TechReborn:" + name, x, y,
|
||||||
icon, parent);
|
icon, parent);
|
||||||
achievements.add(this);
|
achievements.add(this);
|
||||||
|
@ -22,14 +21,12 @@ public class AchievementMod extends Achievement {
|
||||||
}
|
}
|
||||||
|
|
||||||
public AchievementMod(String name, int x, int y, Item icon,
|
public AchievementMod(String name, int x, int y, Item icon,
|
||||||
Achievement parent)
|
Achievement parent) {
|
||||||
{
|
|
||||||
this(name, x, y, new ItemStack(icon), parent);
|
this(name, x, y, new ItemStack(icon), parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AchievementMod(String name, int x, int y, Block icon,
|
public AchievementMod(String name, int x, int y, Block icon,
|
||||||
Achievement parent)
|
Achievement parent) {
|
||||||
{
|
|
||||||
this(name, x, y, new ItemStack(icon), parent);
|
this(name, x, y, new ItemStack(icon), parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,11 +9,9 @@ import net.minecraft.stats.Achievement;
|
||||||
public class AchievementTriggerer {
|
public class AchievementTriggerer {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onItemPickedUp(ItemPickupEvent event)
|
public void onItemPickedUp(ItemPickupEvent event) {
|
||||||
{
|
|
||||||
ItemStack stack = event.pickedUp.getEntityItem();
|
ItemStack stack = event.pickedUp.getEntityItem();
|
||||||
if (stack != null && stack.getItem() instanceof IPickupAchievement)
|
if (stack != null && stack.getItem() instanceof IPickupAchievement) {
|
||||||
{
|
|
||||||
Achievement achievement = ((IPickupAchievement) stack.getItem())
|
Achievement achievement = ((IPickupAchievement) stack.getItem())
|
||||||
.getAchievementOnPickup(stack, event.player, event.pickedUp);
|
.getAchievementOnPickup(stack, event.player, event.pickedUp);
|
||||||
if (achievement != null)
|
if (achievement != null)
|
||||||
|
@ -22,11 +20,9 @@ public class AchievementTriggerer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onItemCrafted(ItemCraftedEvent event)
|
public void onItemCrafted(ItemCraftedEvent event) {
|
||||||
{
|
|
||||||
if (event.crafting != null
|
if (event.crafting != null
|
||||||
&& event.crafting.getItem() instanceof ICraftAchievement)
|
&& event.crafting.getItem() instanceof ICraftAchievement) {
|
||||||
{
|
|
||||||
Achievement achievement = ((ICraftAchievement) event.crafting
|
Achievement achievement = ((ICraftAchievement) event.crafting
|
||||||
.getItem()).getAchievementOnCraft(event.crafting,
|
.getItem()).getAchievementOnCraft(event.crafting,
|
||||||
event.player, event.craftMatrix);
|
event.player, event.craftMatrix);
|
||||||
|
|
|
@ -16,8 +16,7 @@ public class TRAchievements {
|
||||||
public static Achievement thermalgen_Craft;
|
public static Achievement thermalgen_Craft;
|
||||||
public static Achievement centrifuge_Craft;
|
public static Achievement centrifuge_Craft;
|
||||||
|
|
||||||
public static void init()
|
public static void init() {
|
||||||
{
|
|
||||||
ore_PickUp = new AchievementMod("ore_PickUp", 0, 0, new ItemStack(
|
ore_PickUp = new AchievementMod("ore_PickUp", 0, 0, new ItemStack(
|
||||||
ModBlocks.ore, 1, 0), null);
|
ModBlocks.ore, 1, 0), null);
|
||||||
centrifuge_Craft = new AchievementMod("centrifuge_Craft", 1, 1,
|
centrifuge_Craft = new AchievementMod("centrifuge_Craft", 1, 1,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package techreborn.api;
|
package techreborn.api;
|
||||||
|
|
||||||
public interface IpdaItem
|
public interface IpdaItem {
|
||||||
{
|
|
||||||
//TODO
|
//TODO
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,26 +19,21 @@ public class RollingMachineRecipe {
|
||||||
|
|
||||||
public static final RollingMachineRecipe instance = new RollingMachineRecipe();
|
public static final RollingMachineRecipe instance = new RollingMachineRecipe();
|
||||||
|
|
||||||
public void addRecipe(ItemStack output, Object... components)
|
public void addRecipe(ItemStack output, Object... components) {
|
||||||
{
|
|
||||||
String s = "";
|
String s = "";
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int j = 0;
|
int j = 0;
|
||||||
int k = 0;
|
int k = 0;
|
||||||
if (components[i] instanceof String[])
|
if (components[i] instanceof String[]) {
|
||||||
{
|
|
||||||
String as[] = (String[]) components[i++];
|
String as[] = (String[]) components[i++];
|
||||||
for (int l = 0; l < as.length; l++)
|
for (int l = 0; l < as.length; l++) {
|
||||||
{
|
|
||||||
String s2 = as[l];
|
String s2 = as[l];
|
||||||
k++;
|
k++;
|
||||||
j = s2.length();
|
j = s2.length();
|
||||||
s = (new StringBuilder()).append(s).append(s2).toString();
|
s = (new StringBuilder()).append(s).append(s2).toString();
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
{
|
while (components[i] instanceof String) {
|
||||||
while (components[i] instanceof String)
|
|
||||||
{
|
|
||||||
String s1 = (String) components[i++];
|
String s1 = (String) components[i++];
|
||||||
k++;
|
k++;
|
||||||
j = s1.length();
|
j = s1.length();
|
||||||
|
@ -46,33 +41,26 @@ public class RollingMachineRecipe {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HashMap hashmap = new HashMap();
|
HashMap hashmap = new HashMap();
|
||||||
for (; i < components.length; i += 2)
|
for (; i < components.length; i += 2) {
|
||||||
{
|
|
||||||
Character character = (Character) components[i];
|
Character character = (Character) components[i];
|
||||||
ItemStack itemstack1 = null;
|
ItemStack itemstack1 = null;
|
||||||
if (components[i + 1] instanceof Item)
|
if (components[i + 1] instanceof Item) {
|
||||||
{
|
|
||||||
itemstack1 = new ItemStack((Item) components[i + 1]);
|
itemstack1 = new ItemStack((Item) components[i + 1]);
|
||||||
} else if (components[i + 1] instanceof Block)
|
} else if (components[i + 1] instanceof Block) {
|
||||||
{
|
|
||||||
itemstack1 = new ItemStack((Block) components[i + 1], 1, -1);
|
itemstack1 = new ItemStack((Block) components[i + 1], 1, -1);
|
||||||
} else if (components[i + 1] instanceof ItemStack)
|
} else if (components[i + 1] instanceof ItemStack) {
|
||||||
{
|
|
||||||
itemstack1 = (ItemStack) components[i + 1];
|
itemstack1 = (ItemStack) components[i + 1];
|
||||||
}
|
}
|
||||||
hashmap.put(character, itemstack1);
|
hashmap.put(character, itemstack1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemStack recipeArray[] = new ItemStack[j * k];
|
ItemStack recipeArray[] = new ItemStack[j * k];
|
||||||
for (int i1 = 0; i1 < j * k; i1++)
|
for (int i1 = 0; i1 < j * k; i1++) {
|
||||||
{
|
|
||||||
char c = s.charAt(i1);
|
char c = s.charAt(i1);
|
||||||
if (hashmap.containsKey(Character.valueOf(c)))
|
if (hashmap.containsKey(Character.valueOf(c))) {
|
||||||
{
|
|
||||||
recipeArray[i1] = ((ItemStack) hashmap
|
recipeArray[i1] = ((ItemStack) hashmap
|
||||||
.get(Character.valueOf(c))).copy();
|
.get(Character.valueOf(c))).copy();
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
recipeArray[i1] = null;
|
recipeArray[i1] = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,27 +68,21 @@ public class RollingMachineRecipe {
|
||||||
recipes.add(new ShapedRecipes(j, k, recipeArray, output));
|
recipes.add(new ShapedRecipes(j, k, recipeArray, output));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addShapelessRecipe(ItemStack output, Object... components)
|
public void addShapelessRecipe(ItemStack output, Object... components) {
|
||||||
{
|
|
||||||
List<ItemStack> ingredients = new ArrayList<ItemStack>();
|
List<ItemStack> ingredients = new ArrayList<ItemStack>();
|
||||||
for (int j = 0; j < components.length; j++)
|
for (int j = 0; j < components.length; j++) {
|
||||||
{
|
|
||||||
Object obj = components[j];
|
Object obj = components[j];
|
||||||
if (obj instanceof ItemStack)
|
if (obj instanceof ItemStack) {
|
||||||
{
|
|
||||||
ingredients.add(((ItemStack) obj).copy());
|
ingredients.add(((ItemStack) obj).copy());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (obj instanceof Item)
|
if (obj instanceof Item) {
|
||||||
{
|
|
||||||
ingredients.add(new ItemStack((Item) obj));
|
ingredients.add(new ItemStack((Item) obj));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (obj instanceof Block)
|
if (obj instanceof Block) {
|
||||||
{
|
|
||||||
ingredients.add(new ItemStack((Block) obj));
|
ingredients.add(new ItemStack((Block) obj));
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
throw new RuntimeException("Invalid shapeless recipe!");
|
throw new RuntimeException("Invalid shapeless recipe!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,13 +90,10 @@ public class RollingMachineRecipe {
|
||||||
recipes.add(new ShapelessRecipes(output, ingredients));
|
recipes.add(new ShapelessRecipes(output, ingredients));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack findMatchingRecipe(InventoryCrafting inv, World world)
|
public ItemStack findMatchingRecipe(InventoryCrafting inv, World world) {
|
||||||
{
|
for (int k = 0; k < recipes.size(); k++) {
|
||||||
for (int k = 0; k < recipes.size(); k++)
|
|
||||||
{
|
|
||||||
IRecipe irecipe = (IRecipe) recipes.get(k);
|
IRecipe irecipe = (IRecipe) recipes.get(k);
|
||||||
if (irecipe.matches(inv, world))
|
if (irecipe.matches(inv, world)) {
|
||||||
{
|
|
||||||
return irecipe.getCraftingResult(inv);
|
return irecipe.getCraftingResult(inv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,8 +101,7 @@ public class RollingMachineRecipe {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<IRecipe> getRecipeList()
|
public List<IRecipe> getRecipeList() {
|
||||||
{
|
|
||||||
return recipes;
|
return recipes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,22 +5,19 @@ import net.minecraft.item.ItemStack;
|
||||||
public final class TechRebornAPI {
|
public final class TechRebornAPI {
|
||||||
|
|
||||||
public static void addRollingMachinceRecipe(ItemStack output,
|
public static void addRollingMachinceRecipe(ItemStack output,
|
||||||
Object... components)
|
Object... components) {
|
||||||
{
|
|
||||||
RollingMachineRecipe.instance.addRecipe(output, components);
|
RollingMachineRecipe.instance.addRecipe(output, components);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addShapelessRollingMachinceRecipe(ItemStack output,
|
public static void addShapelessRollingMachinceRecipe(ItemStack output,
|
||||||
Object... components)
|
Object... components) {
|
||||||
{
|
|
||||||
RollingMachineRecipe.instance.addShapelessRecipe(output, components);
|
RollingMachineRecipe.instance.addShapelessRecipe(output, components);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class RegisteredItemRecipe extends Exception {
|
class RegisteredItemRecipe extends Exception {
|
||||||
public RegisteredItemRecipe(String message)
|
public RegisteredItemRecipe(String message) {
|
||||||
{
|
|
||||||
super(message);
|
super(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI")
|
@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI") package techreborn.api.farm;
|
||||||
package techreborn.api.farm;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.API;
|
import cpw.mods.fml.common.API;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI")
|
@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI") package techreborn.api;
|
||||||
package techreborn.api;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.API;
|
import cpw.mods.fml.common.API;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||||
public interface IEnergyInterfaceTile {
|
public interface IEnergyInterfaceTile {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @return Amount of energy in the tile
|
* @return Amount of energy in the tile
|
||||||
*/
|
*/
|
||||||
public double getEnergy();
|
public double getEnergy();
|
||||||
|
@ -19,34 +18,29 @@ public interface IEnergyInterfaceTile {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the max stored energy in the tile
|
* Gets the max stored energy in the tile
|
||||||
|
*
|
||||||
* @return The max energy
|
* @return The max energy
|
||||||
*/
|
*/
|
||||||
public double getMaxPower();
|
public double getMaxPower();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param energy amount of energy to add to the tile
|
* @param energy amount of energy to add to the tile
|
||||||
*
|
|
||||||
* @return will return true if can fit all
|
* @return will return true if can fit all
|
||||||
*/
|
*/
|
||||||
public boolean canAddEnergy(double energy);
|
public boolean canAddEnergy(double energy);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* Will try add add the full amount of energy.
|
* Will try add add the full amount of energy.
|
||||||
*
|
*
|
||||||
* @param energy amount to add
|
* @param energy amount to add
|
||||||
*
|
|
||||||
* @return The amount of energy that was added.
|
* @return The amount of energy that was added.
|
||||||
*/
|
*/
|
||||||
public double addEnergy(double energy);
|
public double addEnergy(double energy);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* Will try add add the full amount of energy, if simulate is true it wont add the energy
|
* Will try add add the full amount of energy, if simulate is true it wont add the energy
|
||||||
*
|
*
|
||||||
* @param energy amount to add
|
* @param energy amount to add
|
||||||
*
|
|
||||||
* @return The amount of energy that was added.
|
* @return The amount of energy that was added.
|
||||||
*/
|
*/
|
||||||
public double addEnergy(double energy, boolean simulate);
|
public double addEnergy(double energy, boolean simulate);
|
||||||
|
@ -55,7 +49,6 @@ public interface IEnergyInterfaceTile {
|
||||||
* Returns true if it can use the full amount of energy
|
* Returns true if it can use the full amount of energy
|
||||||
*
|
*
|
||||||
* @param energy amount of energy to use from the tile.
|
* @param energy amount of energy to use from the tile.
|
||||||
*
|
|
||||||
* @return if all the energy can be used.
|
* @return if all the energy can be used.
|
||||||
*/
|
*/
|
||||||
public boolean canUseEnergy(double energy);
|
public boolean canUseEnergy(double energy);
|
||||||
|
@ -64,7 +57,6 @@ public interface IEnergyInterfaceTile {
|
||||||
* Will try and use the full amount of energy
|
* Will try and use the full amount of energy
|
||||||
*
|
*
|
||||||
* @param energy energy to use
|
* @param energy energy to use
|
||||||
*
|
|
||||||
* @return the amount of energy used
|
* @return the amount of energy used
|
||||||
*/
|
*/
|
||||||
public double useEnergy(double energy);
|
public double useEnergy(double energy);
|
||||||
|
@ -74,21 +66,17 @@ public interface IEnergyInterfaceTile {
|
||||||
* Will try and use the full amount of energy, if simulate is true it wont add the energy
|
* Will try and use the full amount of energy, if simulate is true it wont add the energy
|
||||||
*
|
*
|
||||||
* @param energy energy to use
|
* @param energy energy to use
|
||||||
*
|
|
||||||
* @return the amount of energy used
|
* @return the amount of energy used
|
||||||
*/
|
*/
|
||||||
public double useEnergy(double energy, boolean simulate);
|
public double useEnergy(double energy, boolean simulate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param direction The direction to insert energy into
|
* @param direction The direction to insert energy into
|
||||||
*
|
|
||||||
* @return if the tile can accept energy from the direction
|
* @return if the tile can accept energy from the direction
|
||||||
*/
|
*/
|
||||||
public boolean canAcceptEnergy(ForgeDirection direction);
|
public boolean canAcceptEnergy(ForgeDirection direction);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param direction The direction to provide energy from
|
* @param direction The direction to provide energy from
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -25,13 +25,11 @@ public interface IBaseRecipeType {
|
||||||
public ItemStack getOutput(int i);
|
public ItemStack getOutput(int i);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @return The ammount of outputs
|
* @return The ammount of outputs
|
||||||
*/
|
*/
|
||||||
public int getOutputsSize();
|
public int getOutputsSize();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @return get outputs
|
* @return get outputs
|
||||||
*/
|
*/
|
||||||
public List<ItemStack> getOutputs();
|
public List<ItemStack> getOutputs();
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package techreborn.api.recipe;
|
package techreborn.api.recipe;
|
||||||
|
|
||||||
import ic2.api.energy.prefab.BasicSink;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.network.Packet;
|
import net.minecraft.network.Packet;
|
||||||
|
@ -91,7 +90,7 @@ public class RecipeCrafter {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is used to change the speed of the crafting operation.
|
* This is used to change the speed of the crafting operation.
|
||||||
*
|
* <p/>
|
||||||
* 0 = none;
|
* 0 = none;
|
||||||
* 0.2 = 20% speed increase
|
* 0.2 = 20% speed increase
|
||||||
* 0.75 = 75% increase
|
* 0.75 = 75% increase
|
||||||
|
@ -100,7 +99,7 @@ public class RecipeCrafter {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is used to change the power of the crafting operation.
|
* This is used to change the power of the crafting operation.
|
||||||
*
|
* <p/>
|
||||||
* 1 = none;
|
* 1 = none;
|
||||||
* 1.2 = 20% speed increase
|
* 1.2 = 20% speed increase
|
||||||
* 1.75 = 75% increase
|
* 1.75 = 75% increase
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
package techreborn.api.recipe.machines;
|
package techreborn.api.recipe.machines;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
|
||||||
import techreborn.api.recipe.BaseRecipe;
|
import techreborn.api.recipe.BaseRecipe;
|
||||||
import techreborn.lib.Reference;
|
import techreborn.lib.Reference;
|
||||||
import techreborn.tiles.TileIndustrialElectrolyzer;
|
|
||||||
|
|
||||||
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)
|
public IndustrialElectrolyzerRecipe(ItemStack inputCells, ItemStack input2, ItemStack output1, ItemStack output2, ItemStack output3, ItemStack output4, int tickTime, int euPerTick) {
|
||||||
{
|
|
||||||
super(Reference.industrialElectrolyzerRecipe, tickTime, euPerTick);
|
super(Reference.industrialElectrolyzerRecipe, tickTime, euPerTick);
|
||||||
if (inputCells != null)
|
if (inputCells != null)
|
||||||
inputs.add(inputCells);
|
inputs.add(inputCells);
|
||||||
|
@ -32,8 +28,7 @@ public class IndustrialElectrolyzerRecipe extends BaseRecipe {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean useOreDic()
|
public boolean useOreDic() {
|
||||||
{
|
|
||||||
return useOreDictionary;
|
return useOreDictionary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI")
|
@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI") package techreborn.api.upgrade;
|
||||||
package techreborn.api.upgrade;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.API;
|
import cpw.mods.fml.common.API;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
package techreborn.asm;
|
package techreborn.asm;
|
||||||
|
|
||||||
import java.lang.annotation.Documented;
|
import java.lang.annotation.*;
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When used on a class, methods from referenced interfaces will not be removed <br>
|
* When used on a class, methods from referenced interfaces will not be removed <br>
|
||||||
|
|
|
@ -23,22 +23,19 @@ public class BlockChunkLoader extends BlockMachineBase{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockChunkLoader(Material material)
|
public BlockChunkLoader(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.chunkloader");
|
setBlockName("techreborn.chunkloader");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileChunkLoader();
|
return new TileChunkLoader();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.chunkloaderID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.chunkloaderID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -47,8 +44,7 @@ public class BlockChunkLoader extends BlockMachineBase{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/industrial_chunk_loader_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/industrial_chunk_loader_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_chunk_loader_side");
|
this.iconFront = icon.registerIcon("techreborn:machine/industrial_chunk_loader_side");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||||
|
@ -56,8 +52,7 @@ public class BlockChunkLoader extends BlockMachineBase{
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
|
|
@ -17,16 +17,14 @@ public class BlockComputerCube extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockComputerCube(Material material)
|
public BlockComputerCube(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.computercube");
|
setBlockName("techreborn.computercube");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/computer_cube");
|
this.blockIcon = icon.registerIcon("techreborn:machine/computer_cube");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/computer_cube");
|
this.iconFront = icon.registerIcon("techreborn:machine/computer_cube");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/computer_cube");
|
this.iconTop = icon.registerIcon("techreborn:machine/computer_cube");
|
||||||
|
@ -34,8 +32,7 @@ public class BlockComputerCube extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
|
|
@ -23,22 +23,19 @@ public class BlockDigitalChest extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockDigitalChest()
|
public BlockDigitalChest() {
|
||||||
{
|
|
||||||
super(Material.rock);
|
super(Material.rock);
|
||||||
setBlockName("techreborn.digitalChest");
|
setBlockName("techreborn.digitalChest");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileDigitalChest();
|
return new TileDigitalChest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.digitalChestID, world, x,
|
player.openGui(Core.INSTANCE, GuiHandler.digitalChestID, world, x,
|
||||||
y, z);
|
y, z);
|
||||||
|
@ -47,8 +44,7 @@ public class BlockDigitalChest extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/qchest_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/qchest_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/quantum_chest");
|
this.iconFront = icon.registerIcon("techreborn:machine/quantum_chest");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/quantum_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/quantum_top");
|
||||||
|
@ -56,8 +52,7 @@ public class BlockDigitalChest extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
|
|
@ -17,16 +17,14 @@ public class BlockElectricCraftingTable extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockElectricCraftingTable(Material material)
|
public BlockElectricCraftingTable(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.electriccraftingtable");
|
setBlockName("techreborn.electriccraftingtable");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/electric_crafting_table_front");
|
this.iconFront = icon.registerIcon("techreborn:machine/electric_crafting_table_front");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/electric_crafting_table_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/electric_crafting_table_top");
|
||||||
|
@ -34,8 +32,7 @@ public class BlockElectricCraftingTable extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
|
|
@ -32,5 +32,4 @@ public class BlockFarm extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,16 +17,14 @@ public class BlockFusionCoil extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockFusionCoil(Material material)
|
public BlockFusionCoil(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.fusioncoil");
|
setBlockName("techreborn.fusioncoil");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/fusion_coil");
|
this.blockIcon = icon.registerIcon("techreborn:machine/fusion_coil");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/fusion_coil");
|
this.iconFront = icon.registerIcon("techreborn:machine/fusion_coil");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/fusion_coil");
|
this.iconTop = icon.registerIcon("techreborn:machine/fusion_coil");
|
||||||
|
@ -34,8 +32,7 @@ public class BlockFusionCoil extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
|
|
@ -17,16 +17,14 @@ public class BlockFusionControlComputer extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockFusionControlComputer(Material material)
|
public BlockFusionControlComputer(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.fusioncontrolcomputer");
|
setBlockName("techreborn.fusioncontrolcomputer");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
this.blockIcon = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/fusion_control_computer_front");
|
this.iconFront = icon.registerIcon("techreborn:machine/fusion_control_computer_front");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
this.iconTop = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||||
|
@ -34,8 +32,7 @@ public class BlockFusionControlComputer extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
|
|
@ -17,16 +17,14 @@ public class BlockHighlyAdvancedMachine extends BlockMachineBase{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockHighlyAdvancedMachine(Material material)
|
public BlockHighlyAdvancedMachine(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.highlyAdvancedMachine");
|
setBlockName("techreborn.highlyAdvancedMachine");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
this.blockIcon = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
this.iconFront = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
this.iconTop = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
||||||
|
@ -34,8 +32,7 @@ public class BlockHighlyAdvancedMachine extends BlockMachineBase{
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
package techreborn.blocks;
|
package techreborn.blocks;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.*;
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
import net.minecraft.block.BlockDynamicLiquid;
|
|
||||||
import net.minecraft.block.BlockLiquid;
|
|
||||||
import net.minecraft.block.BlockStaticLiquid;
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.EnumCreatureType;
|
import net.minecraft.entity.EnumCreatureType;
|
||||||
|
@ -22,8 +18,7 @@ import java.util.Random;
|
||||||
|
|
||||||
public class BlockMachineBase extends BlockContainer {
|
public class BlockMachineBase extends BlockContainer {
|
||||||
|
|
||||||
public BlockMachineBase(Material material)
|
public BlockMachineBase(Material material) {
|
||||||
{
|
|
||||||
super(Material.rock);
|
super(Material.rock);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setHardness(2f);
|
setHardness(2f);
|
||||||
|
@ -31,24 +26,20 @@ public class BlockMachineBase extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onBlockAdded(World world, int x, int y, int z)
|
public void onBlockAdded(World world, int x, int y, int z) {
|
||||||
{
|
|
||||||
|
|
||||||
super.onBlockAdded(world, x, y, z);
|
super.onBlockAdded(world, x, y, z);
|
||||||
this.setDefaultDirection(world, x, y, z);
|
this.setDefaultDirection(world, x, y, z);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setDefaultDirection(World world, int x, int y, int z)
|
private void setDefaultDirection(World world, int x, int y, int z) {
|
||||||
{
|
|
||||||
|
|
||||||
if (!world.isRemote)
|
if (!world.isRemote) {
|
||||||
{
|
|
||||||
Block block1 = world.getBlock(x, y, z - 1);
|
Block block1 = world.getBlock(x, y, z - 1);
|
||||||
Block block2 = world.getBlock(x, y, z + 1);
|
Block block2 = world.getBlock(x, y, z + 1);
|
||||||
Block block3 = world.getBlock(x - 1, y, z);
|
Block block3 = world.getBlock(x - 1, y, z);
|
||||||
|
@ -56,20 +47,16 @@ public class BlockMachineBase extends BlockContainer {
|
||||||
|
|
||||||
byte b = 3;
|
byte b = 3;
|
||||||
|
|
||||||
if (block1.func_149730_j() && !block2.func_149730_j())
|
if (block1.func_149730_j() && !block2.func_149730_j()) {
|
||||||
{
|
|
||||||
b = 3;
|
b = 3;
|
||||||
}
|
}
|
||||||
if (block2.func_149730_j() && !block1.func_149730_j())
|
if (block2.func_149730_j() && !block1.func_149730_j()) {
|
||||||
{
|
|
||||||
b = 2;
|
b = 2;
|
||||||
}
|
}
|
||||||
if (block3.func_149730_j() && !block4.func_149730_j())
|
if (block3.func_149730_j() && !block4.func_149730_j()) {
|
||||||
{
|
|
||||||
b = 5;
|
b = 5;
|
||||||
}
|
}
|
||||||
if (block4.func_149730_j() && !block3.func_149730_j())
|
if (block4.func_149730_j() && !block3.func_149730_j()) {
|
||||||
{
|
|
||||||
b = 4;
|
b = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,61 +67,50 @@ public class BlockMachineBase extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onBlockPlacedBy(World world, int x, int y, int z,
|
public void onBlockPlacedBy(World world, int x, int y, int z,
|
||||||
EntityLivingBase player, ItemStack itemstack)
|
EntityLivingBase player, ItemStack itemstack) {
|
||||||
{
|
|
||||||
|
|
||||||
int l = MathHelper
|
int l = MathHelper
|
||||||
.floor_double((double) (player.rotationYaw * 4.0F / 360F) + 0.5D) & 3;
|
.floor_double((double) (player.rotationYaw * 4.0F / 360F) + 0.5D) & 3;
|
||||||
|
|
||||||
if (l == 0)
|
if (l == 0) {
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||||
}
|
}
|
||||||
if (l == 1)
|
if (l == 1) {
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||||
}
|
}
|
||||||
if (l == 2)
|
if (l == 2) {
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||||
}
|
}
|
||||||
if (l == 3)
|
if (l == 3) {
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||||
}
|
}
|
||||||
super.onBlockPlacedBy(world, x, y, z, player, itemstack);
|
super.onBlockPlacedBy(world, x, y, z, player, itemstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canCreatureSpawn(EnumCreatureType type, World world, int x,
|
public boolean canCreatureSpawn(EnumCreatureType type, World world, int x,
|
||||||
int y, int z)
|
int y, int z) {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta)
|
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||||
{
|
|
||||||
dropInventory(world, x, y, z);
|
dropInventory(world, x, y, z);
|
||||||
super.breakBlock(world, x, y, z, block, meta);
|
super.breakBlock(world, x, y, z, block, meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void dropInventory(World world, int x, int y, int z)
|
protected void dropInventory(World world, int x, int y, int z) {
|
||||||
{
|
|
||||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
if (!(tileEntity instanceof IInventory))
|
if (!(tileEntity instanceof IInventory)) {
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IInventory inventory = (IInventory) tileEntity;
|
IInventory inventory = (IInventory) tileEntity;
|
||||||
|
|
||||||
for (int i = 0; i < inventory.getSizeInventory(); i++)
|
for (int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||||
{
|
|
||||||
ItemStack itemStack = inventory.getStackInSlot(i);
|
ItemStack itemStack = inventory.getStackInSlot(i);
|
||||||
|
|
||||||
if (itemStack != null && itemStack.stackSize > 0)
|
if (itemStack != null && itemStack.stackSize > 0) {
|
||||||
{
|
|
||||||
if (itemStack.getItem() instanceof ItemBlock) {
|
if (itemStack.getItem() instanceof ItemBlock) {
|
||||||
if (((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockLiquid || ((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockStaticLiquid || ((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockDynamicLiquid) {
|
if (((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockLiquid || ((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockStaticLiquid || ((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockDynamicLiquid) {
|
||||||
return;
|
return;
|
||||||
|
@ -148,8 +124,7 @@ public class BlockMachineBase extends BlockContainer {
|
||||||
|
|
||||||
EntityItem entityItem = new EntityItem(world, x + dX, y + dY, z + dZ, itemStack.copy());
|
EntityItem entityItem = new EntityItem(world, x + dX, y + dY, z + dZ, itemStack.copy());
|
||||||
|
|
||||||
if (itemStack.hasTagCompound())
|
if (itemStack.hasTagCompound()) {
|
||||||
{
|
|
||||||
entityItem.getEntityItem().setTagCompound((NBTTagCompound) itemStack.getTagCompound().copy());
|
entityItem.getEntityItem().setTagCompound((NBTTagCompound) itemStack.getTagCompound().copy());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,7 @@ public class BlockMachineCasing extends BlockMultiblockBase {
|
||||||
{"standard", "reinforced", "advanced"};
|
{"standard", "reinforced", "advanced"};
|
||||||
private IIcon[] textures;
|
private IIcon[] textures;
|
||||||
|
|
||||||
public BlockMachineCasing(Material material)
|
public BlockMachineCasing(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setBlockName("techreborn.machineCasing");
|
setBlockName("techreborn.machineCasing");
|
||||||
|
@ -34,35 +33,29 @@ public class BlockMachineCasing extends BlockMultiblockBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return Item.getItemFromBlock(this);
|
return Item.getItemFromBlock(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
|
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
|
||||||
{
|
for (int meta = 0; meta < types.length; meta++) {
|
||||||
for (int meta = 0; meta < types.length; meta++)
|
|
||||||
{
|
|
||||||
list.add(new ItemStack(item, 1, meta));
|
list.add(new ItemStack(item, 1, meta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int damageDropped(int metaData)
|
public int damageDropped(int metaData) {
|
||||||
{
|
|
||||||
return metaData;
|
return metaData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister iconRegister)
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
{
|
|
||||||
this.textures = new IIcon[types.length];
|
this.textures = new IIcon[types.length];
|
||||||
|
|
||||||
for (int i = 0; i < types.length; i++)
|
for (int i = 0; i < types.length; i++) {
|
||||||
{
|
|
||||||
textures[i] = iconRegister.registerIcon("techreborn:"
|
textures[i] = iconRegister.registerIcon("techreborn:"
|
||||||
+ "machine/casing" + types[i]);
|
+ "machine/casing" + types[i]);
|
||||||
}
|
}
|
||||||
|
@ -70,23 +63,19 @@ public class BlockMachineCasing extends BlockMultiblockBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metaData)
|
public IIcon getIcon(int side, int metaData) {
|
||||||
{
|
|
||||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||||
|
|
||||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN)
|
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||||
{
|
|
||||||
return textures[metaData];
|
return textures[metaData];
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
return textures[metaData];
|
return textures[metaData];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileMachineCasing();
|
return new TileMachineCasing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,7 @@ import java.util.List;
|
||||||
|
|
||||||
public class BlockMachineFrame extends Block {
|
public class BlockMachineFrame extends Block {
|
||||||
|
|
||||||
public static ItemStack getFrameByName(String name, int count)
|
public static ItemStack getFrameByName(String name, int count) {
|
||||||
{
|
|
||||||
for (int i = 0; i < types.length; i++) {
|
for (int i = 0; i < types.length; i++) {
|
||||||
if (types[i].equalsIgnoreCase(name)) {
|
if (types[i].equalsIgnoreCase(name)) {
|
||||||
return new ItemStack(ModBlocks.machineframe, count, i);
|
return new ItemStack(ModBlocks.machineframe, count, i);
|
||||||
|
@ -34,8 +33,7 @@ public class BlockMachineFrame extends Block {
|
||||||
|
|
||||||
private IIcon[] textures;
|
private IIcon[] textures;
|
||||||
|
|
||||||
public BlockMachineFrame(Material material)
|
public BlockMachineFrame(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.machineFrame");
|
setBlockName("techreborn.machineFrame");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
|
@ -44,28 +42,23 @@ public class BlockMachineFrame extends Block {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
|
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
|
||||||
{
|
for (int meta = 0; meta < types.length; meta++) {
|
||||||
for (int meta = 0; meta < types.length; meta++)
|
|
||||||
{
|
|
||||||
list.add(new ItemStack(item, 1, meta));
|
list.add(new ItemStack(item, 1, meta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int damageDropped(int metaData)
|
public int damageDropped(int metaData) {
|
||||||
{
|
|
||||||
return metaData;
|
return metaData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister iconRegister)
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
{
|
|
||||||
this.textures = new IIcon[types.length];
|
this.textures = new IIcon[types.length];
|
||||||
|
|
||||||
for (int i = 0; i < types.length; i++)
|
for (int i = 0; i < types.length; i++) {
|
||||||
{
|
|
||||||
textures[i] = iconRegister.registerIcon("techreborn:" + "machine/"
|
textures[i] = iconRegister.registerIcon("techreborn:" + "machine/"
|
||||||
+ types[i] + "_machine_block");
|
+ types[i] + "_machine_block");
|
||||||
}
|
}
|
||||||
|
@ -73,16 +66,13 @@ public class BlockMachineFrame extends Block {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metaData)
|
public IIcon getIcon(int side, int metaData) {
|
||||||
{
|
|
||||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||||
|
|
||||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN)
|
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||||
{
|
|
||||||
return textures[metaData];
|
return textures[metaData];
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
return textures[metaData];
|
return textures[metaData];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,16 +26,14 @@ public class BlockMetalShelf extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockMetalShelf(Material material)
|
public BlockMetalShelf(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.metalshelf");
|
setBlockName("techreborn.metalshelf");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFrontEmpty = icon.registerIcon("techreborn:machine/metal_shelf_empty");
|
this.iconFrontEmpty = icon.registerIcon("techreborn:machine/metal_shelf_empty");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||||
|
@ -43,8 +41,7 @@ public class BlockMetalShelf extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFrontEmpty
|
return metadata == 0 && side == 3 ? this.iconFrontEmpty
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
|
|
|
@ -27,8 +27,7 @@ import java.util.List;
|
||||||
|
|
||||||
public class BlockOre extends Block {
|
public class BlockOre extends Block {
|
||||||
|
|
||||||
public static ItemStack getOreByName(String name, int count)
|
public static ItemStack getOreByName(String name, int count) {
|
||||||
{
|
|
||||||
int index = -1;
|
int index = -1;
|
||||||
for (int i = 0; i < types.length; i++) {
|
for (int i = 0; i < types.length; i++) {
|
||||||
if (types[i].equals(name)) {
|
if (types[i].equals(name)) {
|
||||||
|
@ -39,8 +38,7 @@ public class BlockOre extends Block {
|
||||||
return new ItemStack(ModBlocks.ore, count, index);
|
return new ItemStack(ModBlocks.ore, count, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack getOreByName(String name)
|
public static ItemStack getOreByName(String name) {
|
||||||
{
|
|
||||||
return getOreByName(name, 1);
|
return getOreByName(name, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,8 +49,7 @@ public class BlockOre extends Block {
|
||||||
|
|
||||||
private IIcon[] textures;
|
private IIcon[] textures;
|
||||||
|
|
||||||
public BlockOre(Material material)
|
public BlockOre(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.ore");
|
setBlockName("techreborn.ore");
|
||||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||||
|
@ -60,11 +57,9 @@ public class BlockOre extends Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
|
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||||
{
|
|
||||||
//Ruby
|
//Ruby
|
||||||
if (metadata == 2)
|
if (metadata == 2) {
|
||||||
{
|
|
||||||
OreDrop ruby = new OreDrop(ItemGems.getGemByName("ruby"));
|
OreDrop ruby = new OreDrop(ItemGems.getGemByName("ruby"));
|
||||||
OreDrop redGarnet = new OreDrop(ItemGems.getGemByName("redGarnet"), 0.02);
|
OreDrop redGarnet = new OreDrop(ItemGems.getGemByName("redGarnet"), 0.02);
|
||||||
OreDropSet set = new OreDropSet(ruby, redGarnet);
|
OreDropSet set = new OreDropSet(ruby, redGarnet);
|
||||||
|
@ -72,8 +67,7 @@ public class BlockOre extends Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Sapphire
|
//Sapphire
|
||||||
if (metadata == 3)
|
if (metadata == 3) {
|
||||||
{
|
|
||||||
OreDrop sapphire = new OreDrop(ItemGems.getGemByName("sapphire"));
|
OreDrop sapphire = new OreDrop(ItemGems.getGemByName("sapphire"));
|
||||||
OreDrop peridot = new OreDrop(ItemGems.getGemByName("peridot"), 0.03);
|
OreDrop peridot = new OreDrop(ItemGems.getGemByName("peridot"), 0.03);
|
||||||
OreDropSet set = new OreDropSet(sapphire, peridot);
|
OreDropSet set = new OreDropSet(sapphire, peridot);
|
||||||
|
@ -81,16 +75,14 @@ public class BlockOre extends Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Pyrite
|
//Pyrite
|
||||||
if (metadata == 5)
|
if (metadata == 5) {
|
||||||
{
|
|
||||||
OreDrop pyriteDust = new OreDrop(ItemDusts.getDustByName("pyrite"));
|
OreDrop pyriteDust = new OreDrop(ItemDusts.getDustByName("pyrite"));
|
||||||
OreDropSet set = new OreDropSet(pyriteDust);
|
OreDropSet set = new OreDropSet(pyriteDust);
|
||||||
return set.drop(fortune, world.rand);
|
return set.drop(fortune, world.rand);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Sodolite
|
//Sodolite
|
||||||
if (metadata == 11)
|
if (metadata == 11) {
|
||||||
{
|
|
||||||
OreDrop sodalite = new OreDrop(ItemDusts.getDustByName("sodalite", 6));
|
OreDrop sodalite = new OreDrop(ItemDusts.getDustByName("sodalite", 6));
|
||||||
OreDrop aluminum = new OreDrop(ItemDusts.getDustByName("aluminum"), 0.50);
|
OreDrop aluminum = new OreDrop(ItemDusts.getDustByName("aluminum"), 0.50);
|
||||||
OreDropSet set = new OreDropSet(sodalite, aluminum);
|
OreDropSet set = new OreDropSet(sodalite, aluminum);
|
||||||
|
@ -98,8 +90,7 @@ public class BlockOre extends Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Cinnabar
|
//Cinnabar
|
||||||
if (metadata == 6)
|
if (metadata == 6) {
|
||||||
{
|
|
||||||
OreDrop cinnabar = new OreDrop(ItemDusts.getDustByName("cinnabar"));
|
OreDrop cinnabar = new OreDrop(ItemDusts.getDustByName("cinnabar"));
|
||||||
OreDrop redstone = new OreDrop(new ItemStack(Items.redstone), 0.25);
|
OreDrop redstone = new OreDrop(new ItemStack(Items.redstone), 0.25);
|
||||||
OreDropSet set = new OreDropSet(cinnabar, redstone);
|
OreDropSet set = new OreDropSet(cinnabar, redstone);
|
||||||
|
@ -107,8 +98,7 @@ public class BlockOre extends Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Sphalerite 1, 1/8 yellow garnet
|
//Sphalerite 1, 1/8 yellow garnet
|
||||||
if (metadata == 7)
|
if (metadata == 7) {
|
||||||
{
|
|
||||||
OreDrop sphalerite = new OreDrop(ItemDusts.getDustByName("sphalerite"));
|
OreDrop sphalerite = new OreDrop(ItemDusts.getDustByName("sphalerite"));
|
||||||
OreDrop yellowGarnet = new OreDrop(ItemGems.getGemByName("yellowGarnet"), 0.125);
|
OreDrop yellowGarnet = new OreDrop(ItemGems.getGemByName("yellowGarnet"), 0.125);
|
||||||
OreDropSet set = new OreDropSet(sphalerite, yellowGarnet);
|
OreDropSet set = new OreDropSet(sphalerite, yellowGarnet);
|
||||||
|
@ -121,34 +111,25 @@ public class BlockOre extends Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean canSilkHarvest()
|
protected boolean canSilkHarvest() {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
|
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
|
||||||
{
|
for (int meta = 0; meta < types.length; meta++) {
|
||||||
for (int meta = 0; meta < types.length; meta++)
|
|
||||||
{
|
|
||||||
list.add(new ItemStack(item, 1, meta));
|
list.add(new ItemStack(item, 1, meta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int damageDropped(int metaData)
|
public int damageDropped(int metaData) {
|
||||||
{
|
if (metaData == 2) {
|
||||||
if(metaData == 2 )
|
|
||||||
{
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
} else if (metaData == 3) {
|
||||||
else if(metaData == 3)
|
|
||||||
{
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
} else if (metaData == 5) {
|
||||||
else if(metaData == 5)
|
|
||||||
{
|
|
||||||
return 60;
|
return 60;
|
||||||
}
|
}
|
||||||
return metaData;
|
return metaData;
|
||||||
|
@ -156,12 +137,10 @@ public class BlockOre extends Block {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister iconRegister)
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
{
|
|
||||||
this.textures = new IIcon[types.length];
|
this.textures = new IIcon[types.length];
|
||||||
|
|
||||||
for (int i = 0; i < types.length; i++)
|
for (int i = 0; i < types.length; i++) {
|
||||||
{
|
|
||||||
textures[i] = iconRegister.registerIcon("techreborn:" + "ore/ore"
|
textures[i] = iconRegister.registerIcon("techreborn:" + "ore/ore"
|
||||||
+ types[i]);
|
+ types[i]);
|
||||||
}
|
}
|
||||||
|
@ -169,17 +148,13 @@ public class BlockOre extends Block {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metaData)
|
public IIcon getIcon(int side, int metaData) {
|
||||||
{
|
|
||||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||||
|
|
||||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN)
|
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||||
{
|
|
||||||
return textures[metaData];
|
return textures[metaData];
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
return textures[metaData];
|
return textures[metaData];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,23 +29,21 @@ public class BlockQuantumChest extends BlockContainer {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockQuantumChest()
|
public BlockQuantumChest() {
|
||||||
{
|
|
||||||
super(Material.rock);
|
super(Material.rock);
|
||||||
setBlockName("techreborn.quantumChest");
|
setBlockName("techreborn.quantumChest");
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setHardness(2.0F);
|
setHardness(2.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileQuantumChest();
|
return new TileQuantumChest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.quantumChestID, world, x,
|
player.openGui(Core.INSTANCE, GuiHandler.quantumChestID, world, x,
|
||||||
y, z);
|
y, z);
|
||||||
|
@ -54,8 +52,7 @@ public class BlockQuantumChest extends BlockContainer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/qchest_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/qchest_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/quantum_chest");
|
this.iconFront = icon.registerIcon("techreborn:machine/quantum_chest");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/quantum_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/quantum_top");
|
||||||
|
@ -63,8 +60,7 @@ public class BlockQuantumChest extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -73,19 +69,16 @@ public class BlockQuantumChest extends BlockContainer {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onBlockAdded(World world, int x, int y, int z)
|
public void onBlockAdded(World world, int x, int y, int z) {
|
||||||
{
|
|
||||||
|
|
||||||
super.onBlockAdded(world, x, y, z);
|
super.onBlockAdded(world, x, y, z);
|
||||||
this.setDefaultDirection(world, x, y, z);
|
this.setDefaultDirection(world, x, y, z);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setDefaultDirection(World world, int x, int y, int z)
|
private void setDefaultDirection(World world, int x, int y, int z) {
|
||||||
{
|
|
||||||
|
|
||||||
if (!world.isRemote)
|
if (!world.isRemote) {
|
||||||
{
|
|
||||||
Block block1 = world.getBlock(x, y, z - 1);
|
Block block1 = world.getBlock(x, y, z - 1);
|
||||||
Block block2 = world.getBlock(x, y, z + 1);
|
Block block2 = world.getBlock(x, y, z + 1);
|
||||||
Block block3 = world.getBlock(x - 1, y, z);
|
Block block3 = world.getBlock(x - 1, y, z);
|
||||||
|
@ -93,20 +86,16 @@ public class BlockQuantumChest extends BlockContainer {
|
||||||
|
|
||||||
byte b = 3;
|
byte b = 3;
|
||||||
|
|
||||||
if (block1.func_149730_j() && !block2.func_149730_j())
|
if (block1.func_149730_j() && !block2.func_149730_j()) {
|
||||||
{
|
|
||||||
b = 3;
|
b = 3;
|
||||||
}
|
}
|
||||||
if (block2.func_149730_j() && !block1.func_149730_j())
|
if (block2.func_149730_j() && !block1.func_149730_j()) {
|
||||||
{
|
|
||||||
b = 2;
|
b = 2;
|
||||||
}
|
}
|
||||||
if (block3.func_149730_j() && !block4.func_149730_j())
|
if (block3.func_149730_j() && !block4.func_149730_j()) {
|
||||||
{
|
|
||||||
b = 5;
|
b = 5;
|
||||||
}
|
}
|
||||||
if (block4.func_149730_j() && !block3.func_149730_j())
|
if (block4.func_149730_j() && !block3.func_149730_j()) {
|
||||||
{
|
|
||||||
b = 4;
|
b = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,26 +106,21 @@ public class BlockQuantumChest extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onBlockPlacedBy(World world, int x, int y, int z,
|
public void onBlockPlacedBy(World world, int x, int y, int z,
|
||||||
EntityLivingBase player, ItemStack itemstack)
|
EntityLivingBase player, ItemStack itemstack) {
|
||||||
{
|
|
||||||
|
|
||||||
int l = MathHelper
|
int l = MathHelper
|
||||||
.floor_double((double) (player.rotationYaw * 4.0F / 360F) + 0.5D) & 3;
|
.floor_double((double) (player.rotationYaw * 4.0F / 360F) + 0.5D) & 3;
|
||||||
|
|
||||||
if (l == 0)
|
if (l == 0) {
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||||
}
|
}
|
||||||
if (l == 1)
|
if (l == 1) {
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||||
}
|
}
|
||||||
if (l == 2)
|
if (l == 2) {
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||||
}
|
}
|
||||||
if (l == 3)
|
if (l == 3) {
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||||
}
|
}
|
||||||
super.onBlockPlacedBy(world, x, y, z, player, itemstack);
|
super.onBlockPlacedBy(world, x, y, z, player, itemstack);
|
||||||
|
|
|
@ -19,22 +19,19 @@ public class BlockQuantumTank extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon other;
|
private IIcon other;
|
||||||
|
|
||||||
public BlockQuantumTank()
|
public BlockQuantumTank() {
|
||||||
{
|
|
||||||
super(Material.rock);
|
super(Material.rock);
|
||||||
setBlockName("techreborn.quantumTank");
|
setBlockName("techreborn.quantumTank");
|
||||||
setHardness(2.0F);
|
setHardness(2.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileQuantumTank();
|
return new TileQuantumTank();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.quantumTankID, world, x, y, z);
|
player.openGui(Core.INSTANCE, GuiHandler.quantumTankID, world, x, y, z);
|
||||||
return true;
|
return true;
|
||||||
|
@ -42,21 +39,17 @@ public class BlockQuantumTank extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
top = icon.registerIcon("techreborn:machine/quantum_top");
|
top = icon.registerIcon("techreborn:machine/quantum_top");
|
||||||
other = icon.registerIcon("techreborn:machine/ThermalGenerator_other");
|
other = icon.registerIcon("techreborn:machine/ThermalGenerator_other");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int currentSide, int meta)
|
public IIcon getIcon(int currentSide, int meta) {
|
||||||
{
|
if (currentSide == 1) {
|
||||||
if (currentSide == 1)
|
|
||||||
{
|
|
||||||
return top;
|
return top;
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
return other;
|
return other;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,7 @@ import java.util.Random;
|
||||||
|
|
||||||
public class BlockStorage extends Block {
|
public class BlockStorage extends Block {
|
||||||
|
|
||||||
public static ItemStack getStorageBlockByName(String name, int count)
|
public static ItemStack getStorageBlockByName(String name, int count) {
|
||||||
{
|
|
||||||
for (int i = 0; i < types.length; i++) {
|
for (int i = 0; i < types.length; i++) {
|
||||||
if (types[i].equals(name)) {
|
if (types[i].equals(name)) {
|
||||||
return new ItemStack(ModBlocks.storage, count, i);
|
return new ItemStack(ModBlocks.storage, count, i);
|
||||||
|
@ -29,8 +28,7 @@ public class BlockStorage extends Block {
|
||||||
return BlockStorage2.getStorageBlockByName(name, count);
|
return BlockStorage2.getStorageBlockByName(name, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack getStorageBlockByName(String name)
|
public static ItemStack getStorageBlockByName(String name) {
|
||||||
{
|
|
||||||
return getStorageBlockByName(name, 1);
|
return getStorageBlockByName(name, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,8 +39,7 @@ public class BlockStorage extends Block {
|
||||||
|
|
||||||
private IIcon[] textures;
|
private IIcon[] textures;
|
||||||
|
|
||||||
public BlockStorage(Material material)
|
public BlockStorage(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.storage");
|
setBlockName("techreborn.storage");
|
||||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||||
|
@ -50,35 +47,29 @@ public class BlockStorage extends Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int par1, Random random, int par2)
|
public Item getItemDropped(int par1, Random random, int par2) {
|
||||||
{
|
|
||||||
return Item.getItemFromBlock(this);
|
return Item.getItemFromBlock(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
|
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
|
||||||
{
|
for (int meta = 0; meta < types.length; meta++) {
|
||||||
for (int meta = 0; meta < types.length; meta++)
|
|
||||||
{
|
|
||||||
list.add(new ItemStack(item, 1, meta));
|
list.add(new ItemStack(item, 1, meta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int damageDropped(int metaData)
|
public int damageDropped(int metaData) {
|
||||||
{
|
|
||||||
return metaData;
|
return metaData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister iconRegister)
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
{
|
|
||||||
this.textures = new IIcon[types.length];
|
this.textures = new IIcon[types.length];
|
||||||
|
|
||||||
for (int i = 0; i < types.length; i++)
|
for (int i = 0; i < types.length; i++) {
|
||||||
{
|
|
||||||
textures[i] = iconRegister.registerIcon("techreborn:"
|
textures[i] = iconRegister.registerIcon("techreborn:"
|
||||||
+ "storage/" + types[i] + "_block");
|
+ "storage/" + types[i] + "_block");
|
||||||
}
|
}
|
||||||
|
@ -86,16 +77,13 @@ public class BlockStorage extends Block {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metaData)
|
public IIcon getIcon(int side, int metaData) {
|
||||||
{
|
|
||||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||||
|
|
||||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN)
|
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||||
{
|
|
||||||
return textures[metaData];
|
return textures[metaData];
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
return textures[metaData];
|
return textures[metaData];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,7 @@ import java.util.Random;
|
||||||
|
|
||||||
public class BlockStorage2 extends Block {
|
public class BlockStorage2 extends Block {
|
||||||
|
|
||||||
public static ItemStack getStorageBlockByName(String name, int count)
|
public static ItemStack getStorageBlockByName(String name, int count) {
|
||||||
{
|
|
||||||
for (int i = 0; i < types.length; i++) {
|
for (int i = 0; i < types.length; i++) {
|
||||||
if (types[i].equals(name)) {
|
if (types[i].equals(name)) {
|
||||||
return new ItemStack(ModBlocks.storage2, count, i);
|
return new ItemStack(ModBlocks.storage2, count, i);
|
||||||
|
@ -36,8 +35,7 @@ public class BlockStorage2 extends Block {
|
||||||
|
|
||||||
private IIcon[] textures;
|
private IIcon[] textures;
|
||||||
|
|
||||||
public BlockStorage2(Material material)
|
public BlockStorage2(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.storage2");
|
setBlockName("techreborn.storage2");
|
||||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||||
|
@ -45,35 +43,29 @@ public class BlockStorage2 extends Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int par1, Random random, int par2)
|
public Item getItemDropped(int par1, Random random, int par2) {
|
||||||
{
|
|
||||||
return Item.getItemFromBlock(this);
|
return Item.getItemFromBlock(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
|
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
|
||||||
{
|
for (int meta = 0; meta < types.length; meta++) {
|
||||||
for (int meta = 0; meta < types.length; meta++)
|
|
||||||
{
|
|
||||||
list.add(new ItemStack(item, 1, meta));
|
list.add(new ItemStack(item, 1, meta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int damageDropped(int metaData)
|
public int damageDropped(int metaData) {
|
||||||
{
|
|
||||||
return metaData;
|
return metaData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister iconRegister)
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
{
|
|
||||||
this.textures = new IIcon[types.length];
|
this.textures = new IIcon[types.length];
|
||||||
|
|
||||||
for (int i = 0; i < types.length; i++)
|
for (int i = 0; i < types.length; i++) {
|
||||||
{
|
|
||||||
textures[i] = iconRegister.registerIcon("techreborn:"
|
textures[i] = iconRegister.registerIcon("techreborn:"
|
||||||
+ "storage/" + types[i] + "_block");
|
+ "storage/" + types[i] + "_block");
|
||||||
}
|
}
|
||||||
|
@ -82,16 +74,13 @@ public class BlockStorage2 extends Block {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metaData)
|
public IIcon getIcon(int side, int metaData) {
|
||||||
{
|
|
||||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||||
|
|
||||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN)
|
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||||
{
|
|
||||||
return textures[metaData];
|
return textures[metaData];
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
return textures[metaData];
|
return textures[metaData];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,16 +17,14 @@ public class BlockSupercondensator extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockSupercondensator(Material material)
|
public BlockSupercondensator(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.supercondensator");
|
setBlockName("techreborn.supercondensator");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/supercondensator_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/supercondensator_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/supercondensator_front");
|
this.iconFront = icon.registerIcon("techreborn:machine/supercondensator_front");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/supercondensator_side");
|
this.iconTop = icon.registerIcon("techreborn:machine/supercondensator_side");
|
||||||
|
@ -34,8 +32,7 @@ public class BlockSupercondensator extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
|
|
@ -17,16 +17,14 @@ public class BlockWoodenshelf extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockWoodenshelf(Material material)
|
public BlockWoodenshelf(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.woodenshelf");
|
setBlockName("techreborn.woodenshelf");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/wood_shelf_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/wood_shelf_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/wood_shelf_empty");
|
this.iconFront = icon.registerIcon("techreborn:machine/wood_shelf_empty");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/wood_shelf_side");
|
this.iconTop = icon.registerIcon("techreborn:machine/wood_shelf_side");
|
||||||
|
@ -34,8 +32,7 @@ public class BlockWoodenshelf extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
|
|
@ -18,22 +18,19 @@ public class BlockFluidBase extends BlockFluidClassic{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
protected IIcon flowingIcon;
|
protected IIcon flowingIcon;
|
||||||
|
|
||||||
public BlockFluidBase(Fluid fluid, Material material)
|
public BlockFluidBase(Fluid fluid, Material material) {
|
||||||
{
|
|
||||||
super(fluid, material);
|
super(fluid, material);
|
||||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IIcon getIcon(int side, int meta)
|
public IIcon getIcon(int side, int meta) {
|
||||||
{
|
|
||||||
return (side == 0 || side == 1) ? stillIcon : flowingIcon;
|
return (side == 0 || side == 1) ? stillIcon : flowingIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void registerBlockIcons(IIconRegister register)
|
public void registerBlockIcons(IIconRegister register) {
|
||||||
{
|
|
||||||
stillIcon = register.registerIcon(ModInfo.MOD_ID.toLowerCase() + ":" + "fluids/" + getUnlocalizedName().substring(16) + "_flowing");
|
stillIcon = register.registerIcon(ModInfo.MOD_ID.toLowerCase() + ":" + "fluids/" + getUnlocalizedName().substring(16) + "_flowing");
|
||||||
flowingIcon = register.registerIcon(ModInfo.MOD_ID.toLowerCase() + ":" + "fluids/" + getUnlocalizedName().substring(16) + "_flowing");
|
flowingIcon = register.registerIcon(ModInfo.MOD_ID.toLowerCase() + ":" + "fluids/" + getUnlocalizedName().substring(16) + "_flowing");
|
||||||
|
|
||||||
|
@ -41,16 +38,14 @@ public class BlockFluidBase extends BlockFluidClassic{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canDisplace(IBlockAccess world, int x, int y, int z)
|
public boolean canDisplace(IBlockAccess world, int x, int y, int z) {
|
||||||
{
|
|
||||||
if (world.getBlock(x, y, z).getMaterial().isLiquid())
|
if (world.getBlock(x, y, z).getMaterial().isLiquid())
|
||||||
return false;
|
return false;
|
||||||
return super.canDisplace(world, x, y, z);
|
return super.canDisplace(world, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean displaceIfPossible(World world, int x, int y, int z)
|
public boolean displaceIfPossible(World world, int x, int y, int z) {
|
||||||
{
|
|
||||||
if (world.getBlock(x, y, z).getMaterial().isLiquid())
|
if (world.getBlock(x, y, z).getMaterial().isLiquid())
|
||||||
return false;
|
return false;
|
||||||
return super.displaceIfPossible(world, x, y, z);
|
return super.displaceIfPossible(world, x, y, z);
|
||||||
|
|
|
@ -5,8 +5,7 @@ import net.minecraftforge.fluids.Fluid;
|
||||||
|
|
||||||
public class BlockFluidTechReborn extends BlockFluidBase {
|
public class BlockFluidTechReborn extends BlockFluidBase {
|
||||||
|
|
||||||
public BlockFluidTechReborn(Fluid fluid, Material material, String name)
|
public BlockFluidTechReborn(Fluid fluid, Material material, String name) {
|
||||||
{
|
|
||||||
super(fluid, material);
|
super(fluid, material);
|
||||||
setBlockName(name);
|
setBlockName(name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,16 +28,14 @@ public class BlockDieselGenerator extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockDieselGenerator(Material material)
|
public BlockDieselGenerator(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.dieselgenerator");
|
setBlockName("techreborn.dieselgenerator");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/diesel_generator_top_off");
|
this.iconTop = icon.registerIcon("techreborn:machine/diesel_generator_top_off");
|
||||||
|
@ -45,15 +43,13 @@ public class BlockDieselGenerator extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileDieselGenerator();
|
return new TileDieselGenerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.dieselGeneratorID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.dieselGeneratorID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -61,8 +57,7 @@ public class BlockDieselGenerator extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -72,8 +67,7 @@ public class BlockDieselGenerator extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,16 +25,14 @@ public class BlockDragonEggSiphoner extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockDragonEggSiphoner(Material material)
|
public BlockDragonEggSiphoner(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.dragoneggsiphoner");
|
setBlockName("techreborn.dragoneggsiphoner");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/dragon_egg_energy_siphon_side_off");
|
this.blockIcon = icon.registerIcon("techreborn:machine/dragon_egg_energy_siphon_side_off");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/dragon_egg_energy_siphon_side_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/dragon_egg_energy_siphon_side_off");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/dragon_egg_energy_siphon_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/dragon_egg_energy_siphon_top");
|
||||||
|
@ -42,14 +40,12 @@ public class BlockDragonEggSiphoner extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileDragonEggSiphoner();
|
return new TileDragonEggSiphoner();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -59,8 +55,7 @@ public class BlockDragonEggSiphoner extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,22 +28,19 @@ public class BlockGasTurbine extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockGasTurbine(Material material)
|
public BlockGasTurbine(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.gasTurbine");
|
setBlockName("techreborn.gasTurbine");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileGasTurbine();
|
return new TileGasTurbine();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.gasTurbineID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.gasTurbineID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -52,8 +49,7 @@ public class BlockGasTurbine extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/gas_generator_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/gas_generator_top");
|
||||||
|
@ -61,8 +57,7 @@ public class BlockGasTurbine extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -72,8 +67,7 @@ public class BlockGasTurbine extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,16 +25,14 @@ public class BlockHeatGenerator extends BlockMachineBase{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockHeatGenerator(Material material)
|
public BlockHeatGenerator(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.heatgenerator");
|
setBlockName("techreborn.heatgenerator");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/heat_generator_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/heat_generator_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/heat_generator_side");
|
this.iconFront = icon.registerIcon("techreborn:machine/heat_generator_side");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/heat_generator_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/heat_generator_top");
|
||||||
|
@ -42,14 +40,12 @@ public class BlockHeatGenerator extends BlockMachineBase{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileHeatGenerator();
|
return new TileHeatGenerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -59,8 +55,7 @@ public class BlockHeatGenerator extends BlockMachineBase{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,16 +22,14 @@ public class BlockLightningRod extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockLightningRod(Material material)
|
public BlockLightningRod(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.lightningrod");
|
setBlockName("techreborn.lightningrod");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/idsu_front");
|
this.blockIcon = icon.registerIcon("techreborn:machine/idsu_front");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/idsu_front");
|
this.iconFront = icon.registerIcon("techreborn:machine/idsu_front");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/lightning_rod_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/lightning_rod_top");
|
||||||
|
@ -39,8 +37,7 @@ public class BlockLightningRod extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -50,8 +47,7 @@ public class BlockLightningRod extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,16 +22,14 @@ public class BlockMagicEnergyAbsorber extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockMagicEnergyAbsorber(Material material)
|
public BlockMagicEnergyAbsorber(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.magicenergyabsorber");
|
setBlockName("techreborn.magicenergyabsorber");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/magic_energy_absorber_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/magic_energy_absorber_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/magic_energy_absorber_side");
|
this.iconFront = icon.registerIcon("techreborn:machine/magic_energy_absorber_side");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/magic_energy_absorber_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/magic_energy_absorber_top");
|
||||||
|
@ -39,8 +37,7 @@ public class BlockMagicEnergyAbsorber extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -50,8 +47,7 @@ public class BlockMagicEnergyAbsorber extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,16 +22,14 @@ public class BlockMagicEnergyConverter extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockMagicEnergyConverter(Material material)
|
public BlockMagicEnergyConverter(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.magicenergyconverter");
|
setBlockName("techreborn.magicenergyconverter");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/magic_energy_converter_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/magic_energy_converter_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/magic_energy_converter_front_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/magic_energy_converter_front_off");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/magic_energy_converter_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/magic_energy_converter_top");
|
||||||
|
@ -39,8 +37,7 @@ public class BlockMagicEnergyConverter extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -50,8 +47,7 @@ public class BlockMagicEnergyConverter extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,16 +22,14 @@ public class BlockPlasmaGenerator extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockPlasmaGenerator(Material material)
|
public BlockPlasmaGenerator(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.plasmagenerator");
|
setBlockName("techreborn.plasmagenerator");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
this.blockIcon = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/plasma_generator_front");
|
this.iconFront = icon.registerIcon("techreborn:machine/plasma_generator_front");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
this.iconTop = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||||
|
@ -39,8 +37,7 @@ public class BlockPlasmaGenerator extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -50,8 +47,7 @@ public class BlockPlasmaGenerator extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,22 +28,19 @@ public class BlockSemiFluidGenerator extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockSemiFluidGenerator(Material material)
|
public BlockSemiFluidGenerator(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.semifluidgenerator");
|
setBlockName("techreborn.semifluidgenerator");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileSemifluidGenerator();
|
return new TileSemifluidGenerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.semifluidGeneratorID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.semifluidGeneratorID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -52,8 +49,7 @@ public class BlockSemiFluidGenerator extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/semifluid_generator_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/semifluid_generator_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/semifluid_generator_side");
|
this.iconFront = icon.registerIcon("techreborn:machine/semifluid_generator_side");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||||
|
@ -61,8 +57,7 @@ public class BlockSemiFluidGenerator extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -72,8 +67,7 @@ public class BlockSemiFluidGenerator extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,22 +28,19 @@ public class BlockThermalGenerator extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockThermalGenerator()
|
public BlockThermalGenerator() {
|
||||||
{
|
|
||||||
super(Material.rock);
|
super(Material.rock);
|
||||||
setBlockName("techreborn.thermalGenerator");
|
setBlockName("techreborn.thermalGenerator");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileThermalGenerator();
|
return new TileThermalGenerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.thermalGeneratorID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.thermalGeneratorID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -52,8 +49,7 @@ public class BlockThermalGenerator extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/thermal_generator_side_off");
|
this.blockIcon = icon.registerIcon("techreborn:machine/thermal_generator_side_off");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/thermal_generator_side_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/thermal_generator_side_off");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/thermal_generator_top_off");
|
this.iconTop = icon.registerIcon("techreborn:machine/thermal_generator_top_off");
|
||||||
|
@ -61,8 +57,7 @@ public class BlockThermalGenerator extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -72,8 +67,7 @@ public class BlockThermalGenerator extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,22 +27,19 @@ public class BlockAlloyFurnace extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockAlloyFurnace(Material material)
|
public BlockAlloyFurnace(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.alloyfurnace");
|
setBlockName("techreborn.alloyfurnace");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileAlloyFurnace();
|
return new TileAlloyFurnace();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.alloyFurnaceID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.alloyFurnaceID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -51,8 +48,7 @@ public class BlockAlloyFurnace extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/alloy_furnace_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/alloy_furnace_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/alloy_furnace_front_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/alloy_furnace_front_off");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/alloy_furnace_front_on");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/alloy_furnace_front_on");
|
||||||
|
@ -61,8 +57,7 @@ public class BlockAlloyFurnace extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
|
|
|
@ -32,22 +32,19 @@ public class BlockAlloySmelter extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockAlloySmelter(Material material)
|
public BlockAlloySmelter(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.alloysmelter");
|
setBlockName("techreborn.alloysmelter");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileAlloySmelter();
|
return new TileAlloySmelter();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.alloySmelterID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.alloySmelterID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -56,8 +53,7 @@ public class BlockAlloySmelter extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/electric_alloy_furnace_front_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/electric_alloy_furnace_front_off");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/electric_alloy_furnace_front_on");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/electric_alloy_furnace_front_on");
|
||||||
|
@ -79,8 +75,7 @@ public class BlockAlloySmelter extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
|
@ -89,8 +84,7 @@ public class BlockAlloySmelter extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,16 +32,14 @@ public class BlockAssemblingMachine extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockAssemblingMachine(Material material)
|
public BlockAssemblingMachine(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.assemblingmachine");
|
setBlockName("techreborn.assemblingmachine");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/assembling_machine_front_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/assembling_machine_front_off");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/assembling_machine_front_on");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/assembling_machine_front_on");
|
||||||
|
@ -50,15 +48,13 @@ public class BlockAssemblingMachine extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileAssemblingMachine();
|
return new TileAssemblingMachine();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.assemblingmachineID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.assemblingmachineID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -80,8 +76,7 @@ public class BlockAssemblingMachine extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
|
@ -90,8 +85,7 @@ public class BlockAssemblingMachine extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,22 +31,19 @@ public class BlockBlastFurnace extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockBlastFurnace(Material material)
|
public BlockBlastFurnace(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.blastfurnace");
|
setBlockName("techreborn.blastfurnace");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileBlastFurnace();
|
return new TileBlastFurnace();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.blastFurnaceID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.blastFurnaceID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -55,8 +52,7 @@ public class BlockBlastFurnace extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_blast_furnace_front_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/industrial_blast_furnace_front_off");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_blast_furnace_front_on");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_blast_furnace_front_on");
|
||||||
|
@ -65,8 +61,7 @@ public class BlockBlastFurnace extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -76,8 +71,7 @@ public class BlockBlastFurnace extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("advancedMachine").getItem();
|
return IC2Items.getItem("advancedMachine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,22 +35,19 @@ public class BlockCentrifuge extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockCentrifuge()
|
public BlockCentrifuge() {
|
||||||
{
|
|
||||||
super(Material.rock);
|
super(Material.rock);
|
||||||
setBlockName("techreborn.centrifuge");
|
setBlockName("techreborn.centrifuge");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileCentrifuge();
|
return new TileCentrifuge();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.centrifugeID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.centrifugeID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -59,8 +56,7 @@ public class BlockCentrifuge extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_centrifuge_side_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/industrial_centrifuge_side_off");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_centrifuge_side_on");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_centrifuge_side_on");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/industrial_centrifuge_top_off");
|
this.iconTop = icon.registerIcon("techreborn:machine/industrial_centrifuge_top_off");
|
||||||
|
@ -89,8 +85,7 @@ public class BlockCentrifuge extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
|
@ -99,8 +94,7 @@ public class BlockCentrifuge extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,21 +27,18 @@ public class BlockChargeBench extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockChargeBench(Material material)
|
public BlockChargeBench(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.chargebench");
|
setBlockName("techreborn.chargebench");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileChargeBench();
|
return new TileChargeBench();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.chargeBench, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.chargeBench, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -50,8 +47,7 @@ public class BlockChargeBench extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/machine_side");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
|
@ -60,8 +56,7 @@ public class BlockChargeBench extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
|
|
|
@ -32,22 +32,19 @@ public class BlockChemicalReactor extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockChemicalReactor(Material material)
|
public BlockChemicalReactor(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.chemicalreactor");
|
setBlockName("techreborn.chemicalreactor");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileChemicalReactor();
|
return new TileChemicalReactor();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.chemicalReactorID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.chemicalReactorID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -56,8 +53,7 @@ public class BlockChemicalReactor extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/chemical_reactor_side_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/chemical_reactor_side_off");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/chemical_reactor_side_on");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/chemical_reactor_side_on");
|
||||||
|
@ -81,8 +77,7 @@ public class BlockChemicalReactor extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
|
@ -91,8 +86,7 @@ public class BlockChemicalReactor extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,16 +22,14 @@ public class BlockDistillationTower extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockDistillationTower(Material material)
|
public BlockDistillationTower(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.distillationtower");
|
setBlockName("techreborn.distillationtower");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/distillation_tower_front_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/distillation_tower_front_off");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||||
|
@ -39,8 +37,7 @@ public class BlockDistillationTower extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -50,8 +47,7 @@ public class BlockDistillationTower extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,22 +35,19 @@ public class BlockGrinder extends BlockMachineBase{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockGrinder(Material material)
|
public BlockGrinder(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.grinder");
|
setBlockName("techreborn.grinder");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileGrinder();
|
return new TileGrinder();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.grinderID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.grinderID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -59,8 +56,7 @@ public class BlockGrinder extends BlockMachineBase{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_grinder_front_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/industrial_grinder_front_off");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_grinder_front_on");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_grinder_front_on");
|
||||||
|
@ -90,8 +86,7 @@ public class BlockGrinder extends BlockMachineBase{
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
|
@ -100,8 +95,7 @@ public class BlockGrinder extends BlockMachineBase{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,22 +32,19 @@ public class BlockImplosionCompressor extends BlockMachineBase{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockImplosionCompressor(Material material)
|
public BlockImplosionCompressor(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.implosioncompressor");
|
setBlockName("techreborn.implosioncompressor");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileImplosionCompressor();
|
return new TileImplosionCompressor();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.compresserID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.compresserID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -56,8 +53,7 @@ public class BlockImplosionCompressor extends BlockMachineBase{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/implosion_compressor_front_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/implosion_compressor_front_off");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/implosion_compressor_front_on");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/implosion_compressor_front_on");
|
||||||
|
@ -80,8 +76,7 @@ public class BlockImplosionCompressor extends BlockMachineBase{
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
|
@ -90,8 +85,7 @@ public class BlockImplosionCompressor extends BlockMachineBase{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("advancedMachine").getItem();
|
return IC2Items.getItem("advancedMachine").getItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,22 +32,19 @@ public class BlockIndustrialElectrolyzer extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockIndustrialElectrolyzer(Material material)
|
public BlockIndustrialElectrolyzer(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.industrialelectrolyzer");
|
setBlockName("techreborn.industrialelectrolyzer");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileIndustrialElectrolyzer();
|
return new TileIndustrialElectrolyzer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.industrialElectrolyzerID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.industrialElectrolyzerID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -57,8 +54,7 @@ public class BlockIndustrialElectrolyzer extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_off");
|
this.blockIcon = icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_off");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_off");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_on");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_on");
|
||||||
|
@ -82,8 +78,7 @@ public class BlockIndustrialElectrolyzer extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -93,8 +88,7 @@ public class BlockIndustrialElectrolyzer extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,22 +32,19 @@ public class BlockIndustrialSawmill extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockIndustrialSawmill(Material material)
|
public BlockIndustrialSawmill(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.industrialsawmill");
|
setBlockName("techreborn.industrialsawmill");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileIndustrialSawmill();
|
return new TileIndustrialSawmill();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.sawMillID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.sawMillID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -56,8 +53,7 @@ public class BlockIndustrialSawmill extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_sawmill_front_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/industrial_sawmill_front_off");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_sawmill_front_on");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_sawmill_front_on");
|
||||||
|
@ -81,8 +77,7 @@ public class BlockIndustrialSawmill extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -92,8 +87,7 @@ public class BlockIndustrialSawmill extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("advancedMachine").getItem();
|
return IC2Items.getItem("advancedMachine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,16 +32,14 @@ public class BlockLathe extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockLathe(Material material)
|
public BlockLathe(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.lathe");
|
setBlockName("techreborn.lathe");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/lathe_front_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/lathe_front_off");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/lathe_front_on");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/lathe_front_on");
|
||||||
|
@ -50,15 +48,13 @@ public class BlockLathe extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileLathe();
|
return new TileLathe();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.latheID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.latheID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -81,8 +77,7 @@ public class BlockLathe extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
|
@ -91,8 +86,7 @@ public class BlockLathe extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,22 +31,19 @@ public class BlockMatterFabricator extends BlockMachineBase{
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockMatterFabricator(Material material)
|
public BlockMatterFabricator(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.matterfabricator");
|
setBlockName("techreborn.matterfabricator");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileMatterFabricator();
|
return new TileMatterFabricator();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.matterfabID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.matterfabID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -55,8 +52,7 @@ public class BlockMatterFabricator extends BlockMachineBase{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/matterfab_off");
|
this.blockIcon = icon.registerIcon("techreborn:machine/matterfab_off");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/matterfab_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/matterfab_off");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/matterfab_on");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/matterfab_on");
|
||||||
|
@ -65,8 +61,7 @@ public class BlockMatterFabricator extends BlockMachineBase{
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -76,8 +71,7 @@ public class BlockMatterFabricator extends BlockMachineBase{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("advancedMachine").getItem();
|
return IC2Items.getItem("advancedMachine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,16 +32,14 @@ public class BlockPlateCuttingMachine extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockPlateCuttingMachine(Material material)
|
public BlockPlateCuttingMachine(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.platecuttingmachine");
|
setBlockName("techreborn.platecuttingmachine");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/plate_cutting_machine_front_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/plate_cutting_machine_front_off");
|
||||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/plate_cutting_machine_front_on");
|
this.iconFrontOn = icon.registerIcon("techreborn:machine/plate_cutting_machine_front_on");
|
||||||
|
@ -50,15 +48,13 @@ public class BlockPlateCuttingMachine extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TilePlateCuttingMachine();
|
return new TilePlateCuttingMachine();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.platecuttingmachineID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.platecuttingmachineID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -80,8 +76,7 @@ public class BlockPlateCuttingMachine extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
|
@ -90,8 +85,7 @@ public class BlockPlateCuttingMachine extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,22 +28,19 @@ public class BlockRollingMachine extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockRollingMachine(Material material)
|
public BlockRollingMachine(Material material) {
|
||||||
{
|
|
||||||
super(material.rock);
|
super(material.rock);
|
||||||
setBlockName("techreborn.rollingmachine");
|
setBlockName("techreborn.rollingmachine");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileRollingMachine();
|
return new TileRollingMachine();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.rollingMachineID, world,
|
player.openGui(Core.INSTANCE, GuiHandler.rollingMachineID, world,
|
||||||
x, y, z);
|
x, y, z);
|
||||||
|
@ -52,8 +49,7 @@ public class BlockRollingMachine extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/rolling_machine_side_off");
|
this.iconFront = icon.registerIcon("techreborn:machine/rolling_machine_side_off");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||||
|
@ -61,8 +57,7 @@ public class BlockRollingMachine extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
|
@ -71,8 +66,7 @@ public class BlockRollingMachine extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("machine").getItem();
|
return IC2Items.getItem("machine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,16 +22,14 @@ public class BlockVacuumFreezer extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockVacuumFreezer(Material material)
|
public BlockVacuumFreezer(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.vacuumfreezer");
|
setBlockName("techreborn.vacuumfreezer");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/vacuum_freezer_front");
|
this.iconFront = icon.registerIcon("techreborn:machine/vacuum_freezer_front");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/vacuum_freezer_top");
|
this.iconTop = icon.registerIcon("techreborn:machine/vacuum_freezer_top");
|
||||||
|
@ -39,8 +37,7 @@ public class BlockVacuumFreezer extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -50,8 +47,7 @@ public class BlockVacuumFreezer extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int meta, Random random, int fortune)
|
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||||
{
|
|
||||||
return IC2Items.getItem("advancedMachine").getItem();
|
return IC2Items.getItem("advancedMachine").getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,22 +26,19 @@ public class BlockAesu extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockAesu(Material material)
|
public BlockAesu(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.aesu");
|
setBlockName("techreborn.aesu");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileAesu();
|
return new TileAesu();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.aesuID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.aesuID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
@ -51,8 +48,7 @@ public class BlockAesu extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/aesu_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/aesu_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/aesu_front");
|
this.iconFront = icon.registerIcon("techreborn:machine/aesu_front");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/aesu_side");
|
this.iconTop = icon.registerIcon("techreborn:machine/aesu_side");
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
package techreborn.blocks.storage;
|
package techreborn.blocks.storage;
|
||||||
|
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
|
@ -15,8 +13,6 @@ import net.minecraft.world.World;
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.blocks.BlockMachineBase;
|
import techreborn.blocks.BlockMachineBase;
|
||||||
import techreborn.client.GuiHandler;
|
import techreborn.client.GuiHandler;
|
||||||
import techreborn.packets.PacketHandler;
|
|
||||||
import techreborn.tiles.idsu.IDSUManager;
|
|
||||||
import techreborn.tiles.idsu.TileIDSU;
|
import techreborn.tiles.idsu.TileIDSU;
|
||||||
|
|
||||||
public class BlockIDSU extends BlockMachineBase {
|
public class BlockIDSU extends BlockMachineBase {
|
||||||
|
@ -30,16 +26,14 @@ public class BlockIDSU extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockIDSU(Material material)
|
public BlockIDSU(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.idsu");
|
setBlockName("techreborn.idsu");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/idsu_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/idsu_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/idsu_front");
|
this.iconFront = icon.registerIcon("techreborn:machine/idsu_front");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/idsu_side");
|
this.iconTop = icon.registerIcon("techreborn:machine/idsu_side");
|
||||||
|
@ -47,8 +41,7 @@ public class BlockIDSU extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||||
|
@ -64,8 +57,7 @@ public class BlockIDSU extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.idsuID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.idsuID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
|
|
@ -24,16 +24,14 @@ public class BlockLesu extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockLesu(Material material)
|
public BlockLesu(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.lesu");
|
setBlockName("techreborn.lesu");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/lesu_side");
|
this.blockIcon = icon.registerIcon("techreborn:machine/lesu_side");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/lesu_front");
|
this.iconFront = icon.registerIcon("techreborn:machine/lesu_front");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/lesu_side");
|
this.iconTop = icon.registerIcon("techreborn:machine/lesu_side");
|
||||||
|
@ -51,15 +49,13 @@ public class BlockLesu extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileLesu();
|
return new TileLesu();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
{
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.lesuID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.lesuID, world, x, y,
|
||||||
z);
|
z);
|
||||||
|
|
|
@ -24,16 +24,14 @@ public class BlockLesuStorage extends BlockMachineBase {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconBottom;
|
private IIcon iconBottom;
|
||||||
|
|
||||||
public BlockLesuStorage(Material material)
|
public BlockLesuStorage(Material material) {
|
||||||
{
|
|
||||||
super(material);
|
super(material);
|
||||||
setBlockName("techreborn.lesustorage");
|
setBlockName("techreborn.lesustorage");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon)
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
{
|
|
||||||
this.blockIcon = icon.registerIcon("techreborn:machine/lesu_block");
|
this.blockIcon = icon.registerIcon("techreborn:machine/lesu_block");
|
||||||
this.iconFront = icon.registerIcon("techreborn:machine/lesu_block");
|
this.iconFront = icon.registerIcon("techreborn:machine/lesu_block");
|
||||||
this.iconTop = icon.registerIcon("techreborn:machine/lesu_block");
|
this.iconTop = icon.registerIcon("techreborn:machine/lesu_block");
|
||||||
|
@ -41,8 +39,7 @@ public class BlockLesuStorage extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata)
|
public IIcon getIcon(int side, int metadata) {
|
||||||
{
|
|
||||||
|
|
||||||
return metadata == 0 && side == 3 ? this.iconFront
|
return metadata == 0 && side == 3 ? this.iconFront
|
||||||
: side == 1 ? this.iconTop :
|
: side == 1 ? this.iconTop :
|
||||||
|
@ -68,10 +65,8 @@ public class BlockLesuStorage extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
{
|
|
||||||
return new TileLesuStorage();
|
return new TileLesuStorage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,102 +44,77 @@ public class GuiHandler implements IGuiHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world,
|
public Object getServerGuiElement(int ID, EntityPlayer player, World world,
|
||||||
int x, int y, int z)
|
int x, int y, int z) {
|
||||||
{
|
if (ID == thermalGeneratorID) {
|
||||||
if (ID == thermalGeneratorID)
|
|
||||||
{
|
|
||||||
return new ContainerThermalGenerator(
|
return new ContainerThermalGenerator(
|
||||||
(TileThermalGenerator) world.getTileEntity(x, y, z), player);
|
(TileThermalGenerator) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == semifluidGeneratorID)
|
} else if (ID == semifluidGeneratorID) {
|
||||||
{
|
|
||||||
return new ContainerSemifluidGenerator(
|
return new ContainerSemifluidGenerator(
|
||||||
(TileSemifluidGenerator) world.getTileEntity(x, y, z), player);
|
(TileSemifluidGenerator) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == gasTurbineID)
|
} else if (ID == gasTurbineID) {
|
||||||
{
|
|
||||||
return new ContainerGasTurbine(
|
return new ContainerGasTurbine(
|
||||||
(TileGasTurbine) world.getTileEntity(x, y, z), player);
|
(TileGasTurbine) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == quantumTankID)
|
} else if (ID == quantumTankID) {
|
||||||
{
|
|
||||||
return new ContainerQuantumTank(
|
return new ContainerQuantumTank(
|
||||||
(TileQuantumTank) world.getTileEntity(x, y, z), player);
|
(TileQuantumTank) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == digitalChestID)
|
} else if (ID == digitalChestID) {
|
||||||
{
|
|
||||||
return new ContainerDigitalChest(
|
return new ContainerDigitalChest(
|
||||||
(TileDigitalChest) world.getTileEntity(x, y, z), player);
|
(TileDigitalChest) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == quantumChestID)
|
} else if (ID == quantumChestID) {
|
||||||
{
|
|
||||||
return new ContainerQuantumChest(
|
return new ContainerQuantumChest(
|
||||||
(TileQuantumChest) world.getTileEntity(x, y, z), player);
|
(TileQuantumChest) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == centrifugeID)
|
} else if (ID == centrifugeID) {
|
||||||
{
|
|
||||||
return new ContainerCentrifuge(
|
return new ContainerCentrifuge(
|
||||||
(TileCentrifuge) world.getTileEntity(x, y, z), player);
|
(TileCentrifuge) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == rollingMachineID)
|
} else if (ID == rollingMachineID) {
|
||||||
{
|
|
||||||
return new ContainerRollingMachine(
|
return new ContainerRollingMachine(
|
||||||
(TileRollingMachine) world.getTileEntity(x, y, z), player);
|
(TileRollingMachine) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == blastFurnaceID)
|
} else if (ID == blastFurnaceID) {
|
||||||
{
|
|
||||||
return new ContainerBlastFurnace(
|
return new ContainerBlastFurnace(
|
||||||
(TileBlastFurnace) world.getTileEntity(x, y, z), player);
|
(TileBlastFurnace) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == alloySmelterID)
|
} else if (ID == alloySmelterID) {
|
||||||
{
|
|
||||||
return new ContainerAlloySmelter(
|
return new ContainerAlloySmelter(
|
||||||
(TileAlloySmelter) world.getTileEntity(x, y, z), player);
|
(TileAlloySmelter) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == grinderID)
|
} else if (ID == grinderID) {
|
||||||
{
|
|
||||||
return new ContainerGrinder(
|
return new ContainerGrinder(
|
||||||
(TileGrinder) world.getTileEntity(x, y, z), player);
|
(TileGrinder) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == compresserID)
|
} else if (ID == compresserID) {
|
||||||
{
|
|
||||||
return new ContainerImplosionCompressor(
|
return new ContainerImplosionCompressor(
|
||||||
(TileImplosionCompressor) world.getTileEntity(x, y, z), player);
|
(TileImplosionCompressor) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == matterfabID)
|
} else if (ID == matterfabID) {
|
||||||
{
|
|
||||||
return new ContainerMatterFabricator(
|
return new ContainerMatterFabricator(
|
||||||
(TileMatterFabricator) world.getTileEntity(x, y, z), player);
|
(TileMatterFabricator) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == chunkloaderID)
|
} else if (ID == chunkloaderID) {
|
||||||
{
|
|
||||||
return new ContainerChunkloader(
|
return new ContainerChunkloader(
|
||||||
(TileChunkLoader) world.getTileEntity(x, y, z), player);
|
(TileChunkLoader) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == assemblingmachineID)
|
} else if (ID == assemblingmachineID) {
|
||||||
{
|
|
||||||
return new ContainerAssemblingMachine(
|
return new ContainerAssemblingMachine(
|
||||||
(TileAssemblingMachine) world.getTileEntity(x, y, z), player);
|
(TileAssemblingMachine) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == latheID)
|
} else if (ID == latheID) {
|
||||||
{
|
|
||||||
return new ContainerLathe(
|
return new ContainerLathe(
|
||||||
(TileLathe) world.getTileEntity(x, y, z), player);
|
(TileLathe) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == platecuttingmachineID)
|
} else if (ID == platecuttingmachineID) {
|
||||||
{
|
|
||||||
return new ContainerPlateCuttingMachine(
|
return new ContainerPlateCuttingMachine(
|
||||||
(TilePlateCuttingMachine) world.getTileEntity(x, y, z), player);
|
(TilePlateCuttingMachine) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == dieselGeneratorID)
|
} else if (ID == dieselGeneratorID) {
|
||||||
{
|
|
||||||
return new ContainerDieselGenerator(
|
return new ContainerDieselGenerator(
|
||||||
(TileDieselGenerator) world.getTileEntity(x, y, z), player);
|
(TileDieselGenerator) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == industrialElectrolyzerID)
|
} else if (ID == industrialElectrolyzerID) {
|
||||||
{
|
|
||||||
return new ContainerIndustrialElectrolyzer(
|
return new ContainerIndustrialElectrolyzer(
|
||||||
(TileIndustrialElectrolyzer) world.getTileEntity(x, y, z), player);
|
(TileIndustrialElectrolyzer) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == aesuID)
|
} else if (ID == aesuID) {
|
||||||
{
|
|
||||||
return new ContainerAesu(
|
return new ContainerAesu(
|
||||||
(TileAesu) world.getTileEntity(x, y, z), player);
|
(TileAesu) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == alloyFurnaceID)
|
} else if (ID == alloyFurnaceID) {
|
||||||
{
|
|
||||||
return new ContainerAlloyFurnace(
|
return new ContainerAlloyFurnace(
|
||||||
(TileAlloyFurnace) world.getTileEntity(x, y, z), player);
|
(TileAlloyFurnace) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == sawMillID)
|
} else if (ID == sawMillID) {
|
||||||
{
|
|
||||||
return new ContainerIndustrialSawmill(
|
return new ContainerIndustrialSawmill(
|
||||||
(TileIndustrialSawmill) world.getTileEntity(x, y, z), player);
|
(TileIndustrialSawmill) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == chemicalReactorID)
|
} else if (ID == chemicalReactorID) {
|
||||||
{
|
|
||||||
return new ContainerChemicalReactor(
|
return new ContainerChemicalReactor(
|
||||||
(TileChemicalReactor) world.getTileEntity(x, y, z), player);
|
(TileChemicalReactor) world.getTileEntity(x, y, z), player);
|
||||||
} else if (ID == pdaID)
|
} else if (ID == pdaID) {
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
} else if (ID == destructoPackID) {
|
} else if (ID == destructoPackID) {
|
||||||
return new ContainerDestructoPack(player);
|
return new ContainerDestructoPack(player);
|
||||||
|
@ -159,102 +134,77 @@ public class GuiHandler implements IGuiHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world,
|
public Object getClientGuiElement(int ID, EntityPlayer player, World world,
|
||||||
int x, int y, int z)
|
int x, int y, int z) {
|
||||||
{
|
if (ID == thermalGeneratorID) {
|
||||||
if (ID == thermalGeneratorID)
|
|
||||||
{
|
|
||||||
return new GuiThermalGenerator(player,
|
return new GuiThermalGenerator(player,
|
||||||
(TileThermalGenerator) world.getTileEntity(x, y, z));
|
(TileThermalGenerator) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == semifluidGeneratorID)
|
} else if (ID == semifluidGeneratorID) {
|
||||||
{
|
|
||||||
return new GuiSemifluidGenerator(player,
|
return new GuiSemifluidGenerator(player,
|
||||||
(TileSemifluidGenerator) world.getTileEntity(x, y, z));
|
(TileSemifluidGenerator) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == gasTurbineID)
|
} else if (ID == gasTurbineID) {
|
||||||
{
|
|
||||||
return new GuiGasTurbine(player,
|
return new GuiGasTurbine(player,
|
||||||
(TileGasTurbine) world.getTileEntity(x, y, z));
|
(TileGasTurbine) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == quantumTankID)
|
} else if (ID == quantumTankID) {
|
||||||
{
|
|
||||||
return new GuiQuantumTank(player,
|
return new GuiQuantumTank(player,
|
||||||
(TileQuantumTank) world.getTileEntity(x, y, z));
|
(TileQuantumTank) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == digitalChestID)
|
} else if (ID == digitalChestID) {
|
||||||
{
|
|
||||||
return new GuiDigitalChest(player,
|
return new GuiDigitalChest(player,
|
||||||
(TileDigitalChest) world.getTileEntity(x, y, z));
|
(TileDigitalChest) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == quantumChestID)
|
} else if (ID == quantumChestID) {
|
||||||
{
|
|
||||||
return new GuiQuantumChest(player,
|
return new GuiQuantumChest(player,
|
||||||
(TileQuantumChest) world.getTileEntity(x, y, z));
|
(TileQuantumChest) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == centrifugeID)
|
} else if (ID == centrifugeID) {
|
||||||
{
|
|
||||||
return new GuiCentrifuge(player,
|
return new GuiCentrifuge(player,
|
||||||
(TileCentrifuge) world.getTileEntity(x, y, z));
|
(TileCentrifuge) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == rollingMachineID)
|
} else if (ID == rollingMachineID) {
|
||||||
{
|
|
||||||
return new GuiRollingMachine(player,
|
return new GuiRollingMachine(player,
|
||||||
(TileRollingMachine) world.getTileEntity(x, y, z));
|
(TileRollingMachine) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == blastFurnaceID)
|
} else if (ID == blastFurnaceID) {
|
||||||
{
|
|
||||||
return new GuiBlastFurnace(player,
|
return new GuiBlastFurnace(player,
|
||||||
(TileBlastFurnace) world.getTileEntity(x, y, z));
|
(TileBlastFurnace) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == alloySmelterID)
|
} else if (ID == alloySmelterID) {
|
||||||
{
|
|
||||||
return new GuiAlloySmelter(player,
|
return new GuiAlloySmelter(player,
|
||||||
(TileAlloySmelter) world.getTileEntity(x, y, z));
|
(TileAlloySmelter) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == grinderID)
|
} else if (ID == grinderID) {
|
||||||
{
|
|
||||||
return new GuiGrinder(player,
|
return new GuiGrinder(player,
|
||||||
(TileGrinder) world.getTileEntity(x, y, z));
|
(TileGrinder) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == compresserID)
|
} else if (ID == compresserID) {
|
||||||
{
|
|
||||||
return new GuiImplosionCompressor(player,
|
return new GuiImplosionCompressor(player,
|
||||||
(TileImplosionCompressor) world.getTileEntity(x, y, z));
|
(TileImplosionCompressor) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == matterfabID)
|
} else if (ID == matterfabID) {
|
||||||
{
|
|
||||||
return new GuiMatterFabricator(player,
|
return new GuiMatterFabricator(player,
|
||||||
(TileMatterFabricator) world.getTileEntity(x, y, z));
|
(TileMatterFabricator) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == chunkloaderID)
|
} else if (ID == chunkloaderID) {
|
||||||
{
|
|
||||||
return new GuiChunkLoader(player,
|
return new GuiChunkLoader(player,
|
||||||
(TileChunkLoader) world.getTileEntity(x, y, z));
|
(TileChunkLoader) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == assemblingmachineID)
|
} else if (ID == assemblingmachineID) {
|
||||||
{
|
|
||||||
return new GuiAssemblingMachine(player,
|
return new GuiAssemblingMachine(player,
|
||||||
(TileAssemblingMachine) world.getTileEntity(x, y, z));
|
(TileAssemblingMachine) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == latheID)
|
} else if (ID == latheID) {
|
||||||
{
|
|
||||||
return new GuiLathe(player,
|
return new GuiLathe(player,
|
||||||
(TileLathe) world.getTileEntity(x, y, z));
|
(TileLathe) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == platecuttingmachineID)
|
} else if (ID == platecuttingmachineID) {
|
||||||
{
|
|
||||||
return new GuiPlateCuttingMachine(player,
|
return new GuiPlateCuttingMachine(player,
|
||||||
(TilePlateCuttingMachine) world.getTileEntity(x, y, z));
|
(TilePlateCuttingMachine) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == dieselGeneratorID)
|
} else if (ID == dieselGeneratorID) {
|
||||||
{
|
|
||||||
return new GuiDieselGenerator(player,
|
return new GuiDieselGenerator(player,
|
||||||
(TileDieselGenerator) world.getTileEntity(x, y, z));
|
(TileDieselGenerator) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == industrialElectrolyzerID)
|
} else if (ID == industrialElectrolyzerID) {
|
||||||
{
|
|
||||||
return new GuiIndustrialElectrolyzer(player,
|
return new GuiIndustrialElectrolyzer(player,
|
||||||
(TileIndustrialElectrolyzer) world.getTileEntity(x, y, z));
|
(TileIndustrialElectrolyzer) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == aesuID)
|
} else if (ID == aesuID) {
|
||||||
{
|
|
||||||
return new GuiAesu(player,
|
return new GuiAesu(player,
|
||||||
(TileAesu) world.getTileEntity(x, y, z));
|
(TileAesu) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == alloyFurnaceID)
|
} else if (ID == alloyFurnaceID) {
|
||||||
{
|
|
||||||
return new GuiAlloyFurnace(player,
|
return new GuiAlloyFurnace(player,
|
||||||
(TileAlloyFurnace) world.getTileEntity(x, y, z));
|
(TileAlloyFurnace) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == sawMillID)
|
} else if (ID == sawMillID) {
|
||||||
{
|
|
||||||
return new GuiIndustrialSawmill(player,
|
return new GuiIndustrialSawmill(player,
|
||||||
(TileIndustrialSawmill) world.getTileEntity(x, y, z));
|
(TileIndustrialSawmill) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == chemicalReactorID)
|
} else if (ID == chemicalReactorID) {
|
||||||
{
|
|
||||||
return new GuiChemicalReactor(player,
|
return new GuiChemicalReactor(player,
|
||||||
(TileChemicalReactor) world.getTileEntity(x, y, z));
|
(TileChemicalReactor) world.getTileEntity(x, y, z));
|
||||||
} else if (ID == pdaID)
|
} else if (ID == pdaID) {
|
||||||
{
|
|
||||||
return new GuiPda(player, new ContainerPda(player));
|
return new GuiPda(player, new ContainerPda(player));
|
||||||
} else if (ID == destructoPackID) {
|
} else if (ID == destructoPackID) {
|
||||||
return new GuiDestructoPack(new ContainerDestructoPack(player));
|
return new GuiDestructoPack(new ContainerDestructoPack(player));
|
||||||
|
|
|
@ -7,20 +7,17 @@ import net.minecraft.util.IIcon;
|
||||||
public class GuiUtil {
|
public class GuiUtil {
|
||||||
|
|
||||||
|
|
||||||
public static void drawRepeated(IIcon icon, double x, double y, double width, double height, double z)
|
public static void drawRepeated(IIcon icon, double x, double y, double width, double height, double z) {
|
||||||
{
|
|
||||||
double iconWidthStep = (icon.getMaxU() - icon.getMinU()) / 16.0D;
|
double iconWidthStep = (icon.getMaxU() - icon.getMinU()) / 16.0D;
|
||||||
double iconHeightStep = (icon.getMaxV() - icon.getMinV()) / 16.0D;
|
double iconHeightStep = (icon.getMaxV() - icon.getMinV()) / 16.0D;
|
||||||
|
|
||||||
Tessellator tessellator = Tessellator.instance;
|
Tessellator tessellator = Tessellator.instance;
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
for (double cy = y; cy < y + height; cy += 16.0D)
|
for (double cy = y; cy < y + height; cy += 16.0D) {
|
||||||
{
|
|
||||||
double quadHeight = Math.min(16.0D, height + y - cy);
|
double quadHeight = Math.min(16.0D, height + y - cy);
|
||||||
double maxY = cy + quadHeight;
|
double maxY = cy + quadHeight;
|
||||||
double maxV = icon.getMinV() + iconHeightStep * quadHeight;
|
double maxV = icon.getMinV() + iconHeightStep * quadHeight;
|
||||||
for (double cx = x; cx < x + width; cx += 16.0D)
|
for (double cx = x; cx < x + width; cx += 16.0D) {
|
||||||
{
|
|
||||||
double quadWidth = Math.min(16.0D, width + x - cx);
|
double quadWidth = Math.min(16.0D, width + x - cx);
|
||||||
double maxX = cx + quadWidth;
|
double maxX = cx + quadWidth;
|
||||||
double maxU = icon.getMinU() + iconWidthStep * quadWidth;
|
double maxU = icon.getMinU() + iconWidthStep * quadWidth;
|
||||||
|
@ -54,8 +51,7 @@ public class GuiUtil {
|
||||||
new GuiHook().drawGradientRect(x, y, x + w, y + h, colour1, colour2);
|
new GuiHook().drawGradientRect(x, y, x + w, y + h, colour1, colour2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GuiHook extends Gui
|
public static class GuiHook extends Gui {
|
||||||
{
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGradientRect(int par1, int par2, int par3, int par4, int par5, int par6) {
|
public void drawGradientRect(int par1, int par2, int par3, int par4, int par5, int par6) {
|
||||||
super.drawGradientRect(par1, par2, par3, par4, par5, par6);
|
super.drawGradientRect(par1, par2, par3, par4, par5, par6);
|
||||||
|
|
|
@ -11,31 +11,26 @@ public class SlotFake extends Slot {
|
||||||
public int mMaxStacksize = 127;
|
public int mMaxStacksize = 127;
|
||||||
|
|
||||||
public SlotFake(IInventory par1iInventory, int par2, int par3, int par4,
|
public SlotFake(IInventory par1iInventory, int par2, int par3, int par4,
|
||||||
boolean aCanInsertItem, boolean aCanStackItem, int aMaxStacksize)
|
boolean aCanInsertItem, boolean aCanStackItem, int aMaxStacksize) {
|
||||||
{
|
|
||||||
super(par1iInventory, par2, par3, par4);
|
super(par1iInventory, par2, par3, par4);
|
||||||
this.mCanInsertItem = aCanInsertItem;
|
this.mCanInsertItem = aCanInsertItem;
|
||||||
this.mCanStackItem = aCanStackItem;
|
this.mCanStackItem = aCanStackItem;
|
||||||
this.mMaxStacksize = aMaxStacksize;
|
this.mMaxStacksize = aMaxStacksize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isItemValid(ItemStack par1ItemStack)
|
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||||
{
|
|
||||||
return this.mCanInsertItem;
|
return this.mCanInsertItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSlotStackLimit()
|
public int getSlotStackLimit() {
|
||||||
{
|
|
||||||
return this.mMaxStacksize;
|
return this.mMaxStacksize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getHasStack()
|
public boolean getHasStack() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack decrStackSize(int par1)
|
public ItemStack decrStackSize(int par1) {
|
||||||
{
|
|
||||||
return !this.mCanStackItem ? null : super.decrStackSize(par1);
|
return !this.mCanStackItem ? null : super.decrStackSize(par1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,13 +11,12 @@ import java.util.List;
|
||||||
public class SlotFilteredVoid extends Slot {
|
public class SlotFilteredVoid extends Slot {
|
||||||
|
|
||||||
private List<ItemStack> filter = new ArrayList<ItemStack>();
|
private List<ItemStack> filter = new ArrayList<ItemStack>();
|
||||||
public SlotFilteredVoid(IInventory par1iInventory, int id, int x, int y)
|
|
||||||
{
|
public SlotFilteredVoid(IInventory par1iInventory, int id, int x, int y) {
|
||||||
super(par1iInventory, id, x, y);
|
super(par1iInventory, id, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SlotFilteredVoid(IInventory par1iInventory, int id, int x, int y, ItemStack[] filterList)
|
public SlotFilteredVoid(IInventory par1iInventory, int id, int x, int y, ItemStack[] filterList) {
|
||||||
{
|
|
||||||
super(par1iInventory, id, x, y);
|
super(par1iInventory, id, x, y);
|
||||||
for (ItemStack itemStack : filterList)
|
for (ItemStack itemStack : filterList)
|
||||||
this.filter.add(itemStack);
|
this.filter.add(itemStack);
|
||||||
|
@ -33,5 +32,6 @@ public class SlotFilteredVoid extends Slot {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void putStack(ItemStack arg0) { }
|
public void putStack(ItemStack arg0) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,18 +6,15 @@ import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class SlotInput extends Slot {
|
public class SlotInput extends Slot {
|
||||||
|
|
||||||
public SlotInput(IInventory par1iInventory, int par2, int par3, int par4)
|
public SlotInput(IInventory par1iInventory, int par2, int par3, int par4) {
|
||||||
{
|
|
||||||
super(par1iInventory, par2, par3, par4);
|
super(par1iInventory, par2, par3, par4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isItemValid(ItemStack par1ItemStack)
|
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSlotStackLimit()
|
public int getSlotStackLimit() {
|
||||||
{
|
|
||||||
return 64;
|
return 64;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -6,18 +6,15 @@ import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class SlotOutput extends Slot {
|
public class SlotOutput extends Slot {
|
||||||
|
|
||||||
public SlotOutput(IInventory par1iInventory, int par2, int par3, int par4)
|
public SlotOutput(IInventory par1iInventory, int par2, int par3, int par4) {
|
||||||
{
|
|
||||||
super(par1iInventory, par2, par3, par4);
|
super(par1iInventory, par2, par3, par4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isItemValid(ItemStack par1ItemStack)
|
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSlotStackLimit()
|
public int getSlotStackLimit() {
|
||||||
{
|
|
||||||
return 64;
|
return 64;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -8,14 +8,12 @@ public class TechRebornCreativeTab extends CreativeTabs {
|
||||||
|
|
||||||
public static TechRebornCreativeTab instance = new TechRebornCreativeTab();
|
public static TechRebornCreativeTab instance = new TechRebornCreativeTab();
|
||||||
|
|
||||||
public TechRebornCreativeTab()
|
public TechRebornCreativeTab() {
|
||||||
{
|
|
||||||
super("techreborn");
|
super("techreborn");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getTabIconItem()
|
public Item getTabIconItem() {
|
||||||
{
|
|
||||||
return Item.getItemFromBlock(ModBlocks.thermalGenerator);
|
return Item.getItemFromBlock(ModBlocks.thermalGenerator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,14 +8,12 @@ public class TechRebornCreativeTabMisc extends CreativeTabs {
|
||||||
|
|
||||||
public static TechRebornCreativeTabMisc instance = new TechRebornCreativeTabMisc();
|
public static TechRebornCreativeTabMisc instance = new TechRebornCreativeTabMisc();
|
||||||
|
|
||||||
public TechRebornCreativeTabMisc()
|
public TechRebornCreativeTabMisc() {
|
||||||
{
|
|
||||||
super("techreborn");
|
super("techreborn");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getTabIconItem()
|
public Item getTabIconItem() {
|
||||||
{
|
|
||||||
return ModItems.cells;
|
return ModItems.cells;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import cpw.mods.fml.client.GuiModList;
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraftforge.client.event.GuiScreenEvent;
|
import net.minecraftforge.client.event.GuiScreenEvent;
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
|
@ -14,8 +14,7 @@ public class ContainerAesu extends TechRebornContainer {
|
||||||
TileAesu tile;
|
TileAesu tile;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,8 +23,7 @@ public class ContainerAesu extends TechRebornContainer {
|
||||||
public int euChange;
|
public int euChange;
|
||||||
|
|
||||||
public ContainerAesu(TileAesu tileaesu,
|
public ContainerAesu(TileAesu tileaesu,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
tile = tileaesu;
|
tile = tileaesu;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
|
||||||
|
@ -35,17 +33,14 @@ public class ContainerAesu extends TechRebornContainer {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 7 + j * 16, 84 + i * 18 + 30));
|
+ 9, 7 + j * 16, 84 + i * 18 + 30));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 7 + i * 16,
|
this.addSlotToContainer(new Slot(player.inventory, i, 7 + i * 16,
|
||||||
142 + 30));
|
142 + 30));
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,16 +12,14 @@ public class ContainerAlloyFurnace extends TechRebornContainer {
|
||||||
TileAlloyFurnace tile;
|
TileAlloyFurnace tile;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
|
|
||||||
public ContainerAlloyFurnace(TileAlloyFurnace tileAlloyfurnace,
|
public ContainerAlloyFurnace(TileAlloyFurnace tileAlloyfurnace,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
tile = tileAlloyfurnace;
|
tile = tileAlloyfurnace;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
|
||||||
|
@ -35,17 +33,14 @@ public class ContainerAlloyFurnace extends TechRebornContainer {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,16 +12,14 @@ public class ContainerAlloySmelter extends ContainerCrafting {
|
||||||
TileAlloySmelter tile;
|
TileAlloySmelter tile;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
|
|
||||||
public ContainerAlloySmelter(TileAlloySmelter tileAlloysmelter,
|
public ContainerAlloySmelter(TileAlloySmelter tileAlloysmelter,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
super(tileAlloysmelter.crafter);
|
super(tileAlloysmelter.crafter);
|
||||||
tile = tileAlloysmelter;
|
tile = tileAlloysmelter;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -42,17 +40,14 @@ public class ContainerAlloySmelter extends ContainerCrafting {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,16 +12,14 @@ public class ContainerAssemblingMachine extends ContainerCrafting {
|
||||||
TileAssemblingMachine tile;
|
TileAssemblingMachine tile;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
|
|
||||||
public ContainerAssemblingMachine(TileAssemblingMachine tileAssemblingMachine,
|
public ContainerAssemblingMachine(TileAssemblingMachine tileAssemblingMachine,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
super(tileAssemblingMachine.crafter);
|
super(tileAssemblingMachine.crafter);
|
||||||
tile = tileAssemblingMachine;
|
tile = tileAssemblingMachine;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -41,17 +39,14 @@ public class ContainerAssemblingMachine extends ContainerCrafting {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,16 +15,14 @@ public class ContainerBlastFurnace extends ContainerCrafting {
|
||||||
public int heat;
|
public int heat;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
|
|
||||||
public ContainerBlastFurnace(TileBlastFurnace tileblastfurnace,
|
public ContainerBlastFurnace(TileBlastFurnace tileblastfurnace,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
super(tileblastfurnace.crafter);
|
super(tileblastfurnace.crafter);
|
||||||
tile = tileblastfurnace;
|
tile = tileblastfurnace;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -38,17 +36,14 @@ public class ContainerBlastFurnace extends ContainerCrafting {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,7 @@ public class ContainerCentrifuge extends TechRebornContainer {
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,15 +11,13 @@ public class ContainerChargeBench extends TechRebornContainer {
|
||||||
TileChargeBench tile;
|
TileChargeBench tile;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
|
|
||||||
public ContainerChargeBench(TileChargeBench tileChargeBench, EntityPlayer player)
|
public ContainerChargeBench(TileChargeBench tileChargeBench, EntityPlayer player) {
|
||||||
{
|
|
||||||
tile = tileChargeBench;
|
tile = tileChargeBench;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
|
||||||
|
@ -32,16 +30,13 @@ public class ContainerChargeBench extends TechRebornContainer {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 142));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,16 +12,14 @@ public class ContainerChemicalReactor extends ContainerCrafting {
|
||||||
TileChemicalReactor tile;
|
TileChemicalReactor tile;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
|
|
||||||
public ContainerChemicalReactor(TileChemicalReactor tilechemicalReactor,
|
public ContainerChemicalReactor(TileChemicalReactor tilechemicalReactor,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
super(tilechemicalReactor.crafter);
|
super(tilechemicalReactor.crafter);
|
||||||
tile = tilechemicalReactor;
|
tile = tilechemicalReactor;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -41,17 +39,14 @@ public class ContainerChemicalReactor extends ContainerCrafting {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,23 +9,19 @@ public class ContainerChunkloader extends TechRebornContainer{
|
||||||
EntityPlayer player;
|
EntityPlayer player;
|
||||||
|
|
||||||
|
|
||||||
public ContainerChunkloader(TileChunkLoader tilechunkloader, EntityPlayer player)
|
public ContainerChunkloader(TileChunkLoader tilechunkloader, EntityPlayer player) {
|
||||||
{
|
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
|
@ -33,8 +29,7 @@ public class ContainerChunkloader extends TechRebornContainer{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer p_75145_1_)
|
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ public class ContainerDestructoPack extends TechRebornContainer {
|
||||||
|
|
||||||
private EntityPlayer player;
|
private EntityPlayer player;
|
||||||
private Inventory inv;
|
private Inventory inv;
|
||||||
|
|
||||||
public ContainerDestructoPack(EntityPlayer player) {
|
public ContainerDestructoPack(EntityPlayer player) {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
inv = new Inventory(1, "destructopack", 64);
|
inv = new Inventory(1, "destructopack", 64);
|
||||||
|
@ -27,17 +28,14 @@ public class ContainerDestructoPack extends TechRebornContainer {
|
||||||
this.addSlotToContainer(new SlotFilteredVoid(inv, 0, 80, 36, new ItemStack[]{new ItemStack(ModItems.parts, 1, 37)}));
|
this.addSlotToContainer(new SlotFilteredVoid(inv, 0, 80, 36, new ItemStack[]{new ItemStack(ModItems.parts, 1, 37)}));
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,7 @@ public class ContainerDieselGenerator extends TechRebornContainer {
|
||||||
public EntityPlayer player;
|
public EntityPlayer player;
|
||||||
|
|
||||||
public ContainerDieselGenerator(TileDieselGenerator tiledieselGenerator,
|
public ContainerDieselGenerator(TileDieselGenerator tiledieselGenerator,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
super();
|
super();
|
||||||
this.tiledieselGenerator = tiledieselGenerator;
|
this.tiledieselGenerator = tiledieselGenerator;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -26,25 +25,21 @@ public class ContainerDieselGenerator extends TechRebornContainer {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,7 @@ public class ContainerDigitalChest extends TechRebornContainer {
|
||||||
public EntityPlayer player;
|
public EntityPlayer player;
|
||||||
|
|
||||||
public ContainerDigitalChest(TileDigitalChest tileDigitalChest,
|
public ContainerDigitalChest(TileDigitalChest tileDigitalChest,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
super();
|
super();
|
||||||
this.tileDigitalChest = tileDigitalChest;
|
this.tileDigitalChest = tileDigitalChest;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -25,25 +24,21 @@ public class ContainerDigitalChest extends TechRebornContainer {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,17 +32,14 @@ public class ContainerFarm extends TechRebornContainer {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18 + 27, 84 + i * 18));
|
+ 9, 8 + j * 18 + 27, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18 + 27,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18 + 27,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,7 @@ public class ContainerGasTurbine extends TechRebornContainer {
|
||||||
public EntityPlayer player;
|
public EntityPlayer player;
|
||||||
|
|
||||||
public ContainerGasTurbine(TileGasTurbine tileGasTurbine,
|
public ContainerGasTurbine(TileGasTurbine tileGasTurbine,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
super();
|
super();
|
||||||
this.tileGasTurbine = tileGasTurbine;
|
this.tileGasTurbine = tileGasTurbine;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -26,25 +25,21 @@ public class ContainerGasTurbine extends TechRebornContainer {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,7 @@ public class ContainerGrinder extends ContainerCrafting{
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
|
|
||||||
public ContainerGrinder(TileGrinder tileGrinder,
|
public ContainerGrinder(TileGrinder tileGrinder,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
super(tileGrinder.crafter);
|
super(tileGrinder.crafter);
|
||||||
tile = tileGrinder;
|
tile = tileGrinder;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -33,25 +32,21 @@ public class ContainerGrinder extends ContainerCrafting{
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer p_75145_1_)
|
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,7 @@ public class ContainerImplosionCompressor extends ContainerCrafting{
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
|
|
||||||
public ContainerImplosionCompressor(TileImplosionCompressor tilecompressor,
|
public ContainerImplosionCompressor(TileImplosionCompressor tilecompressor,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
super(tilecompressor.crafter);
|
super(tilecompressor.crafter);
|
||||||
tile = tilecompressor;
|
tile = tilecompressor;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -31,25 +30,21 @@ public class ContainerImplosionCompressor extends ContainerCrafting{
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer p_75145_1_)
|
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,15 +12,13 @@ public class ContainerIndustrialElectrolyzer extends ContainerCrafting {
|
||||||
TileIndustrialElectrolyzer tile;
|
TileIndustrialElectrolyzer tile;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
|
|
||||||
public ContainerIndustrialElectrolyzer(TileIndustrialElectrolyzer electrolyzer, EntityPlayer player)
|
public ContainerIndustrialElectrolyzer(TileIndustrialElectrolyzer electrolyzer, EntityPlayer player) {
|
||||||
{
|
|
||||||
super(electrolyzer.crafter);
|
super(electrolyzer.crafter);
|
||||||
tile = electrolyzer;
|
tile = electrolyzer;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -35,17 +33,14 @@ public class ContainerIndustrialElectrolyzer extends ContainerCrafting {
|
||||||
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 5, 110, 19));
|
this.addSlotToContainer(new SlotOutput(electrolyzer.inventory, 5, 110, 19));
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,16 +12,14 @@ public class ContainerIndustrialSawmill extends ContainerCrafting {
|
||||||
TileIndustrialSawmill tile;
|
TileIndustrialSawmill tile;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
|
|
||||||
public ContainerIndustrialSawmill(TileIndustrialSawmill tileIndustrialSawmill,
|
public ContainerIndustrialSawmill(TileIndustrialSawmill tileIndustrialSawmill,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
super(tileIndustrialSawmill.crafter);
|
super(tileIndustrialSawmill.crafter);
|
||||||
tile = tileIndustrialSawmill;
|
tile = tileIndustrialSawmill;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -37,17 +35,14 @@ public class ContainerIndustrialSawmill extends ContainerCrafting {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,16 +12,14 @@ public class ContainerLathe extends ContainerCrafting {
|
||||||
TileLathe tile;
|
TileLathe tile;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
|
|
||||||
public ContainerLathe(TileLathe tilelathe,
|
public ContainerLathe(TileLathe tilelathe,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
super(tilelathe.crafter);
|
super(tilelathe.crafter);
|
||||||
tile = tilelathe;
|
tile = tilelathe;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -40,17 +38,14 @@ public class ContainerLathe extends ContainerCrafting {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,7 @@ public class ContainerLesu extends TechRebornContainer {
|
||||||
TileLesu tile;
|
TileLesu tile;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,8 +26,7 @@ public class ContainerLesu extends TechRebornContainer {
|
||||||
public double euStorage;
|
public double euStorage;
|
||||||
|
|
||||||
public ContainerLesu(TileLesu tileaesu,
|
public ContainerLesu(TileLesu tileaesu,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
tile = tileaesu;
|
tile = tileaesu;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
|
||||||
|
@ -38,17 +36,14 @@ public class ContainerLesu extends TechRebornContainer {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 7 + j * 16, 84 + i * 18 + 30));
|
+ 9, 7 + j * 16, 84 + i * 18 + 30));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 7 + i * 16,
|
this.addSlotToContainer(new Slot(player.inventory, i, 7 + i * 16,
|
||||||
142 + 30));
|
142 + 30));
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,7 @@ public class ContainerMatterFabricator extends TechRebornContainer{
|
||||||
public int progressTime;
|
public int progressTime;
|
||||||
|
|
||||||
public ContainerMatterFabricator(TileMatterFabricator tileMatterfab,
|
public ContainerMatterFabricator(TileMatterFabricator tileMatterfab,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
tile = tileMatterfab;
|
tile = tileMatterfab;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
|
||||||
|
@ -36,25 +35,21 @@ public class ContainerMatterFabricator extends TechRebornContainer{
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer p_75145_1_)
|
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,14 +5,13 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
public class ContainerPda extends TechRebornContainer {
|
public class ContainerPda extends TechRebornContainer {
|
||||||
|
|
||||||
EntityPlayer player;
|
EntityPlayer player;
|
||||||
public ContainerPda(EntityPlayer player)
|
|
||||||
{
|
public ContainerPda(EntityPlayer player) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,16 +12,14 @@ public class ContainerPlateCuttingMachine extends ContainerCrafting {
|
||||||
TilePlateCuttingMachine platecuttingmachine;
|
TilePlateCuttingMachine platecuttingmachine;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
|
|
||||||
public ContainerPlateCuttingMachine(TilePlateCuttingMachine tileplatecuttingmachine,
|
public ContainerPlateCuttingMachine(TilePlateCuttingMachine tileplatecuttingmachine,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
super(tileplatecuttingmachine.crafter);
|
super(tileplatecuttingmachine.crafter);
|
||||||
platecuttingmachine = tileplatecuttingmachine;
|
platecuttingmachine = tileplatecuttingmachine;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -40,17 +38,14 @@ public class ContainerPlateCuttingMachine extends ContainerCrafting {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,7 @@ public class ContainerQuantumChest extends TechRebornContainer {
|
||||||
public EntityPlayer player;
|
public EntityPlayer player;
|
||||||
|
|
||||||
public ContainerQuantumChest(TileQuantumChest tileQuantumChest,
|
public ContainerQuantumChest(TileQuantumChest tileQuantumChest,
|
||||||
EntityPlayer player)
|
EntityPlayer player) {
|
||||||
{
|
|
||||||
super();
|
super();
|
||||||
this.tileQuantumChest = tileQuantumChest;
|
this.tileQuantumChest = tileQuantumChest;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
@ -25,25 +24,21 @@ public class ContainerQuantumChest extends TechRebornContainer {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
|
||||||
+ 9, 8 + j * 18, 84 + i * 18));
|
+ 9, 8 + j * 18, 84 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 9; ++i)
|
for (i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
|
||||||
142));
|
142));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer player)
|
public boolean canInteractWith(EntityPlayer player) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue