Browse Source

1.1.21

Update Mappings
Tweak Teleport and Flame Spells
1.15 1.1.21
TheBrokenRail 2 years ago
parent
commit
3fe89d2d95
  1. 4
      CHANGELOG.md
  2. 2
      README.md
  3. 2
      build.gradle
  4. 6
      gradle.properties
  5. 6
      src/main/java/com/thebrokenrail/sorcerycraft/SorceryCraft.java
  6. 2
      src/main/java/com/thebrokenrail/sorcerycraft/entity/SpellEntity.java
  7. 6
      src/main/java/com/thebrokenrail/sorcerycraft/spell/FlameSpell.java
  8. 8
      src/main/java/com/thebrokenrail/sorcerycraft/spell/TeleportSpell.java

4
CHANGELOG.md

@ -1,5 +1,9 @@
# Changelog
**1.1.21**
* Update Mappings
* Tweak Teleport and Flame Spells
**1.1.20**
* Update to 20w12a

2
README.md

@ -57,7 +57,7 @@ You can apply Spells to blank or existing spells in the Casting Table. Doing so
| Dissolve | 1 | Removes target's status effects. |
| Levitate | 2 | Gives target the Levitation effect. |
| Steadfast | 1 | Prevents the spell from failing. This spell does nothing on its own. |
| Teleport | 2 | Teleports the target to a random location. |
| Teleport | 3 | Teleports the target to a random location. |
| Inward | 1 | Causes the spell to target the caster. If the spell fails instead of rebounding, it will just do nothing. This spell does nothing on its own. |
| Cooling | 1 | Extinguish the target if they are on fire. |
| Lightning | 1 | Strikes the target with lightning. |

2
build.gradle

@ -24,7 +24,7 @@ repositories {
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
mappings "net.fabricmc:yarn:${project.minecraft_version}+build.${project.yarn_build}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.fabric_loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"

6
gradle.properties

@ -6,11 +6,11 @@ org.gradle.jvmargs = -Xmx1G
minecraft_version = 20w12a
curseforge_id = 365308
simple_minecraft_version = 1.16-Snapshot
yarn_mappings = 20w12a+build.3
fabric_loader_version = 0.7.8+build.187
yarn_build = 14
fabric_loader_version = 0.7.8+build.189
# Mod Properties
mod_version = 1.1.20
mod_version = 1.1.21
maven_group = com.thebrokenrail
archives_base_name = sorcerycraft

6
src/main/java/com/thebrokenrail/sorcerycraft/SorceryCraft.java

@ -8,7 +8,6 @@ import com.thebrokenrail.sorcerycraft.entity.SpellEntity;
import com.thebrokenrail.sorcerycraft.item.SpellItem;
import com.thebrokenrail.sorcerycraft.mixin.CriterionRegistryHook;
import com.thebrokenrail.sorcerycraft.packet.SelectSpellC2SPacket;
import com.thebrokenrail.sorcerycraft.packet.UpdateKnownSpellsS2CPacket;
import com.thebrokenrail.sorcerycraft.spell.util.RandomSpellLootTableFunction;
import com.thebrokenrail.sorcerycraft.spell.registry.Spells;
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
@ -20,7 +19,6 @@ import net.fabricmc.fabric.api.entity.FabricEntityTypeBuilder;
import net.fabricmc.fabric.api.loot.v1.FabricLootPoolBuilder;
import net.fabricmc.fabric.api.loot.v1.event.LootTableLoadingCallback;
import net.fabricmc.fabric.api.registry.CommandRegistry;
import net.fabricmc.fabric.impl.networking.ClientSidePacketRegistryImpl;
import net.fabricmc.fabric.impl.networking.ServerSidePacketRegistryImpl;
import net.minecraft.block.DispenserBlock;
import net.minecraft.block.dispenser.ProjectileDispenserBehavior;
@ -28,7 +26,7 @@ import net.minecraft.entity.EntityCategory;
import net.minecraft.entity.EntityDimensions;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.projectile.Projectile;
import net.minecraft.entity.projectile.ProjectileEntity;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
@ -139,7 +137,7 @@ public class SorceryCraft implements ModInitializer {
DispenserBlock.registerBehavior(SorceryCraft.SPELL_ITEM, new ProjectileDispenserBehavior() {
@Override
protected Projectile createProjectile(World position, Position stack, ItemStack itemStack) {
protected ProjectileEntity createProjectile(World position, Position stack, ItemStack itemStack) {
SpellEntity entity = new SpellEntity(position, stack.getX(), stack.getY(), stack.getZ());
entity.setItem(itemStack);
return entity;

2
src/main/java/com/thebrokenrail/sorcerycraft/entity/SpellEntity.java

@ -9,7 +9,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.thrown.ThrownItemEntity;
import net.minecraft.entity.projectile.thrown.ThrownItemEntity;
import net.minecraft.item.Item;
import net.minecraft.network.Packet;
import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket;

6
src/main/java/com/thebrokenrail/sorcerycraft/spell/FlameSpell.java

@ -5,6 +5,7 @@ import net.minecraft.block.AbstractFireBlock;
import net.minecraft.block.BlockState;
import net.minecraft.block.TntBlock;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.FlintAndSteelItem;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
@ -21,7 +22,10 @@ public class FlameSpell extends Spell {
@Override
public void execute(World world, Entity source, Entity attacker, Entity target) {
target.setFireTicks(400 + (getLevel() * 200));
if (attacker instanceof LivingEntity) {
((LivingEntity) attacker).onAttacking(target);
}
target.setOnFireFor(8 + (getLevel() * 4));
}
@Override

8
src/main/java/com/thebrokenrail/sorcerycraft/spell/TeleportSpell.java

@ -57,6 +57,9 @@ public class TeleportSpell extends Spell {
case 1: {
return 18;
}
case 2: {
return 24;
}
}
return -1;
}
@ -70,12 +73,15 @@ public class TeleportSpell extends Spell {
case 1: {
return new ItemStack(Items.CHORUS_FRUIT);
}
case 2: {
return new ItemStack(Items.CHORUS_FLOWER);
}
}
return ItemStack.EMPTY;
}
@Override
public int getMaxLevel() {
return 2;
return 3;
}
}

Loading…
Cancel
Save