Cleanup javadoc and make it compile correctly

This commit is contained in:
Nick 2015-12-01 21:14:26 -08:00
parent 427fb25424
commit c4e6f63ada
20 changed files with 44 additions and 47 deletions

View file

@ -11,7 +11,6 @@ import lombok.Getter;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;

View file

@ -134,7 +134,7 @@ public class BloodAltar {
if (altarComponent.getBlockStack().getBlock() == ModBlocks.crystal)
if (blockStack.getBlock() instanceof BlockCrystal || (blockStack.getBlock() instanceof IAltarComponent && (((IAltarComponent) blockStack.getBlock()).getType(blockStack.getMeta()) == EnumAltarComponent.CRYSTAL)))
return true;
return true;
if (altarComponent.getBlockStack().getBlock() == Blocks.glowstone)
if (blockStack.getBlock() instanceof BlockGlowstone || (blockStack.getBlock() instanceof IAltarComponent && (((IAltarComponent) blockStack.getBlock()).getType(blockStack.getMeta()) == EnumAltarComponent.GLOWSTONE)))

View file

@ -4,8 +4,11 @@ import WayofTime.bloodmagic.api.ritual.IMasterRitualStone;
import WayofTime.bloodmagic.api.ritual.Ritual;
import WayofTime.bloodmagic.api.ritual.imperfect.IImperfectRitualStone;
import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual;
import WayofTime.bloodmagic.tile.TileMasterRitualStone;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
@ -23,8 +26,8 @@ public class RitualEvent extends Event {
/**
* This event is called when a ritual is activated. If cancelled, it will not activate.
* <p/>
* {@link WayofTime.bloodmagic.api.util.helper.RitualHelper#activate(IMasterRitualStone, Ritual, EntityPlayer)}
*
* {@link TileMasterRitualStone#activateRitual(ItemStack, EntityPlayer)}
*/
@Cancelable
public static class RitualActivatedEvent extends RitualEvent {
@ -43,8 +46,8 @@ public class RitualEvent extends Event {
/**
* This event is called when a Ritual effect is performed. If cancelled, the effect will not happen.
* <p/>
* {@link WayofTime.bloodmagic.api.util.helper.RitualHelper#perform(IMasterRitualStone, Ritual)}
*
* {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#performRitual(World, BlockPos, Ritual)}
*/
@Cancelable
public static class RitualRunEvent extends RitualEvent {
@ -56,8 +59,8 @@ public class RitualEvent extends Event {
/**
* This event is called when a Ritual is stopped by a {@link Ritual.BreakType}.
* <p/>
* {@link WayofTime.bloodmagic.api.util.helper.RitualHelper#stop(IMasterRitualStone, Ritual, Ritual.BreakType)}
*
* {@link TileMasterRitualStone#stopRitual()}
*/
public static class RitualStopEvent extends RitualEvent {

View file

@ -10,7 +10,7 @@ public interface IBindable {
/**
* Called when the player attempts to bind the item.
* <p/>
*
* If false, binding fails.
*/
boolean onBind(EntityPlayer player, ItemStack stack);

View file

@ -94,7 +94,7 @@ public class SoulNetwork extends WorldSavedData {
/**
* If the player exists on the server, syphon the given amount of LP from the player's LP network and
* damage for any remaining LP required.
* <p/>
*
* Always returns false on the client side.
*
* @return - Whether the action should be performed.

View file

@ -4,7 +4,7 @@ import WayofTime.bloodmagic.api.registry.OrbRegistry;
/**
* Base object for all Blood Orbs. Makes Orb creation quite a bit easier.
* <p/>
*
* Just create a new BloodOrb instance then register it with {@link OrbRegistry#registerOrb(BloodOrb)}
* This will allow the use of just one item ID for all orbs. If an addon dev needs more control over the intricacies
* of their orb (custom right clicking, renderers, etc), they can just create their own item as normal.

View file

@ -25,9 +25,9 @@ public class BindableHelper {
/**
* Bind an item to a username.
* <p/>
*
* Requires the Item contained in the ItemStack to be an instanceof {@link IBindable}
* <p/>
*
* Fires {@link ItemBindEvent}.
*
* @param stack - The ItemStack to bind

View file

@ -42,12 +42,12 @@ public class RitualHelper {
/**
* Adds your Ritual to the {@link RitualRegistry#enabledRituals} Map.
* This is used to determine whether your effect is enabled or not.
* <p/>
*
* The config option will be created as {@code B:ClassName=true} with a comment of
* {@code Enables the ClassName ritual}.
* <p/>
*
* Use {@link #}
* <p/>
*
* Should be safe to modify at any point.
*
* @param config - Your mod's Forge {@link Configuration} object.

View file

@ -6,7 +6,10 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.util.*;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@ -30,14 +33,12 @@ public class BlockBloodLight extends Block {
@Override
@SideOnly(Side.CLIENT)
public EnumWorldBlockLayer getBlockLayer()
{
public EnumWorldBlockLayer getBlockLayer() {
return EnumWorldBlockLayer.CUTOUT;
}
@Override
public boolean isFullCube()
{
public boolean isFullCube() {
return false;
}

View file

@ -26,9 +26,9 @@ import java.util.List;
/**
* Creates a block that has multiple meta-based states.
* <p/>
*
* These states will be numbered 0 through {@code maxMeta}.
* <p/>
*
* For {@link net.minecraft.tileentity.TileEntity}'s, use {@link BlockIntegerContainer}.
*/
@Getter

View file

@ -27,10 +27,10 @@ import java.util.List;
/**
* Creates a block that has multiple meta-based states.
* <p/>
*
* These states will be named after the given string array. Somewhere along the way, each
* value is {@code toLowerCase()}'ed, so the blockstate JSON needs all values to be lowercase.
* <p/>
*
* For {@link net.minecraft.tileentity.TileEntity}'s, use {@link BlockStringContainer}.
*/
@Getter

View file

@ -21,14 +21,14 @@ public class BloodMagicPlugin implements IModPlugin {
@Override
public Iterable<? extends IRecipeCategory> getRecipeCategories() {
return Arrays.asList(
new AltarRecipeCategory()
new AltarRecipeCategory()
);
}
@Override
public Iterable<? extends IRecipeHandler> getRecipeHandlers() {
return Arrays.asList(
new AltarRecipeHandler()
new AltarRecipeHandler()
);
}

View file

@ -2,7 +2,6 @@ package WayofTime.bloodmagic.compat.jei.altar;
import WayofTime.bloodmagic.compat.jei.BloodMagicRecipeWrapper;
import WayofTime.bloodmagic.util.helper.TextHelper;
import com.google.common.base.Strings;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
@ -25,7 +24,7 @@ public class AltarRecipeJEI extends BloodMagicRecipeWrapper {
this.input = input;
this.output = output;
this.infoString = new String[]{ TextHelper.localize("jei.BloodMagic.recipe.requiredTier", tier), TextHelper.localize("jei.BloodMagic.recipe.requiredLP", requiredLP) };
this.infoString = new String[]{TextHelper.localize("jei.BloodMagic.recipe.requiredTier", tier), TextHelper.localize("jei.BloodMagic.recipe.requiredLP", requiredLP)};
}
@Override

View file

@ -5,7 +5,9 @@ import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry;
import net.minecraft.item.ItemStack;
import javax.annotation.Nonnull;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class AltarRecipeMaker {

View file

@ -15,11 +15,8 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@ -58,8 +55,7 @@ public class ItemAltarMaker extends Item implements IAltarManipulator {
setTierToBuild(EnumAltarTier.values()[stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER)]);
ChatUtil.sendNoSpamClient(TextHelper.localizeEffect("chat.BloodMagic.altarMaker.setTier", stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) + 1));
return stack;
}
else {
} else {
stack.getTagCompound().setInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER, stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) + 1);
setTierToBuild(EnumAltarTier.values()[stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER)]);
ChatUtil.sendNoSpamClient(TextHelper.localizeEffect("chat.BloodMagic.altarMaker.setTier", stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) + 1));
@ -68,7 +64,8 @@ public class ItemAltarMaker extends Item implements IAltarManipulator {
}
MovingObjectPosition mop = getMovingObjectPositionFromPlayer(world, player, false);
if (mop == null || mop.typeOfHit == MovingObjectPosition.MovingObjectType.MISS || mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) return stack;
if (mop == null || mop.typeOfHit == MovingObjectPosition.MovingObjectType.MISS || mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY)
return stack;
if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && world.getBlockState(mop.getBlockPos()).getBlock() instanceof BlockAltar) {

View file

@ -321,8 +321,7 @@ public class TileAltar extends TileInventory implements IBloodAltar, ITickable,
this.dislocationMultiplier = 1;
this.accelerationUpgrades = 0;
return;
}
else if (!tier.equals(EnumAltarTier.ONE) && upgrade != null) {
} else if (!tier.equals(EnumAltarTier.ONE) && upgrade != null) {
this.isUpgraded = true;
this.consumptionMultiplier = (float) (0.20 * upgrade.getSpeedCount());
this.efficiencyMultiplier = (float) Math.pow(0.85, upgrade.getEfficiencyCount());

View file

@ -173,7 +173,7 @@ public class ChatUtil {
/**
* Sends a chat message to the client, deleting past messages also sent via
* this method.
* <p/>
*
* Credit to RWTema for the idea
*
* @param player The player to send the chat message to
@ -186,7 +186,7 @@ public class ChatUtil {
/**
* @author tterrag1098
* <p/>
*
* Ripped from EnderCore (and slightly altered)
*/
public static class PacketNoSpamChat implements IMessage {

View file

@ -22,7 +22,7 @@ public class Utils {
/**
* Used for inserting an ItemStack with a stacksize of 1 to a tile's inventory at slot 0.
* Returns {@code true} if the ItemStack is inserted, {@code false} otherwise
* <p/>
*
* EG: Block Altar
*
* @param tile - The {@link TileInventory} to input the item to

View file

@ -1,6 +1,5 @@
package WayofTime.bloodmagic.util.handler;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
import WayofTime.bloodmagic.block.BlockAltar;
import WayofTime.bloodmagic.item.ItemAltarMaker;
@ -14,8 +13,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.StatCollector;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import net.minecraftforge.event.entity.player.FillBucketEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;

View file

@ -14,13 +14,13 @@ import net.minecraftforge.client.model.ModelLoader;
/**
* @author <a href="https://github.com/TehNut">TehNut</a>
* <p/>
*
* The goal of this class is to make registering the inventory renders
* for your Items/Blocks a much simpler and easier process.
* <p/>
*
* You must call this at the post initialization stage on
* the clientside only.
* <p/>
*
* If you pass a Block through here that uses the default
* ItemBlock, you should specify a custom name.
*/