mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-30 16:28:00 +01:00
Added a spellbook_immune_to damage typ tag
This commit is contained in:
parent
f7b1fc6d62
commit
8f737e1607
3 changed files with 28 additions and 0 deletions
|
@ -43,6 +43,7 @@ public interface UTags {
|
|||
TagKey<StatusEffect> PINEAPPLE_EFFECTS = effect("pineapple_effects");
|
||||
|
||||
TagKey<DamageType> BREAKS_SUNGLASSES = damage("breaks_sunglasses");
|
||||
TagKey<DamageType> SPELLBOOK_IMMUNE_TO = damage("spellbook_immune_to");
|
||||
|
||||
TagKey<DimensionType> HAS_NO_ATMOSPHERE = dimension("has_no_atmosphere");
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.minelittlepony.unicopia.entity;
|
||||
|
||||
import com.minelittlepony.unicopia.EquinePredicates;
|
||||
import com.minelittlepony.unicopia.UTags;
|
||||
import com.minelittlepony.unicopia.container.SpellbookScreenHandler;
|
||||
import com.minelittlepony.unicopia.container.SpellbookState;
|
||||
import com.minelittlepony.unicopia.entity.player.MeteorlogicalUtil;
|
||||
|
@ -234,6 +235,16 @@ public class SpellbookEntity extends MobEntity {
|
|||
return ActionResult.PASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isImmuneToExplosion() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInvulnerableTo(DamageSource damageSource) {
|
||||
return super.isInvulnerableTo(damageSource) || damageSource.isIn(UTags.SPELLBOOK_IMMUNE_TO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCustomDataFromNbt(NbtCompound compound) {
|
||||
super.readCustomDataFromNbt(compound);
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#minecraft:is_fall",
|
||||
"#minecraft:is_freezing",
|
||||
"#minecraft:is_lightning",
|
||||
"#minecraft:is_projectile",
|
||||
"unicopia:zap",
|
||||
"unicopia:love_draining",
|
||||
"unicopia:life_draining",
|
||||
"unicopia:rainboom",
|
||||
"unicopia:sun",
|
||||
"unicopia:sunlight",
|
||||
"unicopia:smash"
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue