mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-26 15:03:01 +00:00
Begin skill creation
This commit is contained in:
1 parent
8a3dac472d
commit
5f73c2152e
33 files changed
+1324
-791
No files matched your search
@@ -0,0 +1,57 @@
|
||||
package mods.tinker.tconstruct.skill;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/* Base skill
|
||||
*
|
||||
*/
|
||||
|
||||
public abstract class Skill
|
||||
{
|
||||
boolean active = true;
|
||||
public abstract String getTextureFile(int guiscale);
|
||||
public abstract String getSkillName();
|
||||
public abstract void activate(Entity entity, World world);
|
||||
public void rightClickActivate(Entity entity, World world) {};
|
||||
|
||||
public int chargeTime() //Ticks
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean canEntityUseSkill(Entity entity)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getSkillCost()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean getActive()
|
||||
{
|
||||
return active;
|
||||
}
|
||||
|
||||
public Skill copy() throws InstantiationException, IllegalAccessException
|
||||
{
|
||||
return this.getClass().newInstance();
|
||||
}
|
||||
|
||||
/* Save/Load */
|
||||
public void saveToNBT (NBTTagCompound tag)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void readFromNBT (NBTTagCompound tag)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user