mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Remove new cooldown from signal flare, remove redundant check from fire/rainbowrod
This commit is contained in:
3 files changed
+7
-6
No files matched your search
@@ -43,11 +43,12 @@ public class ItemSignalFlare extends ItemMod implements IColorable {
|
||||
super(LibItemNames.SIGNAL_FLARE);
|
||||
setMaxStackSize(1);
|
||||
setNoRepair();
|
||||
setMaxDamage(200);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, EnumHand hand) {
|
||||
if(!par3EntityPlayer.getCooldownTracker().hasCooldown(this)) {
|
||||
if(par1ItemStack.getItemDamage() == 0) {
|
||||
if(par2World.isRemote)
|
||||
par3EntityPlayer.swingArm(hand);
|
||||
else {
|
||||
@@ -70,7 +71,7 @@ public class ItemSignalFlare extends ItemMod implements IColorable {
|
||||
if(stunned >= 100)
|
||||
par3EntityPlayer.addStat(ModAchievements.signalFlareStun, 1);
|
||||
}
|
||||
par3EntityPlayer.getCooldownTracker().setCooldown(this, 200);
|
||||
par1ItemStack.damageItem(200, par3EntityPlayer);
|
||||
return ActionResult.newResult(EnumActionResult.SUCCESS, par1ItemStack);
|
||||
}
|
||||
|
||||
@@ -79,8 +80,8 @@ public class ItemSignalFlare extends ItemMod implements IColorable {
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
|
||||
if(par1ItemStack.getItemDamage() > 0)
|
||||
par1ItemStack.setItemDamage(0);
|
||||
if(par1ItemStack.isItemDamaged())
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ItemFireRod extends ItemMod implements IManaUsingItem, IAvatarWield
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack par1ItemStack, EntityPlayer player, World par3World, BlockPos pos, EnumHand hand, EnumFacing side, float par8, float par9, float par10) {
|
||||
if(!par3World.isRemote && !player.getCooldownTracker().hasCooldown(this) && ManaItemHandler.requestManaExactForTool(par1ItemStack, player, COST, false)) {
|
||||
if(!par3World.isRemote && ManaItemHandler.requestManaExactForTool(par1ItemStack, player, COST, false)) {
|
||||
EntityFlameRing entity = new EntityFlameRing(player.worldObj);
|
||||
entity.setPosition(pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5);
|
||||
player.worldObj.spawnEntityInWorld(entity);
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ItemRainbowRod extends ItemMod implements IManaUsingItem, IAvatarWi
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, EnumHand hand) {
|
||||
if(!par2World.isRemote && !par3EntityPlayer.getCooldownTracker().hasCooldown(this) && ManaItemHandler.requestManaExactForTool(par1ItemStack, par3EntityPlayer, MANA_COST, false)) {
|
||||
if(!par2World.isRemote && ManaItemHandler.requestManaExactForTool(par1ItemStack, par3EntityPlayer, MANA_COST, false)) {
|
||||
Block place = ModBlocks.bifrost;
|
||||
Vector3 vector = new Vector3(par3EntityPlayer.getLookVec()).normalize();
|
||||
|
||||
|
||||
Reference in new issue
Block a user