Changed formatting to have bracing on a new line

This commit is contained in:
WayofTime 2015-12-30 15:34:40 -05:00
parent e5eddd6c45
commit e48eedb874
189 changed files with 6092 additions and 4041 deletions

View file

@ -2,21 +2,27 @@ package WayofTime.bloodmagic.api.event;
import net.minecraftforge.fml.common.eventhandler.Event;
public class AddToNetworkEvent extends Event {
public class AddToNetworkEvent extends Event
{
public String ownerNetwork;
public int addedAmount;
public int maximum;
/**
* This event is called whenever the network is added to. If cancelled, no LP will be drained from the source. If result is set to Result.DENY,
* the LP will still be drained but the soul network will not be added to.
*
* @param ownerNetwork Key used for the soul network
* @param addedAmount Amount added
* @param maximum Ceiling that the network can add to
* This event is called whenever the network is added to. If cancelled, no
* LP will be drained from the source. If result is set to Result.DENY, the
* LP will still be drained but the soul network will not be added to.
*
* @param ownerNetwork
* Key used for the soul network
* @param addedAmount
* Amount added
* @param maximum
* Ceiling that the network can add to
*/
public AddToNetworkEvent(String ownerNetwork, int addedAmount, int maximum) {
public AddToNetworkEvent(String ownerNetwork, int addedAmount, int maximum)
{
this.ownerNetwork = ownerNetwork;
this.addedAmount = addedAmount;
this.maximum = maximum;

View file

@ -5,32 +5,38 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
public class BoundToolEvent extends Event {
public class BoundToolEvent extends Event
{
public EntityPlayer player;
public BoundToolEvent(EntityPlayer player) {
public BoundToolEvent(EntityPlayer player)
{
this.player = player;
}
@Cancelable
public static class Charge extends BoundToolEvent {
public static class Charge extends BoundToolEvent
{
public ItemStack result;
public Charge(EntityPlayer player, ItemStack result) {
public Charge(EntityPlayer player, ItemStack result)
{
super(player);
this.result = result;
}
}
@Cancelable
public static class Release extends BoundToolEvent {
public static class Release extends BoundToolEvent
{
public final ItemStack boundTool;
public int charge;
public Release(EntityPlayer player, ItemStack boundTool, int charge) {
public Release(EntityPlayer player, ItemStack boundTool, int charge)
{
super(player);
this.boundTool = boundTool;
this.charge = charge;

View file

@ -6,13 +6,15 @@ import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
@Cancelable
public class ItemBindEvent extends Event {
public class ItemBindEvent extends Event
{
public final EntityPlayer player;
public String key;
public ItemStack itemStack;
public ItemBindEvent(EntityPlayer player, String key, ItemStack itemStack) {
public ItemBindEvent(EntityPlayer player, String key, ItemStack itemStack)
{
super();
this.player = player;
this.key = key;

View file

@ -12,30 +12,35 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
public class RitualEvent extends Event {
public class RitualEvent extends Event
{
public final IMasterRitualStone mrs;
public final String ownerName;
public final Ritual ritual;
private RitualEvent(IMasterRitualStone mrs, String ownerName, Ritual ritual) {
private RitualEvent(IMasterRitualStone mrs, String ownerName, Ritual ritual)
{
this.mrs = mrs;
this.ownerName = ownerName;
this.ritual = ritual;
}
/**
* This event is called when a ritual is activated. If cancelled, it will not activate.
*
* This event is called when a ritual is activated. If cancelled, it will
* not activate.
*
* {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#activateRitual(ItemStack, EntityPlayer, Ritual)}
*/
@Cancelable
public static class RitualActivatedEvent extends RitualEvent {
public static class RitualActivatedEvent extends RitualEvent
{
public final EntityPlayer player;
public final ItemStack crystalStack;
public int crystalTier;
public RitualActivatedEvent(IMasterRitualStone mrs, String owner, Ritual ritual, EntityPlayer player, ItemStack activationCrystal, int crystalTier) {
public RitualActivatedEvent(IMasterRitualStone mrs, String owner, Ritual ritual, EntityPlayer player, ItemStack activationCrystal, int crystalTier)
{
super(mrs, owner, ritual);
this.player = player;
@ -45,28 +50,34 @@ public class RitualEvent extends Event {
}
/**
* This event is called when a Ritual effect is performed. If cancelled, the effect will not happen.
*
* This event is called when a Ritual effect is performed. If cancelled, the
* effect will not happen.
*
* {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#performRitual(World, BlockPos)}
*/
@Cancelable
public static class RitualRunEvent extends RitualEvent {
public static class RitualRunEvent extends RitualEvent
{
public RitualRunEvent(IMasterRitualStone mrs, String owner, Ritual ritual) {
public RitualRunEvent(IMasterRitualStone mrs, String owner, Ritual ritual)
{
super(mrs, owner, ritual);
}
}
/**
* This event is called when a Ritual is stopped by a {@link Ritual.BreakType}.
*
* This event is called when a Ritual is stopped by a
* {@link Ritual.BreakType}.
*
* {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#stopRitual(Ritual.BreakType)}
* */
public static class RitualStopEvent extends RitualEvent {
public static class RitualStopEvent extends RitualEvent
{
public final Ritual.BreakType method;
public RitualStopEvent(IMasterRitualStone mrs, String owner, Ritual ritual, Ritual.BreakType method) {
public RitualStopEvent(IMasterRitualStone mrs, String owner, Ritual ritual, Ritual.BreakType method)
{
super(mrs, owner, ritual);
this.method = method;
@ -74,13 +85,15 @@ public class RitualEvent extends Event {
}
@Cancelable
public static class ImperfectRitualActivatedEvent extends Event {
public static class ImperfectRitualActivatedEvent extends Event
{
public final IImperfectRitualStone ims;
public final String ownerName;
public final ImperfectRitual imperfectRitual;
public ImperfectRitualActivatedEvent(IImperfectRitualStone ims, String ownerName, ImperfectRitual imperfectRitual) {
public ImperfectRitualActivatedEvent(IImperfectRitualStone ims, String ownerName, ImperfectRitual imperfectRitual)
{
this.ims = ims;
this.ownerName = ownerName;
this.imperfectRitual = imperfectRitual;

View file

@ -5,13 +5,15 @@ import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
@Cancelable
public class SacrificeKnifeUsedEvent extends Event {
public class SacrificeKnifeUsedEvent extends Event
{
public final EntityPlayer player;
public final int healthDrained;
public boolean shouldDrainHealth;
public boolean shouldFillAltar;
public SacrificeKnifeUsedEvent(EntityPlayer player, boolean shouldDrainHealth, boolean shouldFillAltar, int hp) {
public SacrificeKnifeUsedEvent(EntityPlayer player, boolean shouldDrainHealth, boolean shouldFillAltar, int hp)
{
this.player = player;
this.shouldDrainHealth = shouldDrainHealth;
this.shouldFillAltar = shouldFillAltar;

View file

@ -5,34 +5,41 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
public class SoulNetworkEvent extends Event {
public class SoulNetworkEvent extends Event
{
public final String ownerName;
public int syphon;
public SoulNetworkEvent(String ownerName, int syphon) {
public SoulNetworkEvent(String ownerName, int syphon)
{
this.ownerName = ownerName;
this.syphon = syphon;
}
@Cancelable
public static class ItemDrainInContainerEvent extends SoulNetworkEvent {
public static class ItemDrainInContainerEvent extends SoulNetworkEvent
{
public ItemStack stack;
public ItemDrainInContainerEvent(ItemStack stack, String ownerName, int syphon) {
public ItemDrainInContainerEvent(ItemStack stack, String ownerName, int syphon)
{
super(ownerName, syphon);
this.stack = stack;
}
}
@Cancelable
public static class PlayerDrainNetworkEvent extends SoulNetworkEvent {
public static class PlayerDrainNetworkEvent extends SoulNetworkEvent
{
public final EntityPlayer player;
public boolean shouldDamage; //If true, will damage regardless of if the network had enough inside it
public boolean shouldDamage; // If true, will damage regardless of if
// the network had enough inside it
public PlayerDrainNetworkEvent(EntityPlayer player, String ownerNetwork, int drainAmount) {
public PlayerDrainNetworkEvent(EntityPlayer player, String ownerNetwork, int drainAmount)
{
super(ownerNetwork, drainAmount);
this.shouldDamage = false;
this.player = player;
@ -40,20 +47,28 @@ public class SoulNetworkEvent extends Event {
}
@Cancelable
public static class ItemDrainNetworkEvent extends PlayerDrainNetworkEvent {
public static class ItemDrainNetworkEvent extends PlayerDrainNetworkEvent
{
public final ItemStack itemStack;
public float damageAmount; //Amount of damage that would incur if the network could not drain properly
public float damageAmount; // Amount of damage that would incur if the
// network could not drain properly
/**
* Set result to deny the action i.e. damage/drain anyways. Cancelling event prevents action without penalties
*
* @param player Player using the item
* @param ownerNetwork Network that the item is tied to
* @param itemStack Item used
* @param drainAmount Original drain amount - change to alter cost
* Set result to deny the action i.e. damage/drain anyways. Cancelling
* event prevents action without penalties
*
* @param player
* Player using the item
* @param ownerNetwork
* Network that the item is tied to
* @param itemStack
* Item used
* @param drainAmount
* Original drain amount - change to alter cost
*/
public ItemDrainNetworkEvent(EntityPlayer player, String ownerNetwork, ItemStack itemStack, int drainAmount) {
public ItemDrainNetworkEvent(EntityPlayer player, String ownerNetwork, ItemStack itemStack, int drainAmount)
{
super(player, ownerNetwork, drainAmount);
this.itemStack = itemStack;
this.damageAmount = (float) (drainAmount) / 100.0f;