Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9de1f3fc5b | ||
|
|
7052b44fcb | ||
|
|
e9bbecd0a3 | ||
|
|
a95f5578fb | ||
|
|
ccff65a05e | ||
|
|
be88258061 | ||
|
|
1b0bb897c0 | ||
|
|
3cea141d10 | ||
|
|
12bcded391 | ||
|
|
048c5281c8 | ||
|
|
b0a819aa60 | ||
|
|
9aa4375cb6 | ||
|
|
6a06ab7a59 | ||
|
|
4a561bbeac | ||
|
|
85abe19112 | ||
|
|
3511e8f5b0 | ||
|
|
e574e84c6c | ||
|
|
a4d401b1e1 | ||
|
|
393d9ff1b8 | ||
|
|
ff6ed4e3e1 | ||
|
|
9c782f2a4f | ||
|
|
1bf3ebc365 |
21
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
.gradle
|
||||
/build/
|
||||
/run/
|
||||
/out/
|
||||
*.DS_STORE
|
||||
*.iml
|
||||
*.ipr
|
||||
*.launch
|
||||
*.iws
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
||||
# Cache of project
|
||||
.gradletasknamecache
|
||||
|
||||
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
|
||||
# gradle/wrapper/gradle-wrapper.properties
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
1.0.2:
|
||||
-Fixed: Auto-Repair interrupting block break / item use
|
||||
1.0.1:
|
||||
-Fixed: Auto-Repair Working on Multiple Tools Simultaneously
|
||||
1.0:
|
||||
Initial Release:
|
||||
-Added: Auto-Repair Modifier
|
||||
-Added: Ability to increase modifiers like older Tinkers' Versions
|
||||
-Added: Moss Ball and Bonus Tool Modifiers for all 3 tiers
|
||||
-Added: Config options to disable any or all modifiers
|
||||
20
build.gradle
|
|
@ -7,23 +7,23 @@ buildscript {
|
|||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url "http://dvs1.progwml6.com/files/maven"
|
||||
url = "http://dvs1.progwml6.com/files/maven"
|
||||
}
|
||||
}
|
||||
|
||||
version = "1.0.2"
|
||||
version = mod_version
|
||||
group= "com.oitsjustjose.tinkers_addons"
|
||||
archivesBaseName = "Tinkers' Addons-1.9"
|
||||
archivesBaseName = "Tinkers' Addons-${minecraft_version}"
|
||||
|
||||
minecraft {
|
||||
version = "1.9-12.16.1.1923"
|
||||
version = "${minecraft_version}-${forge_version}"
|
||||
|
||||
if (file('../run').exists()){
|
||||
runDir = "../run"
|
||||
|
|
@ -32,15 +32,15 @@ minecraft {
|
|||
}
|
||||
useDepAts = true
|
||||
replaceIn "lib/Lib.java"
|
||||
replace "@VERSION@", project.version
|
||||
replace "@VERSION@", mod_version
|
||||
|
||||
mappings = "snapshot_20160312"
|
||||
mappings = "snapshot_20160518"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
deobfCompile "mezz.jei:jei_1.9:3.3.3.200"
|
||||
deobfCompile "slimeknights.mantle:Mantle:1.9-0.10.1.jenkins140"
|
||||
deobfCompile "slimeknights:TConstruct:1.9-2.3.1.jenkins226"
|
||||
deobfCompile "mezz.jei:jei_${minecraft_version}:${jei_version}"
|
||||
deobfCompile "slimeknights.mantle:Mantle:1.10-${mantle_version}"
|
||||
deobfCompile "slimeknights:TConstruct:1.10-${ticon_version}"
|
||||
}
|
||||
|
||||
task deobfJar(type: Jar) {
|
||||
|
|
|
|||
39
changelog.md
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
1.0.6:
|
||||
* Fixed: Recipes being NBT insensitive.
|
||||
|
||||
1.0.5:
|
||||
* Added: Modifier Item Tooltips
|
||||
* Changed: New Textures!!
|
||||
* Changed: New Recipes (No, I'm not adding a config option, CraftTweaker is an option!)
|
||||
* Changed: Item Names. Functionality is identical.
|
||||
|
||||
1.0.4:
|
||||
* Changed: Recipe for Amelioration Kit again
|
||||
* Added: Tier IV Bonus Modifier
|
||||
|
||||
1.0.3:
|
||||
* 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: "Officially" supporting 1.10.x+, but also works on 1.9.4 :)
|
||||
* Removed: Moss Ball in place for the Amelioration Kit.
|
||||
* NOTE: Working on a JEI plugin. Until then, to craft the Amelioration Kit with default recipe, do such:
|
||||
|
||||
[M] [M] [M]
|
||||
[M] [E] [M]
|
||||
[M] [M] [M]
|
||||
|
||||
Where [M] is Moss Stone, and E is an enchanted book or item with Mending on it
|
||||
|
||||
|
||||
1.0.2:
|
||||
* Fixed: Auto-Repair interrupting block break / item use
|
||||
|
||||
1.0.1:
|
||||
* Fixed: Auto-Repair Working on Multiple Tools Simultaneously
|
||||
|
||||
1.0:
|
||||
Initial Release:
|
||||
* Added: Auto-Repair Modifier
|
||||
* Added: Ability to increase modifiers like older Tinkers' Versions
|
||||
* Added: Moss Ball and Bonus Tool Modifiers for all 3 tiers
|
||||
* Added: Config options to disable any or all modifiers
|
||||
7
gradle.properties
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
mod_version=1.0.6
|
||||
minecraft_version=1.10.2
|
||||
forge_version=12.18.2.2125
|
||||
|
||||
jei_version=3.14.7.416
|
||||
mantle_version=0.10.3.jenkins158
|
||||
ticon_version=2.3.3a.jenkins289
|
||||
|
|
@ -7,6 +7,7 @@ import com.oitsjustjose.tinkers_addons.lib.LibModifiers;
|
|||
import com.oitsjustjose.tinkers_addons.modifiers.ModAutoRepair;
|
||||
import com.oitsjustjose.tinkers_addons.util.ClientProxy;
|
||||
import com.oitsjustjose.tinkers_addons.util.CommonProxy;
|
||||
import com.oitsjustjose.tinkers_addons.util.Recipes;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
|
@ -17,7 +18,7 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
|||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
|
||||
@Mod(modid = Lib.MODID, name = Lib.NAME, version = Lib.VERSION, guiFactory = Lib.GUI_FACTORY, acceptedMinecraftVersions = "1.9", dependencies = "required-after:tconstruct@[1.9-2.3.1,);" + "required-after:mantle@[1.9-0.10.1,)")
|
||||
@Mod(modid = Lib.MODID, name = Lib.NAME, version = Lib.VERSION, guiFactory = Lib.GUI_FACTORY, dependencies = "required-after:tconstruct@[1.10-2.3.3,);" + "required-after:mantle@[1.10-0.10.3,)", acceptedMinecraftVersions = "1.9.4")
|
||||
public class TinkersAddons
|
||||
{
|
||||
@Instance(Lib.MODID)
|
||||
|
|
@ -28,6 +29,7 @@ public class TinkersAddons
|
|||
public static Config modConfig;
|
||||
public static LibItems modItems;
|
||||
public static LibModifiers modModifiers;
|
||||
public Recipes recipes;
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
|
|
@ -53,5 +55,6 @@ public class TinkersAddons
|
|||
{
|
||||
if (event.getSide().isClient())
|
||||
ClientProxy.init();
|
||||
recipes = new Recipes();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
package com.oitsjustjose.tinkers_addons.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.oitsjustjose.tinkers_addons.lib.Lib;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import slimeknights.tconstruct.library.TinkerRegistry;
|
||||
|
||||
public class ItemModMaterial extends Item
|
||||
{
|
||||
String[] materials = new String[] { "MOSS_BALL", "EXTRA_MODIFIER_LVL1", "EXTRA_MODIFIER_LVL2", "EXTRA_MODIFIER_LVL3" };
|
||||
|
||||
public ItemModMaterial()
|
||||
{
|
||||
this.setHasSubtypes(true);
|
||||
this.setCreativeTab(TinkerRegistry.tabGeneral);
|
||||
GameRegistry.register(this, new ResourceLocation(Lib.MODID.toLowerCase(), "modifier_item"));
|
||||
registerRecipes();
|
||||
Lib.MOD_ITEMS.add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEffect(ItemStack itemstack)
|
||||
{
|
||||
return itemstack.getItemDamage() >= 2 ? true : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack)
|
||||
{
|
||||
return "item." + Lib.MODID + "." + materials[itemStack.getItemDamage()];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list)
|
||||
{
|
||||
for (int i = 0; i < materials.length; i++)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
void registerRecipes()
|
||||
{
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(this, 1, 0), Blocks.mossy_cobblestone, Blocks.mossy_cobblestone, Blocks.mossy_cobblestone, Blocks.mossy_cobblestone, Blocks.mossy_cobblestone, Blocks.mossy_cobblestone, Blocks.mossy_cobblestone, Blocks.mossy_cobblestone, Blocks.mossy_cobblestone));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(this, 1, 1), "gemDiamond", "blockGold"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(this, 1, 2), "blockDiamond", new ItemStack(Items.golden_apple, 1, 1)));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(this, 1, 3), Items.nether_star, new ItemStack(Items.skull, 1, Short.MAX_VALUE)));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.oitsjustjose.tinkers_addons.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.oitsjustjose.tinkers_addons.lib.Lib;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import slimeknights.tconstruct.library.TinkerRegistry;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class ItemModifier extends Item
|
||||
{
|
||||
private final String[] TYPES = new String[] { "AMELIORATION_TOME", "IRON_TOOLKIT", "GOLD_TOOLKIT", "DIAMOND_TOOLKIT", "ENDER_TOOLKIT" };
|
||||
|
||||
public ItemModifier()
|
||||
{
|
||||
this.setHasSubtypes(true);
|
||||
this.setCreativeTab(TinkerRegistry.tabGeneral);
|
||||
GameRegistry.register(this, new ResourceLocation(Lib.MODID.toLowerCase(), "modifier_item"));
|
||||
Lib.MOD_ITEMS.add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEffect(ItemStack itemstack)
|
||||
{
|
||||
return itemstack.getItemDamage() == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack)
|
||||
{
|
||||
return "item." + Lib.MODID + "." + TYPES[itemStack.getItemDamage()];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list)
|
||||
{
|
||||
for (int i = 0; i < TYPES.length; i++)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced)
|
||||
{
|
||||
switch (stack.getItemDamage())
|
||||
{
|
||||
case 0:
|
||||
tooltip.add(I18n.translateToLocal("item.TinkersAddons.AMELIORATION_TOME.description"));
|
||||
return;
|
||||
case 1:
|
||||
tooltip.add(I18n.translateToLocal("item.TinkersAddons.IRON_TOOLKIT.description"));
|
||||
return;
|
||||
case 2:
|
||||
tooltip.add(I18n.translateToLocal("item.TinkersAddons.GOLD_TOOLKIT.description"));
|
||||
return;
|
||||
case 3:
|
||||
tooltip.add(I18n.translateToLocal("item.TinkersAddons.DIAMOND_TOOLKIT.description"));
|
||||
return;
|
||||
case 4:
|
||||
tooltip.add(I18n.translateToLocal("item.TinkersAddons.ENDER_TOOLKIT.description"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -11,10 +11,11 @@ public class Config
|
|||
{
|
||||
public Configuration config;
|
||||
|
||||
public boolean enableAutoRepair;
|
||||
public boolean enableAmelioration;
|
||||
public boolean enableExtraModifierLvl1;
|
||||
public boolean enableExtraModifierLvl2;
|
||||
public boolean enableExtraModifierLvl3;
|
||||
public boolean enableExtraModifierLvl4;
|
||||
|
||||
public Config(File file)
|
||||
{
|
||||
|
|
@ -26,9 +27,9 @@ public class Config
|
|||
{
|
||||
Property property;
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "Enable Auto-Repair", true).setRequiresMcRestart(true);
|
||||
property.setComment("Allows you to enable or disable the auto-repair trait");
|
||||
enableAutoRepair = property.getBoolean();
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "Enable Amelioration Kit mod for tools", true).setRequiresMcRestart(true);
|
||||
property.setComment("Amelioration Kits are the method of getting Pre-TiCon 2 auto-repair");
|
||||
enableAmelioration = property.getBoolean();
|
||||
|
||||
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");
|
||||
|
|
@ -42,6 +43,10 @@ public class Config
|
|||
property.setComment("Re-adds the nether star recipe to increase modifiers on a tool if enabled");
|
||||
enableExtraModifierLvl3 = property.getBoolean();
|
||||
|
||||
property = config.get(Configuration.CATEGORY_GENERAL, "Enable 4th bonus modifier mod for tools", true).setRequiresMcRestart(true);
|
||||
property.setComment("Adds a new Dragon Egg based Bonus Modifier if enabled");
|
||||
enableExtraModifierLvl4 = property.getBoolean();
|
||||
|
||||
if (config.hasChanged())
|
||||
config.save();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.oitsjustjose.tinkers_addons.lib;
|
||||
|
||||
import com.oitsjustjose.tinkers_addons.items.ItemModMaterial;
|
||||
import com.oitsjustjose.tinkers_addons.items.ItemModifier;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
|
|
@ -10,6 +10,6 @@ public class LibItems
|
|||
|
||||
public LibItems()
|
||||
{
|
||||
materials = new ItemModMaterial();
|
||||
materials = new ItemModifier();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,10 +12,11 @@ public class LibModifiers
|
|||
public Modifier extra_modifier_lvl1;
|
||||
public Modifier extra_modifier_lvl2;
|
||||
public Modifier extra_modifier_lvl3;
|
||||
public Modifier extra_modifier_lvl4;
|
||||
|
||||
public LibModifiers()
|
||||
{
|
||||
if (TinkersAddons.modConfig.enableAutoRepair)
|
||||
if (TinkersAddons.modConfig.enableAmelioration)
|
||||
{
|
||||
auto_repair = new ModAutoRepair();
|
||||
}
|
||||
|
|
@ -31,5 +32,9 @@ public class LibModifiers
|
|||
{
|
||||
extra_modifier_lvl3 = new ModExtraModifier(3);
|
||||
}
|
||||
if (TinkersAddons.modConfig.enableExtraModifierLvl4)
|
||||
{
|
||||
extra_modifier_lvl4 = new ModExtraModifier(4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -91,7 +91,7 @@ public class ModAutoRepair extends Modifier
|
|||
if (player.dimension == -1)
|
||||
return 10000 + rand;
|
||||
if (world.canSeeSky(player.getPosition()) && !world.isRaining())
|
||||
if (world.getWorldTime() >= 0 && world.getWorldTime() <= 13000)
|
||||
if ((world.getWorldTime() % 24000) >= 0 && (world.getWorldTime() % 24000) <= 13000)
|
||||
return 12500 + rand;
|
||||
|
||||
return 15000 + rand;
|
||||
|
|
|
|||
158
src/main/java/com/oitsjustjose/tinkers_addons/util/Recipes.java
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
package com.oitsjustjose.tinkers_addons.util;
|
||||
|
||||
import com.oitsjustjose.tinkers_addons.TinkersAddons;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.ShapedRecipes;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import slimeknights.tconstruct.shared.TinkerCommons;
|
||||
import slimeknights.tconstruct.tools.TinkerMaterials;
|
||||
import slimeknights.tconstruct.tools.TinkerTools;
|
||||
|
||||
public class Recipes
|
||||
{
|
||||
public Recipes()
|
||||
{
|
||||
registerBonusModRecipes();
|
||||
}
|
||||
|
||||
public void registerBonusModRecipes()
|
||||
{
|
||||
ItemStack plateItem = null;
|
||||
ItemStack centerItem = null;
|
||||
|
||||
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)
|
||||
{
|
||||
plateItem = TinkerTools.largePlate.getItemstackWithMaterial(TinkerMaterials.iron);
|
||||
centerItem = TinkerCommons.blockPigIron;
|
||||
GameRegistry.addRecipe(new NBTShapedRecipe(3, 2, new ItemStack[] { plateItem, centerItem, plateItem, plateItem, plateItem, plateItem }, new ItemStack(TinkersAddons.modItems.materials, 1, 1)));
|
||||
}
|
||||
if (TinkersAddons.modConfig.enableExtraModifierLvl2)
|
||||
{
|
||||
plateItem = TinkerTools.largePlate.getItemstackWithMaterial(TinkerMaterials.ardite);
|
||||
centerItem = new ItemStack(Blocks.GOLD_BLOCK);
|
||||
GameRegistry.addRecipe(new NBTShapedRecipe(3, 2, new ItemStack[] { plateItem, centerItem, plateItem, plateItem, plateItem, plateItem }, new ItemStack(TinkersAddons.modItems.materials, 1, 2)));
|
||||
}
|
||||
if (TinkersAddons.modConfig.enableExtraModifierLvl3)
|
||||
{
|
||||
plateItem = TinkerTools.largePlate.getItemstackWithMaterial(TinkerMaterials.prismarine);
|
||||
centerItem = new ItemStack(Blocks.DIAMOND_BLOCK);
|
||||
GameRegistry.addRecipe(new NBTShapedRecipe(3, 2, new ItemStack[] { plateItem, centerItem, plateItem, plateItem, plateItem, plateItem }, new ItemStack(TinkersAddons.modItems.materials, 1, 3)));
|
||||
}
|
||||
if (TinkersAddons.modConfig.enableExtraModifierLvl4)
|
||||
{
|
||||
plateItem = TinkerTools.largePlate.getItemstackWithMaterial(TinkerMaterials.obsidian);
|
||||
centerItem = new ItemStack(Items.ENDER_PEARL);
|
||||
GameRegistry.addRecipe(new NBTShapedRecipe(3, 2, new ItemStack[] { plateItem, centerItem, plateItem, plateItem, plateItem, plateItem }, new ItemStack(TinkersAddons.modItems.materials, 1, 4)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BloodWorkXGaming : https://github.com/BloodWorkXGaming
|
||||
*
|
||||
* An inner class for adding NBT-Sensitive recipes. All credit to BloodWorkXGaming for finding and fixing this bug for me. ORIGINAL CLASS: https://github.com/AllTheMods/OreExcavationIntegration/blob/master/src/main/java/atm/bloodworkxgaming/oei/Crafting/NBTShapedRecipe.java
|
||||
*
|
||||
*/
|
||||
public class NBTShapedRecipe extends ShapedRecipes
|
||||
{
|
||||
|
||||
public NBTShapedRecipe(int width, int height, ItemStack[] IngredientArray, ItemStack output)
|
||||
{
|
||||
super(width, height, IngredientArray, output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to check if a recipe matches current crafting inventory
|
||||
*/
|
||||
@Override
|
||||
public boolean matches(InventoryCrafting inv, World worldIn)
|
||||
{
|
||||
for (int i = 0; i <= 3 - this.recipeWidth; ++i)
|
||||
{
|
||||
for (int j = 0; j <= 3 - this.recipeHeight; ++j)
|
||||
{
|
||||
if (this.checkMatch(inv, i, j, true))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this.checkMatch(inv, i, j, false))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the region of a crafting inventory is match for the recipe.
|
||||
*/
|
||||
private boolean checkMatch(InventoryCrafting inventoryCrafting, int horizontal, int vertical, boolean p_77573_4_)
|
||||
{
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
for (int j = 0; j < 3; ++j)
|
||||
{
|
||||
int k = i - horizontal;
|
||||
int l = j - vertical;
|
||||
ItemStack itemStackRecipe = null;
|
||||
|
||||
if (k >= 0 && l >= 0 && k < this.recipeWidth && l < this.recipeHeight)
|
||||
{
|
||||
if (p_77573_4_)
|
||||
{
|
||||
itemStackRecipe = this.recipeItems[this.recipeWidth - k - 1 + l * this.recipeWidth];
|
||||
}
|
||||
else
|
||||
{
|
||||
itemStackRecipe = this.recipeItems[k + l * this.recipeWidth];
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack input = inventoryCrafting.getStackInRowAndColumn(i, j);
|
||||
|
||||
if (input != null || itemStackRecipe != null)
|
||||
{
|
||||
if ((input == null) != (itemStackRecipe == null))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (itemStackRecipe.getItem() != input.getItem())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (itemStackRecipe.getMetadata() != 32767 && itemStackRecipe.getMetadata() != input.getMetadata())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (itemStackRecipe.hasTagCompound() && input.hasTagCompound())
|
||||
{
|
||||
if (!itemStackRecipe.getTagCompound().equals(input.getTagCompound()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
19
src/main/resources/assets/tinkersaddons/lang/ZH_CN.lang
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#Items
|
||||
item.TinkersAddons.AMELIORATION_TOME.name=修复之书
|
||||
item.TinkersAddons.AMELIORATION_TOME.description=§2给与自动修复§r
|
||||
item.TinkersAddons.IRON_TOOLKIT.name=铁质工具包
|
||||
item.TinkersAddons.IRON_TOOLKIT.description=§3给予额外强化次数§r
|
||||
item.TinkersAddons.GOLD_TOOLKIT.name=黄金工具包
|
||||
item.TinkersAddons.GOLD_TOOLKIT.description=§3给予额外强化次数§r
|
||||
item.TinkersAddons.DIAMOND_TOOLKIT.name=钻石工具包
|
||||
item.TinkersAddons.DIAMOND_TOOLKIT.description=§3给予额外强化次数§r
|
||||
item.TinkersAddons.ENDER_TOOLKIT.name=末影工具包t
|
||||
item.TinkersAddons.ENDER_TOOLKIT.description=§3给予额外强化次数§r
|
||||
|
||||
#Modifiers
|
||||
modifier.auto-repair.name=自动修复
|
||||
modifier.bonus-modifier_1.name=强化工具包
|
||||
modifier.bonus-modifier_2.name=强化工具包
|
||||
modifier.bonus-modifier_3.name=强化工具包
|
||||
modifier.bonus-modifier_4.name=强化工具包
|
||||
modifier.auto-repair.desc=§o自动修复就像以前的日子 §r\n你没有意识到你错过了这个,是吗?
|
||||
|
|
@ -1,12 +1,19 @@
|
|||
#Items
|
||||
item.TinkersAddons.MOSS_BALL.name=Moss Ball
|
||||
item.TinkersAddons.EXTRA_MODIFIER_LVL1.name=Bonus Tool Modifier
|
||||
item.TinkersAddons.EXTRA_MODIFIER_LVL2.name=Bonus Tool Modifier
|
||||
item.TinkersAddons.EXTRA_MODIFIER_LVL3.name=Bonus Tool Modifier
|
||||
item.TinkersAddons.AMELIORATION_TOME.name=Amelioration Tome
|
||||
item.TinkersAddons.AMELIORATION_TOME.description=§2Auto-Repair Modifier§r
|
||||
item.TinkersAddons.IRON_TOOLKIT.name=Iron Toolkit
|
||||
item.TinkersAddons.IRON_TOOLKIT.description=§3Grants an Extra Modifier§r
|
||||
item.TinkersAddons.GOLD_TOOLKIT.name=Gold Toolkit
|
||||
item.TinkersAddons.GOLD_TOOLKIT.description=§3Grants an Extra Modifier§r
|
||||
item.TinkersAddons.DIAMOND_TOOLKIT.name=Diamond Toolkit
|
||||
item.TinkersAddons.DIAMOND_TOOLKIT.description=§3Grants an Extra Modifier§r
|
||||
item.TinkersAddons.ENDER_TOOLKIT.name=Ender Toolkit
|
||||
item.TinkersAddons.ENDER_TOOLKIT.description=§3Grants an Extra Modifier§r
|
||||
|
||||
#Modifiers
|
||||
modifier.auto-repair.name=Auto-Repair
|
||||
modifier.bonus-modifier_1.name=Diamond Bonus Modifier
|
||||
modifier.bonus-modifier_2.name=Notch Apple Bonus Modifier
|
||||
modifier.bonus-modifier_3.name=Nether Star Bonus Modifier
|
||||
modifier.auto-repair.desc=§oFree Repair Like the Old Days §r\nYou didn't realize you missed this, did you?
|
||||
modifier.auto-repair.name=Amelioration
|
||||
modifier.bonus-modifier_1.name=This Modifier Toolkit
|
||||
modifier.bonus-modifier_2.name=This Modifier Toolkit
|
||||
modifier.bonus-modifier_3.name=This Modifier Toolkit
|
||||
modifier.bonus-modifier_4.name=This Modifier Toolkit
|
||||
modifier.auto-repair.desc=§oAuto-Repair Like the Old Days §r\nYou didn't realize you missed this, did you?
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "tinkersaddons:items/amelioration_tome"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "tinkersaddons:items/diamond_toolkit"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "tinkersaddons:items/ender_toolkit"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "tinkersaddons:items/extra_modifier_lvl1"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "tinkersaddons:items/extra_modifier_lvl2"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "tinkersaddons:items/extra_modifier_lvl3"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "tinkersaddons:items/gold_toolkit"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "tinkersaddons:items/iron_toolkit"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"textures": {
|
||||
"battleaxe": "tinkersaddons:modifiers/battleaxe",
|
||||
"battlesign": "tinkersaddons:modifiers/battlesign",
|
||||
"broadsword": "tinkersaddons:modifiers/broadsword",
|
||||
"rapier": "tinkersaddons:modifiers/rapier",
|
||||
"cleaver": "tinkersaddons:modifiers/cleaver",
|
||||
"excavator": "tinkersaddons:modifiers/excavator",
|
||||
"frypan": "tinkersaddons:modifiers/frypan",
|
||||
"hammer": "tinkersaddons:modifiers/hammer",
|
||||
"hatchet": "tinkersaddons:modifiers/hatchet",
|
||||
"longsword": "tinkersaddons:modifiers/longsword",
|
||||
"lumberaxe": "tinkersaddons:modifiers/lumberaxe",
|
||||
"mattock": "tinkersaddons:modifiers/mattock",
|
||||
"pickaxe": "tinkersaddons:modifiers/pickaxe",
|
||||
"shovel": "tinkersaddons:modifiers/shovel",
|
||||
"shuriken": "tinkersaddons:modifiers/shuriken"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "tinkersaddons:items/moss_ball"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 207 B |
|
Before Width: | Height: | Size: 157 B |
|
Before Width: | Height: | Size: 189 B |
|
Before Width: | Height: | Size: 128 B |
|
Before Width: | Height: | Size: 232 B |
|
Before Width: | Height: | Size: 222 B |
|
Before Width: | Height: | Size: 190 B |
|
Before Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 133 B |
|
Before Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 168 B |
|
Before Width: | Height: | Size: 149 B |
|
Before Width: | Height: | Size: 155 B |
|
Before Width: | Height: | Size: 109 B |
|
Before Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 286 B |