Skip to content

Commit

Permalink
Even more scepter buffs
Browse files Browse the repository at this point in the history
  • Loading branch information
IcarussOne committed Sep 30, 2024
1 parent a57a0b0 commit 3f47360
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/java/twilightforest/entity/EntityTFLoyalZombie.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public boolean attackEntityAsMob(Entity entity) {
return success;
}

@Override
/*@Override
public void onLivingUpdate() {
// once our damage boost effect wears out, start to burn
// the effect here is that we die shortly after our 60 second lifespan
Expand All @@ -84,7 +84,7 @@ public void onLivingUpdate() {
}
super.onLivingUpdate();
}
}*/

// [VanillaCopy] EntityWolf.shouldAttackEntity, substituting with our class
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player
if (stack.getItemDamage() == stack.getMaxDamage()) {
return ActionResult.newResult(EnumActionResult.FAIL, player.getHeldItem(hand));
} else {
player.playSound(SoundEvents.ENTITY_ENDEREYE_LAUNCH, 1.0F, (world.rand.nextFloat() - world.rand.nextFloat()) * 0.2F + 1.0F);
player.playSound(SoundEvents.ENTITY_ENDEREYE_DEATH, 1.0F, (world.rand.nextFloat() - world.rand.nextFloat()) * 0.2F + 1.0F);

if (!world.isRemote) {
world.spawnEntity(new EntityTFTwilightWandBolt(world, player));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.init.MobEffects;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
Expand Down Expand Up @@ -36,7 +37,9 @@ public ActionResult<ItemStack> onItemRightClick(@Nonnull World world, EntityPlay
ItemStack stack = player.getHeldItem(hand);

if (stack.getItemDamage() == stack.getMaxDamage()) {
return ActionResult.newResult(EnumActionResult.FAIL, stack);
return ActionResult.newResult(EnumActionResult.FAIL, stack);
} else {
player.playSound(SoundEvents.ENTITY_ZOMBIE_VILLAGER_CONVERTED, 1.0F, (world.rand.nextFloat() - world.rand.nextFloat()) * 0.2F + 1.0F);
}

if (!world.isRemote) {
Expand All @@ -53,6 +56,9 @@ public ActionResult<ItemStack> onItemRightClick(@Nonnull World world, EntityPlay

stack.damageItem(1, player);
}

if (!player.isCreative())
player.getCooldownTracker().setCooldown(this, 100);
}

return ActionResult.newResult(EnumActionResult.SUCCESS, stack);
Expand Down

0 comments on commit 3f47360

Please sign in to comment.