Added blast talisman
This commit is contained in:
@@ -7,6 +7,7 @@ import com.willfp.eco.core.config.updating.ConfigUpdater;
|
||||
import com.willfp.talismans.talismans.talismans.AlchemyTalisman;
|
||||
import com.willfp.talismans.talismans.talismans.ArcheryTalisman;
|
||||
import com.willfp.talismans.talismans.talismans.AttackSpeedTalisman;
|
||||
import com.willfp.talismans.talismans.talismans.BlastTalisman;
|
||||
import com.willfp.talismans.talismans.talismans.BossTalisman;
|
||||
import com.willfp.talismans.talismans.talismans.CreeperTalisman;
|
||||
import com.willfp.talismans.talismans.talismans.DayCrystal;
|
||||
@@ -88,6 +89,7 @@ public class Talismans {
|
||||
public static final Talisman STORM_RING = new StormRing();
|
||||
public static final Talisman VIBRANCE_TALISMAN = new VibranceTalisman();
|
||||
public static final Talisman NECROSIS_TALISMAN = new NecrosisTalisman();
|
||||
public static final Talisman BLAST_TALISMAN = new BlastTalisman();
|
||||
|
||||
/**
|
||||
* Get all registered {@link Talisman}s.
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.willfp.talismans.talismans.talismans;
|
||||
|
||||
import com.willfp.talismans.talismans.Talisman;
|
||||
import com.willfp.talismans.talismans.TalismanLevel;
|
||||
import com.willfp.talismans.talismans.Talismans;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class BlastTalisman extends Talisman {
|
||||
public BlastTalisman() {
|
||||
super("blast");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDamage(@NotNull final TalismanLevel level,
|
||||
@NotNull final Player victim,
|
||||
@NotNull final EntityDamageEvent event) {
|
||||
if (event.getCause() != EntityDamageEvent.DamageCause.ENTITY_EXPLOSION && event.getCause() != EntityDamageEvent.DamageCause.BLOCK_EXPLOSION) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.setDamage(event.getDamage() * level.getConfig().getDouble(Talismans.CONFIG_LOCATION + "multiplier"));
|
||||
}
|
||||
}
|
||||
90
eco-core/core-plugin/src/main/resources/talismans/blast.yml
Normal file
90
eco-core/core-plugin/src/main/resources/talismans/blast.yml
Normal file
@@ -0,0 +1,90 @@
|
||||
enabled: true
|
||||
disabled-in-worlds: [ ]
|
||||
|
||||
levels:
|
||||
1:
|
||||
name: "&aBlast Talisman I"
|
||||
description: Take 10% less explosion damage.
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
recipe:
|
||||
- tnt
|
||||
- gunpowder
|
||||
- tnt
|
||||
|
||||
- gunpowder
|
||||
- ender_eye
|
||||
- gunpowder
|
||||
|
||||
- tnt
|
||||
- gunpowder
|
||||
- tnt
|
||||
|
||||
general-config:
|
||||
material: player_head
|
||||
texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGVlYmI4YjAzY2QyN2QzNDM1ZTExNTYxNmI4ZWQzNWRjYjQyN2FmNWIwYjFjYzUyNmQzMjY1YTcyZDQ5M2UifX19
|
||||
custom-model-data: -1
|
||||
|
||||
config:
|
||||
multiplier: 0.9
|
||||
|
||||
2:
|
||||
name: "&eBlast Talisman II"
|
||||
description: Take 25% less explosion damage.
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
- talismans:blast_1
|
||||
- talismans:blast_1
|
||||
- talismans:blast_1
|
||||
|
||||
- talismans:blast_1
|
||||
- heart_of_the_sea
|
||||
- talismans:blast_1
|
||||
|
||||
- talismans:blast_1
|
||||
- talismans:blast_1
|
||||
- talismans:blast_1
|
||||
|
||||
general-config:
|
||||
material: player_head
|
||||
# Texture is base64, https://minecraft-heads.com has a list of skulls. Ignored if material is not player_head
|
||||
texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmFhZTJiNjkxYjlhOTU3N2MzNWU0ZDg4NTQ0M2JlYzk1NzNlN2M3YzNkNDYxOWM4ZjljN2VlOWU1MDIxIn19fQ==
|
||||
custom-model-data: -1
|
||||
|
||||
config:
|
||||
multiplier: 0.75
|
||||
|
||||
3:
|
||||
name: "&cBlast Talisman III"
|
||||
description: Take 40% less explosion damage.
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
- talismans:blast_2
|
||||
- talismans:blast_2
|
||||
- talismans:blast_2
|
||||
|
||||
- talismans:blast_2
|
||||
- nether_star
|
||||
- talismans:blast_2
|
||||
|
||||
- talismans:blast_2
|
||||
- talismans:blast_2
|
||||
- talismans:blast_2
|
||||
|
||||
general-config:
|
||||
material: player_head
|
||||
# Texture is base64, https://minecraft-heads.com has a list of skulls. Ignored if material is not player_head
|
||||
texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDFkNDc5MWYzYjlhNWVhNGJmYWFkY2Q3NzliNTE2NDJkNDkzMGEyMzU5OWI5MzQ3YTMzNzVkM2IyNzIxZCJ9fX0=
|
||||
custom-model-data: -1
|
||||
|
||||
config:
|
||||
multiplier: 0.6
|
||||
Reference in New Issue
Block a user