Improve JavaDoc Update Mappings Tweak Spell Texture
This commit is contained in:
parent
dca3e4718d
commit
3a173b25d1
@ -1,5 +1,10 @@
|
||||
### Changelog
|
||||
|
||||
**1.1.7**
|
||||
* Improve JavaDoc
|
||||
* Update Mappings
|
||||
* Tweak Spell Texture
|
||||
|
||||
**1.1.6**
|
||||
* Add Spell-related Statistics
|
||||
|
||||
|
@ -6,11 +6,11 @@ org.gradle.jvmargs = -Xmx1G
|
||||
minecraft_version = 20w10a
|
||||
curseforge_id = 365308
|
||||
simple_minecraft_version = 1.16-Snapshot
|
||||
yarn_mappings = 20w10a+build.16
|
||||
yarn_mappings = 20w10a+build.20
|
||||
loader_version = 0.7.8+build.187
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.1.6
|
||||
mod_version = 1.1.7
|
||||
maven_group = com.thebrokenrail
|
||||
archives_base_name = sorcerycraft
|
||||
|
||||
|
@ -6,7 +6,6 @@ import net.fabricmc.fabric.api.container.ContainerProviderRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.client.gui.screen.ingame.CraftingTableScreen;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.screen.BlockContext;
|
||||
import net.minecraft.screen.NameableScreenHandlerFactory;
|
||||
|
@ -31,13 +31,13 @@ public class SpellItem extends Item {
|
||||
|
||||
@Override
|
||||
public TypedActionResult<ItemStack> use(World world, PlayerEntity playerEntity, Hand hand) {
|
||||
playerEntity.incrementStat(SorceryCraft.STAT_CAST_SPELL);
|
||||
|
||||
ItemStack itemStack = playerEntity.getStackInHand(hand);
|
||||
|
||||
SorceryCraft.playSpellSound(playerEntity);
|
||||
|
||||
if (!world.isClient()) {
|
||||
playerEntity.incrementStat(SorceryCraft.STAT_CAST_SPELL);
|
||||
|
||||
SpellEntity entity = new SpellEntity(world, playerEntity);
|
||||
entity.setItem(itemStack);
|
||||
entity.setProperties(playerEntity, playerEntity.pitch, playerEntity.yaw, 0.0f, 1.5f, 1.0f);
|
||||
|
@ -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() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The level of this Spell
|
||||
* Get the level of this Spell
|
||||
* @return The Spell Level
|
||||
*/
|
||||
public int getLevel() {
|
||||
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();
|
||||
|
||||
/**
|
||||
* @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();
|
||||
|
||||
/**
|
||||
* @return The maximum level of this Spell
|
||||
* Get the maximum level of this Spell
|
||||
* @return The Max Level
|
||||
*/
|
||||
public abstract int getMaxLevel();
|
||||
}
|
||||
|
@ -53,6 +53,12 @@ public class SpellRegistry {
|
||||
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) {
|
||||
spells.put(id, spell);
|
||||
return id;
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Reference in New Issue
Block a user