From 24cc1e773d7abcec9c83f77da71ddb78d3374f2c Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Sun, 26 Oct 2014 20:08:10 +0100 Subject: [PATCH] Projectiles now slowly regrow with moss :D --- src/main/java/tconstruct/tools/TActiveOmniMod.java | 11 ++++++++++- weaponry.txt | 12 +++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/main/java/tconstruct/tools/TActiveOmniMod.java b/src/main/java/tconstruct/tools/TActiveOmniMod.java index 7cbcb30db1c..3d298301b78 100644 --- a/src/main/java/tconstruct/tools/TActiveOmniMod.java +++ b/src/main/java/tconstruct/tools/TActiveOmniMod.java @@ -15,6 +15,7 @@ import net.minecraftforge.common.ForgeHooks; import tconstruct.library.ActiveToolMod; import tconstruct.library.tools.*; +import tconstruct.library.weaponry.IAmmo; import tconstruct.util.config.PHConstruct; import tconstruct.world.TinkerWorld; import tconstruct.world.entity.BlueSlime; @@ -34,7 +35,15 @@ public void updateTool (ToolCore tool, ItemStack stack, World world, Entity enti { int chance = tags.getInteger("Moss"); int check = world.canBlockSeeTheSky((int) entity.posX, (int) entity.posY, (int) entity.posZ) ? 350 : 1150; - if (random.nextInt(check) < chance) + // REGROWING AMMO :OOoo + if(tool instanceof IAmmo && random.nextInt(check*10) < chance) // ammo regenerates at a much slower rate + { + IAmmo ammothing = (IAmmo)tool; + if(ammothing.getAmmoCount(stack) > 0) // must have ammo + ammothing.addAmmo(1, stack); + } + // selfrepairing tool. LAAAAAME + else if (random.nextInt(check) < chance) { AbilityHelper.healTool(stack, 1, (EntityLivingBase) entity, true); } diff --git a/weaponry.txt b/weaponry.txt index 2576d3ac60c..d3a14d5de1c 100644 --- a/weaponry.txt +++ b/weaponry.txt @@ -1,14 +1,16 @@ TODO: -* Effect graphics for arrows, throwing knifes, javelins,... +* Effect graphics for arrows, throwing knifes, javelins,... MOSTLY DONE * Separate book explaining the system, text only, sorry folks -* Turn dagger into a proper projectile -* Reinforced gives a chance that projectiles aren't broken on entity-hit! +* Turn dagger into a proper projectile DONE +* Reinforced gives a chance that projectiles aren't broken on entity-hit! DONE * Toolstation GUI for weaponry stuff * Partbuilder stuff for weaponry stuff? * Bring bowmaterial stats etc in line? * Can't have flux or redstone or moss on ammo tools -* Knockback on projectiles knocks towards their moving direction -* Glassmakers Arrows :D +* Knockback on projectiles knocks towards their moving direction DONEish +* Glassmakers Arrows :D DONE +* Check why arrow repairing doesn't work +* REGROWING PROJECTILES HAR maybe give javelins slight armor piercing? or do they have that already?