Normalized code formatting.

This commit is contained in:
WayofTime 2016-03-16 18:41:06 -04:00
parent b1db7c5152
commit 134b11f177
122 changed files with 944 additions and 697 deletions

View file

@ -10,7 +10,7 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.GameData;
@Getter
@EqualsAndHashCode(exclude = {"state"})
@EqualsAndHashCode(exclude = { "state" })
public class BlockStack
{
private final Block block;

View file

@ -17,13 +17,13 @@ import WayofTime.bloodmagic.api.util.helper.LogHelper;
/**
* The primary API class. Includes helper methods and blacklists.
*
*
* Some API methods can be used via IMC instead. The supported methods are:
*
*
* <ul>
* <li>{@link #addToTeleposerBlacklist(BlockStack)}</li>
* <li>{@link #blacklistFromGreenGrove(Block)}</li>
* <li>{@link #setEntitySacrificeValue(Class, int)}</li>
* <li>{@link #addToTeleposerBlacklist(BlockStack)}</li>
* <li>{@link #blacklistFromGreenGrove(Block)}</li>
* <li>{@link #setEntitySacrificeValue(Class, int)}</li>
* </ul>
*/
public class BloodMagicAPI
@ -51,8 +51,8 @@ public class BloodMagicAPI
/**
* Used to obtain Items from BloodMagic. Use
* {@link WayofTime.bloodmagic.api.Constants.BloodMagicItem} to get
* the registered name.
* {@link WayofTime.bloodmagic.api.Constants.BloodMagicItem} to get the
* registered name.
*
* @param name
* - The registered name of the item. Usually the same as the class
@ -66,20 +66,22 @@ public class BloodMagicAPI
/**
* @see #getItem(String)
*
*
* @param bloodMagicItem
* - The {@link WayofTime.bloodmagic.api.Constants.BloodMagicItem} to get.
* - The {@link WayofTime.bloodmagic.api.Constants.BloodMagicItem} to
* get.
* @return - The requested Item
*/
public static Item getItem(Constants.BloodMagicItem bloodMagicItem) {
public static Item getItem(Constants.BloodMagicItem bloodMagicItem)
{
return getItem(bloodMagicItem.getRegName());
}
/**
* Used to obtain Blocks from BloodMagic. Use
* {@link WayofTime.bloodmagic.api.Constants.BloodMagicBlock} to get
* the registered name.
*
* {@link WayofTime.bloodmagic.api.Constants.BloodMagicBlock} to get the
* registered name.
*
* @param name
* - The registered name of the block. Usually the same as the class
* name.
@ -92,21 +94,25 @@ public class BloodMagicAPI
/**
* @see #getBlock(String)
*
*
* @param bloodMagicBlock
* - The {@link WayofTime.bloodmagic.api.Constants.BloodMagicBlock} to get.
* - The {@link WayofTime.bloodmagic.api.Constants.BloodMagicBlock}
* to get.
* @return - The requested Block
*/
public static Block getBlock(Constants.BloodMagicBlock bloodMagicBlock) {
public static Block getBlock(Constants.BloodMagicBlock bloodMagicBlock)
{
return getBlock(bloodMagicBlock.getRegName());
}
/**
* Used to add a {@link BlockStack} to the Teleposer blacklist that cannot
* be changed via Configuration files.
*
* IMC: {@code FMLInterModComs.sendMessage("BloodMagic", "teleposerBlacklist", ItemStack)}
* Example: {@code FMLInterModComs.sendMessage("BloodMagic", "teleposerBlacklist", new ItemStack(Blocks.bedrock))}
*
* IMC:
* {@code FMLInterModComs.sendMessage("BloodMagic", "teleposerBlacklist", ItemStack)}
* Example:
* {@code FMLInterModComs.sendMessage("BloodMagic", "teleposerBlacklist", new ItemStack(Blocks.bedrock))}
*
* @param blockStack
* - The BlockStack to blacklist.
@ -142,16 +148,18 @@ public class BloodMagicAPI
}
/**
* Used to set the sacrifice value of an Entity. The value provided is how much
* LP will be gained when the entity is sacrificed at a Blood Altar.
*
* Used to set the sacrifice value of an Entity. The value provided is how
* much LP will be gained when the entity is sacrificed at a Blood Altar.
*
* Setting a sacrificeValue of 0 will effectively blacklist the entity.
*
*
* The default value for any unset Entity is 500 LP per sacrifice.
*
* IMC: {@code FMLInterModComs.sendMessage("BloodMagic", "sacrificeValue", "ClassName;Value")}
* Example: {@code FMLInterModComs.sendMessage("BloodMagic", "sacrificeValue", "EntityVillager;2000")}
*
*
* IMC:
* {@code FMLInterModComs.sendMessage("BloodMagic", "sacrificeValue", "ClassName;Value")}
* Example:
* {@code FMLInterModComs.sendMessage("BloodMagic", "sacrificeValue", "EntityVillager;2000")}
*
* @param entityClass
* - The class of the entity to blacklist.
* @param sacrificeValue
@ -165,7 +173,7 @@ public class BloodMagicAPI
/**
* @see #setEntitySacrificeValue(Class, int)
*
*
* @param entityClassName
* - The name of the class of the entity to blacklist.
* @param sacrificeValue
@ -179,13 +187,17 @@ public class BloodMagicAPI
/**
* Blacklists a block from the Green Grove Ritual and Sigil.
*
* IMC: {@code FMLInterModComs.sendMessage("BloodMagic", "greenGroveBlacklist", "domain:name")}
* Example: {@code FMLInterModComs.sendMessage("BloodMagic", "greenGroveBlacklist", "minecraft:wheat")}
*
* @param block - Block to blacklist
*
* IMC:
* {@code FMLInterModComs.sendMessage("BloodMagic", "greenGroveBlacklist", "domain:name")}
* Example:
* {@code FMLInterModComs.sendMessage("BloodMagic", "greenGroveBlacklist", "minecraft:wheat")}
*
* @param block
* - Block to blacklist
*/
public static void blacklistFromGreenGrove(Block block) {
public static void blacklistFromGreenGrove(Block block)
{
if (!greenGroveBlacklist.contains(block))
greenGroveBlacklist.add(block);
}

View file

@ -7,7 +7,7 @@ import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry;
/**
* Fired whenever a craft is completed in a BloodAltar.
*
*
* It is not cancelable, however you can modify the output stack.
*/
@Getter
@ -19,9 +19,9 @@ public class AltarCraftedEvent extends Event
/**
* @param altarRecipe
* - The recipe that was crafted.
* - The recipe that was crafted.
* @param output
* - The item obtained from the recipe
* - The item obtained from the recipe
*/
public AltarCraftedEvent(AltarRecipeRegistry.AltarRecipe altarRecipe, ItemStack output)
{

View file

@ -9,26 +9,26 @@ import net.minecraft.item.ItemStack;
public interface IBindable
{
/**
* Gets the username of the Item's owner. Usually for display,
* such as in the tooltip.
*
* Gets the username of the Item's owner. Usually for display, such as in
* the tooltip.
*
* If the item is not bound, this will be null.
*
*
* @param stack
* - The owned ItemStack
*
*
* @return - The username of the Item's owner
*/
String getOwnerName(ItemStack stack);
/**
* Gets the UUID of the Item's owner.
*
*
* If the item is not bound, this will be null.
*
*
* @param stack
* - The owned ItemStack
*
*
* @return - The UUID of the Item's owner
*/
String getOwnerUUID(ItemStack stack);

View file

@ -10,20 +10,20 @@ import WayofTime.bloodmagic.api.BlockStack;
public interface IHarvestHandler
{
/**
* Called whenever the Harvest Ritual attempts to harvest a block.
* <br>
* Use this to break the block, plant a new one, and drop the produced items.
* <br>
* Make sure to do checks so you are certain the blocks being handled
* are the block types you want.
*
* Called whenever the Harvest Ritual attempts to harvest a block. <br>
* Use this to break the block, plant a new one, and drop the produced
* items. <br>
* Make sure to do checks so you are certain the blocks being handled are
* the block types you want.
*
* @param world
* - The world the {@link WayofTime.bloodmagic.api.ritual.IMasterRitualStone} is in.
* - The world the
* {@link WayofTime.bloodmagic.api.ritual.IMasterRitualStone} is in.
* @param pos
* - The position of the Block being checked
* - The position of the Block being checked
* @param blockStack
* - The Block being checked
*
* - The Block being checked
*
* @return If the block was successfully harvested.
*/
boolean harvestAndPlant(World world, BlockPos pos, BlockStack blockStack);

View file

@ -1,8 +1,8 @@
package WayofTime.bloodmagic.api.iface;
/**
* Held items that implement this will cause the beams between
* routing nodes to render.
* Held items that implement this will cause the beams between routing nodes to
* render.
*/
public interface INodeRenderer
{

View file

@ -28,9 +28,9 @@ public interface ILivingArmour
* well as the LivingArmour
*
* @param world
* - The World
* - The World
* @param player
* - The player wearing the Armour
* - The player wearing the Armour
*/
void onTick(World world, EntityPlayer player);
@ -43,7 +43,7 @@ public interface ILivingArmour
* that are dirty.
*
* @param tag
* - The NBT tag to write to
* - The NBT tag to write to
*/
void writeDirtyToNBT(NBTTagCompound tag);

View file

@ -181,13 +181,15 @@ public class SoulNetwork extends WorldSavedData
}
}
public SoulNetwork setCurrentEssence(int currentEssence) {
public SoulNetwork setCurrentEssence(int currentEssence)
{
this.currentEssence = currentEssence;
markDirty();
return this;
}
public SoulNetwork setOrbTier(int orbTier) {
public SoulNetwork setOrbTier(int orbTier)
{
this.orbTier = orbTier;
markDirty();
return this;

View file

@ -2,3 +2,4 @@
package WayofTime.bloodmagic.api;
import net.minecraftforge.fml.common.API;

View file

@ -162,11 +162,12 @@ public class AlchemyArrayRecipeRegistry
* inputStack.
*
* @param comparedStack
* - The stack to compare with
*
* - The stack to compare with
*
* @return - True if the ItemStack is a compatible item
*/
public boolean doesInputMatchRecipe(ItemStack comparedStack) {
public boolean doesInputMatchRecipe(ItemStack comparedStack)
{
return !(comparedStack == null || this.inputStack == null) && this.inputStack.isItemEqual(comparedStack);
}
@ -175,7 +176,7 @@ public class AlchemyArrayRecipeRegistry
*
* @param comparedStack
* The catalyst that is being checked
*
*
* @return - The effect
*/
public AlchemyArrayEffect getAlchemyArrayEffectForCatalyst(@Nullable ItemStack comparedStack)
@ -198,7 +199,8 @@ public class AlchemyArrayRecipeRegistry
}
}
public static BiMap<ItemStackWrapper, AlchemyArrayRecipe> getRecipes() {
public static BiMap<ItemStackWrapper, AlchemyArrayRecipe> getRecipes()
{
return HashBiMap.create(recipes);
}
}

View file

@ -93,7 +93,8 @@ public class AltarRecipeRegistry
}
}
public static BiMap<ItemStack, AltarRecipe> getRecipes() {
public static BiMap<ItemStack, AltarRecipe> getRecipes()
{
return HashBiMap.create(recipes);
}
}

View file

@ -22,9 +22,9 @@ public class HarvestRegistry
/**
* Registers a handler for the Harvest Ritual to call.
*
*
* @param handler
* - The custom handler to register
* - The custom handler to register
*/
public static void registerHandler(IHarvestHandler handler)
{
@ -33,15 +33,16 @@ public class HarvestRegistry
}
/**
* Registers a standard crop (IE: Wheat, Carrots, Potatoes, Netherwart, etc) for
* the {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerPlantable} handler
* to handle.
*
* Registers a standard crop (IE: Wheat, Carrots, Potatoes, Netherwart, etc)
* for the
* {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerPlantable}
* handler to handle.
*
* @param crop
* - The crop block to handle.
* - The crop block to handle.
* @param matureMeta
* - The meta value at which the crop is considered mature
* and ready to be harvested.
* - The meta value at which the crop is considered mature and ready
* to be harvested.
*/
public static void registerStandardCrop(Block crop, int matureMeta)
{
@ -51,11 +52,11 @@ public class HarvestRegistry
/**
* Registers a tall crop (Sugar Cane and Cactus) for the
* {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerTall} handler
* to handle.
*
* {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerTall} handler to
* handle.
*
* @param crop
* - The crop block to handle.
* - The crop block to handle.
*/
public static void registerTallCrop(BlockStack crop)
{
@ -65,18 +66,18 @@ public class HarvestRegistry
/**
* Registers a stem crop (Melon and Pumpkin) for the
* {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerStem} handler
* to handle.
*
* Use {@link net.minecraftforge.oredict.OreDictionary#WILDCARD_VALUE} to accept
* any meta for the crop block.
*
* {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerStem} handler to
* handle.
*
* Use {@link net.minecraftforge.oredict.OreDictionary#WILDCARD_VALUE} to
* accept any meta for the crop block.
*
* The Stem must be instanceof {@link BlockStem}
*
*
* @param crop
* - The crop block to handle.
* - The crop block to handle.
* @param stem
* - The stem of the crop
* - The stem of the crop
*/
public static void registerStemCrop(BlockStack crop, BlockStack stem)
{
@ -86,11 +87,11 @@ public class HarvestRegistry
/**
* Registers a range amplifier for the Harvest Ritual.
*
*
* @param blockStack
* - The block for the amplifier.
* - The block for the amplifier.
* @param range
* - The range the amplifier provides.
* - The range the amplifier provides.
*/
public static void registerRangeAmplifier(BlockStack blockStack, int range)
{
@ -98,23 +99,28 @@ public class HarvestRegistry
amplifierMap.put(blockStack, range);
}
public static List<IHarvestHandler> getHandlerList() {
public static List<IHarvestHandler> getHandlerList()
{
return new ArrayList<IHarvestHandler>(handlerList);
}
public static Map<Block, Integer> getStandardCrops() {
public static Map<Block, Integer> getStandardCrops()
{
return new HashMap<Block, Integer>(standardCrops);
}
public static Set<BlockStack> getTallCrops() {
public static Set<BlockStack> getTallCrops()
{
return new HashSet<BlockStack>(tallCrops);
}
public static Map<BlockStack, BlockStack> getStemCrops() {
public static Map<BlockStack, BlockStack> getStemCrops()
{
return new HashMap<BlockStack, BlockStack>(stemCrops);
}
public static Map<BlockStack, Integer> getAmplifierMap() {
public static Map<BlockStack, Integer> getAmplifierMap()
{
return new HashMap<BlockStack, Integer>(amplifierMap);
}
}

View file

@ -94,7 +94,8 @@ public class ImperfectRitualRegistry
}
}
public static boolean ritualEnabled(String id) {
public static boolean ritualEnabled(String id)
{
return ritualEnabled(getRitualForId(id));
}

View file

@ -37,8 +37,7 @@ public class OrbRegistry
{
orbs.add(orb);
registerOrbForTier(orb.getTier(), getOrbStack(orb));
}
else
} else
BloodMagicAPI.getLogger().error("Error adding orb %s. Orb already exists!", orb.toString());
}
@ -110,11 +109,13 @@ public class OrbRegistry
return new ItemStack(orbItem, 1, getIndexOf(orb));
}
public static List<BloodOrb> getOrbs() {
public static List<BloodOrb> getOrbs()
{
return new ArrayList<BloodOrb>(orbs);
}
public static ArrayListMultimap<Integer, ItemStack> getTierMap() {
public static ArrayListMultimap<Integer, ItemStack> getTierMap()
{
return ArrayListMultimap.create(tierMap);
}
}

View file

@ -91,7 +91,8 @@ public class RitualRegistry
}
}
public static boolean ritualEnabled(String id) {
public static boolean ritualEnabled(String id)
{
return ritualEnabled(getRitualForId(id));
}

View file

@ -35,7 +35,8 @@ public class TartaricForgeRecipeRegistry
return null;
}
public static List<TartaricForgeRecipe> getRecipeList() {
public static List<TartaricForgeRecipe> getRecipeList()
{
return new ArrayList<TartaricForgeRecipe>(recipeList);
}
}

View file

@ -40,9 +40,11 @@ public abstract class AreaDescriptor implements Iterator<BlockPos>
* This constructor takes in the minimum and maximum BlockPos. The
* maximum offset is non-inclusive, meaning if you pass in (0,0,0) and
* (1,1,1), calling getContainedPositions() will only give (0,0,0).
*
* @param minimumOffset -
* @param maximumOffset -
*
* @param minimumOffset
* -
* @param maximumOffset
* -
*/
public Rectangle(BlockPos minimumOffset, BlockPos maximumOffset)
{
@ -94,9 +96,11 @@ public abstract class AreaDescriptor implements Iterator<BlockPos>
/**
* Sets the offsets of the AreaDescriptor in a safe way that will make
* minimumOffset the lowest corner
*
* @param offset1 -
* @param offset2 -
*
* @param offset1
* -
* @param offset2
* -
*/
public void setOffsets(BlockPos offset1, BlockPos offset2)
{

View file

@ -14,13 +14,13 @@ public final class CapabilityRuneType
@Override
public NBTBase writeNBT(Capability<IRitualStone.Tile> capability, IRitualStone.Tile instance, EnumFacing side)
{
return new NBTTagByte((byte)instance.getRuneType().ordinal());
return new NBTTagByte((byte) instance.getRuneType().ordinal());
}
@Override
public void readNBT(Capability<IRitualStone.Tile> capability, IRitualStone.Tile instance, EnumFacing side, NBTBase nbt)
{
instance.setRuneType(EnumRuneType.byMetadata(((NBTTagByte)nbt).getByte()));
instance.setRuneType(EnumRuneType.byMetadata(((NBTTagByte) nbt).getByte()));
}
}

View file

@ -14,7 +14,8 @@ public enum EnumDemonWillType implements IStringSerializable
public final String name;
EnumDemonWillType(String name) {
EnumDemonWillType(String name)
{
this.name = name;
}
}

View file

@ -6,21 +6,21 @@ public interface IDemonWill
{
/**
* Obtains the amount of Will an ItemStack contains.
*
*
* @param willStack
* - The stack to retrieve the Will from
*
* - The stack to retrieve the Will from
*
* @return - The amount of Will an ItemStack contains
*/
double getWill(ItemStack willStack);
/**
* Sets the amount of Will in a given ItemStack.
*
*
* @param willStack
* - The ItemStack of the Will
* - The ItemStack of the Will
* @param will
* - The amount of will to set the stack to
* - The amount of will to set the stack to
*/
void setWill(ItemStack willStack, double will);
@ -29,10 +29,10 @@ public interface IDemonWill
* drained, the willStack will be removed.
*
* @param willStack
* - The ItemStack of the will
* - The ItemStack of the will
* @param drainAmount
* - The amount of Will to drain
*
* - The amount of Will to drain
*
* @return The amount of will drained.
*/
double drainWill(ItemStack willStack, double drainAmount);
@ -42,10 +42,10 @@ public interface IDemonWill
* should respect the number requested.
*
* @param meta
* - The meta of the ItemStack to create
* - The meta of the ItemStack to create
* @param number
* - The amount of Will to create the Stack with.
*
* - The amount of Will to create the Stack with.
*
* @return - An ItemStack with the set amount of Will
*/
ItemStack createWill(int meta, double number);

View file

@ -5,7 +5,7 @@ import net.minecraft.item.ItemStack;
public interface IDemonWillGem
{
/**
*
*
* @param willGemStack
* - The ItemStack for this demon will gem.
* @param willStack
@ -18,7 +18,7 @@ public interface IDemonWillGem
/**
* Returns the number of souls that are left in the soul gem. Returns a
* double because souls can be fractionally drained.
*
*
*/
double getWill(EnumDemonWillType type, ItemStack willGemStack);

View file

@ -6,10 +6,10 @@ public interface IDiscreteDemonWill
{
/**
* Obtains the amount of Will an ItemStack contains.
*
*
* @param soulStack
* - The stack to retrieve the Will from
*
* - The stack to retrieve the Will from
*
* @return - The amount of Will an ItemStack contains
*/
double getWill(ItemStack soulStack);
@ -18,32 +18,32 @@ public interface IDiscreteDemonWill
* Drains the demonic will from the willStack. If all of the will is
* drained, the willStack will be removed. Will only drain in discrete
* amounts, determined by getDiscretization.
*
*
* @param willStack
* - The ItemStack of the will
* - The ItemStack of the will
* @param drainAmount
* - The amount of Will to drain
*
* - The amount of Will to drain
*
* @return The amount of will drained.
*/
double drainWill(ItemStack willStack, double drainAmount);
/**
* Gets the discrete number for this demonic will.
*
*
* @param willStack
* - The ItemStack of the will
*
* - The ItemStack of the will
*
* @return - The discrete number for the given stack.
*/
double getDiscretization(ItemStack willStack);
/**
* Obtains the type of will this is.
*
*
* @param willStack
* - The ItemStack of the will
*
* - The ItemStack of the will
*
* @return - The type of will this is.
*/
EnumDemonWillType getType(ItemStack willStack);

View file

@ -13,12 +13,12 @@ public class PlayerDemonWillHandler
{
/**
* Gets the total amount of Will a player contains in their inventory
*
*
* @param type
* - The type of Will to check for
* - The type of Will to check for
* @param player
* - The player to check the will of
*
* - The player to check the will of
*
* @return - The amount of will the player contains
*/
public static double getTotalDemonWill(EnumDemonWillType type, EntityPlayer player)
@ -26,11 +26,15 @@ public class PlayerDemonWillHandler
ItemStack[] inventory = player.inventory.mainInventory;
double souls = 0;
for (ItemStack stack : inventory) {
if (stack != null) {
if (stack.getItem() instanceof IDemonWill) {
for (ItemStack stack : inventory)
{
if (stack != null)
{
if (stack.getItem() instanceof IDemonWill)
{
souls += ((IDemonWill) stack.getItem()).getWill(stack);
} else if (stack.getItem() instanceof IDemonWillGem) {
} else if (stack.getItem() instanceof IDemonWillGem)
{
souls += ((IDemonWillGem) stack.getItem()).getWill(type, stack);
}
}
@ -41,12 +45,12 @@ public class PlayerDemonWillHandler
/**
* Checks if the player's Tartaric gems are completely full.
*
*
* @param type
* - The type of Will to check for
* - The type of Will to check for
* @param player
* - The player to check the Will of
*
* - The player to check the Will of
*
* @return - True if all Will containers are full, false if not.
*/
public static boolean isDemonWillFull(EnumDemonWillType type, EntityPlayer player)
@ -54,8 +58,10 @@ public class PlayerDemonWillHandler
ItemStack[] inventory = player.inventory.mainInventory;
boolean hasGem = false;
for (ItemStack stack : inventory) {
if (stack != null && stack.getItem() instanceof IDemonWillGem) {
for (ItemStack stack : inventory)
{
if (stack != null && stack.getItem() instanceof IDemonWillGem)
{
hasGem = true;
if (((IDemonWillGem) stack.getItem()).getWill(type, stack) < ((IDemonWillGem) stack.getItem()).getMaxWill(type, stack))
return false;
@ -67,12 +73,12 @@ public class PlayerDemonWillHandler
/**
* Consumes Will from the inventory of a given player
*
*
* @param player
* - The player to consume the will of
* - The player to consume the will of
* @param amount
* - The amount of will to consume
*
* - The amount of will to consume
*
* @return - The amount of will consumed.
*/
public static double consumeDemonWill(EnumDemonWillType type, EntityPlayer player, double amount)
@ -109,10 +115,10 @@ public class PlayerDemonWillHandler
* the player's inventory.
*
* @param player
* - The player to add will to
* - The player to add will to
* @param willStack
* - ItemStack that contains an IDemonWill to be added
*
* - ItemStack that contains an IDemonWill to be added
*
* @return - The modified willStack
*/
public static ItemStack addDemonWill(EntityPlayer player, ItemStack willStack)
@ -136,16 +142,16 @@ public class PlayerDemonWillHandler
}
/**
* Adds an IDiscreteDemonWill contained in an ItemStack to one of the Soul Gems in
* the player's inventory.
*
* Adds an IDiscreteDemonWill contained in an ItemStack to one of the Soul
* Gems in the player's inventory.
*
* @param type
* - The type of Will to add
* - The type of Will to add
* @param player
* - The player to check the Will of
* - The player to check the Will of
* @param amount
* - The amount of will to add
*
* - The amount of will to add
*
* @return - The amount of will added
*/
public static double addDemonWill(EnumDemonWillType type, EntityPlayer player, double amount)
@ -167,18 +173,18 @@ public class PlayerDemonWillHandler
}
/**
* Adds an IDiscreteDemonWill contained in an ItemStack to one of the Soul Gems in
* the player's inventory while ignoring a specified stack.
*
* Adds an IDiscreteDemonWill contained in an ItemStack to one of the Soul
* Gems in the player's inventory while ignoring a specified stack.
*
* @param type
* - The type of Will to add
* - The type of Will to add
* @param player
* - The player to check the Will of
* - The player to check the Will of
* @param amount
* - The amount of will to add
* - The amount of will to add
* @param ignored
* - A stack to ignore
*
* - A stack to ignore
*
* @return - The amount of will added
*/
public static double addDemonWill(EnumDemonWillType type, EntityPlayer player, double amount, ItemStack ignored)

View file

@ -31,7 +31,8 @@ public class ChunkPairSerializable implements Serializable
return new BlockPos((chunkXPos << 4) + 8, y, (chunkZPos << 4) + 8);
}
public BlockPos getChunkCenter(){
public BlockPos getChunkCenter()
{
return getChunkCenter(64);
}
}

View file

@ -19,7 +19,7 @@ public class PortalLocation implements Serializable
private int z;
@Getter
private int dimension;
public PortalLocation(int x, int y, int z, int dimension)
{
this.x = x;
@ -64,13 +64,17 @@ public class PortalLocation implements Serializable
@Override
public boolean equals(Object o)
{
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
PortalLocation that = (PortalLocation) o;
if (x != that.x) return false;
if (y != that.y) return false;
if (x != that.x)
return false;
if (y != that.y)
return false;
return z == that.z;
}

View file

@ -33,6 +33,6 @@ public class TeleporterBloodMagic extends Teleporter
@Override
public void placeInPortal(Entity entity, float rotationYaw)
{
entity.setLocationAndAngles(MathHelper.floor_double(entity.posX), MathHelper.floor_double(entity.posY) + 2, MathHelper.floor_double(entity.posZ), entity.rotationYaw, entity.rotationPitch);
entity.setLocationAndAngles(MathHelper.floor_double(entity.posX), MathHelper.floor_double(entity.posY) + 2, MathHelper.floor_double(entity.posZ), entity.rotationYaw, entity.rotationPitch);
}
}

View file

@ -13,9 +13,9 @@ import WayofTime.bloodmagic.api.iface.IBindable;
public class BindableHelper
{
/**
* Sets the Owner Name of the item without checking if it is already bound. Also
* bypasses {@link ItemBindEvent}.
*
* Sets the Owner Name of the item without checking if it is already bound.
* Also bypasses {@link ItemBindEvent}.
*
* @param stack
* - The ItemStack to bind
* @param ownerName
@ -29,9 +29,9 @@ public class BindableHelper
}
/**
* Sets the Owner UUID of the item without checking if it is already bound. Also
* bypasses {@link ItemBindEvent}.
*
* Sets the Owner UUID of the item without checking if it is already bound.
* Also bypasses {@link ItemBindEvent}.
*
* @param stack
* - The ItemStack to bind
* @param ownerUUID
@ -48,12 +48,12 @@ public class BindableHelper
/**
* Deprecated.
*
*
* Built into {@link IBindable} now.
*
*
* @param stack
* - The ItemStack to check the owner of
*
*
* @return - The username of the ItemStack's owner
*/
@Deprecated
@ -66,12 +66,12 @@ public class BindableHelper
/**
* Deprecated.
*
*
* Built into {@link IBindable} now.
*
*
* @param stack
* - The ItemStack to check the owner of
*
*
* @return - The UUID of the ItemStack's owner
*/
@Deprecated
@ -84,14 +84,15 @@ public class BindableHelper
/**
* Deprecated.
*
* Now handled automatically with {@link WayofTime.bloodmagic.util.handler.EventHandler#interactEvent(PlayerInteractEvent)}
*
*
* Now handled automatically with
* {@link WayofTime.bloodmagic.util.handler.EventHandler#interactEvent(PlayerInteractEvent)}
*
* @param stack
* - The ItemStack to bind
* @param player
* - The Player to bind the ItemStack to
*
*
* @return - Whether binding was successful
*/
@Deprecated
@ -102,16 +103,17 @@ public class BindableHelper
/**
* Deprecated.
*
* Now handled automatically with {@link WayofTime.bloodmagic.util.handler.EventHandler#interactEvent(PlayerInteractEvent)}
*
*
* Now handled automatically with
* {@link WayofTime.bloodmagic.util.handler.EventHandler#interactEvent(PlayerInteractEvent)}
*
* @param stack
* - The ItemStack to bind
* @param uuid
* - The username to bind the ItemStack to
* @param currentUsername
* - The current name of the player.
*
*
* @return - Whether the binding was successful
*/
@Deprecated
@ -141,9 +143,10 @@ public class BindableHelper
/**
* Deprecated.
*
* Now handled automatically with {@link WayofTime.bloodmagic.util.handler.EventHandler#interactEvent(PlayerInteractEvent)}
*
*
* Now handled automatically with
* {@link WayofTime.bloodmagic.util.handler.EventHandler#interactEvent(PlayerInteractEvent)}
*
* @param stack
* - ItemStack to check
* @param uuid
@ -159,9 +162,9 @@ public class BindableHelper
/**
* Deprecated.
*
*
* @see #setItemOwnerName(ItemStack, String)
*
*
* @param stack
* - The ItemStack to bind
* @param ownerName

View file

@ -85,7 +85,8 @@ public class NetworkHelper
return soulNetwork.getOrbTier();
}
public static int getMaximumForTier(int tier) {
public static int getMaximumForTier(int tier)
{
int ret = 0;
if (tier > OrbRegistry.getTierMap().size() || tier < 0)

View file

@ -21,11 +21,10 @@ public class PlayerHelper
{
/**
* A list of all known fake players that do not extend FakePlayer.
*
*
* Will be added to as needed.
*/
private static final ArrayList<String> knownFakePlayers = Lists.newArrayList(
);
private static final ArrayList<String> knownFakePlayers = Lists.newArrayList();
public static String getUsernameFromPlayer(EntityPlayer player)
{

View file

@ -120,7 +120,7 @@ public class RitualHelper
if (block instanceof IRitualStone)
return ((IRitualStone) block).isRuneType(world, pos, type);
else if(tile instanceof IRitualStone.Tile)
else if (tile instanceof IRitualStone.Tile)
return ((IRitualStone.Tile) tile).isRuneType(type);
else if (tile != null && tile.hasCapability(RUNE_CAPABILITY, null))
return tile.getCapability(RUNE_CAPABILITY, null).isRuneType(type);
@ -137,7 +137,7 @@ public class RitualHelper
if (block instanceof IRitualStone)
return true;
else if(tile instanceof IRitualStone.Tile)
else if (tile instanceof IRitualStone.Tile)
return true;
else if (tile != null && tile.hasCapability(RUNE_CAPABILITY, null))
return true;
@ -154,7 +154,7 @@ public class RitualHelper
if (block instanceof IRitualStone)
((IRitualStone) block).setRuneType(world, pos, type);
else if(tile instanceof IRitualStone.Tile)
else if (tile instanceof IRitualStone.Tile)
((IRitualStone.Tile) tile).setRuneType(type);
else if (tile != null && tile.hasCapability(RUNE_CAPABILITY, null))
{