Skip to content

Commit

Permalink
Add small cooldown to whip ability
Browse files Browse the repository at this point in the history
  • Loading branch information
IcarussOne committed May 8, 2024
1 parent ea4cffd commit 38733c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/java/drzhark/mocreatures/item/MoCItemWhip.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos p
if (side != EnumFacing.DOWN && (block1 == Blocks.AIR) && (block != Blocks.AIR) && (block != Blocks.STANDING_SIGN)) {
whipFX(worldIn, pos);
worldIn.playSound(player, pos, MoCSoundEvents.ENTITY_GENERIC_WHIP, SoundCategory.PLAYERS, 0.5F, 0.4F / ((itemRand.nextFloat() * 0.4F) + 0.8F));
player.getCooldownTracker().setCooldown(this, 20);
stack.damageItem(2, player);
List<Entity> list = worldIn.getEntitiesWithinAABBExcludingEntity(player, player.getEntityBoundingBox().grow(12D));
for (Entity entity : list) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"ore": "feather"
},
{
"item": "minecraft:writable_book"
"item": "minecraft:book"
}
],
"result": {
Expand Down

0 comments on commit 38733c0

Please sign in to comment.