Skip to content

Commit

Permalink
Fixed Tefnut's Call not being immune to fire
Browse files Browse the repository at this point in the history
Fixed Tefnut's Call not being repairable
  • Loading branch information
GirafiStudios committed Mar 6, 2020
1 parent 0777462 commit c632e6c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class EntityTefnutsCall extends CustomArrow {

public EntityTefnutsCall(World world) {
super(world);
this.isImmuneToFire = true;
}

public EntityTefnutsCall(World world, EntityLivingBase shooter) {
Expand All @@ -40,6 +41,11 @@ protected ItemStack getArrowStack() {
return stack;
}

@Override
public boolean isImmuneToExplosions() {
return true;
}

@Override
protected void onHit(RayTraceResult raytraceResult) {
Entity entity = raytraceResult.entityHit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.EnumAction;
import net.minecraft.item.EnumRarity;
Expand Down Expand Up @@ -108,6 +109,11 @@ public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player
return new ActionResult<>(EnumActionResult.PASS, player.getHeldItem(hand));
}

@Override
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) {
return repair.getItem() == Items.DIAMOND;
}

@Override
@SideOnly(Side.CLIENT)
public void addInformation(@Nonnull ItemStack stack, World world, List<String> tooltip, ITooltipFlag tooltipType) {
Expand Down

0 comments on commit c632e6c

Please sign in to comment.