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

@ -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;