From 20bef6e26d948698398bd16aeab8c9e6b89110e4 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 22 Aug 2019 20:01:40 -0400 Subject: Format/import cleanup --- .../java/darkknight/jewelrycraft/api/Curse.java | 196 +++++++++------------ 1 file changed, 88 insertions(+), 108 deletions(-) (limited to 'src/main/java/darkknight/jewelrycraft/api/Curse.java') diff --git a/src/main/java/darkknight/jewelrycraft/api/Curse.java b/src/main/java/darkknight/jewelrycraft/api/Curse.java index dd220f1..6bf37ee 100755 --- a/src/main/java/darkknight/jewelrycraft/api/Curse.java +++ b/src/main/java/darkknight/jewelrycraft/api/Curse.java @@ -19,21 +19,21 @@ import net.minecraftforge.event.entity.player.PlayerSleepInBedEvent; import net.minecraftforge.event.world.BlockEvent; public abstract class Curse { - protected int textureID, ticksActive; - protected String name, description, texturePackName; + protected int textureID, ticksActive; + protected String name, description, texturePackName; - protected Random rand = new Random(); + protected Random rand = new Random(); - private static ArrayList curses = new ArrayList<>(); - public static ArrayList availableCurses = new ArrayList<>(); + private static ArrayList curses = new ArrayList<>(); + public static ArrayList availableCurses = new ArrayList<>(); /** * @param name - * The name of the curse + * The name of the curse * @param txtID - * The texture ID of it + * The texture ID of it * @param texturepack - * The texturepack location + * The texturepack location */ protected Curse(String name, int txtID, String texturepack) { this.name = name; @@ -62,7 +62,7 @@ public abstract class Curse { /** * @param desc - * description of the curse + * description of the curse * @return The class */ public Curse setDescription(String desc) { @@ -88,9 +88,9 @@ public abstract class Curse { * This runs every tick * * @param world - * The worldthe player is in + * The worldthe player is in * @param player - * The cursed player + * The cursed player */ public void action(World world, EntityPlayer player) { ticksActive++; @@ -108,14 +108,13 @@ public abstract class Curse { * This runs when the player dies * * @param world - * The world the player is in + * The world the player is in * @param player - * The cursed player + * The cursed player * @param event - * The thing that killed the player + * The thing that killed the player */ - public void playerDeathAction(World world, EntityPlayer player, - LivingDeathEvent event) { + public void playerDeathAction(World world, EntityPlayer player, LivingDeathEvent event) { // Do nothing } @@ -123,30 +122,27 @@ public abstract class Curse { * This runs when the player is healed * * @param world - * The world the player is in + * The world the player is in * @param player - * The cursed player + * The cursed player * @param event - * The event that the player is healing from + * The event that the player is healing from */ - public void playerHealAction(World world, EntityPlayer player, - LivingHealEvent event) { + public void playerHealAction(World world, EntityPlayer player, LivingHealEvent event) { // Do nothing } /** - * This runs when an entity is killed (whether by a player or other - * causes) + * This runs when an entity is killed (whether by a player or other causes) * * @param world - * The world the player is in + * The world the player is in * @param target - * The entity that died + * The entity that died * @param player - * The cursed player + * The cursed player */ - public void entityDeathAction(World world, EntityLivingBase target, - EntityPlayer player) { + public void entityDeathAction(World world, EntityLivingBase target, EntityPlayer player) { // Do nothing } @@ -154,67 +150,63 @@ public abstract class Curse { * This runs when the player respawns * * @param world - * The world the player is in + * The world the player is in * @param player - * The cursed player + * The cursed player */ public void respawnAction(World world, EntityPlayer player) { // Do nothing } /** - * This runs when a player gets attacked by anything but another - * player + * This runs when a player gets attacked by anything but another player * * @param world - * The world the player is in + * The world the player is in * @param player - * The cursed player + * The cursed player * @param event - * The event that attacked the player + * The event that attacked the player * @param attacker - * The entity that attacked the player + * The entity that attacked the player */ - public void attackedAction(World world, EntityPlayer player, - LivingAttackEvent event, Entity attacker) { + public void attackedAction(World world, EntityPlayer player, LivingAttackEvent event, Entity attacker) { // Do nothing } /** - * This runs when an entity is attacked by a player (this includes - * other players) + * This runs when an entity is attacked by a player (this includes other + * players) * * @param event * * @param world - * The world the player is in + * The world the player is in * @param player - * The player that caused the damage + * The player that caused the damage * @param target - * The entity damaged + * The entity damaged */ - public void attackedByPlayerAction(LivingAttackEvent event, - World world, EntityPlayer player, Entity target) { + public void attackedByPlayerAction(LivingAttackEvent event, World world, EntityPlayer player, Entity target) { // Do nothing } /** - * This runs when an entity is attacked by a player (this includes - * other players). This can cancel the damaging event. + * This runs when an entity is attacked by a player (this includes other + * players). This can cancel the damaging event. * * @param event * * @param world - * The world the player is in + * The world the player is in * @param player - * The player that caused the damage + * The player that caused the damage * @param target - * The entity damaged + * The entity damaged * @return Whether or not to cancel the event */ - public boolean attackedByPlayerActionCancelable( - LivingAttackEvent event, World world, - EntityPlayer player, Entity target) { + public boolean attackedByPlayerActionCancelable(LivingAttackEvent event, World world, EntityPlayer player, + Entity target) { return false; } @@ -222,60 +214,54 @@ public abstract class Curse { * This runs when an item is dropped by an entity * * @param player - * The cursed player + * The cursed player * @param target - * The entity that drops the item + * The entity that drops the item * @param drops - * An array list containing the dropped items + * An array list containing the dropped items */ - public void entityDropItems(EntityPlayer player, Entity target, - ArrayList drops) { + public void entityDropItems(EntityPlayer player, Entity target, ArrayList drops) { // Do nothing } /** - * This is for rendering special things on the player in 3rd person - * (meaning you won't see this render); This will also render in - * the inventory. + * This is for rendering special things on the player in 3rd person (meaning you + * won't see this render); This will also render in the inventory. * * @param player - * The cursed player + * The cursed player * @param event - * The event used for this + * The event used for this */ @SideOnly(Side.CLIENT) - public void playerRender(EntityPlayer player, - RenderPlayerEvent.Specials.Post event) { + public void playerRender(EntityPlayer player, RenderPlayerEvent.Specials.Post event) { // Do nothing } /** - * This is for rendering special things on the player in 1st and - * 3rd person, but not in the player inventory. + * This is for rendering special things on the player in 1st and 3rd person, but + * not in the player inventory. * * @param player - * The cursed player + * The cursed player * @param event - * The event used for this + * The event used for this */ @SideOnly(Side.CLIENT) - public void playerHandRender(EntityPlayer player, - RenderHandEvent event) { + public void playerHandRender(EntityPlayer player, RenderHandEvent event) { // Do nothing } /** - * This runs when a block drops an item (such as breaking a block - * and dropping itself, or breaking like a Diamond ore and dropping - * diamonds) + * This runs when a block drops an item (such as breaking a block and dropping + * itself, or breaking like a Diamond ore and dropping diamonds) * * @param player - * The cursed player + * The cursed player * @param event - * The BlockEvent that triggers this + * The BlockEvent that triggers this */ - public void onBlockItemsDrop(EntityPlayer player, - BlockEvent.HarvestDropsEvent event) { + public void onBlockItemsDrop(EntityPlayer player, BlockEvent.HarvestDropsEvent event) { // Do nothing } @@ -283,44 +269,41 @@ public abstract class Curse { * This runs when a block is destroyed * * @param player - * The cursed player + * The cursed player * @param event - * The BlockEvent that runs this + * The BlockEvent that runs this */ - public void onBlockDestroyed(EntityPlayer player, - BlockEvent.BreakEvent event) { + public void onBlockDestroyed(EntityPlayer player, BlockEvent.BreakEvent event) { // Do nothing } /** * This determines if the player can toss an item or not (with Q) * - * @return True if the player can no longer toss items; False if he - * can. (by default false) + * @return True if the player can no longer toss items; False if he can. (by + * default false) */ public boolean itemToss() { return false; } /** - * This controls whether a curse can be activated or not (makes it - * easy to do things like disable certain curses if in hardcore) + * This controls whether a curse can be activated or not (makes it easy to do + * things like disable certain curses if in hardcore) * * @param world - * The world the player is in - * @return True for curses to be used; False otherwise (by default - * true) + * The world the player is in + * @return True for curses to be used; False otherwise (by default true) */ public boolean canCurseBeActivated(World world) { return canCurseBeActivated(); } /** - * This controls whether a curse can be activated or not (makes it - * easy to do things like disable certain curses if in hardcore) + * This controls whether a curse can be activated or not (makes it easy to do + * things like disable certain curses if in hardcore) * - * @return True for curses to be used; False otherwise (by default - * true) + * @return True for curses to be used; False otherwise (by default true) */ public boolean canCurseBeActivated() { return true; @@ -336,26 +319,24 @@ public abstract class Curse { } /** - * This is the weight of the curse when it chooses it. The lower - * the value, the less it gets chosen; the higher the value, the - * higher the chance of it getting picked. + * This is the weight of the curse when it chooses it. The lower the value, the + * less it gets chosen; the higher the value, the higher the chance of it + * getting picked. * * @param world - * The world the player is currently in + * The world the player is currently in * @param player - * The cursed player + * The cursed player * @param random - * A random class + * A random class * @return The weight of the curse (by default 10) */ - public int weight(World world, EntityPlayer player, - Random random) { + public int weight(World world, EntityPlayer player, Random random) { return 10; } /* - * This stat is used to determine the chance of certain actions - * happening + * This stat is used to determine the chance of certain actions happening */ public int luck() { return 0; @@ -365,14 +346,13 @@ public abstract class Curse { * This event is called whenever the player attempts to sleep. * * @param worldObj - * the world + * the world * @param player - * the cursed player + * the cursed player * @param event - * the sleeping event + * the sleeping event */ - public void playerSleepAction(World worldObj, EntityPlayer player, - PlayerSleepInBedEvent event) { + public void playerSleepAction(World worldObj, EntityPlayer player, PlayerSleepInBedEvent event) { } } -- cgit v1.2.3