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

View file

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

View file

@ -18,9 +18,9 @@ public class AltarComponent
* Sets a component location for the altar.
*
* @param offset
* - Where the block should be in relation to the Altar
* - Where the block should be in relation to the Altar
* @param component
* - The type of Component the location should contain
* - The type of Component the location should contain
*/
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
* of block does not matter.
*
*
* @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)
{

View file

@ -2,5 +2,10 @@ package WayofTime.bloodmagic.api.altar;
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.
*
* @param inv
* The inventory iterated through
* The inventory iterated through
* @return The result of the compression
*/
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
*
* @param stack
* item/block to be compressed
* item/block to be compressed
* @param threshold
* amount that is to be compressed
* amount that is to be compressed
*/
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.
*
* @param ownerNetwork
* Key used for the soul network
* Key used for the soul network
* @param addedAmount
* Amount added
* Amount added
* @param maximum
* Ceiling that the network can add to
* Ceiling that the network can add to
*/
public AddToNetworkEvent(String ownerNetwork, int addedAmount, int maximum)
{

View file

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

View file

@ -7,8 +7,11 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
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
public class TeleposeEvent extends Event
{

View file

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

View file

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

View file

@ -26,11 +26,11 @@ public abstract class StatTracker
* LivingArmour
*
* @param world
* World the player is in
* World the player is in
* @param player
* The player that has the armour equipped
* The player that has the armour equipped
* @param livingArmour
* The equipped LivingArmour
* The equipped LivingArmour
* @return True if there is a new upgrade unlocked this tick.
*/
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
*
*
* @param syphon
* - The amount of LP to syphon
*
* - The amount of LP to syphon
*
* @return The amount of LP syphoned
*/
public int syphon(int syphon)
@ -112,11 +112,11 @@ public class SoulNetwork extends WorldSavedData
* instead take away from the user's health.
*
* Always returns false on the client side.
*
*
* @param user
* - The Player to syphon from
* - The Player to syphon from
* @param toSyphon
* - The amount of LP to syphon
* - The amount of LP to syphon
*
* @return - Whether the action should be performed.
*/

View file

@ -23,11 +23,11 @@ public class BloodOrb
* EnergyItems.
*
* @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
* - The tier of the Orb.
* - The tier of the Orb.
* @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)
{

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 ? "" : " -> ");
}
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));
}
@ -52,19 +53,19 @@ public class AltarRecipeRegistry
* Orbs)
*
* @param input
* - The input ItemStack
* - The input ItemStack
* @param output
* - The ItemStack obtained from the recipe
* - The ItemStack obtained from the recipe
* @param minTier
* - The minimum tier of Altar required
* - The minimum tier of Altar required
* @param syphon
* - The amount of LP to syphon from the Altar
* - The amount of LP to syphon from the Altar
* @param consumeRate
* - The rate at which LP is consumed during crafting
* - The rate at which LP is consumed during crafting
* @param drainRate
* - The rate at which LP is drained during crafting
* - The rate at which LP is drained during crafting
* @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)
{

View file

@ -19,9 +19,9 @@ public class ImperfectRitualRegistry
* The safe way to register a new Ritual.
*
* @param imperfectRitual
* - The imperfect ritual to register.
* - The imperfect ritual to register.
* @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)
{

View file

@ -24,9 +24,9 @@ public class RitualRegistry
* The safe way to register a new Ritual.
*
* @param ritual
* - The ritual to register.
* - The ritual to register.
* @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)
{

View file

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

View file

@ -8,7 +8,13 @@ import java.util.Locale;
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)
{

View file

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

View file

@ -27,11 +27,11 @@ public abstract class ImperfectRitual
/**
* @param name
* - The name of the ritual
* - The name of the ritual
* @param requiredBlock
* - The block required above the ImperfectRitualStone
* - The block required above the ImperfectRitualStone
* @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)
{
@ -43,10 +43,9 @@ public abstract class ImperfectRitual
* {@link WayofTime.bloodmagic.tile.TileImperfectRitualStone#performRitual(World, BlockPos, ImperfectRitual, EntityPlayer)}
*
* @param imperfectRitualStone
* - The {@link IImperfectRitualStone} that the ritual is bound
* to
* - The {@link IImperfectRitualStone} that the ritual is bound to
* @param player
* - The player activating the ritual
* - The player activating the ritual
* @return - Whether activation was successful
*/
public abstract boolean onActivate(IImperfectRitualStone imperfectRitualStone, EntityPlayer player);

View file

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

View file

@ -46,9 +46,9 @@ public class NetworkHelper
/**
* @see NetworkHelper#getSoulNetwork(String)
*
*
* @param uuid
* - The Player's Mojang UUID
* - The Player's Mojang UUID
*/
public static SoulNetwork getSoulNetwork(UUID uuid)
{
@ -57,9 +57,9 @@ public class NetworkHelper
/**
* @see NetworkHelper#getSoulNetwork(String)
*
*
* @param player
* - The Player
* - The 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.
*
*
* @param stack
* - ItemStack to check
* - ItemStack to check
* @param toSyphon
* - Amount of LP to syphon
*
* - Amount of LP to syphon
*
* @return - If syphoning is possible
*/
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
* stones in the world is valid for the given EnumFacing.
*
*
* @param world
* - The world
* - The world
* @param pos
* - Location of the MasterRitualStone
*
* - Location of the MasterRitualStone
*
* @return The ID of the valid ritual
*/
public static String getValidRitual(World world, BlockPos pos)
@ -136,11 +136,11 @@ public class RitualHelper
* Should be safe to modify at any point.
*
* @param config
* - Your mod's Forge {@link Configuration} object.
* - Your mod's Forge {@link Configuration} object.
* @param packageName
* - The package your Rituals are located in.
* - The package your Rituals are located in.
* @param category
* - The config category to write to.
* - The config category to write to.
*/
@SuppressWarnings("unchecked")
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);
((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());
}

View file

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

View file

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

View file

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

View file

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

View file

@ -88,9 +88,9 @@ public class StorageBlockCraftingRecipeAssimilator
}
}
} 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)
continue;
@ -208,7 +208,7 @@ public class StorageBlockCraftingRecipeAssimilator
* every input element.
*
* @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.
*/
@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.
*
* @param stack
* - The ItemStack to syphon from
* - The ItemStack to syphon from
* @param player
* - The Player using the item
* - The Player using the item
* @param lpUsed
* - The amount of LP to syphon
*
* - The amount of LP to syphon
*
* @return Whether syphoning was successful or not
*/
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.
*
* @param stack
* - The ItemStack to syphon from.
* - The ItemStack to syphon from.
* @param lpUsed
* - The amount of LP to syphon
*
* - The amount of LP to syphon
*
* @return - If syphoning was successful or not
*/
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.
*
*
* @param stack
* - The Ritual Diviner stack
* - The Ritual Diviner stack
* @param world
* - The World
* - The World
* @param pos
* - Block Position of the MRS.
* - Block Position of the MRS.
* @param player
* - The Player attempting to place the ritual
*
* - The Player attempting to place the ritual
*
* @return - True if a rune was successfully added
*/
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.
*
* @param stack
* - The ItemStack of the ritual diviner
* - The ItemStack of the ritual diviner
* @param player
* - The player using the ritual diviner
* - The player using the ritual diviner
*/
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());
}
}
}
else
} else
{
if (entityList1 != null && !entityList1.isEmpty())
{
@ -193,8 +192,10 @@ public class TileTeleposer extends TileInventory implements ITickable
TileEntity finalTile = finalWorld.getTileEntity(finalPos);
NBTTagCompound initialTag = new NBTTagCompound();
NBTTagCompound finalTag = new NBTTagCompound();
if (initialTile != null) initialTile.writeToNBT(initialTag);
if (finalTile != null) finalTile.writeToNBT(finalTag);
if (initialTile != null)
initialTile.writeToNBT(initialTag);
if (finalTile != null)
finalTile.writeToNBT(finalTag);
Block initialBlock = initialWorld.getBlockState(initialPos).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));
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);
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();
newWorldServer.resetUpdateEntityTick();
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()));
}

View file

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

View file

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

View file

@ -29,13 +29,14 @@ public class Utils
/**
* @see #insertItemToTile(TileInventory, EntityPlayer, int)
*
*
* @param tile
* - The {@link TileInventory} to input the item to
* - The {@link TileInventory} to input the item to
* @param player
* - The player to take the item from.
*
* @return {@code true} if the ItemStack is inserted, {@code false} otherwise
* - The player to take the item from.
*
* @return {@code true} if the ItemStack is inserted, {@code false}
* otherwise
*/
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
* inventory at slot 0
*
*
* EG: Block Altar
*
*
* @param tile
* - The {@link TileInventory} to input the item to
* - The {@link TileInventory} to input the item to
* @param player
* - The player to take the item from.
* - The player to take the item from.
* @param slot
* - The slot to attempt to insert to
*
* @return {@code true} if the ItemStack is inserted, {@code false} otherwise
* - The slot to attempt to insert to
*
* @return {@code true} if the ItemStack is inserted, {@code false}
* otherwise
*/
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}
*
*
* @param component
* - The Component to provide a block for.
*
* - The Component to provide a block for.
*
* @return The default Block for the EnumAltarComponent
*/
public static Block getBlockForComponent(EnumAltarComponent component)

View file

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

View file

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