1.9 update is done!

This commit is contained in:
oitsjustjose 2016-05-29 11:12:51 -05:00
commit 7e8a65a994
5 changed files with 36 additions and 30 deletions

View file

@ -1,5 +1,3 @@
// For those who want the bleeding edge
buildscript {
repositories {
jcenter()
@ -22,26 +20,27 @@ repositories {
version = "1.0"
group= "com.oitsjustjose.tinkers_addons"
archivesBaseName = "Tinkers' Addons-1.8.9"
archivesBaseName = "Tinkers' Addons-1.9"
minecraft {
version = "1.8.9-11.15.1.1902-1.8.9"
if (file('../../run').exists()){
runDir = "../../run"
version = "1.9-12.16.1.1923"
if (file('../run').exists()){
runDir = "../run"
} else {
runDir = "run"
}
}
useDepAts = true
replaceIn "lib/Lib.java"
replace "@VERSION@", project.version
mappings = "stable_20"
mappings = "snapshot_20160312"
}
dependencies {
deobfCompile "mezz.jei:jei_1.8.9:2.28.9.176"
deobfCompile "slimeknights.mantle:Mantle:1.8.9-0.9.2.jenkins102"
deobfCompile "slimeknights:TConstruct:1.8.9-2.2.1.jenkins1005"
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"
}
task deobfJar(type: Jar) {
@ -50,16 +49,19 @@ task deobfJar(type: Jar) {
}
artifacts{
archives deobfJar
archives deobfJar
}
processResources{
processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version':project.version, 'mcversion':project.minecraft.version
include 'mcmod.info'
expand 'version':project.version, 'mcversion':project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {

View file

@ -17,7 +17,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.8.9", dependencies = "required-after:tconstruct@[1.8.9-2.2.1,);" + "required-after:mantle@[1.8.9-0.9.0,)")
@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,)")
public class TinkersAddons
{
@Instance(Lib.MODID)

View file

@ -26,20 +26,20 @@ public class Config
{
Property property;
property = config.get(config.CATEGORY_GENERAL, "Enable Auto-Repair", true).setRequiresMcRestart(true);
property.comment = "Allows you to enable or disable the auto-repair trait";
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(config.CATEGORY_GENERAL, "Enable 1st bonus modifier mod for tools", true).setRequiresMcRestart(true);
property.comment = "Re-adds the diamond + gold block recipe to increase modifiers on a tool if enabled";
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");
enableExtraModifierLvl1 = property.getBoolean();
property = config.get(config.CATEGORY_GENERAL, "Enable 2nd bonus modifier mod for tools", true).setRequiresMcRestart(true);
property.comment = "Re-adds the diamond block + gold apple recipe to increase modifiers on a tool if enabled";
property = config.get(Configuration.CATEGORY_GENERAL, "Enable 2nd bonus modifier mod for tools", true).setRequiresMcRestart(true);
property.setComment("Re-adds the diamond block + gold apple recipe to increase modifiers on a tool if enabled");
enableExtraModifierLvl2 = property.getBoolean();
property = config.get(config.CATEGORY_GENERAL, "Enable 3rd bonus modifier mod for tools", true).setRequiresMcRestart(true);
property.comment = "Re-adds the nether star recipe to increase modifiers on a tool if enabled";
property = config.get(Configuration.CATEGORY_GENERAL, "Enable 3rd bonus modifier mod for tools", true).setRequiresMcRestart(true);
property.setComment("Re-adds the nether star recipe to increase modifiers on a tool if enabled");
enableExtraModifierLvl3 = property.getBoolean();
if (config.hasChanged())
@ -49,7 +49,7 @@ public class Config
@SubscribeEvent
public void onConfigurationChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event)
{
if (event.modID.equalsIgnoreCase(Lib.MODID))
if (event.getModID().equalsIgnoreCase(Lib.MODID))
initialize();
}
}

View file

@ -43,16 +43,20 @@ public class ModAutoRepair extends Modifier
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onUpdate(PlayerEvent event)
{
if (event.entityPlayer == null)
if (event.getEntityPlayer() == null)
return;
EntityPlayer player = event.entityPlayer;
EntityPlayer player = event.getEntityPlayer();
ArrayList<ItemStack> tinkersTools = new ArrayList<ItemStack>();
int autoRepairLevel = 0;
for (ItemStack iterStack : player.inventory.mainInventory)
if (iterStack != null && iterStack.getItem() instanceof ToolCore)
tinkersTools.add(iterStack);
// Works to include items held in the second hand
if (player.getHeldItemOffhand() != null && player.getHeldItemOffhand().getItem() instanceof ToolCore)
tinkersTools.add(player.getHeldItemOffhand());
for (ItemStack iterStack : tinkersTools)
{
NBTTagCompound tag = TagUtil.getToolTag(iterStack.getTagCompound());
@ -73,7 +77,7 @@ public class ModAutoRepair extends Modifier
// Calculates that the last repair time stored minus the current time is less than or equal to 30 seconds divided by auto-repair level
if ((System.currentTimeMillis() - lastRepairTime) >= (getRepairCooldown(player)) && autoRepairLevel > 0)
{
ToolHelper.healTool(iterStack, autoRepairLevel, event.entityPlayer);
ToolHelper.healTool(iterStack, autoRepairLevel, player);
tag.setLong(Lib.TAG_AUTO_REPAIR_COOLDOWN, System.currentTimeMillis());
}
}

View file

@ -22,8 +22,8 @@ import com.oitsjustjose.tinkers_addons.lib.Lib;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelBakery;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.model.ModelBakery;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;