Play Failure Sound when Inward Spell Fails
This commit is contained in:
parent
8448acca6a
commit
eabca94f00
@ -1,5 +1,8 @@
|
||||
### Changelog
|
||||
|
||||
**1.0.7**
|
||||
* Play Failure Sound when Inward Spell Fails
|
||||
|
||||
**1.0.6**
|
||||
* Namespace PlayerEntity Mixin
|
||||
|
||||
|
@ -8,7 +8,7 @@ org.gradle.jvmargs = -Xmx1G
|
||||
loader_version = 0.7.8+build.184
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0.6
|
||||
mod_version = 1.0.7
|
||||
maven_group = com.thebrokenrail
|
||||
archives_base_name = sorcerycraft
|
||||
|
||||
|
@ -95,8 +95,13 @@ public class SpellEntity extends ThrownItemEntity {
|
||||
boolean success = didSpellSucceed(spells);
|
||||
for (Map.Entry<Identifier, Integer> entry : spells.entrySet()) {
|
||||
Spell spell = SpellRegistry.getSpell(entry.getKey(), entry.getValue());
|
||||
if (spell != null && success) {
|
||||
spell.execute(getOwner(), this, getOwner());
|
||||
if (spell != null) {
|
||||
if (success) {
|
||||
spell.execute(getOwner(), this, getOwner());
|
||||
} else if (getOwner() instanceof PlayerEntity) {
|
||||
PlayerEntity player = (PlayerEntity) getOwner();
|
||||
player.playSound(SoundEvents.ENCHANT_THORNS_HIT, SoundCategory.PLAYERS, 1.0f, 1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user