Formatted the code - Release state for Blood Magic 1.8.9-2.0.0-1

This commit is contained in:
WayofTime 2016-01-02 17:56:37 -05:00
parent d1ff8c6d4f
commit 71421b7d88
38 changed files with 223 additions and 208 deletions

View file

@ -18,14 +18,14 @@ plugins {
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
def build_number = 'CUSTOM' def build_number = '1'
if (System.getenv('BUILD_NUMBER') != null) if (System.getenv('BUILD_NUMBER') != null)
build_number = System.getenv('BUILD_NUMBER') build_number = System.getenv('BUILD_NUMBER')
group = package_group group = package_group
archivesBaseName = mod_name archivesBaseName = mod_name
version = "${mc_version}-${mod_version}-${build_number}-ss" version = "${mc_version}-${mod_version}-${build_number}"
import org.ajoberstar.grgit.* import org.ajoberstar.grgit.*
@ -153,7 +153,7 @@ curseforge {
project { project {
id = "${curse_id}" id = "${curse_id}"
changelog = project.hasProperty('changelog') ? project.changelog : '' changelog = project.hasProperty('changelog') ? project.changelog : ''
releaseType = 'alpha' releaseType = 'beta'
addArtifact javadocJar addArtifact javadocJar
addArtifact sourceJar addArtifact sourceJar

View file

@ -39,8 +39,8 @@ public class BloodMagicAPI
* items in case internal names change. * items in case internal names change.
* *
* @param name * @param name
* - The registered name of the item. Usually the same as the * - The registered name of the item. Usually the same as the class
* class name. * name.
* @return - The requested Item * @return - The requested Item
*/ */
public static Item getItem(String name) public static Item getItem(String name)
@ -49,11 +49,11 @@ public class BloodMagicAPI
} }
/** /**
* Used to add a {@link BlockStack} to the Teleposer blacklist that * Used to add a {@link BlockStack} to the Teleposer blacklist that cannot
* cannot be changed via Configuration files. * be changed via Configuration files.
* *
* @param blockStack * @param blockStack
* - The BlockStack to blacklist. * - The BlockStack to blacklist.
*/ */
public static void addToTeleposerBlacklist(BlockStack blockStack) public static void addToTeleposerBlacklist(BlockStack blockStack)
{ {
@ -63,11 +63,11 @@ public class BloodMagicAPI
/** /**
* @see #addToTeleposerBlacklist(BlockStack) * @see #addToTeleposerBlacklist(BlockStack)
* *
* @param block * @param block
* - The block to blacklist * - The block to blacklist
* @param meta * @param meta
* - The meta of the block to blacklist * - The meta of the block to blacklist
*/ */
public static void addToTeleposerBlacklist(Block block, int meta) public static void addToTeleposerBlacklist(Block block, int meta)
{ {
@ -76,9 +76,9 @@ public class BloodMagicAPI
/** /**
* @see #addToTeleposerBlacklist(BlockStack) * @see #addToTeleposerBlacklist(BlockStack)
* *
* @param block * @param block
* - The block to blacklist * - The block to blacklist
*/ */
public static void addToTeleposerBlacklist(Block block) public static void addToTeleposerBlacklist(Block block)
{ {

View file

@ -18,9 +18,9 @@ public class AltarComponent
* Sets a component location for the altar. * Sets a component location for the altar.
* *
* @param offset * @param offset
* - Where the block should be in relation to the Altar * - Where the block should be in relation to the Altar
* @param component * @param component
* - The type of Component the location should contain * - The type of Component the location should contain
*/ */
public AltarComponent(BlockPos offset, EnumAltarComponent component) public AltarComponent(BlockPos offset, EnumAltarComponent component)
{ {
@ -31,9 +31,9 @@ public class AltarComponent
/** /**
* Use for setting a location at which there must be a block, but the type * Use for setting a location at which there must be a block, but the type
* of block does not matter. * of block does not matter.
* *
* @param offset * @param offset
* - Where the block should be in relation to the Altar * - Where the block should be in relation to the Altar
*/ */
public AltarComponent(BlockPos offset) public AltarComponent(BlockPos offset)
{ {

View file

@ -2,5 +2,10 @@ package WayofTime.bloodmagic.api.altar;
public enum EnumAltarComponent public enum EnumAltarComponent
{ {
GLOWSTONE, BLOODSTONE, BEACON, BLOODRUNE, CRYSTAL, NOTAIR GLOWSTONE,
BLOODSTONE,
BEACON,
BLOODRUNE,
CRYSTAL,
NOTAIR
} }

View file

@ -10,7 +10,7 @@ public abstract class CompressionHandler
* resultant stack if successful, and null if not. * resultant stack if successful, and null if not.
* *
* @param inv * @param inv
* The inventory iterated through * The inventory iterated through
* @return The result of the compression * @return The result of the compression
*/ */
public abstract ItemStack compressInventory(ItemStack[] inv, World world); public abstract ItemStack compressInventory(ItemStack[] inv, World world);

View file

@ -26,9 +26,9 @@ public class CompressionRegistry
* Registers an item so that it only compresses while above this threshold * Registers an item so that it only compresses while above this threshold
* *
* @param stack * @param stack
* item/block to be compressed * item/block to be compressed
* @param threshold * @param threshold
* amount that is to be compressed * amount that is to be compressed
*/ */
public static void registerItemThreshold(ItemStack stack, int threshold) public static void registerItemThreshold(ItemStack stack, int threshold)
{ {

View file

@ -14,11 +14,11 @@ public class AddToNetworkEvent extends Event
* LP will still be drained but the soul network will not be added to. * LP will still be drained but the soul network will not be added to.
* *
* @param ownerNetwork * @param ownerNetwork
* Key used for the soul network * Key used for the soul network
* @param addedAmount * @param addedAmount
* Amount added * Amount added
* @param maximum * @param maximum
* Ceiling that the network can add to * Ceiling that the network can add to
*/ */
public AddToNetworkEvent(String ownerNetwork, int addedAmount, int maximum) public AddToNetworkEvent(String ownerNetwork, int addedAmount, int maximum)
{ {

View file

@ -61,13 +61,13 @@ public class SoulNetworkEvent extends Event
* event prevents action without penalties * event prevents action without penalties
* *
* @param player * @param player
* Player using the item * Player using the item
* @param ownerNetwork * @param ownerNetwork
* Network that the item is tied to * Network that the item is tied to
* @param itemStack * @param itemStack
* Item used * Item used
* @param drainAmount * @param drainAmount
* Original drain amount - change to alter cost * 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)
{ {

View file

@ -7,8 +7,11 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.common.eventhandler.Cancelable; import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event; import net.minecraftforge.fml.common.eventhandler.Event;
/** Fired when a teleposer attempts to transpose two blocks. Use this to perform special cleanup or compensation, /**
or cancel it entirely to prevent the transposition. */ * Fired when a teleposer attempts to transpose two blocks. Use this to perform
* special cleanup or compensation, or cancel it entirely to prevent the
* transposition.
*/
@Cancelable @Cancelable
public class TeleposeEvent extends Event public class TeleposeEvent extends Event
{ {

View file

@ -10,12 +10,12 @@ public interface IBindable
{ {
/** /**
* Called when the player attempts to bind the item. * Called when the player attempts to bind the item.
* *
* @param player * @param player
* - The Player attempting to bind the item * - The Player attempting to bind the item
* @param stack * @param stack
* - The ItemStack to attempt binding * - The ItemStack to attempt binding
* *
* @return If binding was successful. * @return If binding was successful.
*/ */
boolean onBind(EntityPlayer player, ItemStack stack); boolean onBind(EntityPlayer player, ItemStack stack);

View file

@ -23,7 +23,7 @@ public abstract class LivingArmourUpgrade
* these. * these.
* *
* @param level * @param level
* The level of the upgrade * The level of the upgrade
*/ */
public LivingArmourUpgrade(int level) public LivingArmourUpgrade(int level)
{ {

View file

@ -26,11 +26,11 @@ public abstract class StatTracker
* LivingArmour * LivingArmour
* *
* @param world * @param world
* World the player is in * World the player is in
* @param player * @param player
* The player that has the armour equipped * The player that has the armour equipped
* @param livingArmour * @param livingArmour
* The equipped LivingArmour * The equipped LivingArmour
* @return True if there is a new upgrade unlocked this tick. * @return True if there is a new upgrade unlocked this tick.
*/ */
public abstract boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour); public abstract boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour);

View file

@ -89,10 +89,10 @@ public class SoulNetwork extends WorldSavedData
/** /**
* Used to syphon LP from the network * Used to syphon LP from the network
* *
* @param syphon * @param syphon
* - The amount of LP to syphon * - The amount of LP to syphon
* *
* @return The amount of LP syphoned * @return The amount of LP syphoned
*/ */
public int syphon(int syphon) public int syphon(int syphon)
@ -112,11 +112,11 @@ public class SoulNetwork extends WorldSavedData
* instead take away from the user's health. * instead take away from the user's health.
* *
* Always returns false on the client side. * Always returns false on the client side.
* *
* @param user * @param user
* - The Player to syphon from * - The Player to syphon from
* @param toSyphon * @param toSyphon
* - The amount of LP to syphon * - The amount of LP to syphon
* *
* @return - Whether the action should be performed. * @return - Whether the action should be performed.
*/ */

View file

@ -23,11 +23,11 @@ public class BloodOrb
* EnergyItems. * EnergyItems.
* *
* @param name * @param name
* - A name for the Orb. Gets put into an unlocalized name. * - A name for the Orb. Gets put into an unlocalized name.
* @param tier * @param tier
* - The tier of the Orb. * - The tier of the Orb.
* @param capacity * @param capacity
* - The max amount of LP the Orb can store. * - The max amount of LP the Orb can store.
*/ */
public BloodOrb(String name, int tier, int capacity) public BloodOrb(String name, int tier, int capacity)
{ {

View file

@ -24,7 +24,8 @@ public class AltarRecipeRegistry
BloodMagicAPI.getLogger().error("Error adding altar recipe for %s. Recipe already exists.", recipe.input.getDisplayName(), recipe.output == null ? "" : " -> "); BloodMagicAPI.getLogger().error("Error adding altar recipe for %s. Recipe already exists.", recipe.input.getDisplayName(), recipe.output == null ? "" : " -> ");
} }
public static void registerFillRecipe(ItemStack orbStack, EnumAltarTier tier, int maxForOrb, int consumeRate, int drainRate) { public static void registerFillRecipe(ItemStack orbStack, EnumAltarTier tier, int maxForOrb, int consumeRate, int drainRate)
{
registerRecipe(new AltarRecipe(orbStack, orbStack, tier, maxForOrb, consumeRate, drainRate, true)); registerRecipe(new AltarRecipe(orbStack, orbStack, tier, maxForOrb, consumeRate, drainRate, true));
} }
@ -52,19 +53,19 @@ public class AltarRecipeRegistry
* Orbs) * Orbs)
* *
* @param input * @param input
* - The input ItemStack * - The input ItemStack
* @param output * @param output
* - The ItemStack obtained from the recipe * - The ItemStack obtained from the recipe
* @param minTier * @param minTier
* - The minimum tier of Altar required * - The minimum tier of Altar required
* @param syphon * @param syphon
* - The amount of LP to syphon from the Altar * - The amount of LP to syphon from the Altar
* @param consumeRate * @param consumeRate
* - The rate at which LP is consumed during crafting * - The rate at which LP is consumed during crafting
* @param drainRate * @param drainRate
* - The rate at which LP is drained during crafting * - The rate at which LP is drained during crafting
* @param fillable * @param fillable
* - Whether the input item can be filled with LP. IE: Orbs * - Whether the input item can be filled with LP. IE: Orbs
*/ */
public AltarRecipe(ItemStack input, @Nullable ItemStack output, EnumAltarTier minTier, int syphon, int consumeRate, int drainRate, boolean fillable) public AltarRecipe(ItemStack input, @Nullable ItemStack output, EnumAltarTier minTier, int syphon, int consumeRate, int drainRate, boolean fillable)
{ {

View file

@ -19,9 +19,9 @@ public class ImperfectRitualRegistry
* The safe way to register a new Ritual. * The safe way to register a new Ritual.
* *
* @param imperfectRitual * @param imperfectRitual
* - The imperfect ritual to register. * - The imperfect ritual to register.
* @param id * @param id
* - The ID for the imperfect ritual. Cannot be duplicated. * - The ID for the imperfect ritual. Cannot be duplicated.
*/ */
public static void registerRitual(ImperfectRitual imperfectRitual, String id) public static void registerRitual(ImperfectRitual imperfectRitual, String id)
{ {

View file

@ -24,9 +24,9 @@ public class RitualRegistry
* The safe way to register a new Ritual. * The safe way to register a new Ritual.
* *
* @param ritual * @param ritual
* - The ritual to register. * - The ritual to register.
* @param id * @param id
* - The ID for the ritual. Cannot be duplicated. * - The ID for the ritual. Cannot be duplicated.
*/ */
public static void registerRitual(Ritual ritual, String id) public static void registerRitual(Ritual ritual, String id)
{ {

View file

@ -39,9 +39,9 @@ public abstract class AreaDescriptor
* (1,1,1), calling getContainedPositions() will only give (0,0,0). * (1,1,1), calling getContainedPositions() will only give (0,0,0).
* *
* @param minimumOffset * @param minimumOffset
* - * -
* @param maximumOffset * @param maximumOffset
* - * -
*/ */
public Rectangle(BlockPos minimumOffset, BlockPos maximumOffset) public Rectangle(BlockPos minimumOffset, BlockPos maximumOffset)
{ {
@ -95,9 +95,9 @@ public abstract class AreaDescriptor
* minimumOffset the lowest corner * minimumOffset the lowest corner
* *
* @param offset1 * @param offset1
* - * -
* @param offset2 * @param offset2
* - * -
*/ */
public void setOffsets(BlockPos offset1, BlockPos offset2) public void setOffsets(BlockPos offset1, BlockPos offset2)
{ {

View file

@ -8,7 +8,13 @@ import java.util.Locale;
public enum EnumRuneType implements IStringSerializable public enum EnumRuneType implements IStringSerializable
{ {
BLANK, WATER, FIRE, EARTH, AIR, DUSK, DAWN; BLANK,
WATER,
FIRE,
EARTH,
AIR,
DUSK,
DAWN;
public static EnumRuneType byMetadata(int meta) public static EnumRuneType byMetadata(int meta)
{ {

View file

@ -34,11 +34,11 @@ public abstract class Ritual
/** /**
* @param name * @param name
* - The name of the ritual * - The name of the ritual
* @param crystalLevel * @param crystalLevel
* - Required Activation Crystal tier * - Required Activation Crystal tier
* @param activationCost * @param activationCost
* - Base LP cost for activating the ritual * - Base LP cost for activating the ritual
*/ */
public Ritual(String name, int crystalLevel, int activationCost, String unlocalizedName) public Ritual(String name, int crystalLevel, int activationCost, String unlocalizedName)
{ {
@ -51,9 +51,9 @@ public abstract class Ritual
* {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#activateRitual(ItemStack, EntityPlayer, Ritual)} * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#activateRitual(ItemStack, EntityPlayer, Ritual)}
* *
* @param masterRitualStone * @param masterRitualStone
* - The {@link IMasterRitualStone} that the ritual is bound to * - The {@link IMasterRitualStone} that the ritual is bound to
* @param player * @param player
* - The activating player * - The activating player
* @return - Whether activation was successful * @return - Whether activation was successful
*/ */
public boolean activateRitual(IMasterRitualStone masterRitualStone, EntityPlayer player) public boolean activateRitual(IMasterRitualStone masterRitualStone, EntityPlayer player)
@ -67,7 +67,7 @@ public abstract class Ritual
* {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#performRitual(World, BlockPos)} * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#performRitual(World, BlockPos)}
* *
* @param masterRitualStone * @param masterRitualStone
* - The {@link IMasterRitualStone} that the ritual is bound to * - The {@link IMasterRitualStone} that the ritual is bound to
*/ */
public abstract void performRitual(IMasterRitualStone masterRitualStone); public abstract void performRitual(IMasterRitualStone masterRitualStone);
@ -77,9 +77,9 @@ public abstract class Ritual
* {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#stopRitual(BreakType)} * {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#stopRitual(BreakType)}
* *
* @param masterRitualStone * @param masterRitualStone
* - The {@link IMasterRitualStone} that the ritual is bound to * - The {@link IMasterRitualStone} that the ritual is bound to
* @param breakType * @param breakType
* - The type of break that caused the stoppage. * - The type of break that caused the stoppage.
*/ */
public void stopRitual(IMasterRitualStone masterRitualStone, BreakType breakType) public void stopRitual(IMasterRitualStone masterRitualStone, BreakType breakType)
{ {
@ -114,7 +114,7 @@ public abstract class Ritual
* Used to grab the range of a ritual for a given effect. * Used to grab the range of a ritual for a given effect.
* *
* @param range * @param range
* - Range that needs to be pulled. * - Range that needs to be pulled.
* @return - * @return -
*/ */
public AreaDescriptor getBlockRange(String range) public AreaDescriptor getBlockRange(String range)
@ -162,7 +162,12 @@ public abstract class Ritual
public enum BreakType public enum BreakType
{ {
REDSTONE, BREAK_MRS, BREAK_STONE, ACTIVATE, DEACTIVATE, EXPLOSION, REDSTONE,
BREAK_MRS,
BREAK_STONE,
ACTIVATE,
DEACTIVATE,
EXPLOSION,
} }
public abstract Ritual getNewCopy(); public abstract Ritual getNewCopy();

View file

@ -27,11 +27,11 @@ public abstract class ImperfectRitual
/** /**
* @param name * @param name
* - The name of the ritual * - The name of the ritual
* @param requiredBlock * @param requiredBlock
* - The block required above the ImperfectRitualStone * - The block required above the ImperfectRitualStone
* @param activationCost * @param activationCost
* - Base LP cost for activating the ritual * - Base LP cost for activating the ritual
*/ */
public ImperfectRitual(String name, BlockStack requiredBlock, int activationCost, String unlocalizedName) public ImperfectRitual(String name, BlockStack requiredBlock, int activationCost, String unlocalizedName)
{ {
@ -43,10 +43,9 @@ public abstract class ImperfectRitual
* {@link WayofTime.bloodmagic.tile.TileImperfectRitualStone#performRitual(World, BlockPos, ImperfectRitual, EntityPlayer)} * {@link WayofTime.bloodmagic.tile.TileImperfectRitualStone#performRitual(World, BlockPos, ImperfectRitual, EntityPlayer)}
* *
* @param imperfectRitualStone * @param imperfectRitualStone
* - The {@link IImperfectRitualStone} that the ritual is bound * - The {@link IImperfectRitualStone} that the ritual is bound to
* to
* @param player * @param player
* - The player activating the ritual * - The player activating the ritual
* @return - Whether activation was successful * @return - Whether activation was successful
*/ */
public abstract boolean onActivate(IImperfectRitualStone imperfectRitualStone, EntityPlayer player); public abstract boolean onActivate(IImperfectRitualStone imperfectRitualStone, EntityPlayer player);

View file

@ -18,9 +18,9 @@ public class BindableHelper
* type of Fake Player. * type of Fake Player.
* *
* @param stack * @param stack
* - The ItemStack to bind * - The ItemStack to bind
* @param player * @param player
* - The Player to bind the ItemStack to * - The Player to bind the ItemStack to
* *
* @return - Whether binding was successful * @return - Whether binding was successful
*/ */
@ -38,9 +38,9 @@ public class BindableHelper
* Fires {@link ItemBindEvent}. * Fires {@link ItemBindEvent}.
* *
* @param stack * @param stack
* - The ItemStack to bind * - The ItemStack to bind
* @param uuid * @param uuid
* - The username to bind the ItemStack to * - The username to bind the ItemStack to
* *
* @return - Whether the binding was successful * @return - Whether the binding was successful
*/ */
@ -64,11 +64,11 @@ public class BindableHelper
/** /**
* @see BindableHelper#checkAndSetItemOwner(ItemStack, String) * @see BindableHelper#checkAndSetItemOwner(ItemStack, String)
* *
* @param stack * @param stack
* - ItemStack to check * - ItemStack to check
* @param uuid * @param uuid
* - UUID of the Player * - UUID of the Player
*/ */
public static boolean checkAndSetItemOwner(ItemStack stack, UUID uuid) public static boolean checkAndSetItemOwner(ItemStack stack, UUID uuid)
{ {
@ -80,9 +80,9 @@ public class BindableHelper
* bypasses {@link ItemBindEvent}. * bypasses {@link ItemBindEvent}.
* *
* @param stack * @param stack
* - The ItemStack to bind * - The ItemStack to bind
* @param ownerName * @param ownerName
* - The username to bind the ItemStack to * - The username to bind the ItemStack to
*/ */
public static void setItemOwner(ItemStack stack, String ownerName) public static void setItemOwner(ItemStack stack, String ownerName)
{ {
@ -95,7 +95,7 @@ public class BindableHelper
* Used to safely obtain the username of the ItemStack's owner * Used to safely obtain the username of the ItemStack's owner
* *
* @param stack * @param stack
* - The ItemStack to check the owner of * - The ItemStack to check the owner of
* *
* @return - The username of the ItemStack's owner * @return - The username of the ItemStack's owner
*/ */
@ -110,7 +110,7 @@ public class BindableHelper
* Used to safely obtain the UUID of the ItemStack's owner * Used to safely obtain the UUID of the ItemStack's owner
* *
* @param stack * @param stack
* - The ItemStack to check the owner of * - The ItemStack to check the owner of
* *
* @return - The UUID of the ItemStack's owner * @return - The UUID of the ItemStack's owner
*/ */

View file

@ -46,9 +46,9 @@ public class NetworkHelper
/** /**
* @see NetworkHelper#getSoulNetwork(String) * @see NetworkHelper#getSoulNetwork(String)
* *
* @param uuid * @param uuid
* - The Player's Mojang UUID * - The Player's Mojang UUID
*/ */
public static SoulNetwork getSoulNetwork(UUID uuid) public static SoulNetwork getSoulNetwork(UUID uuid)
{ {
@ -57,9 +57,9 @@ public class NetworkHelper
/** /**
* @see NetworkHelper#getSoulNetwork(String) * @see NetworkHelper#getSoulNetwork(String)
* *
* @param player * @param player
* - The Player * - The Player
*/ */
public static SoulNetwork getSoulNetwork(EntityPlayer player) public static SoulNetwork getSoulNetwork(EntityPlayer player)
{ {
@ -135,12 +135,12 @@ public class NetworkHelper
/** /**
* Checks if the ItemStack has a user to be syphoned from. * Checks if the ItemStack has a user to be syphoned from.
* *
* @param stack * @param stack
* - ItemStack to check * - ItemStack to check
* @param toSyphon * @param toSyphon
* - Amount of LP to syphon * - Amount of LP to syphon
* *
* @return - If syphoning is possible * @return - If syphoning is possible
*/ */
public static boolean canSyphonFromContainer(ItemStack stack, int toSyphon) public static boolean canSyphonFromContainer(ItemStack stack, int toSyphon)

View file

@ -45,12 +45,12 @@ public class RitualHelper
/** /**
* Checks the RitualRegistry to see if the configuration of the ritual * Checks the RitualRegistry to see if the configuration of the ritual
* stones in the world is valid for the given EnumFacing. * stones in the world is valid for the given EnumFacing.
* *
* @param world * @param world
* - The world * - The world
* @param pos * @param pos
* - Location of the MasterRitualStone * - Location of the MasterRitualStone
* *
* @return The ID of the valid ritual * @return The ID of the valid ritual
*/ */
public static String getValidRitual(World world, BlockPos pos) public static String getValidRitual(World world, BlockPos pos)
@ -136,11 +136,11 @@ public class RitualHelper
* Should be safe to modify at any point. * Should be safe to modify at any point.
* *
* @param config * @param config
* - Your mod's Forge {@link Configuration} object. * - Your mod's Forge {@link Configuration} object.
* @param packageName * @param packageName
* - The package your Rituals are located in. * - The package your Rituals are located in.
* @param category * @param category
* - The config category to write to. * - The config category to write to.
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private static void checkRituals(Configuration config, String packageName, String category, Class ritualClass, Map enabledMap) private static void checkRituals(Configuration config, String packageName, String category, Class ritualClass, Map enabledMap)

View file

@ -43,8 +43,7 @@ public class BlockTeleposer extends BlockContainer
{ {
BindableHelper.checkAndSetItemOwner(playerItem, player); BindableHelper.checkAndSetItemOwner(playerItem, player);
((ItemTelepositionFocus) playerItem.getItem()).setBlockPos(playerItem, world, pos); ((ItemTelepositionFocus) playerItem.getItem()).setBlockPos(playerItem, world, pos);
} } else if (world.getTileEntity(pos) instanceof TileTeleposer)
else if (world.getTileEntity(pos) instanceof TileTeleposer)
{ {
player.openGui(BloodMagic.instance, Constants.Gui.TELEPOSER_GUI, world, pos.getX(), pos.getY(), pos.getZ()); player.openGui(BloodMagic.instance, Constants.Gui.TELEPOSER_GUI, world, pos.getX(), pos.getY(), pos.getZ());
} }

View file

@ -18,8 +18,8 @@ public class GuiHandler implements IGuiHandler
switch (id) switch (id)
{ {
case Constants.Gui.TELEPOSER_GUI: case Constants.Gui.TELEPOSER_GUI:
return new ContainerTeleposer(player.inventory, (TileTeleposer) world.getTileEntity(pos)); return new ContainerTeleposer(player.inventory, (TileTeleposer) world.getTileEntity(pos));
} }
return null; return null;
@ -34,8 +34,8 @@ public class GuiHandler implements IGuiHandler
switch (id) switch (id)
{ {
case Constants.Gui.TELEPOSER_GUI: case Constants.Gui.TELEPOSER_GUI:
return new GuiTeleposer(player.inventory, (TileTeleposer) world.getTileEntity(pos)); return new GuiTeleposer(player.inventory, (TileTeleposer) world.getTileEntity(pos));
} }
} }

View file

@ -20,7 +20,7 @@ public interface ICompatibility
* found. * found.
* *
* Generally a determined by a config option. * Generally a determined by a config option.
* *
* @return If Compatibility should load. * @return If Compatibility should load.
*/ */
boolean enableCompat(); boolean enableCompat();

View file

@ -29,17 +29,9 @@ public class BloodMagicPlugin implements IModPlugin
@Override @Override
public void register(IModRegistry registry) public void register(IModRegistry registry)
{ {
registry.addRecipeCategories( registry.addRecipeCategories(new AltarRecipeCategory(), new BindingRecipeCategory(), new AlchemyArrayCraftingCategory());
new AltarRecipeCategory(),
new BindingRecipeCategory(),
new AlchemyArrayCraftingCategory()
);
registry.addRecipeHandlers( registry.addRecipeHandlers(new AltarRecipeHandler(), new BindingRecipeHandler(), new AlchemyArrayCraftingRecipeHandler());
new AltarRecipeHandler(),
new BindingRecipeHandler(),
new AlchemyArrayCraftingRecipeHandler()
);
registry.addRecipes(AltarRecipeMaker.getRecipes()); registry.addRecipes(AltarRecipeMaker.getRecipes());
registry.addRecipes(BindingRecipeMaker.getRecipes()); registry.addRecipes(BindingRecipeMaker.getRecipes());

View file

@ -22,8 +22,9 @@ import net.minecraft.world.World;
import java.util.List; import java.util.List;
/** /**
* Integrated from WailaPlugins by <a href="https://github.com/tterrag1098">tterrag1098</a>. * Integrated from WailaPlugins by <a
* Originally implemented in ImLookingAtBlood by <a href="https://github.com/Pokefenn">Pokefenn</a>. * href="https://github.com/tterrag1098">tterrag1098</a>. Originally implemented
* in ImLookingAtBlood by <a href="https://github.com/Pokefenn">Pokefenn</a>.
*/ */
public class DataProviderBloodAltar implements IWailaDataProvider public class DataProviderBloodAltar implements IWailaDataProvider
{ {
@ -50,27 +51,27 @@ public class DataProviderBloodAltar implements IWailaDataProvider
switch (ConfigHandler.wailaAltarDisplayMode) switch (ConfigHandler.wailaAltarDisplayMode)
{ {
case 0: case 0:
{ {
hasSigil = hasSeer = true; hasSigil = hasSeer = true;
break; break;
} }
case 1: case 1:
{ {
hasSeer = accessor.getPlayer().getHeldItem() != null && accessor.getPlayer().getHeldItem().getItem() instanceof ItemSigilSeer; hasSeer = accessor.getPlayer().getHeldItem() != null && accessor.getPlayer().getHeldItem().getItem() instanceof ItemSigilSeer;
hasSigil = hasSeer || accessor.getPlayer().getHeldItem() != null && accessor.getPlayer().getHeldItem().getItem() instanceof ItemSigilDivination; hasSigil = hasSeer || accessor.getPlayer().getHeldItem() != null && accessor.getPlayer().getHeldItem().getItem() instanceof ItemSigilDivination;
break; break;
} }
case 2: case 2:
{ {
hasSeer = hasStack(new ItemStack(ModItems.sigilSeer), accessor.getPlayer()); hasSeer = hasStack(new ItemStack(ModItems.sigilSeer), accessor.getPlayer());
hasSigil = hasSeer || hasStack(new ItemStack(ModItems.sigilDivination), accessor.getPlayer()); hasSigil = hasSeer || hasStack(new ItemStack(ModItems.sigilDivination), accessor.getPlayer());
break; break;
} }
default: default:
{ {
break; break;
} }
} }
if (!hasSeer && !hasSigil) if (!hasSeer && !hasSigil)

View file

@ -88,9 +88,9 @@ public class StorageBlockCraftingRecipeAssimilator
} }
} }
} else } else
{ {
// unknown IRecipe, check through the recipe conventionally verify recipe size for 3x3 to skip anything smaller quickly // unknown IRecipe, check through the recipe conventionally verify recipe size for 3x3 to skip anything smaller quickly
if (unpacked.stackSize == 9 && recipePack.recipe.getRecipeSize() < 9) if (unpacked.stackSize == 9 && recipePack.recipe.getRecipeSize() < 9)
continue; continue;
@ -208,7 +208,7 @@ public class StorageBlockCraftingRecipeAssimilator
* every input element. * every input element.
* *
* @param inputs * @param inputs
* List of all inputs, null elements are being ignored. * List of all inputs, null elements are being ignored.
* @return List List of all options. * @return List List of all options.
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")

View file

@ -43,12 +43,12 @@ public class ItemBindable extends Item implements IBindable
* it will instead take the LP from the holder of the item. * it will instead take the LP from the holder of the item.
* *
* @param stack * @param stack
* - The ItemStack to syphon from * - The ItemStack to syphon from
* @param player * @param player
* - The Player using the item * - The Player using the item
* @param lpUsed * @param lpUsed
* - The amount of LP to syphon * - The amount of LP to syphon
* *
* @return Whether syphoning was successful or not * @return Whether syphoning was successful or not
*/ */
public static boolean syphonNetwork(ItemStack stack, EntityPlayer player, int lpUsed) public static boolean syphonNetwork(ItemStack stack, EntityPlayer player, int lpUsed)
@ -84,10 +84,10 @@ public class ItemBindable extends Item implements IBindable
* fails to find sufficient LP. * fails to find sufficient LP.
* *
* @param stack * @param stack
* - The ItemStack to syphon from. * - The ItemStack to syphon from.
* @param lpUsed * @param lpUsed
* - The amount of LP to syphon * - The amount of LP to syphon
* *
* @return - If syphoning was successful or not * @return - If syphoning was successful or not
*/ */
public static boolean syphonNetwork(ItemStack stack, int lpUsed) public static boolean syphonNetwork(ItemStack stack, int lpUsed)

View file

@ -78,16 +78,16 @@ public class ItemRitualDiviner extends Item
/** /**
* Adds a single rune to the ritual. * Adds a single rune to the ritual.
* *
* @param stack * @param stack
* - The Ritual Diviner stack * - The Ritual Diviner stack
* @param world * @param world
* - The World * - The World
* @param pos * @param pos
* - Block Position of the MRS. * - Block Position of the MRS.
* @param player * @param player
* - The Player attempting to place the ritual * - The Player attempting to place the ritual
* *
* @return - True if a rune was successfully added * @return - True if a rune was successfully added
*/ */
public boolean addRuneToRitual(ItemStack stack, World world, BlockPos pos, EntityPlayer player) public boolean addRuneToRitual(ItemStack stack, World world, BlockPos pos, EntityPlayer player)
@ -374,9 +374,9 @@ public class ItemRitualDiviner extends Item
* Cycles the selected ritual to the next available ritual that is enabled. * Cycles the selected ritual to the next available ritual that is enabled.
* *
* @param stack * @param stack
* - The ItemStack of the ritual diviner * - The ItemStack of the ritual diviner
* @param player * @param player
* - The player using the ritual diviner * - The player using the ritual diviner
*/ */
public void cycleRitual(ItemStack stack, EntityPlayer player) public void cycleRitual(ItemStack stack, EntityPlayer player)
{ {

View file

@ -156,8 +156,7 @@ public class TileTeleposer extends TileInventory implements ITickable
entity.setPositionAndUpdate(entity.posX - pos.getX() + focusPos.getX(), entity.posY - pos.getY() + focusPos.getY(), entity.posZ - pos.getZ() + focusPos.getZ()); entity.setPositionAndUpdate(entity.posX - pos.getX() + focusPos.getX(), entity.posY - pos.getY() + focusPos.getY(), entity.posZ - pos.getZ() + focusPos.getZ());
} }
} }
} } else
else
{ {
if (entityList1 != null && !entityList1.isEmpty()) if (entityList1 != null && !entityList1.isEmpty())
{ {
@ -193,8 +192,10 @@ public class TileTeleposer extends TileInventory implements ITickable
TileEntity finalTile = finalWorld.getTileEntity(finalPos); TileEntity finalTile = finalWorld.getTileEntity(finalPos);
NBTTagCompound initialTag = new NBTTagCompound(); NBTTagCompound initialTag = new NBTTagCompound();
NBTTagCompound finalTag = new NBTTagCompound(); NBTTagCompound finalTag = new NBTTagCompound();
if (initialTile != null) initialTile.writeToNBT(initialTag); if (initialTile != null)
if (finalTile != null) finalTile.writeToNBT(finalTag); initialTile.writeToNBT(initialTag);
if (finalTile != null)
finalTile.writeToNBT(finalTag);
Block initialBlock = initialWorld.getBlockState(initialPos).getBlock(); Block initialBlock = initialWorld.getBlockState(initialPos).getBlock();
Block finalBlock = finalWorld.getBlockState(finalPos).getBlock(); Block finalBlock = finalWorld.getBlockState(finalPos).getBlock();
@ -210,7 +211,8 @@ public class TileTeleposer extends TileInventory implements ITickable
int finalMeta = finalBlock.getMetaFromState(finalWorld.getBlockState(finalPos)); int finalMeta = finalBlock.getMetaFromState(finalWorld.getBlockState(finalPos));
TeleposeEvent event = new TeleposeEvent(initialWorld, initialPos, initialBlock, initialMeta, finalWorld, finalPos, finalBlock, finalMeta); TeleposeEvent event = new TeleposeEvent(initialWorld, initialPos, initialBlock, initialMeta, finalWorld, finalPos, finalBlock, finalMeta);
if (MinecraftForge.EVENT_BUS.post(event)) return false; if (MinecraftForge.EVENT_BUS.post(event))
return false;
initialWorld.playSoundEffect(initialPos.getX(), initialPos.getY(), initialPos.getZ(), "mob.endermen.portal", 1.0F, 1.0F); initialWorld.playSoundEffect(initialPos.getX(), initialPos.getY(), initialPos.getZ(), "mob.endermen.portal", 1.0F, 1.0F);
finalWorld.playSoundEffect(finalPos.getX(), finalPos.getY(), finalPos.getZ(), "mob.endermen.portal", 1.0F, 1.0F); finalWorld.playSoundEffect(finalPos.getX(), finalPos.getY(), finalPos.getZ(), "mob.endermen.portal", 1.0F, 1.0F);
@ -288,7 +290,7 @@ public class TileTeleposer extends TileInventory implements ITickable
oldWorldServer.resetUpdateEntityTick(); oldWorldServer.resetUpdateEntityTick();
newWorldServer.resetUpdateEntityTick(); newWorldServer.resetUpdateEntityTick();
player.worldObj.theProfiler.endSection(); player.worldObj.theProfiler.endSection();
for (Iterator<PotionEffect> potion = player.getActivePotionEffects().iterator(); potion.hasNext(); ) for (Iterator<PotionEffect> potion = player.getActivePotionEffects().iterator(); potion.hasNext();)
{ {
player.playerNetServerHandler.sendPacket(new S1DPacketEntityEffect(player.getEntityId(), potion.next())); player.playerNetServerHandler.sendPacket(new S1DPacketEntityEffect(player.getEntityId(), potion.next()));
} }

View file

@ -51,8 +51,7 @@ public class ContainerTeleposer extends Container
{ {
return null; return null;
} }
} } else if (!this.mergeItemStack(stackInSlot, slots, 36 + slots, false))
else if (!this.mergeItemStack(stackInSlot, slots, 36 + slots, false))
{ {
return null; return null;
} }

View file

@ -39,7 +39,7 @@ public class ChatUtil
* . * .
* *
* @param s * @param s
* The string to wrap. * The string to wrap.
* *
* @return An {@link IChatComponent} containing the string. * @return An {@link IChatComponent} containing the string.
*/ */
@ -66,9 +66,9 @@ public class ChatUtil
* args. * args.
* *
* @param s * @param s
* The string to format * The string to format
* @param args * @param args
* The args to apply to the format * The args to apply to the format
*/ */
public static IChatComponent wrapFormatted(String s, Object... args) public static IChatComponent wrapFormatted(String s, Object... args)
{ {
@ -79,9 +79,9 @@ public class ChatUtil
* Simply sends the passed lines to the player in a chat message. * Simply sends the passed lines to the player in a chat message.
* *
* @param player * @param player
* The player to send the chat to * The player to send the chat to
* @param lines * @param lines
* The lines to send * The lines to send
*/ */
public static void sendChat(EntityPlayer player, String... lines) public static void sendChat(EntityPlayer player, String... lines)
{ {
@ -102,9 +102,9 @@ public class ChatUtil
* Sends all passed chat components to the player. * Sends all passed chat components to the player.
* *
* @param player * @param player
* The player to send the chat lines to. * The player to send the chat lines to.
* @param lines * @param lines
* The {@link IChatComponent chat components} to send.yes * The {@link IChatComponent chat components} to send.yes
*/ */
public static void sendChat(EntityPlayer player, IChatComponent... lines) public static void sendChat(EntityPlayer player, IChatComponent... lines)
{ {
@ -129,7 +129,7 @@ public class ChatUtil
* Strings automatically. * Strings automatically.
* *
* @param lines * @param lines
* The chat lines to send * The chat lines to send
* *
* @see #wrap(String) * @see #wrap(String)
*/ */
@ -207,9 +207,9 @@ public class ChatUtil
* Credit to RWTema for the idea * Credit to RWTema for the idea
* *
* @param player * @param player
* The player to send the chat message to * The player to send the chat message to
* @param lines * @param lines
* The chat lines to send. * The chat lines to send.
*/ */
public static void sendNoSpam(EntityPlayerMP player, IChatComponent... lines) public static void sendNoSpam(EntityPlayerMP player, IChatComponent... lines)
{ {

View file

@ -29,13 +29,14 @@ public class Utils
/** /**
* @see #insertItemToTile(TileInventory, EntityPlayer, int) * @see #insertItemToTile(TileInventory, EntityPlayer, int)
* *
* @param tile * @param tile
* - The {@link TileInventory} to input the item to * - The {@link TileInventory} to input the item to
* @param player * @param player
* - The player to take the item from. * - The player to take the item from.
* *
* @return {@code true} if the ItemStack is inserted, {@code false} otherwise * @return {@code true} if the ItemStack is inserted, {@code false}
* otherwise
*/ */
public static boolean insertItemToTile(TileInventory tile, EntityPlayer player) public static boolean insertItemToTile(TileInventory tile, EntityPlayer player)
{ {
@ -45,17 +46,18 @@ public class Utils
/** /**
* Used for inserting an ItemStack with a stacksize of 1 to a tile's * Used for inserting an ItemStack with a stacksize of 1 to a tile's
* inventory at slot 0 * inventory at slot 0
* *
* EG: Block Altar * EG: Block Altar
* *
* @param tile * @param tile
* - The {@link TileInventory} to input the item to * - The {@link TileInventory} to input the item to
* @param player * @param player
* - The player to take the item from. * - The player to take the item from.
* @param slot * @param slot
* - The slot to attempt to insert to * - The slot to attempt to insert to
* *
* @return {@code true} if the ItemStack is inserted, {@code false} otherwise * @return {@code true} if the ItemStack is inserted, {@code false}
* otherwise
*/ */
public static boolean insertItemToTile(TileInventory tile, EntityPlayer player, int slot) public static boolean insertItemToTile(TileInventory tile, EntityPlayer player, int slot)
{ {
@ -82,10 +84,10 @@ public class Utils
/** /**
* Gets a default block for each type of {@link EnumAltarComponent} * Gets a default block for each type of {@link EnumAltarComponent}
* *
* @param component * @param component
* - The Component to provide a block for. * - The Component to provide a block for.
* *
* @return The default Block for the EnumAltarComponent * @return The default Block for the EnumAltarComponent
*/ */
public static Block getBlockForComponent(EnumAltarComponent component) public static Block getBlockForComponent(EnumAltarComponent component)

View file

@ -96,7 +96,8 @@ public class EventHandler
} }
@SubscribeEvent @SubscribeEvent
public void onConfigChanged(ConfigChangedEvent event) { public void onConfigChanged(ConfigChangedEvent event)
{
if (event.modID.equals(Constants.Mod.MODID)) if (event.modID.equals(Constants.Mod.MODID))
ConfigHandler.syncConfig(); ConfigHandler.syncConfig();
} }

View file

@ -41,11 +41,11 @@ public class InventoryRenderHelper
* Registers a Model for the given Item and meta. * Registers a Model for the given Item and meta.
* *
* @param item * @param item
* - Item to register Model for * - Item to register Model for
* @param meta * @param meta
* - Meta of Item * - Meta of Item
* @param name * @param name
* - Name of the model JSON * - Name of the model JSON
*/ */
public void itemRender(Item item, int meta, String name) public void itemRender(Item item, int meta, String name)
{ {
@ -59,9 +59,9 @@ public class InventoryRenderHelper
* Shorthand of {@code itemRender(Item, int, String)} * Shorthand of {@code itemRender(Item, int, String)}
* *
* @param item * @param item
* - Item to register Model for * - Item to register Model for
* @param meta * @param meta
* - Meta of Item * - Meta of Item
*/ */
public void itemRender(Item item, int meta) public void itemRender(Item item, int meta)
{ {
@ -77,7 +77,7 @@ public class InventoryRenderHelper
* Shorthand of {@code itemRender(Item, int)} * Shorthand of {@code itemRender(Item, int)}
* *
* @param item * @param item
* - Item to register Model for * - Item to register Model for
*/ */
public void itemRender(Item item) public void itemRender(Item item)
{ {
@ -89,7 +89,7 @@ public class InventoryRenderHelper
* item * item
* *
* @param item * @param item
* - Item to register Model for * - Item to register Model for
*/ */
public void itemRenderAll(Item item) public void itemRenderAll(Item item)
{ {
@ -137,7 +137,7 @@ public class InventoryRenderHelper
/** /**
* @param block * @param block
* - Block to get Item of * - Block to get Item of
* *
* @return - The ItemBlock that corresponds to the Block. * @return - The ItemBlock that corresponds to the Block.
*/ */