mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
Implemented pounce
enchantment
This commit is contained in:
1 parent
b7e8f0a464
commit
0b01e12e59
3 files changed
+15
No files matched your search
@@ -107,4 +107,5 @@ public final class LibResources {
|
||||
|
||||
public static final String ENCHANT_SHATTER="";
|
||||
public static final String ENCHANT_SHOCKWAVE="";
|
||||
public static final String ENCHANT_POUNCE="";
|
||||
}
|
||||
@@ -59,6 +59,19 @@ public class ModEnchantmentHandler {
|
||||
if(heldItem.stackTagCompound == null){
|
||||
heldItem.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
if(attacker instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) attacker;
|
||||
|
||||
ItemStack legs = player.getCurrentArmor(1);
|
||||
int pounce = EnchantmentHelper.getEnchantmentLevel(LibEnchantIDs.pounce, legs);
|
||||
if(pounce > 0){
|
||||
if(player.worldObj.getBlockId((int)Math.floor(player.posX), (int)Math.floor(player.posY)-1, (int)Math.floor(player.posZ)) == 0){
|
||||
|
||||
event.ammount*=1+(.4*pounce);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int finalStrike = EnchantmentHelper.getEnchantmentLevel(LibEnchantIDs.finalStrike, heldItem);
|
||||
if(finalStrike > 0){
|
||||
|
||||
@@ -89,6 +89,7 @@ public final class EnchantmentManager {
|
||||
|
||||
registerExponentialCostData(ModEnchantments.shatter, LibResources.ENCHANT_SHATTER, false, new AspectList().add(Aspect.EARTH, 16).add(Aspect.ENTROPY, 16), LibResearch.KEY_ENCHANT_VAMPIRISM);
|
||||
registerExponentialCostData(ModEnchantments.shockwave, LibResources.ENCHANT_SHOCKWAVE, false, new AspectList().add(Aspect.EARTH, 16).add(Aspect.AIR, 16), LibResearch.KEY_ENCHANT_VAMPIRISM);
|
||||
registerExponentialCostData(ModEnchantments.pounce, LibResources.ENCHANT_POUNCE, false, new AspectList().add(Aspect.EARTH, 16).add(Aspect.AIR, 16), LibResearch.KEY_ENCHANT_VAMPIRISM);
|
||||
|
||||
|
||||
registerCompatibilityRules();
|
||||
|
||||
Reference in new issue
Block a user