Haven't updated in unreasonably long
This commit is contained in:
parent
6a06ab7a59
commit
9aa4375cb6
7 changed files with 20 additions and 114 deletions
|
|
@ -18,7 +18,7 @@ repositories {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
version = "1.0.3"
|
version = "1.0.4"
|
||||||
group= "com.oitsjustjose.tinkers_addons"
|
group= "com.oitsjustjose.tinkers_addons"
|
||||||
archivesBaseName = "Tinkers' Addons-1.10.x"
|
archivesBaseName = "Tinkers' Addons-1.10.x"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
1.0.4:
|
||||||
|
* Changed: Recipe for Amelioration Kit again
|
||||||
|
* Added: Tier IV Bonus Modifier
|
||||||
|
|
||||||
1.0.3:
|
1.0.3:
|
||||||
* Changed: Auto-Repair is now Amelioration (a synonym for "improving"). The mechanics work the same, but recipe has changed
|
* Changed: Auto-Repair is now Amelioration (a synonym for "improving"). The mechanics work the same, but recipe has changed
|
||||||
* Changed: Textures for all items + proper 1.9.x+ model support
|
* Changed: Textures for all items + proper 1.9.x+ model support
|
||||||
|
|
@ -11,10 +15,13 @@
|
||||||
|
|
||||||
Where [M] is Moss Stone, and E is an enchanted book or item with Mending on it
|
Where [M] is Moss Stone, and E is an enchanted book or item with Mending on it
|
||||||
|
|
||||||
|
|
||||||
1.0.2:
|
1.0.2:
|
||||||
* Fixed: Auto-Repair interrupting block break / item use
|
* Fixed: Auto-Repair interrupting block break / item use
|
||||||
|
|
||||||
1.0.1:
|
1.0.1:
|
||||||
* Fixed: Auto-Repair Working on Multiple Tools Simultaneously
|
* Fixed: Auto-Repair Working on Multiple Tools Simultaneously
|
||||||
|
|
||||||
1.0:
|
1.0:
|
||||||
Initial Release:
|
Initial Release:
|
||||||
* Added: Auto-Repair Modifier
|
* Added: Auto-Repair Modifier
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ package com.oitsjustjose.tinkers_addons.items;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.oitsjustjose.tinkers_addons.TinkersAddons;
|
|
||||||
import com.oitsjustjose.tinkers_addons.lib.Lib;
|
import com.oitsjustjose.tinkers_addons.lib.Lib;
|
||||||
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
|
@ -29,7 +28,7 @@ public class ItemModMaterial extends Item
|
||||||
@Override
|
@Override
|
||||||
public boolean hasEffect(ItemStack itemstack)
|
public boolean hasEffect(ItemStack itemstack)
|
||||||
{
|
{
|
||||||
return (itemstack.getItemDamage() == 0 && TinkersAddons.modConfig.autoRepairRecipeType == 2) ? true : itemstack.getItemDamage() == 4 ? false : itemstack.getItemDamage() >= 2 ? true : false;
|
return itemstack.getItemDamage() == 0 ? true : itemstack.getItemDamage() == 4 ? false : itemstack.getItemDamage() >= 2 ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ public class Config
|
||||||
{
|
{
|
||||||
public Configuration config;
|
public Configuration config;
|
||||||
|
|
||||||
public int autoRepairRecipeType;
|
public boolean enableAmelioration;
|
||||||
public boolean enableExtraModifierLvl1;
|
public boolean enableExtraModifierLvl1;
|
||||||
public boolean enableExtraModifierLvl2;
|
public boolean enableExtraModifierLvl2;
|
||||||
public boolean enableExtraModifierLvl3;
|
public boolean enableExtraModifierLvl3;
|
||||||
|
|
@ -27,9 +27,9 @@ public class Config
|
||||||
{
|
{
|
||||||
Property property;
|
Property property;
|
||||||
|
|
||||||
property = config.get(Configuration.CATEGORY_GENERAL, "Auto-Repair Recipe Type", 2).setRequiresMcRestart(true);
|
property = config.get(Configuration.CATEGORY_GENERAL, "Enable Amelioration Kit mod for tools", true).setRequiresMcRestart(true);
|
||||||
property.setComment("Allows you to modify the auto-repair recipe. 0 disables the feature, 1 enables the easier recipe, 2 enables a harder one.");
|
property.setComment("Amelioration Kits are the method of getting Pre-TiCon 2 auto-repair");
|
||||||
autoRepairRecipeType = property.getInt();
|
enableAmelioration = property.getBoolean();
|
||||||
|
|
||||||
property = config.get(Configuration.CATEGORY_GENERAL, "Enable 1st bonus modifier mod for tools", true).setRequiresMcRestart(true);
|
property = config.get(Configuration.CATEGORY_GENERAL, "Enable 1st bonus modifier mod for tools", true).setRequiresMcRestart(true);
|
||||||
property.setComment("Re-adds the diamond + gold block recipe to increase modifiers on a tool if enabled");
|
property.setComment("Re-adds the diamond + gold block recipe to increase modifiers on a tool if enabled");
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,9 @@ public class LibModifiers
|
||||||
public Modifier extra_modifier_lvl3;
|
public Modifier extra_modifier_lvl3;
|
||||||
public Modifier extra_modifier_lvl4;
|
public Modifier extra_modifier_lvl4;
|
||||||
|
|
||||||
|
|
||||||
public LibModifiers()
|
public LibModifiers()
|
||||||
{
|
{
|
||||||
if (TinkersAddons.modConfig.autoRepairRecipeType > 0)
|
if (TinkersAddons.modConfig.enableAmelioration)
|
||||||
{
|
{
|
||||||
auto_repair = new ModAutoRepair();
|
auto_repair = new ModAutoRepair();
|
||||||
}
|
}
|
||||||
|
|
@ -33,7 +32,7 @@ public class LibModifiers
|
||||||
{
|
{
|
||||||
extra_modifier_lvl3 = new ModExtraModifier(3);
|
extra_modifier_lvl3 = new ModExtraModifier(3);
|
||||||
}
|
}
|
||||||
if(TinkersAddons.modConfig.enableExtraModifierLvl4)
|
if (TinkersAddons.modConfig.enableExtraModifierLvl4)
|
||||||
{
|
{
|
||||||
extra_modifier_lvl4 = new ModExtraModifier(4);
|
extra_modifier_lvl4 = new ModExtraModifier(4);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
||||||
package com.oitsjustjose.tinkers_addons.util;
|
|
||||||
|
|
||||||
import com.oitsjustjose.tinkers_addons.TinkersAddons;
|
|
||||||
|
|
||||||
import net.minecraft.enchantment.Enchantment;
|
|
||||||
import net.minecraft.enchantment.EnchantmentHelper;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.inventory.InventoryCrafting;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemEnchantedBook;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.item.crafting.RecipesMapCloning;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class ModRecipeAmelioration extends RecipesMapCloning
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public boolean matches(InventoryCrafting invCraft, World world)
|
|
||||||
{
|
|
||||||
boolean mending = false;
|
|
||||||
int numMoss = 0;
|
|
||||||
|
|
||||||
for (int x = 0; x < 3; x++)
|
|
||||||
{
|
|
||||||
for (int y = 0; y < 3; y++)
|
|
||||||
{
|
|
||||||
ItemStack temp = invCraft.getStackInRowAndColumn(x, y);
|
|
||||||
if (temp == null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Checks for center item slot
|
|
||||||
if (x == 1 && y == 1)
|
|
||||||
{
|
|
||||||
if (temp.getItem() instanceof ItemEnchantedBook)
|
|
||||||
{
|
|
||||||
if (temp.getTagCompound() != null)
|
|
||||||
{
|
|
||||||
NBTTagCompound comp = temp.getTagCompound();
|
|
||||||
mending = comp.getTag("StoredEnchantments").toString().contains("id:70s");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Checks if the center item slot has mending on it
|
|
||||||
if (EnchantmentHelper.getEnchantmentLevel(Enchantment.getEnchantmentByID(70), temp) > 0)
|
|
||||||
mending = true;
|
|
||||||
}
|
|
||||||
// Else not the center slot it drops out if the block isn't mossy cobble
|
|
||||||
else if ((temp.getItem() == Item.getItemFromBlock(Blocks.MOSSY_COBBLESTONE)))
|
|
||||||
{
|
|
||||||
++numMoss;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return mending && numMoss == 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
// DONE
|
|
||||||
@Override
|
|
||||||
public ItemStack getCraftingResult(InventoryCrafting invCraft)
|
|
||||||
{
|
|
||||||
return new ItemStack(TinkersAddons.modItems.materials, 1, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// DONE
|
|
||||||
@Override
|
|
||||||
public int getRecipeSize()
|
|
||||||
{
|
|
||||||
return 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
// DONE
|
|
||||||
@Override
|
|
||||||
public ItemStack getRecipeOutput()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack[] getRemainingItems(InventoryCrafting invCraft)
|
|
||||||
{
|
|
||||||
return new ItemStack[] { null, null, null, null, null, null, null, null, null };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +1,28 @@
|
||||||
package com.oitsjustjose.tinkers_addons.util;
|
package com.oitsjustjose.tinkers_addons.util;
|
||||||
|
|
||||||
import com.oitsjustjose.tinkers_addons.TinkersAddons;
|
import com.oitsjustjose.tinkers_addons.TinkersAddons;
|
||||||
import com.oitsjustjose.tinkers_addons.lib.Lib;
|
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.CraftingManager;
|
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
import net.minecraftforge.oredict.RecipeSorter;
|
|
||||||
import net.minecraftforge.oredict.RecipeSorter.Category;
|
|
||||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||||
|
import slimeknights.tconstruct.shared.TinkerCommons;
|
||||||
|
|
||||||
public class ModRecipes
|
public class ModRecipes
|
||||||
{
|
{
|
||||||
public ModRecipes()
|
public ModRecipes()
|
||||||
{
|
{
|
||||||
registerAutoRepairRecipe();
|
|
||||||
registerBonusModRecipes();
|
registerBonusModRecipes();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerAutoRepairRecipe()
|
|
||||||
{
|
|
||||||
if (TinkersAddons.modConfig.autoRepairRecipeType == 1)
|
|
||||||
{
|
|
||||||
GameRegistry.addRecipe(new ItemStack(TinkersAddons.modItems.materials, 1, 0), new Object[] { "MMM", "MEM", "MMM", 'M', Blocks.MOSSY_COBBLESTONE, 'E', Items.BOOK });
|
|
||||||
}
|
|
||||||
else if (TinkersAddons.modConfig.autoRepairRecipeType == 2)
|
|
||||||
{
|
|
||||||
CraftingManager.getInstance().getRecipeList().add(new ModRecipeAmelioration());
|
|
||||||
RecipeSorter.register(Lib.MODID + ":Amelioration", ModRecipeAmelioration.class, Category.SHAPED, "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void registerBonusModRecipes()
|
public void registerBonusModRecipes()
|
||||||
{
|
{
|
||||||
|
if (TinkersAddons.modConfig.enableAmelioration)
|
||||||
|
{
|
||||||
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TinkersAddons.modItems.materials, 1, 0), new Object[] { new ItemStack(TinkerCommons.materials, 1, 19), new ItemStack(TinkerCommons.materials, 1, 19), new ItemStack(TinkerCommons.materials, 1, 19), Items.BOOK }));
|
||||||
|
}
|
||||||
if (TinkersAddons.modConfig.enableExtraModifierLvl1)
|
if (TinkersAddons.modConfig.enableExtraModifierLvl1)
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TinkersAddons.modItems.materials, 1, 1), "gemDiamond", "blockGold"));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TinkersAddons.modItems.materials, 1, 1), "gemDiamond", "blockGold"));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue