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,8 +49,8 @@ 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.

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

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

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

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

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

@ -43,8 +43,7 @@ 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

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

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

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

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

@ -35,7 +35,8 @@ public class Utils
* @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)
{ {
@ -55,7 +56,8 @@ public class Utils
* @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)
{ {

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();
} }