1.1.7
All checks were successful
SorceryCraft/pipeline/head This commit looks good

Improve JavaDoc
Update Mappings
Tweak Spell Texture
This commit is contained in:
TheBrokenRail 2020-03-10 17:32:00 -04:00
parent dca3e4718d
commit 3a173b25d1
7 changed files with 25 additions and 10 deletions

View File

@ -1,5 +1,10 @@
### Changelog ### Changelog
**1.1.7**
* Improve JavaDoc
* Update Mappings
* Tweak Spell Texture
**1.1.6** **1.1.6**
* Add Spell-related Statistics * Add Spell-related Statistics

View File

@ -6,11 +6,11 @@ org.gradle.jvmargs = -Xmx1G
minecraft_version = 20w10a minecraft_version = 20w10a
curseforge_id = 365308 curseforge_id = 365308
simple_minecraft_version = 1.16-Snapshot simple_minecraft_version = 1.16-Snapshot
yarn_mappings = 20w10a+build.16 yarn_mappings = 20w10a+build.20
loader_version = 0.7.8+build.187 loader_version = 0.7.8+build.187
# Mod Properties # Mod Properties
mod_version = 1.1.6 mod_version = 1.1.7
maven_group = com.thebrokenrail maven_group = com.thebrokenrail
archives_base_name = sorcerycraft archives_base_name = sorcerycraft

View File

@ -6,7 +6,6 @@ import net.fabricmc.fabric.api.container.ContainerProviderRegistry;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Material; import net.minecraft.block.Material;
import net.minecraft.client.gui.screen.ingame.CraftingTableScreen;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.screen.BlockContext; import net.minecraft.screen.BlockContext;
import net.minecraft.screen.NameableScreenHandlerFactory; import net.minecraft.screen.NameableScreenHandlerFactory;

View File

@ -31,13 +31,13 @@ public class SpellItem extends Item {
@Override @Override
public TypedActionResult<ItemStack> use(World world, PlayerEntity playerEntity, Hand hand) { public TypedActionResult<ItemStack> use(World world, PlayerEntity playerEntity, Hand hand) {
playerEntity.incrementStat(SorceryCraft.STAT_CAST_SPELL);
ItemStack itemStack = playerEntity.getStackInHand(hand); ItemStack itemStack = playerEntity.getStackInHand(hand);
SorceryCraft.playSpellSound(playerEntity); SorceryCraft.playSpellSound(playerEntity);
if (!world.isClient()) { if (!world.isClient()) {
playerEntity.incrementStat(SorceryCraft.STAT_CAST_SPELL);
SpellEntity entity = new SpellEntity(world, playerEntity); SpellEntity entity = new SpellEntity(world, playerEntity);
entity.setItem(itemStack); entity.setItem(itemStack);
entity.setProperties(playerEntity, playerEntity.pitch, playerEntity.yaw, 0.0f, 1.5f, 1.0f); entity.setProperties(playerEntity, playerEntity.pitch, playerEntity.yaw, 0.0f, 1.5f, 1.0f);

View File

@ -16,14 +16,16 @@ public abstract class Spell {
} }
/** /**
* @return The ID of this Spell * Get the ID of this Spell
* @return The Spell ID
*/ */
public Identifier getID() { public Identifier getID() {
return id; return id;
} }
/** /**
* @return The level of this Spell * Get the level of this Spell
* @return The Spell Level
*/ */
public int getLevel() { public int getLevel() {
return level; return level;
@ -52,17 +54,20 @@ public abstract class Spell {
} }
/** /**
* @return The amount of levels required to make this Spell in a Casting Table * Get the amount of levels required to make this Spell in a Casting Table
* @return The XP cost
*/ */
public abstract int getXPCost(); public abstract int getXPCost();
/** /**
* @return The item(s) required to make ExampleSpell in a Casting Table, or ItemStack.EMPTY if an item is not required * Get the item(s) required to make ExampleSpell in a Casting Table, or ItemStack.EMPTY if an item is not required
* @return The item cost
*/ */
public abstract ItemStack getItemCost(); public abstract ItemStack getItemCost();
/** /**
* @return The maximum level of this Spell * Get the maximum level of this Spell
* @return The Max Level
*/ */
public abstract int getMaxLevel(); public abstract int getMaxLevel();
} }

View File

@ -53,6 +53,12 @@ public class SpellRegistry {
return out.toArray(new Spell[0]); return out.toArray(new Spell[0]);
} }
/**
* Register a Spell
* @param id The Spell ID
* @param spell The Spell Class
* @return The Spell ID
*/
public static Identifier register(Identifier id, Class<?> spell) { public static Identifier register(Identifier id, Class<?> spell) {
spells.put(id, spell); spells.put(id, spell);
return id; return id;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB