Auto format code
This commit is contained in:
parent
fc4d8686b8
commit
b25742dde0
175 changed files with 527 additions and 737 deletions
|
@ -219,7 +219,7 @@ public class Core {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void LoadPackets(RegisterPacketEvent event){
|
public void LoadPackets(RegisterPacketEvent event) {
|
||||||
event.registerPacket(PacketSyncSideConfig.class, Side.SERVER);
|
event.registerPacket(PacketSyncSideConfig.class, Side.SERVER);
|
||||||
event.registerPacket(PacketAesu.class, Side.SERVER);
|
event.registerPacket(PacketAesu.class, Side.SERVER);
|
||||||
event.registerPacket(PacketIdsu.class, Side.SERVER);
|
event.registerPacket(PacketIdsu.class, Side.SERVER);
|
||||||
|
|
|
@ -35,14 +35,9 @@ import net.minecraft.item.crafting.ShapelessRecipes;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
|
||||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
|
||||||
import org.apache.commons.lang3.Validate;
|
|
||||||
import reborncore.common.util.CraftingHelper;
|
import reborncore.common.util.CraftingHelper;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class RollingMachineRecipe {
|
public class RollingMachineRecipe {
|
||||||
|
|
||||||
|
@ -50,21 +45,21 @@ public class RollingMachineRecipe {
|
||||||
private final HashMap<ResourceLocation, IRecipe> recipes = new HashMap<>();
|
private final HashMap<ResourceLocation, IRecipe> recipes = new HashMap<>();
|
||||||
|
|
||||||
public void addShapedOreRecipe(ResourceLocation resourceLocation, ItemStack outputItemStack, Object... objectInputs) {
|
public void addShapedOreRecipe(ResourceLocation resourceLocation, ItemStack outputItemStack, Object... objectInputs) {
|
||||||
// Validate.notNull(outputItemStack);
|
// Validate.notNull(outputItemStack);
|
||||||
// Validate.notNull(outputItemStack.getItem());
|
// Validate.notNull(outputItemStack.getItem());
|
||||||
// if (objectInputs.length == 0) {
|
// if (objectInputs.length == 0) {
|
||||||
// Validate.notNull(null); //Quick way to crash
|
// Validate.notNull(null); //Quick way to crash
|
||||||
// }
|
// }
|
||||||
// recipes.put(resourceLocation, new ShapedOreRecipe(resourceLocation, outputItemStack, objectInputs));
|
// recipes.put(resourceLocation, new ShapedOreRecipe(resourceLocation, outputItemStack, objectInputs));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addShapelessOreRecipe(ResourceLocation resourceLocation, ItemStack outputItemStack, Object... objectInputs) {
|
public void addShapelessOreRecipe(ResourceLocation resourceLocation, ItemStack outputItemStack, Object... objectInputs) {
|
||||||
// Validate.notNull(outputItemStack);
|
// Validate.notNull(outputItemStack);
|
||||||
// Validate.notNull(outputItemStack.getItem());
|
// Validate.notNull(outputItemStack.getItem());
|
||||||
// if (objectInputs.length == 0) {
|
// if (objectInputs.length == 0) {
|
||||||
// Validate.notNull(null); //Quick way to crash
|
// Validate.notNull(null); //Quick way to crash
|
||||||
// }
|
// }
|
||||||
// recipes.put(resourceLocation, new ShapelessOreRecipe(resourceLocation, outputItemStack, objectInputs));
|
// recipes.put(resourceLocation, new ShapelessOreRecipe(resourceLocation, outputItemStack, objectInputs));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addRecipe(ResourceLocation resourceLocation, ItemStack output, Object... components) {
|
public void addRecipe(ResourceLocation resourceLocation, ItemStack output, Object... components) {
|
||||||
|
@ -115,7 +110,7 @@ public class RollingMachineRecipe {
|
||||||
recipes.put(resourceLocation, new ShapedRecipes("", j, k, recipeArray, output));
|
recipes.put(resourceLocation, new ShapedRecipes("", j, k, recipeArray, output));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addShapelessRecipe(ResourceLocation resourceLocation,ItemStack output, Object... components) {
|
public void addShapelessRecipe(ResourceLocation resourceLocation, ItemStack output, Object... components) {
|
||||||
NonNullList<Ingredient> ingredients = NonNullList.create();
|
NonNullList<Ingredient> ingredients = NonNullList.create();
|
||||||
for (int j = 0; j < components.length; j++) {
|
for (int j = 0; j < components.length; j++) {
|
||||||
ingredients.add(CraftingHelper.toIngredient(components[j]));
|
ingredients.add(CraftingHelper.toIngredient(components[j]));
|
||||||
|
|
|
@ -44,15 +44,15 @@ public final class TechRebornAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addShapelessOreRollingMachinceRecipe(ResourceLocation resourceLocation, ItemStack output, Object... components) {
|
public static void addShapelessOreRollingMachinceRecipe(ResourceLocation resourceLocation, ItemStack output, Object... components) {
|
||||||
RollingMachineRecipe.instance.addShapelessOreRecipe(resourceLocation,output, components);
|
RollingMachineRecipe.instance.addShapelessOreRecipe(resourceLocation, output, components);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addRollingMachinceRecipe(ResourceLocation resourceLocation, ItemStack output, Object... components) {
|
public static void addRollingMachinceRecipe(ResourceLocation resourceLocation, ItemStack output, Object... components) {
|
||||||
RollingMachineRecipe.instance.addRecipe(resourceLocation,output, components);
|
RollingMachineRecipe.instance.addRecipe(resourceLocation, output, components);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addShapelessRollingMachinceRecipe(ResourceLocation resourceLocation, ItemStack output, Object... components) {
|
public static void addShapelessRollingMachinceRecipe(ResourceLocation resourceLocation, ItemStack output, Object... components) {
|
||||||
RollingMachineRecipe.instance.addShapelessRecipe(resourceLocation,output, components);
|
RollingMachineRecipe.instance.addShapelessRecipe(resourceLocation, output, components);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -33,7 +33,9 @@ public enum EFluidGenerator {
|
||||||
@Nonnull
|
@Nonnull
|
||||||
private final String recipeID;
|
private final String recipeID;
|
||||||
|
|
||||||
private EFluidGenerator(@Nonnull String recipeID) {
|
private EFluidGenerator(
|
||||||
|
@Nonnull
|
||||||
|
String recipeID) {
|
||||||
this.recipeID = recipeID;
|
this.recipeID = recipeID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,7 @@ public class FluidGeneratorRecipe {
|
||||||
private final Fluid fluid;
|
private final Fluid fluid;
|
||||||
private final int energyPerMb;
|
private final int energyPerMb;
|
||||||
|
|
||||||
public FluidGeneratorRecipe(Fluid fluid, int energyPerMb, EFluidGenerator generatorType)
|
public FluidGeneratorRecipe(Fluid fluid, int energyPerMb, EFluidGenerator generatorType) {
|
||||||
{
|
|
||||||
this.fluid = fluid;
|
this.fluid = fluid;
|
||||||
this.energyPerMb = energyPerMb;
|
this.energyPerMb = energyPerMb;
|
||||||
this.generatorType = generatorType;
|
this.generatorType = generatorType;
|
||||||
|
@ -41,6 +40,7 @@ public class FluidGeneratorRecipe {
|
||||||
public Fluid getFluid() {
|
public Fluid getFluid() {
|
||||||
return fluid;
|
return fluid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getEnergyPerMb() {
|
public int getEnergyPerMb() {
|
||||||
return energyPerMb;
|
return energyPerMb;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,33 +25,29 @@
|
||||||
package techreborn.api.generator;
|
package techreborn.api.generator;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
import net.minecraftforge.fluids.Fluid;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import net.minecraftforge.fluids.Fluid;
|
|
||||||
|
|
||||||
public class FluidGeneratorRecipeList {
|
public class FluidGeneratorRecipeList {
|
||||||
private HashSet<FluidGeneratorRecipe> recipes;
|
private HashSet<FluidGeneratorRecipe> recipes;
|
||||||
|
|
||||||
public FluidGeneratorRecipeList(FluidGeneratorRecipe... recipes)
|
public FluidGeneratorRecipeList(FluidGeneratorRecipe... recipes) {
|
||||||
{
|
|
||||||
this.recipes = Sets.newHashSet(recipes);
|
this.recipes = Sets.newHashSet(recipes);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean addRecipe(FluidGeneratorRecipe fluidGeneratorRecipe) {
|
public boolean addRecipe(FluidGeneratorRecipe fluidGeneratorRecipe) {
|
||||||
if(!this.getRecipeForFluid(fluidGeneratorRecipe.getFluid()).isPresent())
|
if (!this.getRecipeForFluid(fluidGeneratorRecipe.getFluid()).isPresent())
|
||||||
return this.getRecipes().add(fluidGeneratorRecipe);
|
return this.getRecipes().add(fluidGeneratorRecipe);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean removeRecipe(FluidGeneratorRecipe fluidGeneratorRecipe)
|
public boolean removeRecipe(FluidGeneratorRecipe fluidGeneratorRecipe) {
|
||||||
{
|
|
||||||
return this.getRecipes().remove(fluidGeneratorRecipe);
|
return this.getRecipes().remove(fluidGeneratorRecipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Optional<FluidGeneratorRecipe> getRecipeForFluid(Fluid fluid)
|
public Optional<FluidGeneratorRecipe> getRecipeForFluid(Fluid fluid) {
|
||||||
{
|
|
||||||
return this.recipes.stream().filter(recipe -> recipe.getFluid().equals(fluid)).findAny();
|
return this.recipes.stream().filter(recipe -> recipe.getFluid().equals(fluid)).findAny();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,10 @@
|
||||||
|
|
||||||
package techreborn.api.generator;
|
package techreborn.api.generator;
|
||||||
|
|
||||||
import java.util.EnumMap;
|
|
||||||
|
|
||||||
import net.minecraftforge.fluids.Fluid;
|
import net.minecraftforge.fluids.Fluid;
|
||||||
|
|
||||||
|
import java.util.EnumMap;
|
||||||
|
|
||||||
public class GeneratorRecipeHelper {
|
public class GeneratorRecipeHelper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,12 +41,10 @@ public class GeneratorRecipeHelper {
|
||||||
/**
|
/**
|
||||||
* Register a Fluid energy recipe.
|
* Register a Fluid energy recipe.
|
||||||
*
|
*
|
||||||
* @param generatorType
|
* @param generatorType A value of the EFluidGenerator type in which the fluid is
|
||||||
* A value of the EFluidGenerator type in which the fluid is
|
|
||||||
* allowed to be consumed.
|
* allowed to be consumed.
|
||||||
* @param fluidType
|
* @param fluidType
|
||||||
* @param energyPerMb
|
* @param energyPerMb Represent the energy / MILLI_BUCKET the fluid will produce.
|
||||||
* Represent the energy / MILLI_BUCKET the fluid will produce.
|
|
||||||
* Some generators use this value to alter their fluid decay
|
* Some generators use this value to alter their fluid decay
|
||||||
* speed to match their maximum energy output.
|
* speed to match their maximum energy output.
|
||||||
*/
|
*/
|
||||||
|
@ -56,9 +54,7 @@ public class GeneratorRecipeHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @param generatorType A value of the EFluidGenerator type in which the fluid is
|
||||||
* @param generatorType
|
|
||||||
* A value of the EFluidGenerator type in which the fluid is
|
|
||||||
* allowed to be consumed.
|
* allowed to be consumed.
|
||||||
* @return An object holding a set of availables recipes for this type of
|
* @return An object holding a set of availables recipes for this type of
|
||||||
* FluidGenerator.
|
* FluidGenerator.
|
||||||
|
|
|
@ -130,12 +130,12 @@ public abstract class BaseRecipe implements IBaseRecipeType, Cloneable {
|
||||||
if (inuput == null) {
|
if (inuput == null) {
|
||||||
throw new InvalidParameterException("input is invalid!");
|
throw new InvalidParameterException("input is invalid!");
|
||||||
}
|
}
|
||||||
if(inuput instanceof ItemStack){
|
if (inuput instanceof ItemStack) {
|
||||||
if(((ItemStack) inuput).isEmpty()){
|
if (((ItemStack) inuput).isEmpty()) {
|
||||||
throw new InvalidParameterException("input is invalid!");
|
throw new InvalidParameterException("input is invalid!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(RecipeTranslator.getStackFromObject(inuput) == null){
|
if (RecipeTranslator.getStackFromObject(inuput) == null) {
|
||||||
throw new InvalidParameterException("Could not determin recipe input for " + inuput);
|
throw new InvalidParameterException("Could not determin recipe input for " + inuput);
|
||||||
}
|
}
|
||||||
inputs.add(inuput);
|
inputs.add(inuput);
|
||||||
|
|
|
@ -27,10 +27,8 @@ package techreborn.blocks;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -34,10 +34,8 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fluids.BlockFluidBase;
|
import net.minecraftforge.fluids.BlockFluidBase;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
package techreborn.blocks;
|
package techreborn.blocks;
|
||||||
|
|
||||||
import net.minecraft.block.BlockContainer;
|
import net.minecraft.block.BlockContainer;
|
||||||
import net.minecraft.block.material.MapColor;
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
|
|
|
@ -30,10 +30,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraft.block.properties.PropertyInteger;
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
|
|
@ -31,7 +31,6 @@ import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
|
@ -37,10 +37,8 @@ import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fluids.BlockFluidBase;
|
import net.minecraftforge.fluids.BlockFluidBase;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,7 +28,6 @@ import net.minecraft.block.BlockSapling;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -27,10 +27,8 @@ package techreborn.blocks.advanced_machine;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -29,10 +29,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -29,10 +29,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -68,7 +68,6 @@ public class BlockCable extends BlockContainer {
|
||||||
public static final PropertyBool DOWN = PropertyBool.create("down");
|
public static final PropertyBool DOWN = PropertyBool.create("down");
|
||||||
public static final IProperty<EnumCableType> TYPE = PropertyEnum.create("type", EnumCableType.class);
|
public static final IProperty<EnumCableType> TYPE = PropertyEnum.create("type", EnumCableType.class);
|
||||||
|
|
||||||
|
|
||||||
public BlockCable() {
|
public BlockCable() {
|
||||||
super(Material.ROCK);
|
super(Material.ROCK);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
|
@ -122,7 +121,7 @@ public class BlockCable extends BlockContainer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list) {
|
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||||
for(EnumCableType cableType : EnumCableType.values()){
|
for (EnumCableType cableType : EnumCableType.values()) {
|
||||||
list.add(new ItemStack(this, 1, cableType.ordinal()));
|
list.add(new ItemStack(this, 1, cableType.ordinal()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,7 +157,7 @@ public class BlockCable extends BlockContainer {
|
||||||
IBlockState actualState = state;
|
IBlockState actualState = state;
|
||||||
for (EnumFacing facing : EnumFacing.values()) {
|
for (EnumFacing facing : EnumFacing.values()) {
|
||||||
TileEntity tileEntity = getTileEntitySafely(worldIn, pos.offset(facing));
|
TileEntity tileEntity = getTileEntitySafely(worldIn, pos.offset(facing));
|
||||||
if(tileEntity != null){
|
if (tileEntity != null) {
|
||||||
actualState = actualState.withProperty(getProperty(facing), tileEntity.hasCapability(CapabilityEnergy.ENERGY, facing.getOpposite()));
|
actualState = actualState.withProperty(getProperty(facing), tileEntity.hasCapability(CapabilityEnergy.ENERGY, facing.getOpposite()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ public enum EnumCableType implements IStringSerializable {
|
||||||
return friendlyName.toLowerCase();
|
return friendlyName.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getStack(){
|
public ItemStack getStack() {
|
||||||
return new ItemStack(ModBlocks.CABLE,1, this.ordinal());
|
return new ItemStack(ModBlocks.CABLE, 1, this.ordinal());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -26,7 +26,6 @@ package techreborn.blocks.generator;
|
||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.util.ITooltipFlag;
|
import net.minecraft.client.util.ITooltipFlag;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
|
|
|
@ -29,10 +29,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -27,10 +27,8 @@ package techreborn.blocks.generator;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -26,7 +26,6 @@ package techreborn.blocks.generator;
|
||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.util.ITooltipFlag;
|
import net.minecraft.client.util.ITooltipFlag;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
|
|
|
@ -29,10 +29,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -32,10 +32,8 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -35,10 +35,8 @@ import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -31,10 +31,8 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -32,10 +32,8 @@ import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
@ -57,7 +55,15 @@ public class BlockVacuumFreezer extends BlockMachineBase implements IAdvancedRot
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state, final EntityPlayer player, final EnumHand hand, final EnumFacing side, final float hitX, final float hitY, final float hitZ) {
|
public boolean onBlockActivated(final World world,
|
||||||
|
final BlockPos pos,
|
||||||
|
final IBlockState state,
|
||||||
|
final EntityPlayer player,
|
||||||
|
final EnumHand hand,
|
||||||
|
final EnumFacing side,
|
||||||
|
final float hitX,
|
||||||
|
final float hitY,
|
||||||
|
final float hitZ) {
|
||||||
if (!player.isSneaking()) {
|
if (!player.isSneaking()) {
|
||||||
player.openGui(Core.INSTANCE, EGui.VACUUM_FREEZER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
player.openGui(Core.INSTANCE, EGui.VACUUM_FREEZER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.init.ModBlocks;
|
import techreborn.init.ModBlocks;
|
||||||
import techreborn.tiles.TileAesu;
|
import techreborn.tiles.TileAesu;
|
||||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.tiles.storage.TileBatBox;
|
import techreborn.tiles.storage.TileBatBox;
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.tiles.idsu.TileIDSU;
|
import techreborn.tiles.idsu.TileIDSU;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.tiles.lesu.TileLesu;
|
import techreborn.tiles.lesu.TileLesu;
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,8 @@ import techreborn.tiles.lesu.TileLesuStorage;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockLESUStorage extends BaseTileBlock {;
|
public class BlockLESUStorage extends BaseTileBlock {
|
||||||
|
;
|
||||||
|
|
||||||
public BlockLESUStorage(Material material) {
|
public BlockLESUStorage(Material material) {
|
||||||
super(material);
|
super(material);
|
||||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.init.ModBlocks;
|
import techreborn.init.ModBlocks;
|
||||||
import techreborn.tiles.storage.TileMFE;
|
import techreborn.tiles.storage.TileMFE;
|
||||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.init.ModBlocks;
|
import techreborn.init.ModBlocks;
|
||||||
import techreborn.tiles.storage.TileMFSU;
|
import techreborn.tiles.storage.TileMFSU;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -28,10 +28,8 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.EGui;
|
import techreborn.client.EGui;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
|
@ -68,8 +68,7 @@ public enum EGui {
|
||||||
|
|
||||||
private final boolean containerBuilder;
|
private final boolean containerBuilder;
|
||||||
|
|
||||||
private EGui(final boolean containerBuilder)
|
private EGui(final boolean containerBuilder) {
|
||||||
{
|
|
||||||
this.containerBuilder = containerBuilder;
|
this.containerBuilder = containerBuilder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fml.common.network.IGuiHandler;
|
import net.minecraftforge.fml.common.network.IGuiHandler;
|
||||||
|
|
||||||
import techreborn.client.container.*;
|
import techreborn.client.container.*;
|
||||||
import techreborn.client.gui.*;
|
import techreborn.client.gui.*;
|
||||||
import techreborn.manual.GuiManual;
|
import techreborn.manual.GuiManual;
|
||||||
|
|
|
@ -179,7 +179,7 @@ public class RegisterItemJsons {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (EnumCableType cableType : EnumCableType.values()) {
|
for (EnumCableType cableType : EnumCableType.values()) {
|
||||||
registerBlockstate(ModBlocks.CABLE, cableType.ordinal(), "inv_" +cableType.getName().toLowerCase());
|
registerBlockstate(ModBlocks.CABLE, cableType.ordinal(), "inv_" + cableType.getName().toLowerCase());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import reborncore.client.gui.slots.BaseSlot;
|
import reborncore.client.gui.slots.BaseSlot;
|
||||||
import reborncore.common.container.RebornContainer;
|
import reborncore.common.container.RebornContainer;
|
||||||
import techreborn.config.ConfigTechReborn;
|
|
||||||
import techreborn.tiles.lesu.TileLesu;
|
import techreborn.tiles.lesu.TileLesu;
|
||||||
|
|
||||||
public class ContainerLESU extends RebornContainer {
|
public class ContainerLESU extends RebornContainer {
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
package techreborn.client.container;
|
package techreborn.client.container;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
|
||||||
import techreborn.client.container.builder.BuiltContainer;
|
import techreborn.client.container.builder.BuiltContainer;
|
||||||
|
|
||||||
public interface IContainerProvider {
|
public interface IContainerProvider {
|
||||||
|
|
|
@ -24,16 +24,14 @@
|
||||||
|
|
||||||
package techreborn.client.container.builder;
|
package techreborn.client.container.builder;
|
||||||
|
|
||||||
import org.apache.commons.lang3.Range;
|
|
||||||
import org.apache.commons.lang3.tuple.MutableTriple;
|
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.*;
|
import net.minecraft.inventory.*;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
import org.apache.commons.lang3.Range;
|
||||||
|
import org.apache.commons.lang3.tuple.MutableTriple;
|
||||||
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
import reborncore.common.util.ItemUtils;
|
import reborncore.common.util.ItemUtils;
|
||||||
import techreborn.client.container.IRightClickHandler;
|
import techreborn.client.container.IRightClickHandler;
|
||||||
|
|
||||||
|
@ -107,10 +105,10 @@ public class BuiltContainer extends Container {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) {
|
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) {
|
||||||
if(dragType == 1 && slotId > 0 && slotId < 1000){
|
if (dragType == 1 && slotId > 0 && slotId < 1000) {
|
||||||
Slot slot = this.inventorySlots.get(slotId);
|
Slot slot = this.inventorySlots.get(slotId);
|
||||||
if(slot instanceof IRightClickHandler){
|
if (slot instanceof IRightClickHandler) {
|
||||||
if(((IRightClickHandler) slot).handleRightClick(slot.getSlotIndex(), player, this)){
|
if (((IRightClickHandler) slot).handleRightClick(slot.getSlotIndex(), player, this)) {
|
||||||
return ItemStack.EMPTY;
|
return ItemStack.EMPTY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -180,18 +178,14 @@ public class BuiltContainer extends Container {
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(final int id, final int value) {
|
public void updateProgressBar(final int id, final int value) {
|
||||||
|
|
||||||
if(id < this.shortValues.size())
|
if (id < this.shortValues.size()) {
|
||||||
{
|
|
||||||
this.shortValues.get(id).getMiddle().accept((short) value);
|
this.shortValues.get(id).getMiddle().accept((short) value);
|
||||||
this.shortValues.get(id).setRight((short) value);
|
this.shortValues.get(id).setRight((short) value);
|
||||||
}
|
} else if (id - this.shortValues.size() < this.integerValues.size() * 2) {
|
||||||
else if (id - this.shortValues.size() < this.integerValues.size() * 2)
|
|
||||||
{
|
|
||||||
|
|
||||||
if ((id - this.shortValues.size()) % 2 == 0)
|
if ((id - this.shortValues.size()) % 2 == 0)
|
||||||
this.integerParts[(id - this.shortValues.size()) / 2] = value;
|
this.integerParts[(id - this.shortValues.size()) / 2] = value;
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
this.integerValues.get((id - this.shortValues.size()) / 2).getMiddle().accept(
|
this.integerValues.get((id - this.shortValues.size()) / 2).getMiddle().accept(
|
||||||
(this.integerParts[(id - this.shortValues.size()) / 2] & 0xFFFF) << 16 | value & 0xFFFF);
|
(this.integerParts[(id - this.shortValues.size()) / 2] & 0xFFFF) << 16 | value & 0xFFFF);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,14 +24,13 @@
|
||||||
|
|
||||||
package techreborn.client.container.builder;
|
package techreborn.client.container.builder;
|
||||||
|
|
||||||
import org.apache.commons.lang3.Range;
|
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.inventory.InventoryCrafting;
|
import net.minecraft.inventory.InventoryCrafting;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
|
import org.apache.commons.lang3.Range;
|
||||||
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -24,9 +24,6 @@
|
||||||
|
|
||||||
package techreborn.client.container.builder;
|
package techreborn.client.container.builder;
|
||||||
|
|
||||||
import org.apache.commons.lang3.Range;
|
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.inventory.InventoryCrafting;
|
import net.minecraft.inventory.InventoryCrafting;
|
||||||
import net.minecraft.inventory.SlotFurnaceFuel;
|
import net.minecraft.inventory.SlotFurnaceFuel;
|
||||||
|
@ -34,7 +31,8 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraftforge.energy.CapabilityEnergy;
|
import net.minecraftforge.energy.CapabilityEnergy;
|
||||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||||
|
import org.apache.commons.lang3.Range;
|
||||||
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
import reborncore.api.power.IEnergyInterfaceItem;
|
import reborncore.api.power.IEnergyInterfaceItem;
|
||||||
import reborncore.api.recipe.IRecipeCrafterProvider;
|
import reborncore.api.recipe.IRecipeCrafterProvider;
|
||||||
import reborncore.api.tile.IUpgrade;
|
import reborncore.api.tile.IUpgrade;
|
||||||
|
@ -43,7 +41,6 @@ import reborncore.client.gui.slots.BaseSlot;
|
||||||
import reborncore.client.gui.slots.SlotFake;
|
import reborncore.client.gui.slots.SlotFake;
|
||||||
import reborncore.client.gui.slots.SlotOutput;
|
import reborncore.client.gui.slots.SlotOutput;
|
||||||
import reborncore.common.powerSystem.TilePowerAcceptor;
|
import reborncore.common.powerSystem.TilePowerAcceptor;
|
||||||
|
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.container.builder.slot.FilteredSlot;
|
import techreborn.client.container.builder.slot.FilteredSlot;
|
||||||
import techreborn.client.container.builder.slot.UpgradeSlot;
|
import techreborn.client.container.builder.slot.UpgradeSlot;
|
||||||
|
@ -63,7 +60,7 @@ public class ContainerTileInventoryBuilder {
|
||||||
this.tile = tile;
|
this.tile = tile;
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
this.rangeStart = parent.slots.size();
|
this.rangeStart = parent.slots.size();
|
||||||
if(tile instanceof IUpgradeable){
|
if (tile instanceof IUpgradeable) {
|
||||||
upgradeSlots((IUpgradeable) tile);
|
upgradeSlots((IUpgradeable) tile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,8 +101,7 @@ public class ContainerTileInventoryBuilder {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ContainerTileInventoryBuilder fuelSlot(final int index, final int x, final int y)
|
public ContainerTileInventoryBuilder fuelSlot(final int index, final int x, final int y) {
|
||||||
{
|
|
||||||
this.parent.slots.add(new SlotFurnaceFuel(this.tile, index, x, y));
|
this.parent.slots.add(new SlotFurnaceFuel(this.tile, index, x, y));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -117,8 +113,8 @@ public class ContainerTileInventoryBuilder {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ContainerTileInventoryBuilder upgradeSlots(IUpgradeable upgradeable){
|
private ContainerTileInventoryBuilder upgradeSlots(IUpgradeable upgradeable) {
|
||||||
if(upgradeable.canBeUpgraded()){
|
if (upgradeable.canBeUpgraded()) {
|
||||||
for (int i = 0; i < upgradeable.getUpgradeSlotCount(); i++) {
|
for (int i = 0; i < upgradeable.getUpgradeSlotCount(); i++) {
|
||||||
this.parent.slots.add(new UpgradeSlot(upgradeable.getUpgradeInvetory(), i, -19, i * 18 + 12));
|
this.parent.slots.add(new UpgradeSlot(upgradeable.getUpgradeInvetory(), i, -19, i * 18 + 12));
|
||||||
}
|
}
|
||||||
|
@ -127,12 +123,9 @@ public class ContainerTileInventoryBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @param supplier The supplier must supply a variable holding inside a Short, it
|
||||||
* @param supplier
|
|
||||||
* The supplier must supply a variable holding inside a Short, it
|
|
||||||
* will be truncated by force.
|
* will be truncated by force.
|
||||||
* @param setter
|
* @param setter The setter to call when the variable has been updated.
|
||||||
* The setter to call when the variable has been updated.
|
|
||||||
*/
|
*/
|
||||||
public ContainerTileInventoryBuilder syncShortValue(final IntSupplier supplier, final IntConsumer setter) {
|
public ContainerTileInventoryBuilder syncShortValue(final IntSupplier supplier, final IntConsumer setter) {
|
||||||
this.parent.shortValues.add(Pair.of(supplier, setter));
|
this.parent.shortValues.add(Pair.of(supplier, setter));
|
||||||
|
@ -140,12 +133,9 @@ public class ContainerTileInventoryBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @param supplier The supplier it can supply a variable holding in an Integer it
|
||||||
* @param supplier
|
|
||||||
* The supplier it can supply a variable holding in an Integer it
|
|
||||||
* will be split inside multiples shorts.
|
* will be split inside multiples shorts.
|
||||||
* @param setter
|
* @param setter The setter to call when the variable has been updated.
|
||||||
* The setter to call when the variable has been updated.
|
|
||||||
*/
|
*/
|
||||||
public ContainerTileInventoryBuilder syncIntegerValue(final IntSupplier supplier, final IntConsumer setter) {
|
public ContainerTileInventoryBuilder syncIntegerValue(final IntSupplier supplier, final IntConsumer setter) {
|
||||||
this.parent.integerValues.add(Pair.of(supplier, setter));
|
this.parent.integerValues.add(Pair.of(supplier, setter));
|
||||||
|
|
|
@ -24,14 +24,13 @@
|
||||||
|
|
||||||
package techreborn.client.container.builder.slot;
|
package techreborn.client.container.builder.slot;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import techreborn.lib.ModInfo;
|
import techreborn.lib.ModInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
public class SpriteSlot extends FilteredSlot {
|
public class SpriteSlot extends FilteredSlot {
|
||||||
|
|
||||||
private final String sprite;
|
private final String sprite;
|
||||||
|
|
|
@ -31,7 +31,6 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import reborncore.api.tile.IUpgrade;
|
import reborncore.api.tile.IUpgrade;
|
||||||
import reborncore.api.tile.IUpgradeable;
|
import reborncore.api.tile.IUpgradeable;
|
||||||
import reborncore.common.tile.TileBase;
|
|
||||||
import reborncore.common.util.Inventory;
|
import reborncore.common.util.Inventory;
|
||||||
import techreborn.client.container.IRightClickHandler;
|
import techreborn.client.container.IRightClickHandler;
|
||||||
import techreborn.client.container.builder.BuiltContainer;
|
import techreborn.client.container.builder.BuiltContainer;
|
||||||
|
@ -46,7 +45,6 @@ public class UpgradeSlot extends Slot implements IRightClickHandler {
|
||||||
super(inventory, index, xPosition, yPosition);
|
super(inventory, index, xPosition, yPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValid(final ItemStack stack) {
|
public boolean isItemValid(final ItemStack stack) {
|
||||||
return stack.getItem() instanceof IUpgrade;
|
return stack.getItem() instanceof IUpgrade;
|
||||||
|
@ -59,15 +57,15 @@ public class UpgradeSlot extends Slot implements IRightClickHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handleRightClick(int slotID, EntityPlayer player, BuiltContainer container) {
|
public boolean handleRightClick(int slotID, EntityPlayer player, BuiltContainer container) {
|
||||||
if(inventory instanceof Inventory){
|
if (inventory instanceof Inventory) {
|
||||||
Inventory inv = (Inventory) inventory;
|
Inventory inv = (Inventory) inventory;
|
||||||
TileEntity tileEntity = inv.getTileBase();
|
TileEntity tileEntity = inv.getTileBase();
|
||||||
if(tileEntity instanceof IUpgradeable){
|
if (tileEntity instanceof IUpgradeable) {
|
||||||
IUpgradeable upgradeable = (IUpgradeable) tileEntity;
|
IUpgradeable upgradeable = (IUpgradeable) tileEntity;
|
||||||
if(upgradeable.canBeUpgraded()){
|
if (upgradeable.canBeUpgraded()) {
|
||||||
ItemStack stack = upgradeable.getUpgradeInvetory().getStackInSlot(slotID);
|
ItemStack stack = upgradeable.getUpgradeInvetory().getStackInSlot(slotID);
|
||||||
if(!stack.isEmpty() && stack.getItem() instanceof IUpgrade){
|
if (!stack.isEmpty() && stack.getItem() instanceof IUpgrade) {
|
||||||
if(player.world.isRemote){
|
if (player.world.isRemote) {
|
||||||
((IUpgrade) stack.getItem()).handleRightClick(tileEntity, stack, container, slotID);
|
((IUpgrade) stack.getItem()).handleRightClick(tileEntity, stack, container, slotID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import techreborn.tiles.TileAlloyFurnace;
|
import techreborn.tiles.TileAlloyFurnace;
|
||||||
|
|
||||||
public class GuiAlloyFurnace extends GuiContainer {
|
public class GuiAlloyFurnace extends GuiContainer {
|
||||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import techreborn.tiles.TileAlloySmelter;
|
import techreborn.tiles.TileAlloySmelter;
|
||||||
|
|
||||||
public class GuiAlloySmelter extends GuiContainer {
|
public class GuiAlloySmelter extends GuiContainer {
|
||||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import techreborn.tiles.TileAssemblingMachine;
|
import techreborn.tiles.TileAssemblingMachine;
|
||||||
|
|
||||||
public class GuiAssemblingMachine extends GuiContainer {
|
public class GuiAssemblingMachine extends GuiContainer {
|
||||||
|
|
|
@ -112,22 +112,22 @@ public class GuiBase extends GuiContainer {
|
||||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int mouseX, int mouseY) {
|
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int mouseX, int mouseY) {
|
||||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
builder.drawDefaultBackground(this, guiLeft, guiTop, xSize, ySize);
|
builder.drawDefaultBackground(this, guiLeft, guiTop, xSize, ySize);
|
||||||
if(drawPlayerSlots()){
|
if (drawPlayerSlots()) {
|
||||||
builder.drawPlayerSlots(this, guiLeft + xSize / 2, guiTop + 93, true);
|
builder.drawPlayerSlots(this, guiLeft + xSize / 2, guiTop + 93, true);
|
||||||
}
|
}
|
||||||
if(tryAddUpgrades() && tile instanceof IUpgradeable){
|
if (tryAddUpgrades() && tile instanceof IUpgradeable) {
|
||||||
IUpgradeable upgradeable = (IUpgradeable) tile;
|
IUpgradeable upgradeable = (IUpgradeable) tile;
|
||||||
if(upgradeable.canBeUpgraded()){
|
if (upgradeable.canBeUpgraded()) {
|
||||||
builder.drawUpgrades(this, upgradeable, guiLeft, guiTop);
|
builder.drawUpgrades(this, upgradeable, guiLeft, guiTop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean drawPlayerSlots(){
|
public boolean drawPlayerSlots() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean tryAddUpgrades(){
|
public boolean tryAddUpgrades() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import techreborn.tiles.TileChunkLoader;
|
import techreborn.tiles.TileChunkLoader;
|
||||||
|
|
||||||
public class GuiChunkLoader extends GuiContainer {
|
public class GuiChunkLoader extends GuiContainer {
|
||||||
|
|
|
@ -29,9 +29,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import reborncore.common.powerSystem.PowerSystem;
|
import reborncore.common.powerSystem.PowerSystem;
|
||||||
|
|
||||||
import techreborn.tiles.generator.TileDieselGenerator;
|
import techreborn.tiles.generator.TileDieselGenerator;
|
||||||
|
|
||||||
public class GuiDieselGenerator extends GuiContainer {
|
public class GuiDieselGenerator extends GuiContainer {
|
||||||
|
|
|
@ -26,7 +26,6 @@ package techreborn.client.gui;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import techreborn.tiles.TileDigitalChest;
|
import techreborn.tiles.TileDigitalChest;
|
||||||
|
|
||||||
public class GuiDigitalChest extends GuiBase {
|
public class GuiDigitalChest extends GuiBase {
|
||||||
|
|
|
@ -32,12 +32,10 @@ import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import reborncore.client.multiblock.MultiblockRenderEvent;
|
import reborncore.client.multiblock.MultiblockRenderEvent;
|
||||||
import reborncore.client.multiblock.MultiblockSet;
|
import reborncore.client.multiblock.MultiblockSet;
|
||||||
import reborncore.common.misc.Location;
|
import reborncore.common.misc.Location;
|
||||||
import reborncore.common.powerSystem.PowerSystem;
|
import reborncore.common.powerSystem.PowerSystem;
|
||||||
|
|
||||||
import techreborn.client.ClientMultiBlocks;
|
import techreborn.client.ClientMultiBlocks;
|
||||||
import techreborn.proxies.ClientProxy;
|
import techreborn.proxies.ClientProxy;
|
||||||
import techreborn.tiles.fusionReactor.TileEntityFusionController;
|
import techreborn.tiles.fusionReactor.TileEntityFusionController;
|
||||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import techreborn.tiles.generator.TileGasTurbine;
|
import techreborn.tiles.generator.TileGasTurbine;
|
||||||
|
|
||||||
public class GuiGasTurbine extends GuiContainer {
|
public class GuiGasTurbine extends GuiContainer {
|
||||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import techreborn.tiles.multiblock.TileImplosionCompressor;
|
import techreborn.tiles.multiblock.TileImplosionCompressor;
|
||||||
|
|
||||||
public class GuiImplosionCompressor extends GuiContainer {
|
public class GuiImplosionCompressor extends GuiContainer {
|
||||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import techreborn.tiles.TileIndustrialElectrolyzer;
|
import techreborn.tiles.TileIndustrialElectrolyzer;
|
||||||
|
|
||||||
public class GuiIndustrialElectrolyzer extends GuiContainer {
|
public class GuiIndustrialElectrolyzer extends GuiContainer {
|
||||||
|
@ -39,7 +38,6 @@ public class GuiIndustrialElectrolyzer extends GuiContainer {
|
||||||
|
|
||||||
TileIndustrialElectrolyzer eletrolyzer;
|
TileIndustrialElectrolyzer eletrolyzer;
|
||||||
|
|
||||||
|
|
||||||
public GuiIndustrialElectrolyzer(final EntityPlayer player, final TileIndustrialElectrolyzer tileeletrolyzer) {
|
public GuiIndustrialElectrolyzer(final EntityPlayer player, final TileIndustrialElectrolyzer tileeletrolyzer) {
|
||||||
super(tileeletrolyzer.createContainer(player));
|
super(tileeletrolyzer.createContainer(player));
|
||||||
this.xSize = 176;
|
this.xSize = 176;
|
||||||
|
|
|
@ -32,7 +32,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
|
||||||
import techreborn.tiles.multiblock.TileIndustrialSawmill;
|
import techreborn.tiles.multiblock.TileIndustrialSawmill;
|
||||||
|
|
||||||
public class GuiIndustrialSawmill extends GuiContainer {
|
public class GuiIndustrialSawmill extends GuiContainer {
|
||||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import techreborn.tiles.TileIronFurnace;
|
import techreborn.tiles.TileIronFurnace;
|
||||||
|
|
||||||
public class GuiIronFurnace extends GuiContainer {
|
public class GuiIronFurnace extends GuiContainer {
|
||||||
|
|
|
@ -26,7 +26,6 @@ package techreborn.client.gui;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import techreborn.tiles.TileQuantumChest;
|
import techreborn.tiles.TileQuantumChest;
|
||||||
|
|
||||||
public class GuiQuantumChest extends GuiBase {
|
public class GuiQuantumChest extends GuiBase {
|
||||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import techreborn.tiles.TileQuantumTank;
|
import techreborn.tiles.TileQuantumTank;
|
||||||
|
|
||||||
public class GuiQuantumTank extends GuiContainer {
|
public class GuiQuantumTank extends GuiContainer {
|
||||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import techreborn.tiles.TileRollingMachine;
|
import techreborn.tiles.TileRollingMachine;
|
||||||
|
|
||||||
public class GuiRollingMachine extends GuiContainer {
|
public class GuiRollingMachine extends GuiContainer {
|
||||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
import techreborn.tiles.TileScrapboxinator;
|
import techreborn.tiles.TileScrapboxinator;
|
||||||
|
|
||||||
public class GuiScrapboxinator extends GuiContainer {
|
public class GuiScrapboxinator extends GuiContainer {
|
||||||
|
|
|
@ -29,9 +29,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import reborncore.client.RenderUtil;
|
import reborncore.client.RenderUtil;
|
||||||
|
|
||||||
import techreborn.tiles.generator.TileSemifluidGenerator;
|
import techreborn.tiles.generator.TileSemifluidGenerator;
|
||||||
|
|
||||||
public class GuiSemifluidGenerator extends GuiContainer {
|
public class GuiSemifluidGenerator extends GuiContainer {
|
||||||
|
|
|
@ -29,9 +29,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
|
||||||
import reborncore.client.RenderUtil;
|
import reborncore.client.RenderUtil;
|
||||||
|
|
||||||
import techreborn.tiles.generator.TileThermalGenerator;
|
import techreborn.tiles.generator.TileThermalGenerator;
|
||||||
|
|
||||||
public class GuiThermalGenerator extends GuiContainer {
|
public class GuiThermalGenerator extends GuiContainer {
|
||||||
|
|
|
@ -333,7 +333,7 @@ public class TRBuilder extends GuiBuilder {
|
||||||
|
|
||||||
public void drawUpgrades(GuiScreen gui, IUpgradeable upgradeable, int posX, int posY) {
|
public void drawUpgrades(GuiScreen gui, IUpgradeable upgradeable, int posX, int posY) {
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(GUI_SHEET);
|
Minecraft.getMinecraft().getTextureManager().bindTexture(GUI_SHEET);
|
||||||
gui.drawTexturedModalRect(posX -27, posY + 4, 126, 151, 30, 87);
|
gui.drawTexturedModalRect(posX - 27, posY + 4, 126, 151, 30, 87);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawScrapSlot(GuiScreen gui, int posX, int posY) {
|
public void drawScrapSlot(GuiScreen gui, int posX, int posY) {
|
||||||
|
|
|
@ -27,7 +27,6 @@ package techreborn.client.gui.upgrades;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
|
||||||
import net.minecraft.client.renderer.RenderHelper;
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -62,7 +61,7 @@ public class GuiSideConfig extends GuiBase {
|
||||||
super.initGui();
|
super.initGui();
|
||||||
this.buttonList.clear();
|
this.buttonList.clear();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for(EnumFacing facing : EnumFacing.VALUES){
|
for (EnumFacing facing : EnumFacing.VALUES) {
|
||||||
buttonList.add(new GuiButton(facing.getIndex(), guiLeft + 150, guiTop + i++ * 23 + 22, 20, 20, "✓"));
|
buttonList.add(new GuiButton(facing.getIndex(), guiLeft + 150, guiTop + i++ * 23 + 22, 20, 20, "✓"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +71,6 @@ public class GuiSideConfig extends GuiBase {
|
||||||
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -82,11 +80,11 @@ public class GuiSideConfig extends GuiBase {
|
||||||
int offset = 10;
|
int offset = 10;
|
||||||
RenderHelper.enableStandardItemLighting();
|
RenderHelper.enableStandardItemLighting();
|
||||||
RenderHelper.enableGUIStandardItemLighting();
|
RenderHelper.enableGUIStandardItemLighting();
|
||||||
for(EnumFacing facing : EnumFacing.VALUES){
|
for (EnumFacing facing : EnumFacing.VALUES) {
|
||||||
BlockPos pos = tileEntity.getPos().offset(facing);
|
BlockPos pos = tileEntity.getPos().offset(facing);
|
||||||
IBlockState state = tileEntity.getWorld().getBlockState(pos);
|
IBlockState state = tileEntity.getWorld().getBlockState(pos);
|
||||||
ItemStack stack = state.getBlock().getPickBlock(state, new RayTraceResult(new Vec3d(0, 0, 0), facing, pos), tileEntity.getWorld(), pos, Minecraft.getMinecraft().player);
|
ItemStack stack = state.getBlock().getPickBlock(state, new RayTraceResult(new Vec3d(0, 0, 0), facing, pos), tileEntity.getWorld(), pos, Minecraft.getMinecraft().player);
|
||||||
if(stack != null && !stack.isEmpty() && stack.getItem() != null){
|
if (stack != null && !stack.isEmpty() && stack.getItem() != null) {
|
||||||
drawCentredString(stack.getDisplayName() + " - " + facing.getName(), offset += 22, 4210752, layer);
|
drawCentredString(stack.getDisplayName() + " - " + facing.getName(), offset += 22, 4210752, layer);
|
||||||
itemRender.renderItemIntoGUI(stack, 10, offset - 2);
|
itemRender.renderItemIntoGUI(stack, 10, offset - 2);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -114,7 +114,7 @@ public class TechRebornDevCommand extends CommandBase {
|
||||||
sender.sendMessage(new TextComponentString(e.getLocalizedMessage()));
|
sender.sendMessage(new TextComponentString(e.getLocalizedMessage()));
|
||||||
}
|
}
|
||||||
} else if ("ores".equals(args[0])) {
|
} else if ("ores".equals(args[0])) {
|
||||||
for(String ore: OreDictionary.getOreNames()){
|
for (String ore : OreDictionary.getOreNames()) {
|
||||||
System.out.println(ore);
|
System.out.println(ore);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,7 @@ public class CTGeneric {
|
||||||
public void apply() {
|
public void apply() {
|
||||||
for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(name)) {
|
for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(name)) {
|
||||||
for (Object stack : recipeType.getInputs()) {
|
for (Object stack : recipeType.getInputs()) {
|
||||||
if(stack instanceof ItemStack){
|
if (stack instanceof ItemStack) {
|
||||||
if (output.matches(MineTweakerMC.getIItemStack((ItemStack) stack))) {
|
if (output.matches(MineTweakerMC.getIItemStack((ItemStack) stack))) {
|
||||||
removedRecipes.add((BaseRecipe) recipeType);
|
removedRecipes.add((BaseRecipe) recipeType);
|
||||||
RecipeHandler.recipeList.remove(recipeType);
|
RecipeHandler.recipeList.remove(recipeType);
|
||||||
|
|
|
@ -35,7 +35,6 @@ import reborncore.common.util.ItemUtils;
|
||||||
import stanhebben.zenscript.annotations.ZenClass;
|
import stanhebben.zenscript.annotations.ZenClass;
|
||||||
import stanhebben.zenscript.annotations.ZenMethod;
|
import stanhebben.zenscript.annotations.ZenMethod;
|
||||||
import techreborn.api.RollingMachineRecipe;
|
import techreborn.api.RollingMachineRecipe;
|
||||||
import techreborn.api.TechRebornAPI;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -44,17 +43,16 @@ import java.util.Map;
|
||||||
@ZenClass("mods.techreborn.rollingMachine")
|
@ZenClass("mods.techreborn.rollingMachine")
|
||||||
public class CTRollingMachine {
|
public class CTRollingMachine {
|
||||||
|
|
||||||
|
|
||||||
//TODO 1.12 Crafttweaker
|
//TODO 1.12 Crafttweaker
|
||||||
// @ZenMethod
|
// @ZenMethod
|
||||||
// public static void addShaped(IItemStack output, IIngredient[][] ingredients) {
|
// public static void addShaped(IItemStack output, IIngredient[][] ingredients) {
|
||||||
// TechRebornAPI.addRollingOreMachinceRecipe(toStack(output), toShapedObjects(ingredients));
|
// TechRebornAPI.addRollingOreMachinceRecipe(toStack(output), toShapedObjects(ingredients));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// @ZenMethod
|
// @ZenMethod
|
||||||
// public static void addShapeless(IItemStack output, IIngredient[] ingredients) {
|
// public static void addShapeless(IItemStack output, IIngredient[] ingredients) {
|
||||||
// TechRebornAPI.addShapelessOreRollingMachinceRecipe(toStack(output), toObjects(ingredients));
|
// TechRebornAPI.addShapelessOreRollingMachinceRecipe(toStack(output), toObjects(ingredients));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@ZenMethod
|
@ZenMethod
|
||||||
public static void removeRecipe(IItemStack output) {
|
public static void removeRecipe(IItemStack output) {
|
||||||
|
@ -64,7 +62,7 @@ public class CTRollingMachine {
|
||||||
toRemove.add(recipe.getKey());
|
toRemove.add(recipe.getKey());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(ResourceLocation resourceLocation : toRemove){
|
for (ResourceLocation resourceLocation : toRemove) {
|
||||||
RollingMachineRecipe.instance.getRecipeList().remove(resourceLocation);
|
RollingMachineRecipe.instance.getRecipeList().remove(resourceLocation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ public abstract class BaseRecipeWrapper<T extends BaseRecipe> extends BlankRecip
|
||||||
inputs = new ArrayList<>();
|
inputs = new ArrayList<>();
|
||||||
outputs = new ArrayList<>();
|
outputs = new ArrayList<>();
|
||||||
for (Object input : baseRecipe.getInputs()) {
|
for (Object input : baseRecipe.getInputs()) {
|
||||||
if(input instanceof ItemStack){
|
if (input instanceof ItemStack) {
|
||||||
ItemStack stack = (ItemStack) input;
|
ItemStack stack = (ItemStack) input;
|
||||||
if (baseRecipe.useOreDic()) {
|
if (baseRecipe.useOreDic()) {
|
||||||
List<ItemStack> oreDictInputs = expandOreDict(stack);
|
List<ItemStack> oreDictInputs = expandOreDict(stack);
|
||||||
|
@ -55,7 +55,7 @@ public abstract class BaseRecipeWrapper<T extends BaseRecipe> extends BlankRecip
|
||||||
} else {
|
} else {
|
||||||
inputs.add(Collections.singletonList(stack));
|
inputs.add(Collections.singletonList(stack));
|
||||||
}
|
}
|
||||||
} else if (input instanceof String){
|
} else if (input instanceof String) {
|
||||||
inputs.add(OreDictionary.getOres((String) input));
|
inputs.add(OreDictionary.getOres((String) input));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,15 +24,13 @@
|
||||||
|
|
||||||
package techreborn.compat.jei;
|
package techreborn.compat.jei;
|
||||||
|
|
||||||
|
import mezz.jei.api.recipe.transfer.IRecipeTransferInfo;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
|
|
||||||
import techreborn.client.container.builder.BuiltContainer;
|
import techreborn.client.container.builder.BuiltContainer;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import mezz.jei.api.recipe.transfer.IRecipeTransferInfo;
|
|
||||||
|
|
||||||
public class BuiltContainerTransferInfo implements IRecipeTransferInfo<BuiltContainer> {
|
public class BuiltContainerTransferInfo implements IRecipeTransferInfo<BuiltContainer> {
|
||||||
|
|
||||||
private final String containerName, recipeCategory;
|
private final String containerName, recipeCategory;
|
||||||
|
|
|
@ -189,7 +189,7 @@ public class TechRebornJeiPlugin extends BlankModPlugin {
|
||||||
new CompressorRecipeCategory(guiHelper), new ScrapboxRecipeCategory(guiHelper),
|
new CompressorRecipeCategory(guiHelper), new ScrapboxRecipeCategory(guiHelper),
|
||||||
new IndustrialSawmillRecipeCategory(guiHelper));
|
new IndustrialSawmillRecipeCategory(guiHelper));
|
||||||
|
|
||||||
if(!IC2Duplicates.deduplicate()){
|
if (!IC2Duplicates.deduplicate()) {
|
||||||
registry.addRecipeCategories(new ExtractorRecipeCategory(guiHelper));
|
registry.addRecipeCategories(new ExtractorRecipeCategory(guiHelper));
|
||||||
registry.addRecipeHandlers(new ExtractorRecipeHandler(jeiHelpers));
|
registry.addRecipeHandlers(new ExtractorRecipeHandler(jeiHelpers));
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class ChemicalReactorRecipeWrapper extends BaseRecipeWrapper<ChemicalReac
|
||||||
progressright.draw(minecraft, 25, 12);
|
progressright.draw(minecraft, 25, 12);
|
||||||
progressleft.draw(minecraft, 75, 12);
|
progressleft.draw(minecraft, 75, 12);
|
||||||
|
|
||||||
int y = 30 ;
|
int y = 30;
|
||||||
int lineHeight = minecraft.fontRendererObj.FONT_HEIGHT;
|
int lineHeight = minecraft.fontRendererObj.FONT_HEIGHT;
|
||||||
|
|
||||||
minecraft.fontRendererObj.drawString(baseRecipe.tickTime / 20 + " seconds", (recipeWidth / 2 - minecraft.fontRendererObj.getStringWidth(baseRecipe.tickTime / 20 + " seconds") / 2), y, 0x444444);
|
minecraft.fontRendererObj.drawString(baseRecipe.tickTime / 20 + " seconds", (recipeWidth / 2 - minecraft.fontRendererObj.getStringWidth(baseRecipe.tickTime / 20 + " seconds") / 2), y, 0x444444);
|
||||||
|
|
|
@ -24,18 +24,20 @@
|
||||||
|
|
||||||
package techreborn.compat.jei.generators.fluid;
|
package techreborn.compat.jei.generators.fluid;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
|
|
||||||
import mezz.jei.api.IJeiHelpers;
|
import mezz.jei.api.IJeiHelpers;
|
||||||
import mezz.jei.api.recipe.IRecipeHandler;
|
import mezz.jei.api.recipe.IRecipeHandler;
|
||||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||||
import techreborn.api.generator.FluidGeneratorRecipe;
|
import techreborn.api.generator.FluidGeneratorRecipe;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
public class FluidGeneratorRecipeHandler implements IRecipeHandler<FluidGeneratorRecipe> {
|
public class FluidGeneratorRecipeHandler implements IRecipeHandler<FluidGeneratorRecipe> {
|
||||||
@Nonnull
|
@Nonnull
|
||||||
private final IJeiHelpers jeiHelpers;
|
private final IJeiHelpers jeiHelpers;
|
||||||
|
|
||||||
public FluidGeneratorRecipeHandler(@Nonnull IJeiHelpers jeiHelpers) {
|
public FluidGeneratorRecipeHandler(
|
||||||
|
@Nonnull
|
||||||
|
IJeiHelpers jeiHelpers) {
|
||||||
this.jeiHelpers = jeiHelpers;
|
this.jeiHelpers = jeiHelpers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,13 +24,6 @@
|
||||||
|
|
||||||
package techreborn.compat.jei.generators.fluid;
|
package techreborn.compat.jei.generators.fluid;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.text.DecimalFormatSymbols;
|
|
||||||
import java.text.NumberFormat;
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
import mezz.jei.api.IGuiHelper;
|
import mezz.jei.api.IGuiHelper;
|
||||||
import mezz.jei.api.IJeiHelpers;
|
import mezz.jei.api.IJeiHelpers;
|
||||||
import mezz.jei.api.gui.IDrawable;
|
import mezz.jei.api.gui.IDrawable;
|
||||||
|
@ -41,6 +34,12 @@ import net.minecraftforge.fluids.Fluid;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import techreborn.api.generator.FluidGeneratorRecipe;
|
import techreborn.api.generator.FluidGeneratorRecipe;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.text.DecimalFormatSymbols;
|
||||||
|
import java.text.NumberFormat;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public class FluidGeneratorRecipeWrapper extends BlankRecipeWrapper {
|
public class FluidGeneratorRecipeWrapper extends BlankRecipeWrapper {
|
||||||
|
|
||||||
private static final DecimalFormat formatter;
|
private static final DecimalFormat formatter;
|
||||||
|
@ -58,7 +57,11 @@ public class FluidGeneratorRecipeWrapper extends BlankRecipeWrapper {
|
||||||
private final FluidGeneratorRecipe baseRecipe;
|
private final FluidGeneratorRecipe baseRecipe;
|
||||||
private final IDrawable energyProduced;
|
private final IDrawable energyProduced;
|
||||||
|
|
||||||
public FluidGeneratorRecipeWrapper(@Nonnull IJeiHelpers jeiHelpers, @Nonnull FluidGeneratorRecipe recipe) {
|
public FluidGeneratorRecipeWrapper(
|
||||||
|
@Nonnull
|
||||||
|
IJeiHelpers jeiHelpers,
|
||||||
|
@Nonnull
|
||||||
|
FluidGeneratorRecipe recipe) {
|
||||||
|
|
||||||
this.baseRecipe = recipe;
|
this.baseRecipe = recipe;
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ public class GrinderRecipeCategory extends BlankRecipeCategory<GrinderRecipeWrap
|
||||||
background = guiHelper.createDrawable(texture, 0, 62, 74, 32);
|
background = guiHelper.createDrawable(texture, 0, 62, 74, 32);
|
||||||
title = I18n.translateToLocal("tile.techreborn.grinder.name");
|
title = I18n.translateToLocal("tile.techreborn.grinder.name");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getModName() {
|
public String getModName() {
|
||||||
return ModInfo.MOD_NAME;
|
return ModInfo.MOD_NAME;
|
||||||
|
|
|
@ -51,8 +51,7 @@ public class IndustrialSawmillRecipeCategory extends BlankRecipeCategory<Industr
|
||||||
private static final int[] OUTPUT_SLOTS = { 2, 3, 4 };
|
private static final int[] OUTPUT_SLOTS = { 2, 3, 4 };
|
||||||
private static final int[] INPUT_TANKS = { 0 };
|
private static final int[] INPUT_TANKS = { 0 };
|
||||||
|
|
||||||
|
public IndustrialSawmillRecipeCategory(IGuiHelper guiHelper) {
|
||||||
public IndustrialSawmillRecipeCategory(IGuiHelper guiHelper){
|
|
||||||
title = Translator.translateToLocal("tile.techreborn.industrialsawmill.name");
|
title = Translator.translateToLocal("tile.techreborn.industrialsawmill.name");
|
||||||
background = guiHelper.createDrawable(texture, 7, 15, 141, 55);
|
background = guiHelper.createDrawable(texture, 7, 15, 141, 55);
|
||||||
tankOverlay = guiHelper.createDrawable(texture, 176, 86, 12, 47);
|
tankOverlay = guiHelper.createDrawable(texture, 176, 86, 12, 47);
|
||||||
|
|
|
@ -24,20 +24,21 @@
|
||||||
|
|
||||||
package techreborn.compat.jei.industrialSawmill;
|
package techreborn.compat.jei.industrialSawmill;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
|
|
||||||
import mezz.jei.api.IJeiHelpers;
|
import mezz.jei.api.IJeiHelpers;
|
||||||
import mezz.jei.api.recipe.IRecipeHandler;
|
import mezz.jei.api.recipe.IRecipeHandler;
|
||||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||||
import techreborn.Core;
|
|
||||||
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
|
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
|
||||||
import techreborn.compat.jei.RecipeCategoryUids;
|
import techreborn.compat.jei.RecipeCategoryUids;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
public class IndustrialSawmillRecipeHandler implements IRecipeHandler<IndustrialSawmillRecipe> {
|
public class IndustrialSawmillRecipeHandler implements IRecipeHandler<IndustrialSawmillRecipe> {
|
||||||
@Nonnull
|
@Nonnull
|
||||||
private final IJeiHelpers jeiHelpers;
|
private final IJeiHelpers jeiHelpers;
|
||||||
|
|
||||||
public IndustrialSawmillRecipeHandler(@Nonnull IJeiHelpers jeiHelpers) {
|
public IndustrialSawmillRecipeHandler(
|
||||||
|
@Nonnull
|
||||||
|
IJeiHelpers jeiHelpers) {
|
||||||
this.jeiHelpers = jeiHelpers;
|
this.jeiHelpers = jeiHelpers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,6 @@
|
||||||
|
|
||||||
package techreborn.compat.jei.industrialSawmill;
|
package techreborn.compat.jei.industrialSawmill;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
|
|
||||||
import mezz.jei.api.IGuiHelper;
|
import mezz.jei.api.IGuiHelper;
|
||||||
import mezz.jei.api.IJeiHelpers;
|
import mezz.jei.api.IJeiHelpers;
|
||||||
import mezz.jei.api.gui.IDrawableAnimated;
|
import mezz.jei.api.gui.IDrawableAnimated;
|
||||||
|
@ -40,16 +35,18 @@ import net.minecraftforge.fluids.FluidStack;
|
||||||
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
|
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
|
||||||
import techreborn.compat.jei.BaseRecipeWrapper;
|
import techreborn.compat.jei.BaseRecipeWrapper;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author drcrazy
|
* @author drcrazy
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class IndustrialSawmillRecipeWrapper extends BaseRecipeWrapper <IndustrialSawmillRecipe>{
|
public class IndustrialSawmillRecipeWrapper extends BaseRecipeWrapper<IndustrialSawmillRecipe> {
|
||||||
public static final ResourceLocation texture = new ResourceLocation("techreborn",
|
public static final ResourceLocation texture = new ResourceLocation("techreborn",
|
||||||
"textures/gui/industrial_sawmill.png");
|
"textures/gui/industrial_sawmill.png");
|
||||||
private final IDrawableAnimated progress;
|
private final IDrawableAnimated progress;
|
||||||
|
|
||||||
|
|
||||||
public IndustrialSawmillRecipeWrapper(
|
public IndustrialSawmillRecipeWrapper(
|
||||||
@Nonnull
|
@Nonnull
|
||||||
IJeiHelpers jeiHelpers,
|
IJeiHelpers jeiHelpers,
|
||||||
|
@ -96,7 +93,4 @@ public class IndustrialSawmillRecipeWrapper extends BaseRecipeWrapper <Industria
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,7 +130,6 @@ public class IC2Dict {
|
||||||
|
|
||||||
OreDictionary.registerOre("plateIridium", ItemName.crafting.getItemStack(CraftingItemType.iridium));
|
OreDictionary.registerOre("plateIridium", ItemName.crafting.getItemStack(CraftingItemType.iridium));
|
||||||
|
|
||||||
|
|
||||||
} catch (NoClassDefFoundError notFound) {
|
} catch (NoClassDefFoundError notFound) {
|
||||||
Core.logHelper.warn(
|
Core.logHelper.warn(
|
||||||
"Can't enable integration: IC2 installed but cannot be hooked\n" +
|
"Can't enable integration: IC2 installed but cannot be hooked\n" +
|
||||||
|
@ -146,14 +145,12 @@ public class IC2Dict {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ItemStack getIC2Cable(CableType type, int insulation) {
|
||||||
public static ItemStack getIC2Cable(CableType type, int insulation){
|
if (insulation > type.maxInsulation) {
|
||||||
if(insulation > type.maxInsulation){
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
ItemCable itemCable = ItemName.cable.getInstance();
|
ItemCable itemCable = ItemName.cable.getInstance();
|
||||||
return itemCable.getCable(type, insulation);
|
return itemCable.getCable(type, insulation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue