Auto format code
This commit is contained in:
parent
c0aab7f37a
commit
774fec221e
65 changed files with 100 additions and 125 deletions
|
@ -34,7 +34,6 @@ import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
||||||
public class BlockComputerCube extends BlockMachineBase {
|
public class BlockComputerCube extends BlockMachineBase {
|
||||||
|
|
||||||
|
|
||||||
public BlockComputerCube(final Material material) {
|
public BlockComputerCube(final Material material) {
|
||||||
super();
|
super();
|
||||||
this.setUnlocalizedName("techreborn.computercube");
|
this.setUnlocalizedName("techreborn.computercube");
|
||||||
|
|
|
@ -27,10 +27,7 @@ package techreborn.blocks;
|
||||||
import net.minecraft.block.BlockFence;
|
import net.minecraft.block.BlockFence;
|
||||||
import net.minecraft.block.BlockPlanks;
|
import net.minecraft.block.BlockPlanks;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import prospector.shootingstar.ShootingStar;
|
|
||||||
import prospector.shootingstar.model.ModelCompound;
|
|
||||||
import techreborn.client.TechRebornCreativeTabMisc;
|
import techreborn.client.TechRebornCreativeTabMisc;
|
||||||
import techreborn.lib.ModInfo;
|
|
||||||
|
|
||||||
public class BlockRefinedIronFence extends BlockFence {
|
public class BlockRefinedIronFence extends BlockFence {
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ public class BlockRubberLog extends Block {
|
||||||
item.motionZ = rand.nextGaussian() * factor;
|
item.motionZ = rand.nextGaussian() * factor;
|
||||||
worldIn.spawnEntity(item);
|
worldIn.spawnEntity(item);
|
||||||
}
|
}
|
||||||
if(playerIn instanceof EntityPlayerMP){
|
if (playerIn instanceof EntityPlayerMP) {
|
||||||
TRRecipeHandler.unlockTRRecipes((EntityPlayerMP) playerIn);
|
TRRecipeHandler.unlockTRRecipes((EntityPlayerMP) playerIn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
package techreborn.blocks.advanced_machine;
|
package techreborn.blocks.advanced_machine;
|
||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import prospector.shootingstar.ShootingStar;
|
import prospector.shootingstar.ShootingStar;
|
||||||
import prospector.shootingstar.model.ModelCompound;
|
import prospector.shootingstar.model.ModelCompound;
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
package techreborn.blocks.advanced_machine;
|
package techreborn.blocks.advanced_machine;
|
||||||
|
|
||||||
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;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
package techreborn.blocks.advanced_machine;
|
package techreborn.blocks.advanced_machine;
|
||||||
|
|
||||||
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.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
package techreborn.blocks.generator;
|
package techreborn.blocks.generator;
|
||||||
|
|
||||||
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.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
package techreborn.blocks.machine;
|
package techreborn.blocks.machine;
|
||||||
|
|
||||||
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;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
package techreborn.blocks.machine;
|
package techreborn.blocks.machine;
|
||||||
|
|
||||||
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;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
package techreborn.blocks.tier1;
|
package techreborn.blocks.tier1;
|
||||||
|
|
||||||
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;
|
||||||
|
|
|
@ -29,7 +29,10 @@ 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.ContainerAESU;
|
||||||
|
import techreborn.client.container.ContainerDestructoPack;
|
||||||
|
import techreborn.client.container.ContainerLESU;
|
||||||
|
import techreborn.client.container.IContainerProvider;
|
||||||
import techreborn.client.gui.*;
|
import techreborn.client.gui.*;
|
||||||
import techreborn.client.gui.autocrafting.GuiAutoCrafting;
|
import techreborn.client.gui.autocrafting.GuiAutoCrafting;
|
||||||
import techreborn.tiles.*;
|
import techreborn.tiles.*;
|
||||||
|
@ -38,9 +41,9 @@ import techreborn.tiles.generator.*;
|
||||||
import techreborn.tiles.idsu.TileInterdimensionalSU;
|
import techreborn.tiles.idsu.TileInterdimensionalSU;
|
||||||
import techreborn.tiles.lesu.TileLapotronicSU;
|
import techreborn.tiles.lesu.TileLapotronicSU;
|
||||||
import techreborn.tiles.multiblock.*;
|
import techreborn.tiles.multiblock.*;
|
||||||
|
import techreborn.tiles.storage.TileHighVoltageSU;
|
||||||
import techreborn.tiles.storage.TileLowVoltageSU;
|
import techreborn.tiles.storage.TileLowVoltageSU;
|
||||||
import techreborn.tiles.storage.TileMediumVoltageSU;
|
import techreborn.tiles.storage.TileMediumVoltageSU;
|
||||||
import techreborn.tiles.storage.TileHighVoltageSU;
|
|
||||||
import techreborn.tiles.teir1.*;
|
import techreborn.tiles.teir1.*;
|
||||||
|
|
||||||
public class GuiHandler implements IGuiHandler {
|
public class GuiHandler implements IGuiHandler {
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class GuiAutoCrafting extends GuiBase {
|
||||||
int mX = mouseX - getGuiLeft();
|
int mX = mouseX - getGuiLeft();
|
||||||
int mY = mouseY - getGuiTop();
|
int mY = mouseY - getGuiTop();
|
||||||
|
|
||||||
if(recipe != null && !tileAutoCraftingTable.customRecipe){
|
if (recipe != null && !tileAutoCraftingTable.customRecipe) {
|
||||||
if (builder.isInRect(91, 66, 23, 23, mX, mY)) {
|
if (builder.isInRect(91, 66, 23, 23, mX, mY)) {
|
||||||
List<String> list = new ArrayList<>();
|
List<String> list = new ArrayList<>();
|
||||||
list.add("Click to clear");
|
list.add("Click to clear");
|
||||||
|
@ -149,7 +149,7 @@ public class GuiAutoCrafting extends GuiBase {
|
||||||
drawString("Inventory", 8, 82, 4210752, layer);
|
drawString("Inventory", 8, 82, 4210752, layer);
|
||||||
|
|
||||||
IRecipe recipe = tileAutoCraftingTable.getIRecipe();
|
IRecipe recipe = tileAutoCraftingTable.getIRecipe();
|
||||||
if (recipe != null && ! tileAutoCraftingTable.customRecipe) {
|
if (recipe != null && !tileAutoCraftingTable.customRecipe) {
|
||||||
renderRecipe(recipe, guiLeft + 91, 66 + guiTop);
|
renderRecipe(recipe, guiLeft + 91, 66 + guiTop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ public class GuiAutoCraftingRecipeSlector extends GuiRecipeBook {
|
||||||
|
|
||||||
GuiAutoCrafting guiAutoCrafting;
|
GuiAutoCrafting guiAutoCrafting;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initVisuals(boolean p_193014_1_, InventoryCrafting p_193014_2_) {
|
public void initVisuals(boolean p_193014_1_, InventoryCrafting p_193014_2_) {
|
||||||
super.initVisuals(p_193014_1_, p_193014_2_);
|
super.initVisuals(p_193014_1_, p_193014_2_);
|
||||||
|
|
|
@ -38,7 +38,6 @@ import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.client.model.*;
|
import net.minecraftforge.client.model.*;
|
||||||
import net.minecraftforge.common.model.IModelPart;
|
|
||||||
import net.minecraftforge.common.model.IModelState;
|
import net.minecraftforge.common.model.IModelState;
|
||||||
import net.minecraftforge.common.model.TRSRTransformation;
|
import net.minecraftforge.common.model.TRSRTransformation;
|
||||||
import net.minecraftforge.fluids.Fluid;
|
import net.minecraftforge.fluids.Fluid;
|
||||||
|
@ -99,7 +98,6 @@ public class ModelDynamicCell implements IModel {
|
||||||
return ImmutableList.of(baseTexture, emptyTexture);
|
return ImmutableList.of(baseTexture, emptyTexture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
|
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
|
||||||
|
|
||||||
|
|
|
@ -62,12 +62,12 @@ public class CompatManager {
|
||||||
public void registerCompact(Class<? extends ICompatModule> moduleClass, boolean config, Object... objs) {
|
public void registerCompact(Class<? extends ICompatModule> moduleClass, boolean config, Object... objs) {
|
||||||
boolean shouldLoad = true;
|
boolean shouldLoad = true;
|
||||||
//TODO config
|
//TODO config
|
||||||
// if (config) {
|
// if (config) {
|
||||||
// shouldLoad = ConfigTechReborn.config
|
// shouldLoad = ConfigTechReborn.config
|
||||||
// .get(ConfigTechReborn.CATEGORY_INTEGRATION, "Compat:" + moduleClass.getSimpleName(), true,
|
// .get(ConfigTechReborn.CATEGORY_INTEGRATION, "Compat:" + moduleClass.getSimpleName(), true,
|
||||||
// "Should the " + moduleClass.getSimpleName() + " be loaded?")
|
// "Should the " + moduleClass.getSimpleName() + " be loaded?")
|
||||||
// .getBoolean(true);
|
// .getBoolean(true);
|
||||||
// }
|
// }
|
||||||
for (Object obj : objs) {
|
for (Object obj : objs) {
|
||||||
if (obj instanceof String) {
|
if (obj instanceof String) {
|
||||||
String modid = (String) obj;
|
String modid = (String) obj;
|
||||||
|
|
|
@ -152,7 +152,6 @@ public class CTFusionReactor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String describe() {
|
public String describe() {
|
||||||
return "Removing Fusion Reactor recipe";
|
return "Removing Fusion Reactor recipe";
|
||||||
|
|
|
@ -118,7 +118,6 @@ public class CTGeneric {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String describe() {
|
public String describe() {
|
||||||
return "Removing " + name + " recipe";
|
return "Removing " + name + " recipe";
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
package techreborn.events;
|
package techreborn.events;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.CraftingManager;
|
import net.minecraft.item.crafting.CraftingManager;
|
||||||
|
@ -45,16 +44,16 @@ public class TRRecipeHandler {
|
||||||
|
|
||||||
private static List<IForgeRegistryEntry> hiddenEntrys = new ArrayList<>();
|
private static List<IForgeRegistryEntry> hiddenEntrys = new ArrayList<>();
|
||||||
|
|
||||||
public static void hideEntry(IForgeRegistryEntry entry){
|
public static void hideEntry(IForgeRegistryEntry entry) {
|
||||||
hiddenEntrys.add(entry);
|
hiddenEntrys.add(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void pickupEvent(EntityItemPickupEvent entityItemPickupEvent){
|
public void pickupEvent(EntityItemPickupEvent entityItemPickupEvent) {
|
||||||
if(entityItemPickupEvent.getEntityPlayer() instanceof EntityPlayerMP){
|
if (entityItemPickupEvent.getEntityPlayer() instanceof EntityPlayerMP) {
|
||||||
if(ItemUtils.isInputEqual("logWood", entityItemPickupEvent.getItem().getItem(), false, false, true)){
|
if (ItemUtils.isInputEqual("logWood", entityItemPickupEvent.getItem().getItem(), false, false, true)) {
|
||||||
for(IRecipe recipe : CraftingManager.REGISTRY){
|
for (IRecipe recipe : CraftingManager.REGISTRY) {
|
||||||
if(recipe.getRecipeOutput().getItem() == ModItems.TREE_TAP){
|
if (recipe.getRecipeOutput().getItem() == ModItems.TREE_TAP) {
|
||||||
entityItemPickupEvent.getEntityPlayer().unlockRecipes(Collections.singletonList(recipe));
|
entityItemPickupEvent.getEntityPlayer().unlockRecipes(Collections.singletonList(recipe));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,32 +61,32 @@ public class TRRecipeHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void unlockTRRecipes(EntityPlayerMP playerMP){
|
public static void unlockTRRecipes(EntityPlayerMP playerMP) {
|
||||||
List<IRecipe> recipeList = new ArrayList<>();
|
List<IRecipe> recipeList = new ArrayList<>();
|
||||||
for(IRecipe recipe : CraftingManager.REGISTRY){
|
for (IRecipe recipe : CraftingManager.REGISTRY) {
|
||||||
if(isRecipeValid(recipe)){
|
if (isRecipeValid(recipe)) {
|
||||||
recipeList.add(recipe);
|
recipeList.add(recipe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
playerMP.unlockRecipes(recipeList);
|
playerMP.unlockRecipes(recipeList);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isRecipeValid(IRecipe recipe){
|
private static boolean isRecipeValid(IRecipe recipe) {
|
||||||
if(recipe.getRegistryName() == null){
|
if (recipe.getRegistryName() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!recipe.getRegistryName().getResourceDomain().equals(ModInfo.MOD_ID)){
|
if (!recipe.getRegistryName().getResourceDomain().equals(ModInfo.MOD_ID)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!recipe.getRecipeOutput().getItem().getRegistryName().getResourceDomain().equals(ModInfo.MOD_ID)){
|
if (!recipe.getRecipeOutput().getItem().getRegistryName().getResourceDomain().equals(ModInfo.MOD_ID)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(hiddenEntrys.contains(recipe.getRecipeOutput().getItem())){
|
if (hiddenEntrys.contains(recipe.getRecipeOutput().getItem())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//Hide uu recipes
|
//Hide uu recipes
|
||||||
for(Ingredient ingredient : recipe.getIngredients()){
|
for (Ingredient ingredient : recipe.getIngredients()) {
|
||||||
if(ingredient.apply(new ItemStack(ModItems.UU_MATTER))){
|
if (ingredient.apply(new ItemStack(ModItems.UU_MATTER))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,5 +52,4 @@ public class TRTickHandler {
|
||||||
previouslyWearing = chestslot;
|
previouslyWearing = chestslot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,6 @@ import techreborn.tiles.transformers.TileHVTransformer;
|
||||||
import techreborn.tiles.transformers.TileLVTransformer;
|
import techreborn.tiles.transformers.TileLVTransformer;
|
||||||
import techreborn.tiles.transformers.TileMVTransformer;
|
import techreborn.tiles.transformers.TileMVTransformer;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
|
|
||||||
public class ModBlocks {
|
public class ModBlocks {
|
||||||
|
|
||||||
public static Block THERMAL_GENERATOR;
|
public static Block THERMAL_GENERATOR;
|
||||||
|
@ -418,7 +416,7 @@ public class ModBlocks {
|
||||||
public static void registerBlock(Block block, Class<? extends ItemBlock> itemclass, String name) {
|
public static void registerBlock(Block block, Class<? extends ItemBlock> itemclass, String name) {
|
||||||
name = name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
block.setUnlocalizedName(ModInfo.MOD_ID + ":" + name);
|
block.setUnlocalizedName(ModInfo.MOD_ID + ":" + name);
|
||||||
RebornRegistry.registerBlock(block, itemclass, new ResourceLocation(ModInfo.MOD_ID, name));
|
RebornRegistry.registerBlock(block, itemclass, new ResourceLocation(ModInfo.MOD_ID, name));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerOreDict() {
|
public static void registerOreDict() {
|
||||||
|
|
|
@ -26,10 +26,8 @@ package techreborn.init;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.item.ItemBlock;
|
|
||||||
import net.minecraftforge.fluids.Fluid;
|
import net.minecraftforge.fluids.Fluid;
|
||||||
import net.minecraftforge.fluids.FluidRegistry;
|
import net.minecraftforge.fluids.FluidRegistry;
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
|
||||||
import reborncore.RebornRegistry;
|
import reborncore.RebornRegistry;
|
||||||
import reborncore.api.fuel.FluidPowerManager;
|
import reborncore.api.fuel.FluidPowerManager;
|
||||||
import techreborn.blocks.fluid.BlockFluidBase;
|
import techreborn.blocks.fluid.BlockFluidBase;
|
||||||
|
|
|
@ -27,7 +27,6 @@ package techreborn.init;
|
||||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import reborncore.RebornRegistry;
|
import reborncore.RebornRegistry;
|
||||||
import reborncore.api.power.IEnergyInterfaceItem;
|
import reborncore.api.power.IEnergyInterfaceItem;
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class ModRecipes {
|
||||||
2));
|
2));
|
||||||
|
|
||||||
for (String ore : OreUtil.oreNames) {
|
for (String ore : OreUtil.oreNames) {
|
||||||
if(ore.equals("iridium")){
|
if (ore.equals("iridium")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (OreUtil.doesOreExistAndValid("plate" + OreUtil.capitalizeFirstLetter(ore)) && OreUtil.doesOreExistAndValid("ingot" + OreUtil.capitalizeFirstLetter(ore))) {
|
if (OreUtil.doesOreExistAndValid("plate" + OreUtil.capitalizeFirstLetter(ore)) && OreUtil.doesOreExistAndValid("ingot" + OreUtil.capitalizeFirstLetter(ore))) {
|
||||||
|
@ -901,9 +901,9 @@ public class ModRecipes {
|
||||||
.addSmelting(ItemDusts.getDustByName("silver", 1), ItemIngots.getIngotByName("silver"),
|
.addSmelting(ItemDusts.getDustByName("silver", 1), ItemIngots.getIngotByName("silver"),
|
||||||
1F);
|
1F);
|
||||||
|
|
||||||
RebornCraftingHelper
|
RebornCraftingHelper
|
||||||
.addShapedOreRecipe((getOre("oreIridium")), "UUU", " U ", "UUU", 'U',
|
.addShapedOreRecipe((getOre("oreIridium")), "UUU", " U ", "UUU", 'U',
|
||||||
ModItems.UU_MATTER);
|
ModItems.UU_MATTER);
|
||||||
|
|
||||||
// Chemical Reactor
|
// Chemical Reactor
|
||||||
RecipeHandler.addRecipe(new ChemicalReactorRecipe(ItemDusts.getDustByName("calcite", 1), null,
|
RecipeHandler.addRecipe(new ChemicalReactorRecipe(ItemDusts.getDustByName("calcite", 1), null,
|
||||||
|
|
|
@ -26,7 +26,6 @@ package techreborn.init;
|
||||||
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.SoundEvent;
|
import net.minecraft.util.SoundEvent;
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
|
||||||
import net.minecraftforge.registries.GameData;
|
import net.minecraftforge.registries.GameData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -43,8 +43,6 @@ import techreborn.items.DynamicCell;
|
||||||
import techreborn.items.ItemDustsSmall;
|
import techreborn.items.ItemDustsSmall;
|
||||||
import techreborn.items.ItemNuggets;
|
import techreborn.items.ItemNuggets;
|
||||||
|
|
||||||
import java.security.InvalidParameterException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Prospector
|
* Created by Prospector
|
||||||
*/
|
*/
|
||||||
|
@ -213,10 +211,10 @@ public class CraftingTableRecipes extends RecipeMethods {
|
||||||
|
|
||||||
static void registerCompressionRecipes() {
|
static void registerCompressionRecipes() {
|
||||||
for (String name : ArrayUtils.addAll(BlockStorage.types, BlockStorage2.types)) {
|
for (String name : ArrayUtils.addAll(BlockStorage.types, BlockStorage2.types)) {
|
||||||
if(OreUtil.hasIngot(name)){
|
if (OreUtil.hasIngot(name)) {
|
||||||
registerShaped(BlockStorage.getStorageBlockByName(name), "AAA", "AAA", "AAA", 'A',
|
registerShaped(BlockStorage.getStorageBlockByName(name), "AAA", "AAA", "AAA", 'A',
|
||||||
"ingot" + StringUtils.toFirstCapital(name));
|
"ingot" + StringUtils.toFirstCapital(name));
|
||||||
} else if (OreUtil.hasGem(name)){
|
} else if (OreUtil.hasGem(name)) {
|
||||||
registerShaped(BlockStorage.getStorageBlockByName(name), "AAA", "AAA", "AAA", 'A',
|
registerShaped(BlockStorage.getStorageBlockByName(name), "AAA", "AAA", "AAA", 'A',
|
||||||
"gem" + StringUtils.toFirstCapital(name));
|
"gem" + StringUtils.toFirstCapital(name));
|
||||||
}
|
}
|
||||||
|
@ -270,13 +268,13 @@ public class CraftingTableRecipes extends RecipeMethods {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void registerMixedMetal(String top, String middle, String bottom, int amount) {
|
static void registerMixedMetal(String top, String middle, String bottom, int amount) {
|
||||||
if(!OreDictionary.doesOreNameExist(top)){
|
if (!OreDictionary.doesOreNameExist(top)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!OreDictionary.doesOreNameExist(middle)){
|
if (!OreDictionary.doesOreNameExist(middle)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!OreDictionary.doesOreNameExist(bottom)){
|
if (!OreDictionary.doesOreNameExist(bottom)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (top.equals("ingotRefinedIron") && IC2Duplicates.deduplicate()) {
|
if (top.equals("ingotRefinedIron") && IC2Duplicates.deduplicate()) {
|
||||||
|
|
|
@ -133,7 +133,7 @@ public class DynamicCell extends Item {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems) {
|
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems) {
|
||||||
if(!isInCreativeTab(tab)){
|
if (!isInCreativeTab(tab)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
subItems.add(getEmptyCell(1));
|
subItems.add(getEmptyCell(1));
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class ItemDusts extends ItemTR {
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||||
if(!isInCreativeTab(creativeTabs)){
|
if (!isInCreativeTab(creativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int meta = 0; meta < types.length; ++meta) {
|
for (int meta = 0; meta < types.length; ++meta) {
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class ItemDustsSmall extends ItemTR {
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||||
if(!isInCreativeTab(creativeTabs)){
|
if (!isInCreativeTab(creativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int meta = 0; meta < types.length; ++meta) {
|
for (int meta = 0; meta < types.length; ++meta) {
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class ItemGems extends ItemTR {
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||||
if(!isInCreativeTab(creativeTabs)){
|
if (!isInCreativeTab(creativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int meta = 0; meta < types.length; ++meta) {
|
for (int meta = 0; meta < types.length; ++meta) {
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class ItemNuggets extends ItemTR {
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||||
if(!isInCreativeTab(creativeTabs)){
|
if (!isInCreativeTab(creativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int meta = 0; meta < types.length; ++meta) {
|
for (int meta = 0; meta < types.length; ++meta) {
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class ItemParts extends ItemTR {
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(final CreativeTabs creativeTabs, final NonNullList list) {
|
public void getSubItems(final CreativeTabs creativeTabs, final NonNullList list) {
|
||||||
if(!isInCreativeTab(creativeTabs)){
|
if (!isInCreativeTab(creativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int meta = 0; meta < ItemParts.types.length; ++meta) {
|
for (int meta = 0; meta < ItemParts.types.length; ++meta) {
|
||||||
|
|
|
@ -94,7 +94,7 @@ public class ItemPlates extends ItemTR {
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||||
if(!isInCreativeTab(creativeTabs)){
|
if (!isInCreativeTab(creativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int meta = 0; meta < types.length; ++meta) {
|
for (int meta = 0; meta < types.length; ++meta) {
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
package techreborn.items;
|
package techreborn.items;
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import reborncore.RebornCore;
|
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
|
||||||
public class ItemTR extends Item {
|
public class ItemTR extends Item {
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class ItemUpgrades extends ItemTR implements IUpgrade {
|
||||||
// Adds Dusts SubItems To Creative Tab
|
// Adds Dusts SubItems To Creative Tab
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||||
if(!isInCreativeTab(creativeTabs)){
|
if (!isInCreativeTab(creativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int meta = 0; meta < types.length; ++meta) {
|
for (int meta = 0; meta < types.length; ++meta) {
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class ItemLapotronPack extends ItemArmor implements IEnergyItemInfo {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(Item item,
|
public void getSubItems(Item item,
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack uncharged = new ItemStack(ModItems.LAPOTRONIC_ORB_PACK);
|
ItemStack uncharged = new ItemStack(ModItems.LAPOTRONIC_ORB_PACK);
|
||||||
|
|
|
@ -101,7 +101,7 @@ public class ItemLithiumBatpack extends ItemArmor implements IEnergyItemInfo {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack uncharged = new ItemStack(ModItems.LITHIUM_BATTERY_PACK);
|
ItemStack uncharged = new ItemStack(ModItems.LITHIUM_BATTERY_PACK);
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class ItemEnergyCrystal extends ItemBattery {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.ENERGY_CRYSTAL);
|
ItemStack stack = new ItemStack(ModItems.ENERGY_CRYSTAL);
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class ItemLapotronCrystal extends ItemBattery {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.LAPOTRONIC_CRYSTAL);
|
ItemStack stack = new ItemStack(ModItems.LAPOTRONIC_CRYSTAL);
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class ItemLapotronicOrb extends ItemBattery {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.LAPOTRONIC_ORB);
|
ItemStack stack = new ItemStack(ModItems.LAPOTRONIC_ORB);
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class ItemLithiumBattery extends ItemBattery {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.LITHIUM_BATTERY);
|
ItemStack stack = new ItemStack(ModItems.LITHIUM_BATTERY);
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class ItemReBattery extends ItemBattery {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.RE_BATTERY);
|
ItemStack stack = new ItemStack(ModItems.RE_BATTERY);
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class ItemAdvancedChainsaw extends ItemChainsaw {
|
||||||
|
|
||||||
public ItemAdvancedChainsaw() {
|
public ItemAdvancedChainsaw() {
|
||||||
super(ToolMaterial.DIAMOND, "techreborn.advancedChainsaw", ConfigTechReborn.AdvancedChainsawCharge,
|
super(ToolMaterial.DIAMOND, "techreborn.advancedChainsaw", ConfigTechReborn.AdvancedChainsawCharge,
|
||||||
4.0F);
|
4.0F);
|
||||||
this.cost = 250;
|
this.cost = 250;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ public class ItemAdvancedChainsaw extends ItemChainsaw {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.ADVANCED_CHAINSAW);
|
ItemStack stack = new ItemStack(ModItems.ADVANCED_CHAINSAW);
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class ItemAdvancedDrill extends ItemDrill {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.ADVANCED_DRILL);
|
ItemStack stack = new ItemStack(ModItems.ADVANCED_DRILL);
|
||||||
|
@ -117,7 +117,7 @@ public class ItemAdvancedDrill extends ItemDrill {
|
||||||
}
|
}
|
||||||
IBlockState blockState = world.getBlockState(pos);
|
IBlockState blockState = world.getBlockState(pos);
|
||||||
Block block = blockState.getBlock();
|
Block block = blockState.getBlock();
|
||||||
if(block.getBlockHardness(blockState, world, pos) == -1.0F){
|
if (block.getBlockHardness(blockState, world, pos) == -1.0F) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<ItemStack> stuff = block.getDrops(world, pos, blockState, 0);
|
List<ItemStack> stuff = block.getDrops(world, pos, blockState, 0);
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class ItemAdvancedJackhammer extends ItemJackhammer {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.ADVANCED_JACKHAMMER);
|
ItemStack stack = new ItemStack(ModItems.ADVANCED_JACKHAMMER);
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class ItemCloakingDevice extends ItemTR implements IEnergyItemInfo {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack uncharged = new ItemStack(ModItems.CLOAKING_DEVICE);
|
ItemStack uncharged = new ItemStack(ModItems.CLOAKING_DEVICE);
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class ItemDiamondChainsaw extends ItemChainsaw {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.DIAMOND_CHAINSAW);
|
ItemStack stack = new ItemStack(ModItems.DIAMOND_CHAINSAW);
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class ItemDiamondDrill extends ItemDrill {
|
||||||
|
|
||||||
public ItemDiamondDrill() {
|
public ItemDiamondDrill() {
|
||||||
super(ToolMaterial.DIAMOND, "techreborn.diamondDrill", ConfigTechReborn.DiamondDrillCharge,
|
super(ToolMaterial.DIAMOND, "techreborn.diamondDrill", ConfigTechReborn.DiamondDrillCharge,
|
||||||
0.5F, 15F);
|
0.5F, 15F);
|
||||||
this.cost = 250;
|
this.cost = 250;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ public class ItemDiamondDrill extends ItemDrill {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.DIAMOND_DRILL);
|
ItemStack stack = new ItemStack(ModItems.DIAMOND_DRILL);
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class ItemDiamondJackhammer extends ItemJackhammer {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.DIAMOND_JACKHAMMER);
|
ItemStack stack = new ItemStack(ModItems.DIAMOND_JACKHAMMER);
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class ItemElectricTreetap extends ItemTR implements IEnergyItemInfo {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack uncharged = new ItemStack(ModItems.ELECTRIC_TREE_TAP);
|
ItemStack uncharged = new ItemStack(ModItems.ELECTRIC_TREE_TAP);
|
||||||
|
|
|
@ -120,7 +120,7 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
|
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack itemStack = new ItemStack(this, 1);
|
ItemStack itemStack = new ItemStack(this, 1);
|
||||||
|
|
|
@ -113,7 +113,7 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack inactiveUncharged = new ItemStack(ModItems.NANOSABER);
|
ItemStack inactiveUncharged = new ItemStack(ModItems.NANOSABER);
|
||||||
|
|
|
@ -139,7 +139,7 @@ public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack uncharged = new ItemStack(ModItems.OMNI_TOOL);
|
ItemStack uncharged = new ItemStack(ModItems.OMNI_TOOL);
|
||||||
|
|
|
@ -131,13 +131,12 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo {
|
||||||
return 200;
|
return 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack uncharged = new ItemStack(ModItems.ROCK_CUTTER);
|
ItemStack uncharged = new ItemStack(ModItems.ROCK_CUTTER);
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class ItemSteelChainsaw extends ItemChainsaw {
|
||||||
|
|
||||||
public ItemSteelChainsaw() {
|
public ItemSteelChainsaw() {
|
||||||
super(ToolMaterial.IRON, "techreborn.ironChainsaw", ConfigTechReborn.IronChainsawCharge,
|
super(ToolMaterial.IRON, "techreborn.ironChainsaw", ConfigTechReborn.IronChainsawCharge,
|
||||||
2.0F);
|
2.0F);
|
||||||
this.cost = 50;
|
this.cost = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ public class ItemSteelChainsaw extends ItemChainsaw {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.STEEL_CHAINSAW);
|
ItemStack stack = new ItemStack(ModItems.STEEL_CHAINSAW);
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class ItemSteelDrill extends ItemDrill {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.STEEL_DRILL);
|
ItemStack stack = new ItemStack(ModItems.STEEL_DRILL);
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class ItemSteelJackhammer extends ItemJackhammer {
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(
|
public void getSubItems(
|
||||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||||
if(!isInCreativeTab(par2CreativeTabs)){
|
if (!isInCreativeTab(par2CreativeTabs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack stack = new ItemStack(ModItems.STEEL_JACKHAMMER);
|
ItemStack stack = new ItemStack(ModItems.STEEL_JACKHAMMER);
|
||||||
|
|
|
@ -55,10 +55,10 @@ public class ItemTreeTap extends ItemTR {
|
||||||
Block block = state.getBlock();
|
Block block = state.getBlock();
|
||||||
if (CompatManager.isIC2Loaded && block == Block.getBlockFromName("ic2:rubber_wood")) {
|
if (CompatManager.isIC2Loaded && block == Block.getBlockFromName("ic2:rubber_wood")) {
|
||||||
ItemTreetap.attemptExtract(playerIn, worldIn, pos, side, state, null);
|
ItemTreetap.attemptExtract(playerIn, worldIn, pos, side, state, null);
|
||||||
if (!worldIn.isRemote){
|
if (!worldIn.isRemote) {
|
||||||
playerIn.getHeldItem(hand).damageItem(1, playerIn);
|
playerIn.getHeldItem(hand).damageItem(1, playerIn);
|
||||||
}
|
}
|
||||||
if(playerIn instanceof EntityPlayerMP){
|
if (playerIn instanceof EntityPlayerMP) {
|
||||||
TRRecipeHandler.unlockTRRecipes((EntityPlayerMP) playerIn);
|
TRRecipeHandler.unlockTRRecipes((EntityPlayerMP) playerIn);
|
||||||
}
|
}
|
||||||
return EnumActionResult.SUCCESS;
|
return EnumActionResult.SUCCESS;
|
||||||
|
|
|
@ -22,7 +22,7 @@ public class PacketSetRecipe implements INetworkPacket<PacketSetRecipe> {
|
||||||
|
|
||||||
public PacketSetRecipe(TileAutoCraftingTable tile, IRecipe recipe, boolean custom) {
|
public PacketSetRecipe(TileAutoCraftingTable tile, IRecipe recipe, boolean custom) {
|
||||||
this.pos = tile.getPos();
|
this.pos = tile.getPos();
|
||||||
if(recipe == null){
|
if (recipe == null) {
|
||||||
this.recipe = new ResourceLocation("");
|
this.recipe = new ResourceLocation("");
|
||||||
} else {
|
} else {
|
||||||
this.recipe = recipe.getRegistryName();
|
this.recipe = recipe.getRegistryName();
|
||||||
|
@ -51,8 +51,9 @@ public class PacketSetRecipe implements INetworkPacket<PacketSetRecipe> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void processData(PacketSetRecipe message, MessageContext context) {
|
public void processData(PacketSetRecipe message, MessageContext context) {
|
||||||
TileEntity tileEntity = context.getServerHandler().player.world.getTileEntity(message.pos);;
|
TileEntity tileEntity = context.getServerHandler().player.world.getTileEntity(message.pos);
|
||||||
if(tileEntity instanceof TileAutoCraftingTable){
|
;
|
||||||
|
if (tileEntity instanceof TileAutoCraftingTable) {
|
||||||
((TileAutoCraftingTable) tileEntity).setCurrentRecipe(message.recipe, message.custom);
|
((TileAutoCraftingTable) tileEntity).setCurrentRecipe(message.recipe, message.custom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
|
||||||
IRecipe lastCustomRecipe = null;
|
IRecipe lastCustomRecipe = null;
|
||||||
|
|
||||||
public void setCurrentRecipe(IRecipe recipe, boolean customRecipe) {
|
public void setCurrentRecipe(IRecipe recipe, boolean customRecipe) {
|
||||||
if(recipe != null){
|
if (recipe != null) {
|
||||||
currentRecipe = recipe.getRegistryName();
|
currentRecipe = recipe.getRegistryName();
|
||||||
} else {
|
} else {
|
||||||
currentRecipe = null;
|
currentRecipe = null;
|
||||||
|
@ -61,10 +61,10 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public IRecipe getIRecipe() {
|
public IRecipe getIRecipe() {
|
||||||
if(customRecipe){
|
if (customRecipe) {
|
||||||
InventoryCrafting crafting = getCraftingInventory();
|
InventoryCrafting crafting = getCraftingInventory();
|
||||||
for(IRecipe testRecipe : CraftingManager.REGISTRY){
|
for (IRecipe testRecipe : CraftingManager.REGISTRY) {
|
||||||
if(testRecipe.matches(crafting, world)){
|
if (testRecipe.matches(crafting, world)) {
|
||||||
return testRecipe;
|
return testRecipe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,8 +84,8 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
|
||||||
return cachedRecipe.getRight();
|
return cachedRecipe.getRight();
|
||||||
}
|
}
|
||||||
|
|
||||||
public InventoryCrafting getCraftingInventory(){
|
public InventoryCrafting getCraftingInventory() {
|
||||||
if(inventoryCrafting == null){
|
if (inventoryCrafting == null) {
|
||||||
inventoryCrafting = new InventoryCrafting(new Container() {
|
inventoryCrafting = new InventoryCrafting(new Container() {
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer playerIn) {
|
public boolean canInteractWith(EntityPlayer playerIn) {
|
||||||
|
@ -120,13 +120,13 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(recipe == null){
|
if (recipe == null) {
|
||||||
progress = 0;
|
progress = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canMake(IRecipe recipe) {
|
public boolean canMake(IRecipe recipe) {
|
||||||
if(customRecipe){
|
if (customRecipe) {
|
||||||
recipe = getIRecipe();
|
recipe = getIRecipe();
|
||||||
}
|
}
|
||||||
if (recipe != null && recipe.canFit(3, 3)) {
|
if (recipe != null && recipe.canFit(3, 3)) {
|
||||||
|
@ -179,8 +179,8 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
|
||||||
|
|
||||||
public boolean make(IRecipe recipe) {
|
public boolean make(IRecipe recipe) {
|
||||||
if (canMake(recipe)) {
|
if (canMake(recipe)) {
|
||||||
if(recipe == null && customRecipe){
|
if (recipe == null && customRecipe) {
|
||||||
if(lastCustomRecipe == null){
|
if (lastCustomRecipe == null) {
|
||||||
return false;
|
return false;
|
||||||
}//Should be uptodate as we just set it in canMake
|
}//Should be uptodate as we just set it in canMake
|
||||||
recipe = lastCustomRecipe;
|
recipe = lastCustomRecipe;
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class TileLightningRod extends TilePowerAcceptor implements IWrenchable {
|
||||||
final float lightStrikeChance = (100F - chanceOfStrike) * 20F;
|
final float lightStrikeChance = (100F - chanceOfStrike) * 20F;
|
||||||
final float totalChance = lightStrikeChance * this.getLightningStrikeMultiplier() * (1.1F - weatherStrength);
|
final float totalChance = lightStrikeChance * this.getLightningStrikeMultiplier() * (1.1F - weatherStrength);
|
||||||
if (this.world.rand.nextInt((int) Math.floor(totalChance)) == 0) {
|
if (this.world.rand.nextInt((int) Math.floor(totalChance)) == 0) {
|
||||||
if(world.getBlockState(pos.up()).getBlock() != ModBlocks.REFINED_IRON_FENCE){
|
if (world.getBlockState(pos.up()).getBlock() != ModBlocks.REFINED_IRON_FENCE) {
|
||||||
this.onStatusHoldTicks = 400;
|
this.onStatusHoldTicks = 400;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,14 +77,14 @@ public class TileThermalGenerator extends TileBaseFluidGenerator implements ICon
|
||||||
this.getPos().getY() + direction.getFrontOffsetY(),
|
this.getPos().getY() + direction.getFrontOffsetY(),
|
||||||
this.getPos().getZ() + direction.getFrontOffsetZ()))
|
this.getPos().getZ() + direction.getFrontOffsetZ()))
|
||||||
.getBlock() == Blocks.LAVA) {
|
.getBlock() == Blocks.LAVA) {
|
||||||
if (this.tryAddingEnergy(1)){
|
if (this.tryAddingEnergy(1)) {
|
||||||
this.lastOutput = this.world.getTotalWorldTime();
|
this.lastOutput = this.world.getTotalWorldTime();
|
||||||
didRun = true;
|
didRun = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(didRun != isOn){
|
if (didRun != isOn) {
|
||||||
isOn = didRun;
|
isOn = didRun;
|
||||||
world.setBlockState(pos, world.getBlockState(pos).withProperty(BlockThermalGenerator.ACTIVE, isOn));
|
world.setBlockState(pos, world.getBlockState(pos).withProperty(BlockThermalGenerator.ACTIVE, isOn));
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.world.storage.MapStorage;
|
||||||
import techreborn.lib.ModInfo;
|
import techreborn.lib.ModInfo;
|
||||||
|
|
||||||
public class IDSUManager {
|
public class IDSUManager {
|
||||||
public static IDataIDSU getData(World world){
|
public static IDataIDSU getData(World world) {
|
||||||
MapStorage storage = world.getMapStorage();
|
MapStorage storage = world.getMapStorage();
|
||||||
IDSUSaveManger instance = (IDSUSaveManger) storage.getOrLoadData(IDSUSaveManger.class, ModInfo.MOD_ID + "_IDSU");
|
IDSUSaveManger instance = (IDSUSaveManger) storage.getOrLoadData(IDSUSaveManger.class, ModInfo.MOD_ID + "_IDSU");
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,7 @@ public class IDSUSaveManger extends WorldSavedData implements IDataIDSU {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isDirty()
|
public boolean isDirty() {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,8 @@ public class TileTransformer extends TilePowerAcceptor implements IWrenchable, I
|
||||||
super();
|
super();
|
||||||
this.wrenchDrop = wrenchDrop;
|
this.wrenchDrop = wrenchDrop;
|
||||||
this.inputTier = tier;
|
this.inputTier = tier;
|
||||||
if(tier != EnumPowerTier.MICRO){
|
if (tier != EnumPowerTier.MICRO) {
|
||||||
ouputTier = EnumPowerTier.values()[tier.ordinal() -1];
|
ouputTier = EnumPowerTier.values()[tier.ordinal() - 1];
|
||||||
} else {
|
} else {
|
||||||
ouputTier = EnumPowerTier.MICRO;
|
ouputTier = EnumPowerTier.MICRO;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,13 +55,13 @@ public class OilLakeGenerator implements IWorldGenerator {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) {
|
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) {
|
||||||
if(!enable){
|
if (!enable) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!world.provider.isSurfaceWorld()){
|
if (!world.provider.isSurfaceWorld()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(random.nextInt(rareity) != 0){
|
if (random.nextInt(rareity) != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int y = random.nextInt(maxHeight);
|
int y = random.nextInt(maxHeight);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue