Update Rebound Chances
SorceryCraft/pipeline/head This commit looks good Details

This commit is contained in:
TheBrokenRail 2020-03-01 13:56:28 -05:00
parent 6052e00429
commit cf0f390b25
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ Cast Spells in Minecraft!
This mod supports the Minecraft 1.16 snapshots.
## Spells
Spells are found throughout the world in chests. When you pick up a Spell you will learn it, one you learn a Spell you can apply it to a blank or existing Spell in the Casting Table. You can cast Spells by right-clicking.
Spells are found throughout the world in chests. When you pick up a Spell you will learn it, one you learn a Spell you can apply it to a blank or existing Spell in the Casting Table. You can cast Spells by right-clicking. There is also a 30% chance the spell will rebound and hit you instead, unless the "Steadfast" Spell is applied.
## Casting Table
You can apply Spells to blank or existing Spells in the Casting Table. Doing so will require a certain amount of levels, and sometimes may require an item.

View File

@ -45,7 +45,7 @@ public class SpellEntity extends ThrownItemEntity {
for (Map.Entry<String, Integer> entry : spells.entrySet()) {
Spell spell = SpellRegistry.getSpell(entry.getKey(), entry.getValue());
if (spell != null) {
if (Math.random() > 0.1 || spells.containsKey("steadfast_spell")) {
if (Math.random() > 0.3 || spells.containsKey("steadfast_spell")) {
spell.execute(entity, this, getOwner());
} else if (getOwner() != null) {
getOwner().playSound(SoundEvents.ENCHANT_THORNS_HIT, 1.0f, 1.0f);