diff --git a/src/main/java/WayofTime/bloodmagic/BloodMagic.java b/src/main/java/WayofTime/bloodmagic/BloodMagic.java index 0fbd4be6..7eac4175 100644 --- a/src/main/java/WayofTime/bloodmagic/BloodMagic.java +++ b/src/main/java/WayofTime/bloodmagic/BloodMagic.java @@ -104,7 +104,8 @@ public class BloodMagic } @Mod.EventHandler - public void serverStarting(FMLServerStartingEvent event) { + public void serverStarting(FMLServerStartingEvent event) + { event.registerServerCommand(new CommandBloodMagic()); } diff --git a/src/main/java/WayofTime/bloodmagic/ConfigHandler.java b/src/main/java/WayofTime/bloodmagic/ConfigHandler.java index 24cb238c..c6c95ae0 100644 --- a/src/main/java/WayofTime/bloodmagic/ConfigHandler.java +++ b/src/main/java/WayofTime/bloodmagic/ConfigHandler.java @@ -155,26 +155,26 @@ public class ConfigHandler category = "Item/Block Blacklisting"; config.addCustomCategoryComment(category, "Allows disabling of specific Blocks/Items.\nNote that using this may result in crashes. Use is not supported."); config.setCategoryRequiresMcRestart(category, true); - itemBlacklist = Arrays.asList(config.getStringList("itemBlacklist", category, new String[]{}, "Items to not be registered. This requires their mapping name. Usually the same as the class name. Can be found in F3+H mode.")); - blockBlacklist = Arrays.asList(config.getStringList("blockBlacklist", category, new String[]{}, "Blocks to not be registered. This requires their mapping name. Usually the same as the class name. Can be found in F3+H mode.")); + itemBlacklist = Arrays.asList(config.getStringList("itemBlacklist", category, new String[] {}, "Items to not be registered. This requires their mapping name. Usually the same as the class name. Can be found in F3+H mode.")); + blockBlacklist = Arrays.asList(config.getStringList("blockBlacklist", category, new String[] {}, "Blocks to not be registered. This requires their mapping name. Usually the same as the class name. Can be found in F3+H mode.")); category = "Teleposer Blacklist"; config.addCustomCategoryComment(category, "Block blacklisting"); - teleposerBlacklisting = config.getStringList("teleposerBlacklist", category, new String[]{"minecraft:bedrock"}, "Stops specified blocks from being teleposed. Put entries on new lines. Valid syntax is:\nmodid:blockname:meta"); + teleposerBlacklisting = config.getStringList("teleposerBlacklist", category, new String[] { "minecraft:bedrock" }, "Stops specified blocks from being teleposed. Put entries on new lines. Valid syntax is:\nmodid:blockname:meta"); buildBlacklist(teleposerBlacklisting, teleposerBlacklist); category = "Transposition Sigil Blacklist"; config.addCustomCategoryComment(category, "Block blacklisting"); - transpositionBlacklisting = config.getStringList("transpositionBlacklist", category, new String[]{"minecraft:bedrock"}, "Stops specified blocks from being teleposed. Put entries on new lines. Valid syntax is:\nmodid:blockname:meta"); + transpositionBlacklisting = config.getStringList("transpositionBlacklist", category, new String[] { "minecraft:bedrock" }, "Stops specified blocks from being teleposed. Put entries on new lines. Valid syntax is:\nmodid:blockname:meta"); buildBlacklist(transpositionBlacklisting, transpositionBlacklist); category = "Well of Suffering Blacklist"; config.addCustomCategoryComment(category, "Entity blacklisting from WoS"); - wellOfSufferingBlacklist = Arrays.asList(config.getStringList("wellOfSufferingBlacklist", category, new String[]{}, "Use the class name of the Entity to blacklist it from usage.\nIE: EntityWolf, EntityWitch, etc")); + wellOfSufferingBlacklist = Arrays.asList(config.getStringList("wellOfSufferingBlacklist", category, new String[] {}, "Use the class name of the Entity to blacklist it from usage.\nIE: EntityWolf, EntityWitch, etc")); category = "Blood Altar Sacrificial Values"; config.addCustomCategoryComment(category, "Entity Sacrificial Value Settings"); - entitySacrificeValuesList = config.getStringList("entitySacrificeValues", category, new String[]{"EntityVillager;2000", "EntitySlime;150", "EntityEnderman;200", "EntityCow;250", "EntityChicken;250", "EntityHorse;250", "EntitySheep;250", "EntityWolf;250", "EntityOcelot;250", "EntityPig;250", "EntityRabbit;250"}, "Used to edit the amount of LP gained per sacrifice of the given entity.\nSetting an entity to 0 effectively blacklists it.\nIf a mod modifies an entity via the API, it will take precedence over this config.\nSyntax: EntityClassName;LPPerSacrifice"); + entitySacrificeValuesList = config.getStringList("entitySacrificeValues", category, new String[] { "EntityVillager;2000", "EntitySlime;150", "EntityEnderman;200", "EntityCow;250", "EntityChicken;250", "EntityHorse;250", "EntitySheep;250", "EntityWolf;250", "EntityOcelot;250", "EntityPig;250", "EntityRabbit;250" }, "Used to edit the amount of LP gained per sacrifice of the given entity.\nSetting an entity to 0 effectively blacklists it.\nIf a mod modifies an entity via the API, it will take precedence over this config.\nSyntax: EntityClassName;LPPerSacrifice"); buildEntitySacrificeValues(); category = "Potions"; diff --git a/src/main/java/WayofTime/bloodmagic/api/BlockStack.java b/src/main/java/WayofTime/bloodmagic/api/BlockStack.java index 079aad67..4fb523ac 100644 --- a/src/main/java/WayofTime/bloodmagic/api/BlockStack.java +++ b/src/main/java/WayofTime/bloodmagic/api/BlockStack.java @@ -10,7 +10,7 @@ import net.minecraft.world.World; import net.minecraftforge.fml.common.registry.GameData; @Getter -@EqualsAndHashCode(exclude = {"state"}) +@EqualsAndHashCode(exclude = { "state" }) public class BlockStack { private final Block block; diff --git a/src/main/java/WayofTime/bloodmagic/api/BloodMagicAPI.java b/src/main/java/WayofTime/bloodmagic/api/BloodMagicAPI.java index a9265d79..fd1243ce 100644 --- a/src/main/java/WayofTime/bloodmagic/api/BloodMagicAPI.java +++ b/src/main/java/WayofTime/bloodmagic/api/BloodMagicAPI.java @@ -17,13 +17,13 @@ import WayofTime.bloodmagic.api.util.helper.LogHelper; /** * The primary API class. Includes helper methods and blacklists. - * + * * Some API methods can be used via IMC instead. The supported methods are: - * + * * */ public class BloodMagicAPI @@ -51,8 +51,8 @@ public class BloodMagicAPI /** * Used to obtain Items from BloodMagic. Use - * {@link WayofTime.bloodmagic.api.Constants.BloodMagicItem} to get - * the registered name. + * {@link WayofTime.bloodmagic.api.Constants.BloodMagicItem} to get the + * registered name. * * @param name * - The registered name of the item. Usually the same as the class @@ -66,20 +66,22 @@ public class BloodMagicAPI /** * @see #getItem(String) - * + * * @param bloodMagicItem - * - The {@link WayofTime.bloodmagic.api.Constants.BloodMagicItem} to get. + * - The {@link WayofTime.bloodmagic.api.Constants.BloodMagicItem} to + * get. * @return - The requested Item */ - public static Item getItem(Constants.BloodMagicItem bloodMagicItem) { + public static Item getItem(Constants.BloodMagicItem bloodMagicItem) + { return getItem(bloodMagicItem.getRegName()); } /** * Used to obtain Blocks from BloodMagic. Use - * {@link WayofTime.bloodmagic.api.Constants.BloodMagicBlock} to get - * the registered name. - * + * {@link WayofTime.bloodmagic.api.Constants.BloodMagicBlock} to get the + * registered name. + * * @param name * - The registered name of the block. Usually the same as the class * name. @@ -92,21 +94,25 @@ public class BloodMagicAPI /** * @see #getBlock(String) - * + * * @param bloodMagicBlock - * - The {@link WayofTime.bloodmagic.api.Constants.BloodMagicBlock} to get. + * - The {@link WayofTime.bloodmagic.api.Constants.BloodMagicBlock} + * to get. * @return - The requested Block */ - public static Block getBlock(Constants.BloodMagicBlock bloodMagicBlock) { + public static Block getBlock(Constants.BloodMagicBlock bloodMagicBlock) + { return getBlock(bloodMagicBlock.getRegName()); } /** * Used to add a {@link BlockStack} to the Teleposer blacklist that cannot * be changed via Configuration files. - * - * IMC: {@code FMLInterModComs.sendMessage("BloodMagic", "teleposerBlacklist", ItemStack)} - * Example: {@code FMLInterModComs.sendMessage("BloodMagic", "teleposerBlacklist", new ItemStack(Blocks.bedrock))} + * + * IMC: + * {@code FMLInterModComs.sendMessage("BloodMagic", "teleposerBlacklist", ItemStack)} + * Example: + * {@code FMLInterModComs.sendMessage("BloodMagic", "teleposerBlacklist", new ItemStack(Blocks.bedrock))} * * @param blockStack * - The BlockStack to blacklist. @@ -142,16 +148,18 @@ public class BloodMagicAPI } /** - * Used to set the sacrifice value of an Entity. The value provided is how much - * LP will be gained when the entity is sacrificed at a Blood Altar. - * + * Used to set the sacrifice value of an Entity. The value provided is how + * much LP will be gained when the entity is sacrificed at a Blood Altar. + * * Setting a sacrificeValue of 0 will effectively blacklist the entity. - * + * * The default value for any unset Entity is 500 LP per sacrifice. - * - * IMC: {@code FMLInterModComs.sendMessage("BloodMagic", "sacrificeValue", "ClassName;Value")} - * Example: {@code FMLInterModComs.sendMessage("BloodMagic", "sacrificeValue", "EntityVillager;2000")} - * + * + * IMC: + * {@code FMLInterModComs.sendMessage("BloodMagic", "sacrificeValue", "ClassName;Value")} + * Example: + * {@code FMLInterModComs.sendMessage("BloodMagic", "sacrificeValue", "EntityVillager;2000")} + * * @param entityClass * - The class of the entity to blacklist. * @param sacrificeValue @@ -165,7 +173,7 @@ public class BloodMagicAPI /** * @see #setEntitySacrificeValue(Class, int) - * + * * @param entityClassName * - The name of the class of the entity to blacklist. * @param sacrificeValue @@ -179,13 +187,17 @@ public class BloodMagicAPI /** * Blacklists a block from the Green Grove Ritual and Sigil. - * - * IMC: {@code FMLInterModComs.sendMessage("BloodMagic", "greenGroveBlacklist", "domain:name")} - * Example: {@code FMLInterModComs.sendMessage("BloodMagic", "greenGroveBlacklist", "minecraft:wheat")} - * - * @param block - Block to blacklist + * + * IMC: + * {@code FMLInterModComs.sendMessage("BloodMagic", "greenGroveBlacklist", "domain:name")} + * Example: + * {@code FMLInterModComs.sendMessage("BloodMagic", "greenGroveBlacklist", "minecraft:wheat")} + * + * @param block + * - Block to blacklist */ - public static void blacklistFromGreenGrove(Block block) { + public static void blacklistFromGreenGrove(Block block) + { if (!greenGroveBlacklist.contains(block)) greenGroveBlacklist.add(block); } diff --git a/src/main/java/WayofTime/bloodmagic/api/event/AltarCraftedEvent.java b/src/main/java/WayofTime/bloodmagic/api/event/AltarCraftedEvent.java index a6f24ad0..6380bc85 100644 --- a/src/main/java/WayofTime/bloodmagic/api/event/AltarCraftedEvent.java +++ b/src/main/java/WayofTime/bloodmagic/api/event/AltarCraftedEvent.java @@ -7,7 +7,7 @@ import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry; /** * Fired whenever a craft is completed in a BloodAltar. - * + * * It is not cancelable, however you can modify the output stack. */ @Getter @@ -19,9 +19,9 @@ public class AltarCraftedEvent extends Event /** * @param altarRecipe - * - The recipe that was crafted. + * - The recipe that was crafted. * @param output - * - The item obtained from the recipe + * - The item obtained from the recipe */ public AltarCraftedEvent(AltarRecipeRegistry.AltarRecipe altarRecipe, ItemStack output) { diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/IBindable.java b/src/main/java/WayofTime/bloodmagic/api/iface/IBindable.java index f9409daa..b75f0530 100644 --- a/src/main/java/WayofTime/bloodmagic/api/iface/IBindable.java +++ b/src/main/java/WayofTime/bloodmagic/api/iface/IBindable.java @@ -9,26 +9,26 @@ import net.minecraft.item.ItemStack; public interface IBindable { /** - * Gets the username of the Item's owner. Usually for display, - * such as in the tooltip. - * + * Gets the username of the Item's owner. Usually for display, such as in + * the tooltip. + * * If the item is not bound, this will be null. - * + * * @param stack * - The owned ItemStack - * + * * @return - The username of the Item's owner */ String getOwnerName(ItemStack stack); /** * Gets the UUID of the Item's owner. - * + * * If the item is not bound, this will be null. - * + * * @param stack * - The owned ItemStack - * + * * @return - The UUID of the Item's owner */ String getOwnerUUID(ItemStack stack); diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/IHarvestHandler.java b/src/main/java/WayofTime/bloodmagic/api/iface/IHarvestHandler.java index 485ccae2..e8423ddf 100644 --- a/src/main/java/WayofTime/bloodmagic/api/iface/IHarvestHandler.java +++ b/src/main/java/WayofTime/bloodmagic/api/iface/IHarvestHandler.java @@ -10,20 +10,20 @@ import WayofTime.bloodmagic.api.BlockStack; public interface IHarvestHandler { /** - * Called whenever the Harvest Ritual attempts to harvest a block. - *
- * Use this to break the block, plant a new one, and drop the produced items. - *
- * Make sure to do checks so you are certain the blocks being handled - * are the block types you want. - * + * Called whenever the Harvest Ritual attempts to harvest a block.
+ * Use this to break the block, plant a new one, and drop the produced + * items.
+ * Make sure to do checks so you are certain the blocks being handled are + * the block types you want. + * * @param world - * - The world the {@link WayofTime.bloodmagic.api.ritual.IMasterRitualStone} is in. + * - The world the + * {@link WayofTime.bloodmagic.api.ritual.IMasterRitualStone} is in. * @param pos - * - The position of the Block being checked + * - The position of the Block being checked * @param blockStack - * - The Block being checked - * + * - The Block being checked + * * @return If the block was successfully harvested. */ boolean harvestAndPlant(World world, BlockPos pos, BlockStack blockStack); diff --git a/src/main/java/WayofTime/bloodmagic/api/iface/INodeRenderer.java b/src/main/java/WayofTime/bloodmagic/api/iface/INodeRenderer.java index 5cc184f8..89701cf7 100644 --- a/src/main/java/WayofTime/bloodmagic/api/iface/INodeRenderer.java +++ b/src/main/java/WayofTime/bloodmagic/api/iface/INodeRenderer.java @@ -1,8 +1,8 @@ package WayofTime.bloodmagic.api.iface; /** - * Held items that implement this will cause the beams between - * routing nodes to render. + * Held items that implement this will cause the beams between routing nodes to + * render. */ public interface INodeRenderer { diff --git a/src/main/java/WayofTime/bloodmagic/api/livingArmour/ILivingArmour.java b/src/main/java/WayofTime/bloodmagic/api/livingArmour/ILivingArmour.java index ba052ed4..e5d045cb 100644 --- a/src/main/java/WayofTime/bloodmagic/api/livingArmour/ILivingArmour.java +++ b/src/main/java/WayofTime/bloodmagic/api/livingArmour/ILivingArmour.java @@ -28,9 +28,9 @@ public interface ILivingArmour * well as the LivingArmour * * @param world - * - The World + * - The World * @param player - * - The player wearing the Armour + * - The player wearing the Armour */ void onTick(World world, EntityPlayer player); @@ -43,7 +43,7 @@ public interface ILivingArmour * that are dirty. * * @param tag - * - The NBT tag to write to + * - The NBT tag to write to */ void writeDirtyToNBT(NBTTagCompound tag); diff --git a/src/main/java/WayofTime/bloodmagic/api/network/SoulNetwork.java b/src/main/java/WayofTime/bloodmagic/api/network/SoulNetwork.java index 7326b0a7..2dcf3be3 100644 --- a/src/main/java/WayofTime/bloodmagic/api/network/SoulNetwork.java +++ b/src/main/java/WayofTime/bloodmagic/api/network/SoulNetwork.java @@ -181,13 +181,15 @@ public class SoulNetwork extends WorldSavedData } } - public SoulNetwork setCurrentEssence(int currentEssence) { + public SoulNetwork setCurrentEssence(int currentEssence) + { this.currentEssence = currentEssence; markDirty(); return this; } - public SoulNetwork setOrbTier(int orbTier) { + public SoulNetwork setOrbTier(int orbTier) + { this.orbTier = orbTier; markDirty(); return this; diff --git a/src/main/java/WayofTime/bloodmagic/api/package-info.java b/src/main/java/WayofTime/bloodmagic/api/package-info.java index 4b78ecd7..c40a7361 100644 --- a/src/main/java/WayofTime/bloodmagic/api/package-info.java +++ b/src/main/java/WayofTime/bloodmagic/api/package-info.java @@ -2,3 +2,4 @@ package WayofTime.bloodmagic.api; import net.minecraftforge.fml.common.API; + diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/AlchemyArrayRecipeRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/AlchemyArrayRecipeRegistry.java index 88f732c5..53a57577 100644 --- a/src/main/java/WayofTime/bloodmagic/api/registry/AlchemyArrayRecipeRegistry.java +++ b/src/main/java/WayofTime/bloodmagic/api/registry/AlchemyArrayRecipeRegistry.java @@ -162,11 +162,12 @@ public class AlchemyArrayRecipeRegistry * inputStack. * * @param comparedStack - * - The stack to compare with - * + * - The stack to compare with + * * @return - True if the ItemStack is a compatible item */ - public boolean doesInputMatchRecipe(ItemStack comparedStack) { + public boolean doesInputMatchRecipe(ItemStack comparedStack) + { return !(comparedStack == null || this.inputStack == null) && this.inputStack.isItemEqual(comparedStack); } @@ -175,7 +176,7 @@ public class AlchemyArrayRecipeRegistry * * @param comparedStack * The catalyst that is being checked - * + * * @return - The effect */ public AlchemyArrayEffect getAlchemyArrayEffectForCatalyst(@Nullable ItemStack comparedStack) @@ -198,7 +199,8 @@ public class AlchemyArrayRecipeRegistry } } - public static BiMap getRecipes() { + public static BiMap getRecipes() + { return HashBiMap.create(recipes); } } diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/AltarRecipeRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/AltarRecipeRegistry.java index 314f0a1d..67dd27b3 100644 --- a/src/main/java/WayofTime/bloodmagic/api/registry/AltarRecipeRegistry.java +++ b/src/main/java/WayofTime/bloodmagic/api/registry/AltarRecipeRegistry.java @@ -93,7 +93,8 @@ public class AltarRecipeRegistry } } - public static BiMap getRecipes() { + public static BiMap getRecipes() + { return HashBiMap.create(recipes); } } diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/HarvestRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/HarvestRegistry.java index 34a161f5..a5ae97d6 100644 --- a/src/main/java/WayofTime/bloodmagic/api/registry/HarvestRegistry.java +++ b/src/main/java/WayofTime/bloodmagic/api/registry/HarvestRegistry.java @@ -22,9 +22,9 @@ public class HarvestRegistry /** * Registers a handler for the Harvest Ritual to call. - * + * * @param handler - * - The custom handler to register + * - The custom handler to register */ public static void registerHandler(IHarvestHandler handler) { @@ -33,15 +33,16 @@ public class HarvestRegistry } /** - * Registers a standard crop (IE: Wheat, Carrots, Potatoes, Netherwart, etc) for - * the {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerPlantable} handler - * to handle. - * + * Registers a standard crop (IE: Wheat, Carrots, Potatoes, Netherwart, etc) + * for the + * {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerPlantable} + * handler to handle. + * * @param crop - * - The crop block to handle. + * - The crop block to handle. * @param matureMeta - * - The meta value at which the crop is considered mature - * and ready to be harvested. + * - The meta value at which the crop is considered mature and ready + * to be harvested. */ public static void registerStandardCrop(Block crop, int matureMeta) { @@ -51,11 +52,11 @@ public class HarvestRegistry /** * Registers a tall crop (Sugar Cane and Cactus) for the - * {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerTall} handler - * to handle. - * + * {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerTall} handler to + * handle. + * * @param crop - * - The crop block to handle. + * - The crop block to handle. */ public static void registerTallCrop(BlockStack crop) { @@ -65,18 +66,18 @@ public class HarvestRegistry /** * Registers a stem crop (Melon and Pumpkin) for the - * {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerStem} handler - * to handle. - * - * Use {@link net.minecraftforge.oredict.OreDictionary#WILDCARD_VALUE} to accept - * any meta for the crop block. - * + * {@link WayofTime.bloodmagic.ritual.harvest.HarvestHandlerStem} handler to + * handle. + * + * Use {@link net.minecraftforge.oredict.OreDictionary#WILDCARD_VALUE} to + * accept any meta for the crop block. + * * The Stem must be instanceof {@link BlockStem} - * + * * @param crop - * - The crop block to handle. + * - The crop block to handle. * @param stem - * - The stem of the crop + * - The stem of the crop */ public static void registerStemCrop(BlockStack crop, BlockStack stem) { @@ -86,11 +87,11 @@ public class HarvestRegistry /** * Registers a range amplifier for the Harvest Ritual. - * + * * @param blockStack - * - The block for the amplifier. + * - The block for the amplifier. * @param range - * - The range the amplifier provides. + * - The range the amplifier provides. */ public static void registerRangeAmplifier(BlockStack blockStack, int range) { @@ -98,23 +99,28 @@ public class HarvestRegistry amplifierMap.put(blockStack, range); } - public static List getHandlerList() { + public static List getHandlerList() + { return new ArrayList(handlerList); } - public static Map getStandardCrops() { + public static Map getStandardCrops() + { return new HashMap(standardCrops); } - public static Set getTallCrops() { + public static Set getTallCrops() + { return new HashSet(tallCrops); } - public static Map getStemCrops() { + public static Map getStemCrops() + { return new HashMap(stemCrops); } - public static Map getAmplifierMap() { + public static Map getAmplifierMap() + { return new HashMap(amplifierMap); } } diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/ImperfectRitualRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/ImperfectRitualRegistry.java index 04c4f93c..c068e4d0 100644 --- a/src/main/java/WayofTime/bloodmagic/api/registry/ImperfectRitualRegistry.java +++ b/src/main/java/WayofTime/bloodmagic/api/registry/ImperfectRitualRegistry.java @@ -94,7 +94,8 @@ public class ImperfectRitualRegistry } } - public static boolean ritualEnabled(String id) { + public static boolean ritualEnabled(String id) + { return ritualEnabled(getRitualForId(id)); } diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/OrbRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/OrbRegistry.java index a28c1646..d8b406c0 100644 --- a/src/main/java/WayofTime/bloodmagic/api/registry/OrbRegistry.java +++ b/src/main/java/WayofTime/bloodmagic/api/registry/OrbRegistry.java @@ -37,8 +37,7 @@ public class OrbRegistry { orbs.add(orb); registerOrbForTier(orb.getTier(), getOrbStack(orb)); - } - else + } else BloodMagicAPI.getLogger().error("Error adding orb %s. Orb already exists!", orb.toString()); } @@ -110,11 +109,13 @@ public class OrbRegistry return new ItemStack(orbItem, 1, getIndexOf(orb)); } - public static List getOrbs() { + public static List getOrbs() + { return new ArrayList(orbs); } - public static ArrayListMultimap getTierMap() { + public static ArrayListMultimap getTierMap() + { return ArrayListMultimap.create(tierMap); } } diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/RitualRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/RitualRegistry.java index 2957d355..39a70eec 100644 --- a/src/main/java/WayofTime/bloodmagic/api/registry/RitualRegistry.java +++ b/src/main/java/WayofTime/bloodmagic/api/registry/RitualRegistry.java @@ -91,7 +91,8 @@ public class RitualRegistry } } - public static boolean ritualEnabled(String id) { + public static boolean ritualEnabled(String id) + { return ritualEnabled(getRitualForId(id)); } diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/TartaricForgeRecipeRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/TartaricForgeRecipeRegistry.java index e4ab7276..b89bd1da 100644 --- a/src/main/java/WayofTime/bloodmagic/api/registry/TartaricForgeRecipeRegistry.java +++ b/src/main/java/WayofTime/bloodmagic/api/registry/TartaricForgeRecipeRegistry.java @@ -35,7 +35,8 @@ public class TartaricForgeRecipeRegistry return null; } - public static List getRecipeList() { + public static List getRecipeList() + { return new ArrayList(recipeList); } } \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/AreaDescriptor.java b/src/main/java/WayofTime/bloodmagic/api/ritual/AreaDescriptor.java index 16cfd867..45875d97 100644 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/AreaDescriptor.java +++ b/src/main/java/WayofTime/bloodmagic/api/ritual/AreaDescriptor.java @@ -40,9 +40,11 @@ public abstract class AreaDescriptor implements Iterator * This constructor takes in the minimum and maximum BlockPos. The * maximum offset is non-inclusive, meaning if you pass in (0,0,0) and * (1,1,1), calling getContainedPositions() will only give (0,0,0). - * - * @param minimumOffset - - * @param maximumOffset - + * + * @param minimumOffset + * - + * @param maximumOffset + * - */ public Rectangle(BlockPos minimumOffset, BlockPos maximumOffset) { @@ -94,9 +96,11 @@ public abstract class AreaDescriptor implements Iterator /** * Sets the offsets of the AreaDescriptor in a safe way that will make * minimumOffset the lowest corner - * - * @param offset1 - - * @param offset2 - + * + * @param offset1 + * - + * @param offset2 + * - */ public void setOffsets(BlockPos offset1, BlockPos offset2) { diff --git a/src/main/java/WayofTime/bloodmagic/api/ritual/CapabilityRuneType.java b/src/main/java/WayofTime/bloodmagic/api/ritual/CapabilityRuneType.java index 79a6f45c..3adc484e 100644 --- a/src/main/java/WayofTime/bloodmagic/api/ritual/CapabilityRuneType.java +++ b/src/main/java/WayofTime/bloodmagic/api/ritual/CapabilityRuneType.java @@ -14,13 +14,13 @@ public final class CapabilityRuneType @Override public NBTBase writeNBT(Capability capability, IRitualStone.Tile instance, EnumFacing side) { - return new NBTTagByte((byte)instance.getRuneType().ordinal()); + return new NBTTagByte((byte) instance.getRuneType().ordinal()); } @Override public void readNBT(Capability capability, IRitualStone.Tile instance, EnumFacing side, NBTBase nbt) { - instance.setRuneType(EnumRuneType.byMetadata(((NBTTagByte)nbt).getByte())); + instance.setRuneType(EnumRuneType.byMetadata(((NBTTagByte) nbt).getByte())); } } diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/EnumDemonWillType.java b/src/main/java/WayofTime/bloodmagic/api/soul/EnumDemonWillType.java index 1ceda668..5d5263f0 100644 --- a/src/main/java/WayofTime/bloodmagic/api/soul/EnumDemonWillType.java +++ b/src/main/java/WayofTime/bloodmagic/api/soul/EnumDemonWillType.java @@ -14,7 +14,8 @@ public enum EnumDemonWillType implements IStringSerializable public final String name; - EnumDemonWillType(String name) { + EnumDemonWillType(String name) + { this.name = name; } } diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWill.java b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWill.java index 1ee09c54..43b5cf46 100644 --- a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWill.java +++ b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWill.java @@ -6,21 +6,21 @@ public interface IDemonWill { /** * Obtains the amount of Will an ItemStack contains. - * + * * @param willStack - * - The stack to retrieve the Will from - * + * - The stack to retrieve the Will from + * * @return - The amount of Will an ItemStack contains */ double getWill(ItemStack willStack); /** * Sets the amount of Will in a given ItemStack. - * + * * @param willStack - * - The ItemStack of the Will + * - The ItemStack of the Will * @param will - * - The amount of will to set the stack to + * - The amount of will to set the stack to */ void setWill(ItemStack willStack, double will); @@ -29,10 +29,10 @@ public interface IDemonWill * drained, the willStack will be removed. * * @param willStack - * - The ItemStack of the will + * - The ItemStack of the will * @param drainAmount - * - The amount of Will to drain - * + * - The amount of Will to drain + * * @return The amount of will drained. */ double drainWill(ItemStack willStack, double drainAmount); @@ -42,10 +42,10 @@ public interface IDemonWill * should respect the number requested. * * @param meta - * - The meta of the ItemStack to create + * - The meta of the ItemStack to create * @param number - * - The amount of Will to create the Stack with. - * + * - The amount of Will to create the Stack with. + * * @return - An ItemStack with the set amount of Will */ ItemStack createWill(int meta, double number); diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillGem.java b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillGem.java index 9f57e3f2..d470f66f 100644 --- a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillGem.java +++ b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillGem.java @@ -5,7 +5,7 @@ import net.minecraft.item.ItemStack; public interface IDemonWillGem { /** - * + * * @param willGemStack * - The ItemStack for this demon will gem. * @param willStack @@ -18,7 +18,7 @@ public interface IDemonWillGem /** * Returns the number of souls that are left in the soul gem. Returns a * double because souls can be fractionally drained. - * + * */ double getWill(EnumDemonWillType type, ItemStack willGemStack); diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/IDiscreteDemonWill.java b/src/main/java/WayofTime/bloodmagic/api/soul/IDiscreteDemonWill.java index 32d659da..7712cea6 100644 --- a/src/main/java/WayofTime/bloodmagic/api/soul/IDiscreteDemonWill.java +++ b/src/main/java/WayofTime/bloodmagic/api/soul/IDiscreteDemonWill.java @@ -6,10 +6,10 @@ public interface IDiscreteDemonWill { /** * Obtains the amount of Will an ItemStack contains. - * + * * @param soulStack - * - The stack to retrieve the Will from - * + * - The stack to retrieve the Will from + * * @return - The amount of Will an ItemStack contains */ double getWill(ItemStack soulStack); @@ -18,32 +18,32 @@ public interface IDiscreteDemonWill * Drains the demonic will from the willStack. If all of the will is * drained, the willStack will be removed. Will only drain in discrete * amounts, determined by getDiscretization. - * + * * @param willStack - * - The ItemStack of the will + * - The ItemStack of the will * @param drainAmount - * - The amount of Will to drain - * + * - The amount of Will to drain + * * @return The amount of will drained. */ double drainWill(ItemStack willStack, double drainAmount); /** * Gets the discrete number for this demonic will. - * + * * @param willStack - * - The ItemStack of the will - * + * - The ItemStack of the will + * * @return - The discrete number for the given stack. */ double getDiscretization(ItemStack willStack); /** * Obtains the type of will this is. - * + * * @param willStack - * - The ItemStack of the will - * + * - The ItemStack of the will + * * @return - The type of will this is. */ EnumDemonWillType getType(ItemStack willStack); diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java b/src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java index 48d578ec..221742a9 100644 --- a/src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java +++ b/src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java @@ -13,12 +13,12 @@ public class PlayerDemonWillHandler { /** * Gets the total amount of Will a player contains in their inventory - * + * * @param type - * - The type of Will to check for + * - The type of Will to check for * @param player - * - The player to check the will of - * + * - The player to check the will of + * * @return - The amount of will the player contains */ public static double getTotalDemonWill(EnumDemonWillType type, EntityPlayer player) @@ -26,11 +26,15 @@ public class PlayerDemonWillHandler ItemStack[] inventory = player.inventory.mainInventory; double souls = 0; - for (ItemStack stack : inventory) { - if (stack != null) { - if (stack.getItem() instanceof IDemonWill) { + for (ItemStack stack : inventory) + { + if (stack != null) + { + if (stack.getItem() instanceof IDemonWill) + { souls += ((IDemonWill) stack.getItem()).getWill(stack); - } else if (stack.getItem() instanceof IDemonWillGem) { + } else if (stack.getItem() instanceof IDemonWillGem) + { souls += ((IDemonWillGem) stack.getItem()).getWill(type, stack); } } @@ -41,12 +45,12 @@ public class PlayerDemonWillHandler /** * Checks if the player's Tartaric gems are completely full. - * + * * @param type - * - The type of Will to check for + * - The type of Will to check for * @param player - * - The player to check the Will of - * + * - The player to check the Will of + * * @return - True if all Will containers are full, false if not. */ public static boolean isDemonWillFull(EnumDemonWillType type, EntityPlayer player) @@ -54,8 +58,10 @@ public class PlayerDemonWillHandler ItemStack[] inventory = player.inventory.mainInventory; boolean hasGem = false; - for (ItemStack stack : inventory) { - if (stack != null && stack.getItem() instanceof IDemonWillGem) { + for (ItemStack stack : inventory) + { + if (stack != null && stack.getItem() instanceof IDemonWillGem) + { hasGem = true; if (((IDemonWillGem) stack.getItem()).getWill(type, stack) < ((IDemonWillGem) stack.getItem()).getMaxWill(type, stack)) return false; @@ -67,12 +73,12 @@ public class PlayerDemonWillHandler /** * Consumes Will from the inventory of a given player - * + * * @param player - * - The player to consume the will of + * - The player to consume the will of * @param amount - * - The amount of will to consume - * + * - The amount of will to consume + * * @return - The amount of will consumed. */ public static double consumeDemonWill(EnumDemonWillType type, EntityPlayer player, double amount) @@ -109,10 +115,10 @@ public class PlayerDemonWillHandler * the player's inventory. * * @param player - * - The player to add will to + * - The player to add will to * @param willStack - * - ItemStack that contains an IDemonWill to be added - * + * - ItemStack that contains an IDemonWill to be added + * * @return - The modified willStack */ public static ItemStack addDemonWill(EntityPlayer player, ItemStack willStack) @@ -136,16 +142,16 @@ public class PlayerDemonWillHandler } /** - * Adds an IDiscreteDemonWill contained in an ItemStack to one of the Soul Gems in - * the player's inventory. - * + * Adds an IDiscreteDemonWill contained in an ItemStack to one of the Soul + * Gems in the player's inventory. + * * @param type - * - The type of Will to add + * - The type of Will to add * @param player - * - The player to check the Will of + * - The player to check the Will of * @param amount - * - The amount of will to add - * + * - The amount of will to add + * * @return - The amount of will added */ public static double addDemonWill(EnumDemonWillType type, EntityPlayer player, double amount) @@ -167,18 +173,18 @@ public class PlayerDemonWillHandler } /** - * Adds an IDiscreteDemonWill contained in an ItemStack to one of the Soul Gems in - * the player's inventory while ignoring a specified stack. - * + * Adds an IDiscreteDemonWill contained in an ItemStack to one of the Soul + * Gems in the player's inventory while ignoring a specified stack. + * * @param type - * - The type of Will to add + * - The type of Will to add * @param player - * - The player to check the Will of + * - The player to check the Will of * @param amount - * - The amount of will to add + * - The amount of will to add * @param ignored - * - A stack to ignore - * + * - A stack to ignore + * * @return - The amount of will added */ public static double addDemonWill(EnumDemonWillType type, EntityPlayer player, double amount, ItemStack ignored) diff --git a/src/main/java/WayofTime/bloodmagic/api/teleport/ChunkPairSerializable.java b/src/main/java/WayofTime/bloodmagic/api/teleport/ChunkPairSerializable.java index fe2db561..457b1698 100644 --- a/src/main/java/WayofTime/bloodmagic/api/teleport/ChunkPairSerializable.java +++ b/src/main/java/WayofTime/bloodmagic/api/teleport/ChunkPairSerializable.java @@ -31,7 +31,8 @@ public class ChunkPairSerializable implements Serializable return new BlockPos((chunkXPos << 4) + 8, y, (chunkZPos << 4) + 8); } - public BlockPos getChunkCenter(){ + public BlockPos getChunkCenter() + { return getChunkCenter(64); } } diff --git a/src/main/java/WayofTime/bloodmagic/api/teleport/PortalLocation.java b/src/main/java/WayofTime/bloodmagic/api/teleport/PortalLocation.java index c0f93613..227e0780 100644 --- a/src/main/java/WayofTime/bloodmagic/api/teleport/PortalLocation.java +++ b/src/main/java/WayofTime/bloodmagic/api/teleport/PortalLocation.java @@ -19,7 +19,7 @@ public class PortalLocation implements Serializable private int z; @Getter private int dimension; - + public PortalLocation(int x, int y, int z, int dimension) { this.x = x; @@ -64,13 +64,17 @@ public class PortalLocation implements Serializable @Override public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; PortalLocation that = (PortalLocation) o; - if (x != that.x) return false; - if (y != that.y) return false; + if (x != that.x) + return false; + if (y != that.y) + return false; return z == that.z; } diff --git a/src/main/java/WayofTime/bloodmagic/api/teleport/TeleporterBloodMagic.java b/src/main/java/WayofTime/bloodmagic/api/teleport/TeleporterBloodMagic.java index ff856e53..bd85a830 100644 --- a/src/main/java/WayofTime/bloodmagic/api/teleport/TeleporterBloodMagic.java +++ b/src/main/java/WayofTime/bloodmagic/api/teleport/TeleporterBloodMagic.java @@ -33,6 +33,6 @@ public class TeleporterBloodMagic extends Teleporter @Override public void placeInPortal(Entity entity, float rotationYaw) { - entity.setLocationAndAngles(MathHelper.floor_double(entity.posX), MathHelper.floor_double(entity.posY) + 2, MathHelper.floor_double(entity.posZ), entity.rotationYaw, entity.rotationPitch); + entity.setLocationAndAngles(MathHelper.floor_double(entity.posX), MathHelper.floor_double(entity.posY) + 2, MathHelper.floor_double(entity.posZ), entity.rotationYaw, entity.rotationPitch); } } diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/BindableHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/BindableHelper.java index dd4ccbcb..591a5412 100644 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/BindableHelper.java +++ b/src/main/java/WayofTime/bloodmagic/api/util/helper/BindableHelper.java @@ -13,9 +13,9 @@ import WayofTime.bloodmagic.api.iface.IBindable; public class BindableHelper { /** - * Sets the Owner Name of the item without checking if it is already bound. Also - * bypasses {@link ItemBindEvent}. - * + * Sets the Owner Name of the item without checking if it is already bound. + * Also bypasses {@link ItemBindEvent}. + * * @param stack * - The ItemStack to bind * @param ownerName @@ -29,9 +29,9 @@ public class BindableHelper } /** - * Sets the Owner UUID of the item without checking if it is already bound. Also - * bypasses {@link ItemBindEvent}. - * + * Sets the Owner UUID of the item without checking if it is already bound. + * Also bypasses {@link ItemBindEvent}. + * * @param stack * - The ItemStack to bind * @param ownerUUID @@ -48,12 +48,12 @@ public class BindableHelper /** * Deprecated. - * + * * Built into {@link IBindable} now. - * + * * @param stack * - The ItemStack to check the owner of - * + * * @return - The username of the ItemStack's owner */ @Deprecated @@ -66,12 +66,12 @@ public class BindableHelper /** * Deprecated. - * + * * Built into {@link IBindable} now. - * + * * @param stack * - The ItemStack to check the owner of - * + * * @return - The UUID of the ItemStack's owner */ @Deprecated @@ -84,14 +84,15 @@ public class BindableHelper /** * Deprecated. - * - * Now handled automatically with {@link WayofTime.bloodmagic.util.handler.EventHandler#interactEvent(PlayerInteractEvent)} - * + * + * Now handled automatically with + * {@link WayofTime.bloodmagic.util.handler.EventHandler#interactEvent(PlayerInteractEvent)} + * * @param stack * - The ItemStack to bind * @param player * - The Player to bind the ItemStack to - * + * * @return - Whether binding was successful */ @Deprecated @@ -102,16 +103,17 @@ public class BindableHelper /** * Deprecated. - * - * Now handled automatically with {@link WayofTime.bloodmagic.util.handler.EventHandler#interactEvent(PlayerInteractEvent)} - * + * + * Now handled automatically with + * {@link WayofTime.bloodmagic.util.handler.EventHandler#interactEvent(PlayerInteractEvent)} + * * @param stack * - The ItemStack to bind * @param uuid * - The username to bind the ItemStack to * @param currentUsername * - The current name of the player. - * + * * @return - Whether the binding was successful */ @Deprecated @@ -141,9 +143,10 @@ public class BindableHelper /** * Deprecated. - * - * Now handled automatically with {@link WayofTime.bloodmagic.util.handler.EventHandler#interactEvent(PlayerInteractEvent)} - * + * + * Now handled automatically with + * {@link WayofTime.bloodmagic.util.handler.EventHandler#interactEvent(PlayerInteractEvent)} + * * @param stack * - ItemStack to check * @param uuid @@ -159,9 +162,9 @@ public class BindableHelper /** * Deprecated. - * + * * @see #setItemOwnerName(ItemStack, String) - * + * * @param stack * - The ItemStack to bind * @param ownerName diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/NetworkHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/NetworkHelper.java index 4b1119c8..99f3b13a 100644 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/NetworkHelper.java +++ b/src/main/java/WayofTime/bloodmagic/api/util/helper/NetworkHelper.java @@ -85,7 +85,8 @@ public class NetworkHelper return soulNetwork.getOrbTier(); } - public static int getMaximumForTier(int tier) { + public static int getMaximumForTier(int tier) + { int ret = 0; if (tier > OrbRegistry.getTierMap().size() || tier < 0) diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/PlayerHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/PlayerHelper.java index 2a4e0adf..e1c3d588 100644 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/PlayerHelper.java +++ b/src/main/java/WayofTime/bloodmagic/api/util/helper/PlayerHelper.java @@ -21,11 +21,10 @@ public class PlayerHelper { /** * A list of all known fake players that do not extend FakePlayer. - * + * * Will be added to as needed. */ - private static final ArrayList knownFakePlayers = Lists.newArrayList( - ); + private static final ArrayList knownFakePlayers = Lists.newArrayList(); public static String getUsernameFromPlayer(EntityPlayer player) { diff --git a/src/main/java/WayofTime/bloodmagic/api/util/helper/RitualHelper.java b/src/main/java/WayofTime/bloodmagic/api/util/helper/RitualHelper.java index 1342ae8b..77e82b44 100644 --- a/src/main/java/WayofTime/bloodmagic/api/util/helper/RitualHelper.java +++ b/src/main/java/WayofTime/bloodmagic/api/util/helper/RitualHelper.java @@ -120,7 +120,7 @@ public class RitualHelper if (block instanceof IRitualStone) return ((IRitualStone) block).isRuneType(world, pos, type); - else if(tile instanceof IRitualStone.Tile) + else if (tile instanceof IRitualStone.Tile) return ((IRitualStone.Tile) tile).isRuneType(type); else if (tile != null && tile.hasCapability(RUNE_CAPABILITY, null)) return tile.getCapability(RUNE_CAPABILITY, null).isRuneType(type); @@ -137,7 +137,7 @@ public class RitualHelper if (block instanceof IRitualStone) return true; - else if(tile instanceof IRitualStone.Tile) + else if (tile instanceof IRitualStone.Tile) return true; else if (tile != null && tile.hasCapability(RUNE_CAPABILITY, null)) return true; @@ -154,7 +154,7 @@ public class RitualHelper if (block instanceof IRitualStone) ((IRitualStone) block).setRuneType(world, pos, type); - else if(tile instanceof IRitualStone.Tile) + else if (tile instanceof IRitualStone.Tile) ((IRitualStone.Tile) tile).setRuneType(type); else if (tile != null && tile.hasCapability(RUNE_CAPABILITY, null)) { diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockAltar.java b/src/main/java/WayofTime/bloodmagic/block/BlockAltar.java index 07960416..e200baec 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockAltar.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockAltar.java @@ -77,7 +77,8 @@ public class BlockAltar extends BlockContainer implements IVariantProvider return Math.min(15, level) % 16; } } - } else { + } else + { int maxEssence = altar.getCapacity(); int currentEssence = altar.getCurrentBlood(); int level = currentEssence * 15 / maxEssence; @@ -157,7 +158,8 @@ public class BlockAltar extends BlockContainer implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockBloodLight.java b/src/main/java/WayofTime/bloodmagic/block/BlockBloodLight.java index f59f8706..1c3eb7a8 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockBloodLight.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockBloodLight.java @@ -75,7 +75,8 @@ public class BlockBloodLight extends Block if (rand.nextInt(3) != 0) { worldIn.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5D + rand.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + rand.nextGaussian() / 8, 0, 0, 0, 0); - if (playerSP.getHeldItem() != null && playerSP.getHeldItem().getItem() == ModItems.sigilBloodLight) { + if (playerSP.getHeldItem() != null && playerSP.getHeldItem().getItem() == ModItems.sigilBloodLight) + { worldIn.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5D + rand.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + rand.nextGaussian() / 8, 0, 0, 0, 0); worldIn.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5D + rand.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + rand.nextGaussian() / 8, 0, 0, 0, 0); worldIn.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5D + rand.nextGaussian() / 8, pos.getY() + 0.5D, pos.getZ() + 0.5D + rand.nextGaussian() / 8, 0, 0, 0, 0); diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockBloodRune.java b/src/main/java/WayofTime/bloodmagic/block/BlockBloodRune.java index ce273c93..e5b0c4bc 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockBloodRune.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockBloodRune.java @@ -34,7 +34,8 @@ public class BlockBloodRune extends BlockString implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); for (int i = 0; i < names.length; i++) ret.add(new ImmutablePair(i, "type=" + names[i])); diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockBloodStoneBrick.java b/src/main/java/WayofTime/bloodmagic/block/BlockBloodStoneBrick.java index 2b8ade80..eeed7197 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockBloodStoneBrick.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockBloodStoneBrick.java @@ -29,7 +29,8 @@ public class BlockBloodStoneBrick extends BlockString implements IVariantProvide } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); for (int i = 0; i < names.length; i++) ret.add(new ImmutablePair(i, "type=" + names[i])); diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockBloodTank.java b/src/main/java/WayofTime/bloodmagic/block/BlockBloodTank.java index 10b1d19e..ba1eeded 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockBloodTank.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockBloodTank.java @@ -45,7 +45,8 @@ public class BlockBloodTank extends BlockContainer } @Override - public int getRenderType() { + public int getRenderType() + { return 3; } diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockCrystal.java b/src/main/java/WayofTime/bloodmagic/block/BlockCrystal.java index d410109e..141ddc30 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockCrystal.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockCrystal.java @@ -29,7 +29,8 @@ public class BlockCrystal extends BlockString implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); for (int i = 0; i < names.length; i++) ret.add(new ImmutablePair(i, "type=" + names[i])); diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrucible.java b/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrucible.java index 286280d0..651e9c3c 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrucible.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrucible.java @@ -103,7 +103,8 @@ public class BlockDemonCrucible extends BlockContainer implements IVariantProvid } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrystallizer.java b/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrystallizer.java index 9f04043e..cbd5c108 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrystallizer.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockDemonCrystallizer.java @@ -38,7 +38,7 @@ public class BlockDemonCrystallizer extends BlockContainer implements IVariantPr { return side == EnumFacing.UP; } - + @Override public boolean isOpaqueCube() { @@ -70,7 +70,8 @@ public class BlockDemonCrystallizer extends BlockContainer implements IVariantPr } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockDemonPylon.java b/src/main/java/WayofTime/bloodmagic/block/BlockDemonPylon.java index befb6273..1b2203d6 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockDemonPylon.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockDemonPylon.java @@ -61,7 +61,8 @@ public class BlockDemonPylon extends BlockContainer implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockIncenseAltar.java b/src/main/java/WayofTime/bloodmagic/block/BlockIncenseAltar.java index 422d2be2..408c9be1 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockIncenseAltar.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockIncenseAltar.java @@ -73,7 +73,8 @@ public class BlockIncenseAltar extends BlockContainer implements IVariantProvide } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockPath.java b/src/main/java/WayofTime/bloodmagic/block/BlockPath.java index ba1dea5c..6a031d78 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockPath.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockPath.java @@ -63,7 +63,8 @@ public class BlockPath extends BlockString implements IIncensePath, IVariantProv } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); for (int i = 0; i < names.length; i++) ret.add(new ImmutablePair(i, "type=" + names[i])); diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockPhantom.java b/src/main/java/WayofTime/bloodmagic/block/BlockPhantom.java index b397dd75..45214b1f 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockPhantom.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockPhantom.java @@ -94,7 +94,8 @@ public class BlockPhantom extends BlockContainer implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockRitualController.java b/src/main/java/WayofTime/bloodmagic/block/BlockRitualController.java index 63d0d00a..2458a3d6 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockRitualController.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockRitualController.java @@ -106,7 +106,8 @@ public class BlockRitualController extends BlockStringContainer implements IVari } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); for (int i = 0; i < names.length; i++) ret.add(new ImmutablePair(i, "type=" + names[i])); diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockRitualStone.java b/src/main/java/WayofTime/bloodmagic/block/BlockRitualStone.java index 25f91d27..ea1fa60d 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockRitualStone.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockRitualStone.java @@ -55,7 +55,8 @@ public class BlockRitualStone extends BlockString implements IRitualStone, IVari } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); for (int i = 0; i < names.length; i++) ret.add(new ImmutablePair(i, "type=" + names[i])); diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockSoulForge.java b/src/main/java/WayofTime/bloodmagic/block/BlockSoulForge.java index 642909bc..a8b10a70 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockSoulForge.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockSoulForge.java @@ -85,7 +85,8 @@ public class BlockSoulForge extends BlockContainer implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockSpectral.java b/src/main/java/WayofTime/bloodmagic/block/BlockSpectral.java index f3d14264..ce360ecc 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockSpectral.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockSpectral.java @@ -82,7 +82,8 @@ public class BlockSpectral extends BlockContainer implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/block/BlockTeleposer.java b/src/main/java/WayofTime/bloodmagic/block/BlockTeleposer.java index 5a0087b6..581dc7b9 100644 --- a/src/main/java/WayofTime/bloodmagic/block/BlockTeleposer.java +++ b/src/main/java/WayofTime/bloodmagic/block/BlockTeleposer.java @@ -69,7 +69,8 @@ public class BlockTeleposer extends BlockContainer implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/client/IMeshProvider.java b/src/main/java/WayofTime/bloodmagic/client/IMeshProvider.java index 85365453..d208b811 100644 --- a/src/main/java/WayofTime/bloodmagic/client/IMeshProvider.java +++ b/src/main/java/WayofTime/bloodmagic/client/IMeshProvider.java @@ -10,7 +10,8 @@ import java.util.List; * Provides a custom {@link ItemMeshDefinition} for automatic registration of * renders. */ -public interface IMeshProvider { +public interface IMeshProvider +{ @SideOnly(Side.CLIENT) ItemMeshDefinition getMeshDefinition(); diff --git a/src/main/java/WayofTime/bloodmagic/client/IVariantProvider.java b/src/main/java/WayofTime/bloodmagic/client/IVariantProvider.java index a33985c3..fb42c02f 100644 --- a/src/main/java/WayofTime/bloodmagic/client/IVariantProvider.java +++ b/src/main/java/WayofTime/bloodmagic/client/IVariantProvider.java @@ -4,7 +4,8 @@ import org.apache.commons.lang3.tuple.Pair; import java.util.List; -public interface IVariantProvider { +public interface IVariantProvider +{ List> getVariants(); } diff --git a/src/main/java/WayofTime/bloodmagic/client/mesh/CustomMeshDefinitionActivatable.java b/src/main/java/WayofTime/bloodmagic/client/mesh/CustomMeshDefinitionActivatable.java index d02762aa..dded64fd 100644 --- a/src/main/java/WayofTime/bloodmagic/client/mesh/CustomMeshDefinitionActivatable.java +++ b/src/main/java/WayofTime/bloodmagic/client/mesh/CustomMeshDefinitionActivatable.java @@ -11,7 +11,8 @@ public class CustomMeshDefinitionActivatable implements ItemMeshDefinition { private final String name; - public CustomMeshDefinitionActivatable(String name) { + public CustomMeshDefinitionActivatable(String name) + { this.name = name; } diff --git a/src/main/java/WayofTime/bloodmagic/client/render/RenderItemRoutingNode.java b/src/main/java/WayofTime/bloodmagic/client/render/RenderItemRoutingNode.java index a59431bb..d716e024 100644 --- a/src/main/java/WayofTime/bloodmagic/client/render/RenderItemRoutingNode.java +++ b/src/main/java/WayofTime/bloodmagic/client/render/RenderItemRoutingNode.java @@ -34,7 +34,8 @@ public class RenderItemRoutingNode extends TileEntitySpecialRenderer connectionList = tileNode.getConnected(); - for (BlockPos wantedPos : connectionList) { + for (BlockPos wantedPos : connectionList) + { BlockPos offsetPos = wantedPos.subtract(tileNode.getPos()); //The beam renders towards the east by default. diff --git a/src/main/java/WayofTime/bloodmagic/command/CommandBloodMagic.java b/src/main/java/WayofTime/bloodmagic/command/CommandBloodMagic.java index f3600e61..5783f97b 100644 --- a/src/main/java/WayofTime/bloodmagic/command/CommandBloodMagic.java +++ b/src/main/java/WayofTime/bloodmagic/command/CommandBloodMagic.java @@ -11,12 +11,14 @@ import net.minecraft.util.ChatComponentText; import java.util.*; -public class CommandBloodMagic extends CommandBase { +public class CommandBloodMagic extends CommandBase +{ private final List aliases = new ArrayList(); private final Map subCommands = new HashMap(); - public CommandBloodMagic() { + public CommandBloodMagic() + { aliases.add("BloodMagic"); aliases.add("bloodmagic"); aliases.add("bloodMagic"); @@ -29,38 +31,46 @@ public class CommandBloodMagic extends CommandBase { } @Override - public String getCommandName() { + public String getCommandName() + { return "/bloodmagic"; } @Override - public int getRequiredPermissionLevel() { + public int getRequiredPermissionLevel() + { return 3; } @Override - public String getCommandUsage(ICommandSender commandSender) { + public String getCommandUsage(ICommandSender commandSender) + { return getCommandName() + " help"; } @Override - public List getCommandAliases() { + public List getCommandAliases() + { return aliases; } @Override - public void processCommand(ICommandSender commandSender, String[] args) { - if (args.length > 0 && subCommands.containsKey(args[0])) { + public void processCommand(ICommandSender commandSender, String[] args) + { + if (args.length > 0 && subCommands.containsKey(args[0])) + { ISubCommand subCommand = subCommands.get(args[0]); String[] subArgs = Arrays.copyOfRange(args, 1, args.length); subCommand.processSubCommand(commandSender, subArgs); - } else { + } else + { commandSender.addChatMessage(new ChatComponentText(TextHelper.localizeEffect("commands.error.unknown"))); } } - public Map getSubCommands() { + public Map getSubCommands() + { return subCommands; } } diff --git a/src/main/java/WayofTime/bloodmagic/command/ISubCommand.java b/src/main/java/WayofTime/bloodmagic/command/ISubCommand.java index 9f945f06..63503d38 100644 --- a/src/main/java/WayofTime/bloodmagic/command/ISubCommand.java +++ b/src/main/java/WayofTime/bloodmagic/command/ISubCommand.java @@ -3,7 +3,8 @@ package WayofTime.bloodmagic.command; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; -public interface ISubCommand { +public interface ISubCommand +{ String getSubCommandName(); diff --git a/src/main/java/WayofTime/bloodmagic/command/SubCommandBase.java b/src/main/java/WayofTime/bloodmagic/command/SubCommandBase.java index 9c8a9a24..a703ef64 100644 --- a/src/main/java/WayofTime/bloodmagic/command/SubCommandBase.java +++ b/src/main/java/WayofTime/bloodmagic/command/SubCommandBase.java @@ -12,28 +12,33 @@ import net.minecraft.util.StatCollector; import java.util.Locale; -public abstract class SubCommandBase implements ISubCommand { +public abstract class SubCommandBase implements ISubCommand +{ private ICommand parent; private String name; - public SubCommandBase(ICommand parent, String name) { + public SubCommandBase(ICommand parent, String name) + { this.parent = parent; this.name = name; } @Override - public String getSubCommandName() { + public String getSubCommandName() + { return name; } @Override - public ICommand getParentCommand() { + public ICommand getParentCommand() + { return parent; } @Override - public void processSubCommand(ICommandSender commandSender, String[] args) { + public void processSubCommand(ICommandSender commandSender, String[] args) + { if (args.length == 0 && !getSubCommandName().equals("help")) displayErrorString(commandSender, String.format(StatCollector.translateToLocal("commands.format.error"), capitalizeFirstLetter(getSubCommandName()), getArgUsage(commandSender))); @@ -42,19 +47,22 @@ public abstract class SubCommandBase implements ISubCommand { displayHelpString(commandSender, String.format(StatCollector.translateToLocal("commands.format.help"), capitalizeFirstLetter(getSubCommandName()), getHelpText())); } - protected EntityPlayerMP getCommandSenderAsPlayer(ICommandSender commandSender) throws PlayerNotFoundException{ + protected EntityPlayerMP getCommandSenderAsPlayer(ICommandSender commandSender) throws PlayerNotFoundException + { if (commandSender instanceof EntityPlayerMP) - return (EntityPlayerMP)commandSender; + return (EntityPlayerMP) commandSender; else throw new PlayerNotFoundException(StatCollector.translateToLocal("commands.error.arg.player.missing")); } - protected EntityPlayerMP getPlayer(ICommandSender commandSender, String playerName) throws PlayerNotFoundException { + protected EntityPlayerMP getPlayer(ICommandSender commandSender, String playerName) throws PlayerNotFoundException + { EntityPlayerMP entityplayermp = PlayerSelector.matchOnePlayer(commandSender, playerName); if (entityplayermp != null) return entityplayermp; - else { + else + { entityplayermp = MinecraftServer.getServer().getConfigurationManager().getPlayerByUsername(playerName); if (entityplayermp == null) @@ -64,23 +72,28 @@ public abstract class SubCommandBase implements ISubCommand { } } - protected String capitalizeFirstLetter(String toCapital) { + protected String capitalizeFirstLetter(String toCapital) + { return String.valueOf(toCapital.charAt(0)).toUpperCase(Locale.ENGLISH) + toCapital.substring(1); } - protected boolean isBounded(int low, int high, int given) { + protected boolean isBounded(int low, int high, int given) + { return given > low && given < high; } - protected void displayHelpString(ICommandSender commandSender, String display, Object ... info) { + protected void displayHelpString(ICommandSender commandSender, String display, Object... info) + { commandSender.addChatMessage(new ChatComponentText(TextHelper.localizeEffect(display, info))); } - protected void displayErrorString(ICommandSender commandSender, String display, Object ... info) { + protected void displayErrorString(ICommandSender commandSender, String display, Object... info) + { commandSender.addChatMessage(new ChatComponentText(TextHelper.localizeEffect(display, info))); } - protected void displaySuccessString(ICommandSender commandSender, String display, Object ... info) { + protected void displaySuccessString(ICommandSender commandSender, String display, Object... info) + { commandSender.addChatMessage(new ChatComponentText(TextHelper.localizeEffect(display, info))); } } diff --git a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandBind.java b/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandBind.java index f5da6547..76b09ab5 100644 --- a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandBind.java +++ b/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandBind.java @@ -15,71 +15,86 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatComponentTranslation; -public class SubCommandBind extends SubCommandBase { +public class SubCommandBind extends SubCommandBase +{ - public SubCommandBind(ICommand parent) { + public SubCommandBind(ICommand parent) + { super(parent, "bind"); } @Override - public String getArgUsage(ICommandSender commandSender) { + public String getArgUsage(ICommandSender commandSender) + { return TextHelper.localizeEffect("commands.bind.usage"); } @Override - public String getHelpText() { + public String getHelpText() + { return TextHelper.localizeEffect("commands.bind.help"); } @Override - public void processSubCommand(ICommandSender commandSender, String[] args) { + public void processSubCommand(ICommandSender commandSender, String[] args) + { super.processSubCommand(commandSender, args); if (commandSender.getEntityWorld().isRemote) return; - try { + try + { EntityPlayer player = getCommandSenderAsPlayer(commandSender); String playerName = player.getName(); String uuid = PlayerHelper.getUUIDFromPlayer(player).toString(); ItemStack held = player.getHeldItem(); boolean bind = true; - if (held != null && held.getItem() instanceof IBindable) { - if (args.length > 0) { + if (held != null && held.getItem() instanceof IBindable) + { + if (args.length > 0) + { if (args[0].equalsIgnoreCase("help")) return; - if (isBoolean(args[0])) { + if (isBoolean(args[0])) + { bind = Boolean.parseBoolean(args[0]); if (args.length > 2) playerName = args[1]; - } else { + } else + { playerName = args[0]; uuid = PlayerHelper.getUUIDFromPlayer(getPlayer(commandSender, playerName)).toString(); } } - if (bind) { + if (bind) + { BindableHelper.setItemOwnerName(held, playerName); BindableHelper.setItemOwnerUUID(held, uuid); commandSender.addChatMessage(new ChatComponentTranslation("commands.bind.success")); - } else { - if (!Strings.isNullOrEmpty(((IBindable) held.getItem()).getOwnerUUID(held))) { + } else + { + if (!Strings.isNullOrEmpty(((IBindable) held.getItem()).getOwnerUUID(held))) + { held.getTagCompound().removeTag(Constants.NBT.OWNER_UUID); held.getTagCompound().removeTag(Constants.NBT.OWNER_NAME); commandSender.addChatMessage(new ChatComponentTranslation("commands.bind.remove.success")); } } } - } catch (PlayerNotFoundException e) { + } catch (PlayerNotFoundException e) + { commandSender.addChatMessage(new ChatComponentText(TextHelper.localizeEffect("commands.error.404"))); } } - private boolean isBoolean(String string) { + private boolean isBoolean(String string) + { return string.equalsIgnoreCase("true") || string.equalsIgnoreCase("false"); } } diff --git a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandHelp.java b/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandHelp.java index 64cc26dc..d35364e4 100644 --- a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandHelp.java +++ b/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandHelp.java @@ -9,30 +9,35 @@ import net.minecraft.command.ICommandSender; import net.minecraft.util.ChatComponentText; import net.minecraft.util.StatCollector; -public class SubCommandHelp extends SubCommandBase { +public class SubCommandHelp extends SubCommandBase +{ - public SubCommandHelp(ICommand parent) { + public SubCommandHelp(ICommand parent) + { super(parent, "help"); } @Override - public String getArgUsage(ICommandSender commandSender) { + public String getArgUsage(ICommandSender commandSender) + { return StatCollector.translateToLocal("commands.help.usage"); } @Override - public String getHelpText() { + public String getHelpText() + { return StatCollector.translateToLocal("commands.help.help"); } @Override - public void processSubCommand(ICommandSender commandSender, String[] args) { + public void processSubCommand(ICommandSender commandSender, String[] args) + { super.processSubCommand(commandSender, args); if (args.length > 0) return; - for (ISubCommand subCommand : ((CommandBloodMagic)getParentCommand()).getSubCommands().values()) + for (ISubCommand subCommand : ((CommandBloodMagic) getParentCommand()).getSubCommands().values()) commandSender.addChatMessage(new ChatComponentText(TextHelper.localizeEffect("commands.format.help", capitalizeFirstLetter(subCommand.getSubCommandName()), subCommand.getArgUsage(commandSender)))); } } diff --git a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandNetwork.java b/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandNetwork.java index a37b02db..669fefed 100644 --- a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandNetwork.java +++ b/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandNetwork.java @@ -15,36 +15,44 @@ import net.minecraft.util.StatCollector; import java.util.Locale; -public class SubCommandNetwork extends SubCommandBase { +public class SubCommandNetwork extends SubCommandBase +{ - public SubCommandNetwork(ICommand parent) { + public SubCommandNetwork(ICommand parent) + { super(parent, "network"); } @Override - public String getArgUsage(ICommandSender commandSender) { + public String getArgUsage(ICommandSender commandSender) + { return StatCollector.translateToLocal("commands.network.usage"); } @Override - public String getHelpText() { + public String getHelpText() + { return StatCollector.translateToLocal("commands.network.help"); } @Override - public void processSubCommand(ICommandSender commandSender, String[] args) { + public void processSubCommand(ICommandSender commandSender, String[] args) + { super.processSubCommand(commandSender, args); - if (args.length > 0) { + if (args.length > 0) + { if (args[0].equalsIgnoreCase("help")) return; - try { + try + { String givenName = commandSender.getName(); EntityPlayer player = getPlayer(commandSender, givenName); - if (args.length > 1) { + if (args.length > 1) + { givenName = args[1]; player = getPlayer(commandSender, givenName); } @@ -52,117 +60,148 @@ public class SubCommandNetwork extends SubCommandBase { SoulNetwork network = NetworkHelper.getSoulNetwork(player); boolean displayHelp = isBounded(0, 2, args.length); - try { - switch (ValidCommands.valueOf(args[0].toUpperCase(Locale.ENGLISH))) { - case SYPHON: { - if (displayHelp) { - displayHelpString(commandSender, ValidCommands.SYPHON.help); - break; - } - - if (args.length == 3) { - if (Utils.isInteger(args[2])) { - int amount = Integer.parseInt(args[2]); - NetworkHelper.syphonAndDamage(NetworkHelper.getSoulNetwork(player), player, amount); - displaySuccessString(commandSender, "commands.network.syphon.success", amount, givenName); - } else { - displayErrorString(commandSender, "commands.error.arg.invalid"); - } - } else { - displayErrorString(commandSender, "commands.error.arg.missing"); - } - + try + { + switch (ValidCommands.valueOf(args[0].toUpperCase(Locale.ENGLISH))) + { + case SYPHON: + { + if (displayHelp) + { + displayHelpString(commandSender, ValidCommands.SYPHON.help); break; } - case ADD: { - if (displayHelp) { - displayHelpString(commandSender, ValidCommands.ADD.help); - break; - } - if (args.length == 3) { - if (Utils.isInteger(args[2])) { - int amount = Integer.parseInt(args[2]); - int maxOrb = NetworkHelper.getMaximumForTier(network.getOrbTier()); - displaySuccessString(commandSender, "commands.network.add.success", network.addLifeEssence(amount, maxOrb), givenName); - } else { - displayErrorString(commandSender, "commands.error.arg.invalid"); - } - } else { - displayErrorString(commandSender, "commands.error.arg.missing"); + if (args.length == 3) + { + if (Utils.isInteger(args[2])) + { + int amount = Integer.parseInt(args[2]); + NetworkHelper.syphonAndDamage(NetworkHelper.getSoulNetwork(player), player, amount); + displaySuccessString(commandSender, "commands.network.syphon.success", amount, givenName); + } else + { + displayErrorString(commandSender, "commands.error.arg.invalid"); } - - break; + } else + { + displayErrorString(commandSender, "commands.error.arg.missing"); } - case SET: { - if (displayHelp) { - displayHelpString(commandSender, ValidCommands.SET.help); - break; - } - if (args.length == 3) { - if (Utils.isInteger(args[2])) { - int amount = Integer.parseInt(args[2]); - network.setCurrentEssence(amount); - displaySuccessString(commandSender, "commands.network.set.success", givenName, amount); - } else { - displayErrorString(commandSender, "commands.error.arg.invalid"); - } - } else { - displayErrorString(commandSender, "commands.error.arg.missing"); - } - - break; - } - case GET: { - if (displayHelp) { - displayHelpString(commandSender, ValidCommands.GET.help); - break; - } - - if (args.length > 1) - commandSender.addChatMessage(new ChatComponentText(TextHelper.localizeEffect("message.divinationsigil.currentessence", network.getCurrentEssence()))); - - break; - } - case FILL: { - if (displayHelp) { - displayHelpString(commandSender, ValidCommands.FILL.help, Integer.MAX_VALUE); - break; - } - - if (args.length > 1) { - network.setCurrentEssence(Integer.MAX_VALUE); - displaySuccessString(commandSender, "commands.network.fill.success", givenName); - } - - break; - } - case CAP: { - if (displayHelp) { - displayHelpString(commandSender, ValidCommands.CAP.help); - break; - } - - if (args.length > 1) { - int maxOrb = NetworkHelper.getMaximumForTier(network.getOrbTier()); - network.setCurrentEssence(maxOrb); - displaySuccessString(commandSender, "commands.network.cap.success", givenName); - } - - break; - } + break; } - } catch (IllegalArgumentException e) { + case ADD: + { + if (displayHelp) + { + displayHelpString(commandSender, ValidCommands.ADD.help); + break; + } + + if (args.length == 3) + { + if (Utils.isInteger(args[2])) + { + int amount = Integer.parseInt(args[2]); + int maxOrb = NetworkHelper.getMaximumForTier(network.getOrbTier()); + displaySuccessString(commandSender, "commands.network.add.success", network.addLifeEssence(amount, maxOrb), givenName); + } else + { + displayErrorString(commandSender, "commands.error.arg.invalid"); + } + } else + { + displayErrorString(commandSender, "commands.error.arg.missing"); + } + + break; + } + case SET: + { + if (displayHelp) + { + displayHelpString(commandSender, ValidCommands.SET.help); + break; + } + + if (args.length == 3) + { + if (Utils.isInteger(args[2])) + { + int amount = Integer.parseInt(args[2]); + network.setCurrentEssence(amount); + displaySuccessString(commandSender, "commands.network.set.success", givenName, amount); + } else + { + displayErrorString(commandSender, "commands.error.arg.invalid"); + } + } else + { + displayErrorString(commandSender, "commands.error.arg.missing"); + } + + break; + } + case GET: + { + if (displayHelp) + { + displayHelpString(commandSender, ValidCommands.GET.help); + break; + } + + if (args.length > 1) + commandSender.addChatMessage(new ChatComponentText(TextHelper.localizeEffect("message.divinationsigil.currentessence", network.getCurrentEssence()))); + + break; + } + case FILL: + { + if (displayHelp) + { + displayHelpString(commandSender, ValidCommands.FILL.help, Integer.MAX_VALUE); + break; + } + + if (args.length > 1) + { + network.setCurrentEssence(Integer.MAX_VALUE); + displaySuccessString(commandSender, "commands.network.fill.success", givenName); + } + + break; + } + case CAP: + { + if (displayHelp) + { + displayHelpString(commandSender, ValidCommands.CAP.help); + break; + } + + if (args.length > 1) + { + int maxOrb = NetworkHelper.getMaximumForTier(network.getOrbTier()); + network.setCurrentEssence(maxOrb); + displaySuccessString(commandSender, "commands.network.cap.success", givenName); + } + + break; + } + } + } catch (IllegalArgumentException e) + { displayErrorString(commandSender, "commands.error.404"); } - } catch (PlayerNotFoundException e) { + } catch (PlayerNotFoundException e) + { displayErrorString(commandSender, "commands.error.404"); } } } - private enum ValidCommands { + private enum ValidCommands + { SYPHON("commands.network.syphon.help"), ADD("commands.network.add.help"), SET("commands.network.set.help"), @@ -172,7 +211,8 @@ public class SubCommandNetwork extends SubCommandBase { public String help; - ValidCommands(String help) { + ValidCommands(String help) + { this.help = help; } } diff --git a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandOrb.java b/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandOrb.java index 436f99b3..2ed7d8b2 100644 --- a/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandOrb.java +++ b/src/main/java/WayofTime/bloodmagic/command/sub/SubCommandOrb.java @@ -15,32 +15,39 @@ import net.minecraft.util.StatCollector; import java.util.Locale; -public class SubCommandOrb extends SubCommandBase { +public class SubCommandOrb extends SubCommandBase +{ - public SubCommandOrb(ICommand parent) { + public SubCommandOrb(ICommand parent) + { super(parent, "orb"); } @Override - public String getArgUsage(ICommandSender commandSender) { + public String getArgUsage(ICommandSender commandSender) + { return StatCollector.translateToLocal("commands.orb.usage"); } @Override - public String getHelpText() { + public String getHelpText() + { return StatCollector.translateToLocal("commands.orb.help"); } @Override - public void processSubCommand(ICommandSender commandSender, String[] args) { + public void processSubCommand(ICommandSender commandSender, String[] args) + { super.processSubCommand(commandSender, args); - if (args.length > 0) { + if (args.length > 0) + { if (args[0].equalsIgnoreCase("help")) return; - try { + try + { String givenName = commandSender.getName(); if (args.length > 1) @@ -52,56 +59,70 @@ public class SubCommandOrb extends SubCommandBase { boolean displayHelp = isBounded(0, 2, args.length); - try { - switch (ValidCommands.valueOf(args[0].toUpperCase(Locale.ENGLISH))) { - case SET: { - if (displayHelp) { - displayHelpString(commandSender, ValidCommands.SET.help); - break; - } - - if (args.length == 3) { - if (Utils.isInteger(args[2])) { - int amount = Integer.parseInt(args[2]); - network.setOrbTier(amount); - displaySuccessString(commandSender, "commands.success"); - } else { - displayErrorString(commandSender, "commands.error.arg.invalid"); - } - } else { - displayErrorString(commandSender, "commands.error.arg.missing"); - } - + try + { + switch (ValidCommands.valueOf(args[0].toUpperCase(Locale.ENGLISH))) + { + case SET: + { + if (displayHelp) + { + displayHelpString(commandSender, ValidCommands.SET.help); break; } - case GET: { - if (displayHelp) { - displayHelpString(commandSender, ValidCommands.GET.help); - break; + + if (args.length == 3) + { + if (Utils.isInteger(args[2])) + { + int amount = Integer.parseInt(args[2]); + network.setOrbTier(amount); + displaySuccessString(commandSender, "commands.success"); + } else + { + displayErrorString(commandSender, "commands.error.arg.invalid"); } - - if (args.length > 1) - commandSender.addChatMessage(new ChatComponentText(TextHelper.localizeEffect("message.orb.currenttier", network.getOrbTier()))); - - break; + } else + { + displayErrorString(commandSender, "commands.error.arg.missing"); } + + break; } - } catch (IllegalArgumentException e) { + case GET: + { + if (displayHelp) + { + displayHelpString(commandSender, ValidCommands.GET.help); + break; + } + + if (args.length > 1) + commandSender.addChatMessage(new ChatComponentText(TextHelper.localizeEffect("message.orb.currenttier", network.getOrbTier()))); + + break; + } + } + } catch (IllegalArgumentException e) + { displayErrorString(commandSender, "commands.error.404"); } - } catch (PlayerNotFoundException e) { + } catch (PlayerNotFoundException e) + { displayErrorString(commandSender, "commands.error.404"); } } } - private enum ValidCommands { + private enum ValidCommands + { SET("commands.orb.set.help"), GET("commands.orb.get.help"); public String help; - ValidCommands(String help) { + ValidCommands(String help) + { this.help = help; } } diff --git a/src/main/java/WayofTime/bloodmagic/compat/ICompatibility.java b/src/main/java/WayofTime/bloodmagic/compat/ICompatibility.java index e3c68aeb..a69a052e 100644 --- a/src/main/java/WayofTime/bloodmagic/compat/ICompatibility.java +++ b/src/main/java/WayofTime/bloodmagic/compat/ICompatibility.java @@ -6,11 +6,11 @@ package WayofTime.bloodmagic.compat; public interface ICompatibility { /** - * Called during each initialization phase after the given {@link #getModId()} - * has been verified as loaded. - * + * Called during each initialization phase after the given + * {@link #getModId()} has been verified as loaded. + * * @param phase - * - The load phase at which this method is being called. + * - The load phase at which this method is being called. */ void loadCompatibility(InitializationPhase phase); @@ -32,17 +32,21 @@ public interface ICompatibility /** * Represents a given mod initialization state. */ - enum InitializationPhase { + enum InitializationPhase + { /** - * Represents {@link net.minecraftforge.fml.common.event.FMLPreInitializationEvent} + * Represents + * {@link net.minecraftforge.fml.common.event.FMLPreInitializationEvent} */ PRE_INIT, /** - * Represents {@link net.minecraftforge.fml.common.event.FMLInitializationEvent} + * Represents + * {@link net.minecraftforge.fml.common.event.FMLInitializationEvent} */ INIT, /** - * Represents {@link net.minecraftforge.fml.common.event.FMLPostInitializationEvent} + * Represents + * {@link net.minecraftforge.fml.common.event.FMLPostInitializationEvent} */ POST_INIT } diff --git a/src/main/java/WayofTime/bloodmagic/compat/guideapi/guide/page/PageAltarRecipe.java b/src/main/java/WayofTime/bloodmagic/compat/guideapi/guide/page/PageAltarRecipe.java index c05cda98..31a3bc0f 100644 --- a/src/main/java/WayofTime/bloodmagic/compat/guideapi/guide/page/PageAltarRecipe.java +++ b/src/main/java/WayofTime/bloodmagic/compat/guideapi/guide/page/PageAltarRecipe.java @@ -18,7 +18,8 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -public class PageAltarRecipe extends PageBase { +public class PageAltarRecipe extends PageBase +{ public ItemStack input; public ItemStack output; diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeJEI.java b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeJEI.java index 4313e229..f1174adc 100644 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeJEI.java +++ b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeJEI.java @@ -62,7 +62,8 @@ public class TartaricForgeRecipeJEI extends BlankRecipeWrapper return null; } - public enum DefaultWill { + public enum DefaultWill + { SOUL(new ItemStack(ModItems.monsterSoul, 1, 0), 64), PETTY(new ItemStack(ModItems.soulGem, 1, 0), 64), LESSER(new ItemStack(ModItems.soulGem, 1, 1), 256), @@ -73,7 +74,8 @@ public class TartaricForgeRecipeJEI extends BlankRecipeWrapper public final ItemStack willStack; public final double minSouls; - DefaultWill(ItemStack willStack, double minSouls) { + DefaultWill(ItemStack willStack, double minSouls) + { this.willStack = willStack; this.minSouls = minSouls; } diff --git a/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/CompatibilityThaumcraft.java b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/CompatibilityThaumcraft.java index d385f2b1..7d5a0467 100644 --- a/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/CompatibilityThaumcraft.java +++ b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/CompatibilityThaumcraft.java @@ -12,7 +12,7 @@ public class CompatibilityThaumcraft implements ICompatibility if (phase == InitializationPhase.POST_INIT) { BloodMagicResearch.addResearch(); - + LivingArmourHandler.registerStatTracker(StatTrackerThaumRunicShielding.class); LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeThaumRunicShielding(0)); diff --git a/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/LivingArmourUpgradeThaumRevealing.java b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/LivingArmourUpgradeThaumRevealing.java index e8659e73..5389abdc 100644 --- a/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/LivingArmourUpgradeThaumRevealing.java +++ b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/LivingArmourUpgradeThaumRevealing.java @@ -4,39 +4,47 @@ import net.minecraft.nbt.NBTTagCompound; import WayofTime.bloodmagic.api.Constants; import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -public class LivingArmourUpgradeThaumRevealing extends LivingArmourUpgrade { +public class LivingArmourUpgradeThaumRevealing extends LivingArmourUpgrade +{ - public LivingArmourUpgradeThaumRevealing(int level) { + public LivingArmourUpgradeThaumRevealing(int level) + { super(level); } @Override - public String getUniqueIdentifier() { + public String getUniqueIdentifier() + { return Constants.Mod.MODID + ".upgrade.revealing"; } @Override - public String getUnlocalizedName() { + public String getUnlocalizedName() + { return tooltipBase + "revealing"; } @Override - public int getMaxTier() { + public int getMaxTier() + { return 1; } @Override - public int getCostOfUpgrade() { + public int getCostOfUpgrade() + { return 5; } @Override - public void writeToNBT(NBTTagCompound tag) { + public void writeToNBT(NBTTagCompound tag) + { } @Override - public void readFromNBT(NBTTagCompound tag) { + public void readFromNBT(NBTTagCompound tag) + { } } diff --git a/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/BloodMagicResearch.java b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/BloodMagicResearch.java index 5de672a1..3008d04f 100644 --- a/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/BloodMagicResearch.java +++ b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/BloodMagicResearch.java @@ -16,7 +16,7 @@ public class BloodMagicResearch ResearchCategories.registerCategory(BLOOD_MAGIC, null, new ResourceLocation("bloodmagic", "textures/items/WeakBloodOrb.png"), new ResourceLocation("bloodmagic", "textures/gui/thaumcraft/gui_research_back.jpg"), new ResourceLocation("bloodmagic", "textures/gui/thaumcraft/gui_research_back_over.png")); - (new SanguineResearchItem("BLOODMAGIC", BLOOD_MAGIC, new AspectList(), 0, 0, 0, new ItemStack(BloodMagicAPI.getItem(Constants.BloodMagicItem.BLOOD_ORB), 1, 0))).setPages(new ResearchPage[]{new ResearchPage(researchPage("BLOODMAGIC"))}).setAutoUnlock().setStub().setRound().registerResearchItem(); + (new SanguineResearchItem("BLOODMAGIC", BLOOD_MAGIC, new AspectList(), 0, 0, 0, new ItemStack(BloodMagicAPI.getItem(Constants.BloodMagicItem.BLOOD_ORB), 1, 0))).setPages(new ResearchPage[] { new ResearchPage(researchPage("BLOODMAGIC")) }).setAutoUnlock().setStub().setRound().registerResearchItem(); } private static String researchPage(String researchName) diff --git a/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/SanguineResearchItem.java b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/SanguineResearchItem.java index d7bd2cc4..1fbe3804 100644 --- a/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/SanguineResearchItem.java +++ b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/SanguineResearchItem.java @@ -20,13 +20,15 @@ public class SanguineResearchItem extends ResearchItem @Override @SideOnly(Side.CLIENT) - public String getName() { + public String getName() + { return StatCollector.translateToLocal("bloodmagic.research_name." + this.key); } @Override @SideOnly(Side.CLIENT) - public String getText() { + public String getText() + { return StatCollector.translateToLocal("bloodmagic.research_text." + this.key); } } diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemActivationCrystal.java b/src/main/java/WayofTime/bloodmagic/item/ItemActivationCrystal.java index 4ed512aa..3c30b12d 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemActivationCrystal.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemActivationCrystal.java @@ -53,7 +53,8 @@ public class ItemActivationCrystal extends ItemBindable implements IVariantProvi } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=weak")); ret.add(new ImmutablePair(1, "type=demonic")); diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemAltarMaker.java b/src/main/java/WayofTime/bloodmagic/item/ItemAltarMaker.java index a58e9685..bcc3535d 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemAltarMaker.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemAltarMaker.java @@ -92,7 +92,8 @@ public class ItemAltarMaker extends Item implements IAltarManipulator, IVariantP } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=altarmaker")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemArcaneAshes.java b/src/main/java/WayofTime/bloodmagic/item/ItemArcaneAshes.java index fae97acc..ed8ad09e 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemArcaneAshes.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemArcaneAshes.java @@ -57,7 +57,8 @@ public class ItemArcaneAshes extends Item implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=arcaneashes")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemBloodShard.java b/src/main/java/WayofTime/bloodmagic/item/ItemBloodShard.java index ee37c891..a1b86f00 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemBloodShard.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemBloodShard.java @@ -43,7 +43,8 @@ public class ItemBloodShard extends Item implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=weak")); ret.add(new ImmutablePair(1, "type=demonic")); diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemBoundPickaxe.java b/src/main/java/WayofTime/bloodmagic/item/ItemBoundPickaxe.java index 4c1686dc..ae60f7cd 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemBoundPickaxe.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemBoundPickaxe.java @@ -57,7 +57,9 @@ public class ItemBoundPickaxe extends ItemBoundTool implements IMeshProvider @Override public boolean canHarvestBlock(Block blockIn) { - return blockIn == Blocks.obsidian ? this.toolMaterial.getHarvestLevel() == 3 : (blockIn != Blocks.diamond_block && blockIn != Blocks.diamond_ore ? (blockIn != Blocks.emerald_ore && blockIn != Blocks.emerald_block ? (blockIn != Blocks.gold_block && blockIn != Blocks.gold_ore ? (blockIn != Blocks.iron_block && blockIn != Blocks.iron_ore ? (blockIn != Blocks.lapis_block && blockIn != Blocks.lapis_ore ? (blockIn != Blocks.redstone_ore && blockIn != Blocks.lit_redstone_ore ? (blockIn.getMaterial() == Material.rock || (blockIn.getMaterial() == Material.iron || blockIn.getMaterial() == Material.anvil)) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2); + return blockIn == Blocks.obsidian ? this.toolMaterial.getHarvestLevel() == 3 + : (blockIn != Blocks.diamond_block && blockIn != Blocks.diamond_ore ? (blockIn != Blocks.emerald_ore && blockIn != Blocks.emerald_block ? (blockIn != Blocks.gold_block && blockIn != Blocks.gold_ore ? (blockIn != Blocks.iron_block && blockIn != Blocks.iron_ore ? (blockIn != Blocks.lapis_block && blockIn != Blocks.lapis_ore ? (blockIn != Blocks.redstone_ore && blockIn != Blocks.lit_redstone_ore ? (blockIn.getMaterial() == Material.rock || (blockIn.getMaterial() == Material.iron || blockIn.getMaterial() == Material.anvil)) : this.toolMaterial.getHarvestLevel() >= 2) + : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2); } @Override diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemBoundTool.java b/src/main/java/WayofTime/bloodmagic/item/ItemBoundTool.java index 426b8004..76cfce5b 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemBoundTool.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemBoundTool.java @@ -83,8 +83,7 @@ public class ItemBoundTool extends ItemTool implements IBindable, IActivatable { EntityPlayer player = (EntityPlayer) entityIn; setHeldDownCount(stack, Math.min(player.getItemInUseDuration(), chargeTime)); - } - else if (!isSelected) + } else if (!isSelected) { setBeingHeldDown(stack, false); } @@ -158,7 +157,8 @@ public class ItemBoundTool extends ItemTool implements IBindable, IActivatable } @Override - public Multimap getAttributeModifiers(ItemStack stack) { + public Multimap getAttributeModifiers(ItemStack stack) + { Multimap multimap = super.getAttributeModifiers(stack); double damage = getActivated(stack) ? this.damage : 1.0D; multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(itemModifierUUID, "Weapon modifier", damage, 0)); @@ -202,7 +202,8 @@ public class ItemBoundTool extends ItemTool implements IBindable, IActivatable } @Override - public Set getToolClasses(ItemStack stack) { + public Set getToolClasses(ItemStack stack) + { return ImmutableSet.of(name); } @@ -240,17 +241,20 @@ public class ItemBoundTool extends ItemTool implements IBindable, IActivatable // IBindable @Override - public String getOwnerName(ItemStack stack) { + public String getOwnerName(ItemStack stack) + { return stack != null ? NBTHelper.checkNBT(stack).getTagCompound().getString(Constants.NBT.OWNER_NAME) : null; } @Override - public String getOwnerUUID(ItemStack stack) { + public String getOwnerUUID(ItemStack stack) + { return stack != null ? NBTHelper.checkNBT(stack).getTagCompound().getString(Constants.NBT.OWNER_UUID) : null; } @Override - public boolean onBind(EntityPlayer player, ItemStack stack) { + public boolean onBind(EntityPlayer player, ItemStack stack) + { return true; } diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemComponent.java b/src/main/java/WayofTime/bloodmagic/item/ItemComponent.java index d1976be8..fb37b2f1 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemComponent.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemComponent.java @@ -96,7 +96,8 @@ public class ItemComponent extends Item implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); for (String name : names) ret.add(new ImmutablePair(names.indexOf(name), "type=" + name)); diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemDaggerOfSacrifice.java b/src/main/java/WayofTime/bloodmagic/item/ItemDaggerOfSacrifice.java index 8b287b46..2209405d 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemDaggerOfSacrifice.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemDaggerOfSacrifice.java @@ -69,7 +69,8 @@ public class ItemDaggerOfSacrifice extends Item implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemDemonCrystal.java b/src/main/java/WayofTime/bloodmagic/item/ItemDemonCrystal.java index ed0c9811..f0ab87bd 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemDemonCrystal.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemDemonCrystal.java @@ -104,7 +104,8 @@ public class ItemDemonCrystal extends Item implements IDiscreteDemonWill, IVaria } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); for (String name : names) ret.add(new ImmutablePair(names.indexOf(name), "type=" + name)); diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemInscriptionTool.java b/src/main/java/WayofTime/bloodmagic/item/ItemInscriptionTool.java index 8b68c0b9..390b5bf1 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemInscriptionTool.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemInscriptionTool.java @@ -77,7 +77,8 @@ public class ItemInscriptionTool extends ItemBindable implements IVariantProvide } @Override - public boolean showDurabilityBar(ItemStack stack) { + public boolean showDurabilityBar(ItemStack stack) + { return true; } @@ -99,7 +100,8 @@ public class ItemInscriptionTool extends ItemBindable implements IVariantProvide } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); for (int i = 1; i < EnumRuneType.values().length; i++) ret.add(new ImmutablePair(i, "type=" + EnumRuneType.values()[i].name())); diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemLavaCrystal.java b/src/main/java/WayofTime/bloodmagic/item/ItemLavaCrystal.java index 6cc38c90..08bc84b9 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemLavaCrystal.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemLavaCrystal.java @@ -83,7 +83,8 @@ public class ItemLavaCrystal extends ItemBindable implements IFuelHandler, IVari } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemRitualDiviner.java b/src/main/java/WayofTime/bloodmagic/item/ItemRitualDiviner.java index c4468fa2..551e5dc2 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemRitualDiviner.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemRitualDiviner.java @@ -310,7 +310,8 @@ public class ItemRitualDiviner extends Item implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=basic")); ret.add(new ImmutablePair(1, "type=dusk")); diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemSacrificialDagger.java b/src/main/java/WayofTime/bloodmagic/item/ItemSacrificialDagger.java index 557ee705..60c80876 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemSacrificialDagger.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemSacrificialDagger.java @@ -152,7 +152,8 @@ public class ItemSacrificialDagger extends Item implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=normal")); ret.add(new ImmutablePair(1, "type=creative")); diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemSlate.java b/src/main/java/WayofTime/bloodmagic/item/ItemSlate.java index bee9f480..ffdff2f3 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemSlate.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemSlate.java @@ -53,7 +53,8 @@ public class ItemSlate extends Item implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=blank")); ret.add(new ImmutablePair(1, "type=reinforced")); diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemTelepositionFocus.java b/src/main/java/WayofTime/bloodmagic/item/ItemTelepositionFocus.java index 84479238..8c449885 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemTelepositionFocus.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemTelepositionFocus.java @@ -88,7 +88,8 @@ public class ItemTelepositionFocus extends ItemBindable implements IVariantProvi } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=weak")); ret.add(new ImmutablePair(1, "type=enhanced")); diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTome.java b/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTome.java index 546c9b36..6d7939c8 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTome.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTome.java @@ -88,7 +88,8 @@ public class ItemUpgradeTome extends Item implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=upgradetome")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTrainer.java b/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTrainer.java index 1bde4be9..6db2b6fe 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTrainer.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemUpgradeTrainer.java @@ -112,7 +112,8 @@ public class ItemUpgradeTrainer extends Item implements IUpgradeTrainer, IVarian } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=upgradetrainer")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/item/block/ItemBlockBloodTank.java b/src/main/java/WayofTime/bloodmagic/item/block/ItemBlockBloodTank.java index 17dc675d..b8cbd5bd 100644 --- a/src/main/java/WayofTime/bloodmagic/item/block/ItemBlockBloodTank.java +++ b/src/main/java/WayofTime/bloodmagic/item/block/ItemBlockBloodTank.java @@ -1,6 +1,5 @@ package WayofTime.bloodmagic.item.block; - import java.util.List; import net.minecraft.block.Block; @@ -69,7 +68,8 @@ public class ItemBlockBloodTank extends ItemBlock implements IFluidContainerItem @Override public int fill(ItemStack stack, FluidStack resource, boolean doFill) { - if (resource == null || stack.stackSize != 1) return 0; + if (resource == null || stack.stackSize != 1) + return 0; int fillAmount = 0, capacity = getCapacity(stack); NBTTagCompound tag = stack.getTagCompound(), fluidTag = null; FluidStack fluid = null; diff --git a/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSacrifice.java b/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSacrifice.java index 4a5c6374..ae42df46 100644 --- a/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSacrifice.java +++ b/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSacrifice.java @@ -95,7 +95,8 @@ public class ItemPackSacrifice extends ItemArmor implements IAltarManipulator, I } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSelfSacrifice.java b/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSelfSacrifice.java index b9c50307..d1ceedcb 100644 --- a/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSelfSacrifice.java +++ b/src/main/java/WayofTime/bloodmagic/item/gear/ItemPackSelfSacrifice.java @@ -114,7 +114,8 @@ public class ItemPackSelfSacrifice extends ItemArmor implements IAltarManipulato } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/item/routing/ItemNodeRouter.java b/src/main/java/WayofTime/bloodmagic/item/routing/ItemNodeRouter.java index 306c831d..3753ed02 100644 --- a/src/main/java/WayofTime/bloodmagic/item/routing/ItemNodeRouter.java +++ b/src/main/java/WayofTime/bloodmagic/item/routing/ItemNodeRouter.java @@ -196,7 +196,8 @@ public class ItemNodeRouter extends Item implements INodeRenderer, IVariantProvi } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/item/routing/ItemRouterFilter.java b/src/main/java/WayofTime/bloodmagic/item/routing/ItemRouterFilter.java index f7de68a7..d80d8439 100644 --- a/src/main/java/WayofTime/bloodmagic/item/routing/ItemRouterFilter.java +++ b/src/main/java/WayofTime/bloodmagic/item/routing/ItemRouterFilter.java @@ -154,7 +154,8 @@ public class ItemRouterFilter extends Item implements IItemFilterProvider, IVari } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=exact")); ret.add(new ImmutablePair(1, "type=ignorenbt")); diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBase.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBase.java index fc55a7e8..80230c4d 100644 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBase.java +++ b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBase.java @@ -62,7 +62,8 @@ public class ItemSigilBase extends ItemBindable implements ISigil, IVariantProvi } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=normal")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBloodLight.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBloodLight.java index bd4e4d86..91610dbe 100644 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBloodLight.java +++ b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilBloodLight.java @@ -21,7 +21,8 @@ public class ItemSigilBloodLight extends ItemSigilBase } @Override - public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) { + public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) + { if (getCooldownRemainder(stack) > 0) reduceCooldown(stack); } @@ -49,7 +50,8 @@ public class ItemSigilBloodLight extends ItemSigilBase } } else { - if (!world.isRemote) { + if (!world.isRemote) + { world.spawnEntityInWorld(new EntityBloodLight(world, player)); NetworkHelper.syphonAndDamage(NetworkHelper.getSoulNetwork(player), player, getLPUsed()); } @@ -65,15 +67,18 @@ public class ItemSigilBloodLight extends ItemSigilBase return oldStack.getItem() != newStack.getItem(); } - public int getCooldownRemainder(ItemStack stack) { + public int getCooldownRemainder(ItemStack stack) + { return NBTHelper.checkNBT(stack).getTagCompound().getInteger(Constants.NBT.TICKS_REMAINING); } - public void reduceCooldown(ItemStack stack) { + public void reduceCooldown(ItemStack stack) + { NBTHelper.checkNBT(stack).getTagCompound().setInteger(Constants.NBT.TICKS_REMAINING, getCooldownRemainder(stack) - 1); } - public void resetCooldown(ItemStack stack) { + public void resetCooldown(ItemStack stack) + { NBTHelper.checkNBT(stack).getTagCompound().setInteger(Constants.NBT.TICKS_REMAINING, 10); } } diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilSuppression.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilSuppression.java index d99682ef..8becf161 100644 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilSuppression.java +++ b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilSuppression.java @@ -54,5 +54,4 @@ public class ItemSigilSuppression extends ItemSigilToggleable } } - } diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTeleposition.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTeleposition.java index 4a351181..00fbfa18 100644 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTeleposition.java +++ b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTeleposition.java @@ -82,4 +82,3 @@ public class ItemSigilTeleposition extends ItemSigilBase return tag.getInteger(key); } } - diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilToggleable.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilToggleable.java index 5b089af0..72e6bb04 100644 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilToggleable.java +++ b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilToggleable.java @@ -83,7 +83,8 @@ public class ItemSigilToggleable extends ItemSigilBase } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "active=false")); ret.add(new ImmutablePair(1, "active=true")); diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTransposition.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTransposition.java index a4dbdf51..0289e749 100644 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTransposition.java +++ b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilTransposition.java @@ -1,6 +1,5 @@ package WayofTime.bloodmagic.item.sigil; - import java.util.List; import net.minecraft.block.Block; @@ -146,5 +145,4 @@ public class ItemSigilTransposition extends ItemSigilBase world.addWeatherEffect(new EntityLightningBolt(world, blockPos.getX(), blockPos.getY(), blockPos.getZ())); } - } diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWater.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWater.java index 1b6231be..c2da4450 100644 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWater.java +++ b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWater.java @@ -83,7 +83,8 @@ public class ItemSigilWater extends ItemSigilBase return false; } - if (world.getBlockState(blockPos).getBlock() == Blocks.cauldron && syphonNetwork(stack, player, getLPUsed())) { + if (world.getBlockState(blockPos).getBlock() == Blocks.cauldron && syphonNetwork(stack, player, getLPUsed())) + { world.setBlockState(blockPos, Blocks.cauldron.getDefaultState().withProperty(BlockCauldron.LEVEL, 3)); return true; } diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemMonsterSoul.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemMonsterSoul.java index 9db44551..1a6f89be 100644 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemMonsterSoul.java +++ b/src/main/java/WayofTime/bloodmagic/item/soul/ItemMonsterSoul.java @@ -97,7 +97,8 @@ public class ItemMonsterSoul extends Item implements IDemonWill, IVariantProvide } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=monstersoul")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulGem.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulGem.java index ad047b0c..98b3e2d5 100644 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulGem.java +++ b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulGem.java @@ -188,7 +188,8 @@ public class ItemSoulGem extends Item implements IDemonWillGem, IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=petty")); ret.add(new ImmutablePair(1, "type=lesser")); diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulSnare.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulSnare.java index 34292bb1..4674a8c7 100644 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulSnare.java +++ b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulSnare.java @@ -76,7 +76,8 @@ public class ItemSoulSnare extends Item implements IVariantProvider } @Override - public List> getVariants() { + public List> getVariants() + { List> ret = new ArrayList>(); ret.add(new ImmutablePair(0, "type=soulsnare")); return ret; diff --git a/src/main/java/WayofTime/bloodmagic/proxy/ClientProxy.java b/src/main/java/WayofTime/bloodmagic/proxy/ClientProxy.java index ac56a55a..67a203ce 100644 --- a/src/main/java/WayofTime/bloodmagic/proxy/ClientProxy.java +++ b/src/main/java/WayofTime/bloodmagic/proxy/ClientProxy.java @@ -94,8 +94,10 @@ public class ClientProxy extends CommonProxy } @Override - public void tryHandleBlockModel(Block block, String name) { - if (block instanceof IVariantProvider) { + public void tryHandleBlockModel(Block block, String name) + { + if (block instanceof IVariantProvider) + { IVariantProvider variantProvider = (IVariantProvider) block; for (Pair variant : variantProvider.getVariants()) ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), variant.getLeft(), new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, name), variant.getRight())); @@ -103,13 +105,16 @@ public class ClientProxy extends CommonProxy } @Override - public void tryHandleItemModel(Item item, String name) { - if (item instanceof IMeshProvider) { + public void tryHandleItemModel(Item item, String name) + { + if (item instanceof IMeshProvider) + { IMeshProvider meshProvider = (IMeshProvider) item; ModelLoader.setCustomMeshDefinition(item, meshProvider.getMeshDefinition()); for (String variant : meshProvider.getVariants()) ModelLoader.registerItemVariants(item, new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, "item/" + name), variant)); - } else if (item instanceof IVariantProvider) { + } else if (item instanceof IVariantProvider) + { IVariantProvider variantProvider = (IVariantProvider) item; for (Pair variant : variantProvider.getVariants()) ModelLoader.setCustomModelResourceLocation(item, variant.getLeft(), new ModelResourceLocation(new ResourceLocation(Constants.Mod.MODID, "item/" + name), variant.getRight())); diff --git a/src/main/java/WayofTime/bloodmagic/proxy/CommonProxy.java b/src/main/java/WayofTime/bloodmagic/proxy/CommonProxy.java index 9189c2d5..7bafe129 100644 --- a/src/main/java/WayofTime/bloodmagic/proxy/CommonProxy.java +++ b/src/main/java/WayofTime/bloodmagic/proxy/CommonProxy.java @@ -34,7 +34,7 @@ public class CommonProxy public void init() { - CapabilityManager.INSTANCE.register(IRitualStone.Tile.class, new CapabilityRuneType.RuneTypeStorage(), new CapabilityRuneType.Factory()); + CapabilityManager.INSTANCE.register(IRitualStone.Tile.class, new CapabilityRuneType.RuneTypeStorage(), new CapabilityRuneType.Factory()); } public void postInit() @@ -53,11 +53,13 @@ public class CommonProxy return null; } - public void tryHandleBlockModel(Block block, String name) { + public void tryHandleBlockModel(Block block, String name) + { // NO-OP } - public void tryHandleItemModel(Item item, String name) { + public void tryHandleItemModel(Item item, String name) + { // NO-OP } } diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModBlocks.java b/src/main/java/WayofTime/bloodmagic/registry/ModBlocks.java index 6d511421..00547d53 100644 --- a/src/main/java/WayofTime/bloodmagic/registry/ModBlocks.java +++ b/src/main/java/WayofTime/bloodmagic/registry/ModBlocks.java @@ -185,7 +185,8 @@ public class ModBlocks private static Block registerBlock(Block block, Class itemBlock, String name) { - if (!ConfigHandler.blockBlacklist.contains(name)) { + if (!ConfigHandler.blockBlacklist.contains(name)) + { GameRegistry.registerBlock(block, itemBlock); BloodMagic.proxy.tryHandleBlockModel(block, name); } @@ -202,7 +203,8 @@ public class ModBlocks } String blockName = block.getRegistryName().split(":")[1]; - if (!ConfigHandler.blockBlacklist.contains(blockName)) { + if (!ConfigHandler.blockBlacklist.contains(blockName)) + { GameRegistry.registerBlock(block, itemBlock); BloodMagic.proxy.tryHandleBlockModel(block, blockName); } @@ -219,7 +221,8 @@ public class ModBlocks } String blockName = block.getRegistryName().split(":")[1]; - if (!ConfigHandler.blockBlacklist.contains(blockName)) { + if (!ConfigHandler.blockBlacklist.contains(blockName)) + { GameRegistry.registerBlock(block); BloodMagic.proxy.tryHandleBlockModel(block, blockName); } diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModRituals.java b/src/main/java/WayofTime/bloodmagic/registry/ModRituals.java index 206f237a..ac1c6e49 100644 --- a/src/main/java/WayofTime/bloodmagic/registry/ModRituals.java +++ b/src/main/java/WayofTime/bloodmagic/registry/ModRituals.java @@ -64,7 +64,7 @@ public class ModRituals public static Ritual zephyrRitual; public static Ritual upgradeRemoveRitual; public static Ritual armourEvolveRitual; - + public static Ritual cobblestoneRitual; public static Ritual placerRitual; public static Ritual fellingRitual; @@ -120,7 +120,7 @@ public class ModRituals RitualRegistry.registerRitual(upgradeRemoveRitual, ConfigHandler.ritualUpgradeRemove); armourEvolveRitual = new RitualArmourEvolve(); RitualRegistry.registerRitual(armourEvolveRitual, ConfigHandler.ritualArmourEvolve); - + cobblestoneRitual = new RitualCobblestone(); RitualRegistry.registerRitual(cobblestoneRitual, ConfigHandler.cobblestoneRitual); placerRitual = new RitualPlacer(); diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualAltarBuilder.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualAltarBuilder.java index 07421444..947e3481 100644 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualAltarBuilder.java +++ b/src/main/java/WayofTime/bloodmagic/ritual/RitualAltarBuilder.java @@ -80,39 +80,39 @@ public class RitualAltarBuilder extends Ritual { switch (currentComponent.getComponent()) { - case NOTAIR: + case NOTAIR: + { + BlockStack blockStack = getMundaneBlock(tileEntity); + if (blockStack != null) { - BlockStack blockStack = getMundaneBlock(tileEntity); - if (blockStack != null) - { - world.setBlockState(currentPos, blockStack.getState(), 3); - lightning(world, currentPos); - network.syphon(getRefreshCost()); - } - break; + world.setBlockState(currentPos, blockStack.getState(), 3); + lightning(world, currentPos); + network.syphon(getRefreshCost()); } - case BLOODRUNE: + break; + } + case BLOODRUNE: + { + BlockStack blockStack = getBloodRune(tileEntity); + if (blockStack != null) { - BlockStack blockStack = getBloodRune(tileEntity); - if (blockStack != null) - { - world.setBlockState(currentPos, blockStack.getState(), 3); - lightning(world, currentPos); - network.syphon(getRefreshCost()); - } - break; + world.setBlockState(currentPos, blockStack.getState(), 3); + lightning(world, currentPos); + network.syphon(getRefreshCost()); } - default: + break; + } + default: + { + BlockStack blockStack = new BlockStack(Utils.getBlockForComponent(currentComponent.getComponent()), 0); + if (hasItem(tileEntity, Item.getItemFromBlock(blockStack.getBlock()), blockStack.getMeta(), true)) { - BlockStack blockStack = new BlockStack(Utils.getBlockForComponent(currentComponent.getComponent()), 0); - if (hasItem(tileEntity, Item.getItemFromBlock(blockStack.getBlock()), blockStack.getMeta(), true)) - { - world.setBlockState(currentPos, blockStack.getState(), 3); - lightning(world, currentPos); - network.syphon(getRefreshCost()); - } - break; + world.setBlockState(currentPos, blockStack.getState(), 3); + lightning(world, currentPos); + network.syphon(getRefreshCost()); } + break; + } } } } else @@ -193,10 +193,9 @@ public class RitualAltarBuilder extends Ritual } /* - * - * These methods are utilities for this ritual. - * They support both the old forge inventory system, and the new one. - * + * + * These methods are utilities for this ritual. They support both the old + * forge inventory system, and the new one. */ public boolean hasItem(TileEntity tileEntity, Item item, int damage, boolean consumeItem) { diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualCobblestone.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualCobblestone.java index eb80f029..3300d909 100644 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualCobblestone.java +++ b/src/main/java/WayofTime/bloodmagic/ritual/RitualCobblestone.java @@ -56,25 +56,23 @@ public class RitualCobblestone extends Ritual { switch (alchemyArray.getStackInSlot(0).getItemDamage()) { - case 0: - block = Blocks.obsidian; - alchemyArray.decrStackSize(0, 1); - world.setBlockToAir(alchemyArray.getPos()); - break; - case 1: - block = Blocks.netherrack; - alchemyArray.decrStackSize(0, 1); - world.setBlockToAir(alchemyArray.getPos()); - break; - /* - case 4: - block = Blocks.end_stone; - alchemyArray.decrStackSize(0, 1); - world.setBlockToAir(alchemyArray.getPos()); - break; - */ - default: - break; + case 0: + block = Blocks.obsidian; + alchemyArray.decrStackSize(0, 1); + world.setBlockToAir(alchemyArray.getPos()); + break; + case 1: + block = Blocks.netherrack; + alchemyArray.decrStackSize(0, 1); + world.setBlockToAir(alchemyArray.getPos()); + break; + /* + * case 4: block = Blocks.end_stone; + * alchemyArray.decrStackSize(0, 1); + * world.setBlockToAir(alchemyArray.getPos()); break; + */ + default: + break; } } } diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualExpulsion.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualExpulsion.java index b5e89c9b..4c432b14 100644 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualExpulsion.java +++ b/src/main/java/WayofTime/bloodmagic/ritual/RitualExpulsion.java @@ -144,8 +144,7 @@ public class RitualExpulsion extends Ritual if (block != null && block.getMaterial().blocksMovement()) { flag1 = true; - } - else + } else { --entityLiving.posY; --j; @@ -167,8 +166,7 @@ public class RitualExpulsion extends Ritual { moveEntityViaTeleport(entityLiving, lastX, lastY, lastZ); return false; - } - else + } else { for (l = 0; l < 128; ++l) { @@ -208,8 +206,7 @@ public class RitualExpulsion extends Ritual } } } - } - else if (entityLiving != null) + } else if (entityLiving != null) { entityLiving.setPosition(x, y, z); } diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualHarvest.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualHarvest.java index 35ead8c3..3ef3b138 100644 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualHarvest.java +++ b/src/main/java/WayofTime/bloodmagic/ritual/RitualHarvest.java @@ -17,16 +17,15 @@ import WayofTime.bloodmagic.api.ritual.RitualComponent; import WayofTime.bloodmagic.api.util.helper.NetworkHelper; /** - * This ritual uses registered {@link IHarvestHandler}'s to - * harvest blocks. - * + * This ritual uses registered {@link IHarvestHandler}'s to harvest blocks. + * * To register a new Handler for this ritual use * {@link HarvestRegistry#registerHandler(IHarvestHandler)} - * - * This ritual includes a way to change the range based on what block - * is above the MasterRitualStone. You can use - * {@link HarvestRegistry#registerRangeAmplifier(BlockStack, int)} - * to register a new amplifier. + * + * This ritual includes a way to change the range based on what block is above + * the MasterRitualStone. You can use + * {@link HarvestRegistry#registerRangeAmplifier(BlockStack, int)} to register a + * new amplifier. */ public class RitualHarvest extends Ritual { @@ -118,7 +117,8 @@ public class RitualHarvest extends Ritual return new RitualHarvest(); } - public static boolean harvestBlock(World world, BlockPos pos) { + public static boolean harvestBlock(World world, BlockPos pos) + { BlockStack harvestStack = BlockStack.getStackFromPos(world, pos); for (IHarvestHandler handler : HarvestRegistry.getHandlerList()) diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualPlacer.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualPlacer.java index a6244e93..bb3e3cc1 100644 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualPlacer.java +++ b/src/main/java/WayofTime/bloodmagic/ritual/RitualPlacer.java @@ -79,7 +79,7 @@ public class RitualPlacer extends Ritual } } } - //Compatibility with the old system, as it still exists + //Compatibility with the old system, as it still exists } else if (tileEntity instanceof IInventory) { iInventory = (IInventory) tileEntity; diff --git a/src/main/java/WayofTime/bloodmagic/ritual/RitualSpeed.java b/src/main/java/WayofTime/bloodmagic/ritual/RitualSpeed.java index ff6aa9eb..19f4bdcb 100644 --- a/src/main/java/WayofTime/bloodmagic/ritual/RitualSpeed.java +++ b/src/main/java/WayofTime/bloodmagic/ritual/RitualSpeed.java @@ -42,7 +42,8 @@ public class RitualSpeed extends Ritual for (EntityLivingBase entity : world.getEntitiesWithinAABB(EntityLivingBase.class, speedRange.getAABB(masterRitualStone.getBlockPos()))) { - if (entity.isSneaking()) continue; + if (entity.isSneaking()) + continue; double motionY = 1.2; double speed = 3; @@ -53,21 +54,21 @@ public class RitualSpeed extends Ritual switch (direction) { - case NORTH: - entity.setVelocity(0, motionY, -speed); - break; + case NORTH: + entity.setVelocity(0, motionY, -speed); + break; - case SOUTH: - entity.setVelocity(0, motionY, speed); - break; + case SOUTH: + entity.setVelocity(0, motionY, speed); + break; - case WEST: - entity.setVelocity(-speed, motionY, 0); - break; + case WEST: + entity.setVelocity(-speed, motionY, 0); + break; - case EAST: - entity.setVelocity(speed, motionY, 0); - break; + case EAST: + entity.setVelocity(speed, motionY, 0); + break; } } diff --git a/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerPlantable.java b/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerPlantable.java index fdc317dc..09002a7f 100644 --- a/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerPlantable.java +++ b/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerPlantable.java @@ -14,9 +14,8 @@ import WayofTime.bloodmagic.api.iface.IHarvestHandler; import WayofTime.bloodmagic.api.registry.HarvestRegistry; /** - * Harvest handler for standard plantable crops such as - * Wheat, Potatoes, and Netherwart. - *
+ * Harvest handler for standard plantable crops such as Wheat, Potatoes, and + * Netherwart.
* Register a new crop for this handler with * {@link HarvestRegistry#registerStandardCrop(Block, int)} */ @@ -38,13 +37,14 @@ public class HarvestHandlerPlantable implements IHarvestHandler int matureMeta = HarvestRegistry.getStandardCrops().get(blockStack.getBlock()); - if(blockStack.getMeta() < matureMeta) + if (blockStack.getMeta() < matureMeta) return false; List drops = blockStack.getBlock().getDrops(world, pos, blockStack.getState(), 0); boolean foundSeed = false; - for (ItemStack stack : drops) { + for (ItemStack stack : drops) + { if (stack == null) continue; @@ -53,7 +53,7 @@ public class HarvestHandlerPlantable implements IHarvestHandler if (stack.stackSize > 1) stack.stackSize--; else - drops.remove(stack); + drops.remove(stack); foundSeed = true; break; diff --git a/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerStem.java b/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerStem.java index 425c6893..5826337b 100644 --- a/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerStem.java +++ b/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerStem.java @@ -17,10 +17,9 @@ import WayofTime.bloodmagic.api.registry.HarvestRegistry; /** * Harvest handler for crops with stems such as Pumpkins and Melons. - * {@link OreDictionary#WILDCARD_VALUE} is used as a wildcard to allow - * the crop to be harvested at any metadata. Rotation based crop blocks - * are a good reason to use this (see pumpkins). - *
+ * {@link OreDictionary#WILDCARD_VALUE} is used as a wildcard to allow the crop + * to be harvested at any metadata. Rotation based crop blocks are a good reason + * to use this (see pumpkins).
* Register a new crop for this handler with * {@link HarvestRegistry#registerStemCrop(BlockStack, BlockStack)} */ diff --git a/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerTall.java b/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerTall.java index ff0161ac..7971b6ae 100644 --- a/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerTall.java +++ b/src/main/java/WayofTime/bloodmagic/ritual/harvest/HarvestHandlerTall.java @@ -13,9 +13,7 @@ import WayofTime.bloodmagic.api.iface.IHarvestHandler; import WayofTime.bloodmagic.api.registry.HarvestRegistry; /** - * Harvest handler for crops that grow vertically such as - * Sugar Cane and Cactus. - *
+ * Harvest handler for crops that grow vertically such as Sugar Cane and Cactus.
* Register a new crop for this handler with * {@link HarvestRegistry#registerTallCrop(BlockStack)} */ diff --git a/src/main/java/WayofTime/bloodmagic/routing/DefaultItemFilter.java b/src/main/java/WayofTime/bloodmagic/routing/DefaultItemFilter.java index 9d47639b..706255a9 100644 --- a/src/main/java/WayofTime/bloodmagic/routing/DefaultItemFilter.java +++ b/src/main/java/WayofTime/bloodmagic/routing/DefaultItemFilter.java @@ -53,8 +53,8 @@ public class DefaultItemFilter implements IItemFilter * filter via it's transfer method. * * @param inputStack - * - The stack to transfer - * + * - The stack to transfer + * * @return - The remainder of the stack after it has been absorbed into the * inventory. */ diff --git a/src/main/java/WayofTime/bloodmagic/routing/IItemFilter.java b/src/main/java/WayofTime/bloodmagic/routing/IItemFilter.java index 5ac0ceda..ffe1d9f7 100644 --- a/src/main/java/WayofTime/bloodmagic/routing/IItemFilter.java +++ b/src/main/java/WayofTime/bloodmagic/routing/IItemFilter.java @@ -17,7 +17,7 @@ public interface IItemFilter * * @param inputStack * - The stack to filter - * + * * @return - The remainder of the stack after it has been absorbed into the * inventory. */ diff --git a/src/main/java/WayofTime/bloodmagic/routing/TestItemFilter.java b/src/main/java/WayofTime/bloodmagic/routing/TestItemFilter.java index 78642545..1758ca68 100644 --- a/src/main/java/WayofTime/bloodmagic/routing/TestItemFilter.java +++ b/src/main/java/WayofTime/bloodmagic/routing/TestItemFilter.java @@ -163,7 +163,7 @@ public class TestItemFilter implements IItemFilter * filter via it's transfer method. * * @param inputStack - * - The stack to transfer + * - The stack to transfer * @return - The remainder of the stack after it has been absorbed into the * inventory. */ diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileBloodTank.java b/src/main/java/WayofTime/bloodmagic/tile/TileBloodTank.java index e8b7ad0b..b588af34 100644 --- a/src/main/java/WayofTime/bloodmagic/tile/TileBloodTank.java +++ b/src/main/java/WayofTime/bloodmagic/tile/TileBloodTank.java @@ -54,7 +54,7 @@ public class TileBloodTank extends TileEntity implements IFluidHandler @Override public FluidTankInfo[] getTankInfo(EnumFacing from) { - return new FluidTankInfo[]{tank.getInfo()}; + return new FluidTankInfo[] { tank.getInfo() }; } @Override @@ -69,7 +69,8 @@ public class TileBloodTank extends TileEntity implements IFluidHandler public void writeToNBT(NBTTagCompound tagCompound) { super.writeToNBT(tagCompound); - if (tank.getFluidAmount() != 0) tagCompound.setTag("tank", tank.writeToNBT(new NBTTagCompound())); + if (tank.getFluidAmount() != 0) + tagCompound.setTag("tank", tank.writeToNBT(new NBTTagCompound())); tagCompound.setInteger("capacity", capacity); } } diff --git a/src/main/java/WayofTime/bloodmagic/util/Utils.java b/src/main/java/WayofTime/bloodmagic/util/Utils.java index cac6eaa8..93004b1c 100644 --- a/src/main/java/WayofTime/bloodmagic/util/Utils.java +++ b/src/main/java/WayofTime/bloodmagic/util/Utils.java @@ -61,10 +61,12 @@ public class Utils } /** - * @param tile - The {@link TileInventory} to input the item to - * @param player - The player to take the item from. + * @param tile + * - 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 + * otherwise * @see #insertItemToTile(TileInventory, EntityPlayer, int) */ public static boolean insertItemToTile(TileInventory tile, EntityPlayer player) @@ -77,12 +79,15 @@ public class Utils * inventory at slot 0 *

* EG: Block Altar - * - * @param tile - The {@link TileInventory} to input the item to - * @param player - The player to take the item from. - * @param slot - The slot to attempt to insert to + * + * @param tile + * - The {@link TileInventory} to input the item to + * @param player + * - 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 + * otherwise */ public static boolean insertItemToTile(TileInventory tile, EntityPlayer player, int slot) { @@ -109,28 +114,29 @@ public class Utils /** * Gets a default block for each type of {@link EnumAltarComponent} - * - * @param component - The Component to provide a block for. + * + * @param component + * - The Component to provide a block for. * @return The default Block for the EnumAltarComponent */ public static Block getBlockForComponent(EnumAltarComponent component) { switch (component) { - case GLOWSTONE: - return Blocks.glowstone; - case BLOODSTONE: - return ModBlocks.bloodStoneBrick; - case BEACON: - return Blocks.beacon; - case BLOODRUNE: - return ModBlocks.bloodRune; - case CRYSTAL: - return ModBlocks.crystal; - case NOTAIR: - return Blocks.stonebrick; - default: - return Blocks.air; + case GLOWSTONE: + return Blocks.glowstone; + case BLOODSTONE: + return ModBlocks.bloodStoneBrick; + case BEACON: + return Blocks.beacon; + case BLOODRUNE: + return ModBlocks.bloodRune; + case CRYSTAL: + return ModBlocks.crystal; + case NOTAIR: + return Blocks.stonebrick; + default: + return Blocks.air; } } @@ -243,9 +249,11 @@ public class Utils /** * Used to determine if stack1 can be placed into stack2. If stack2 is null * and stack1 isn't null, returns true. Ignores stack size - * - * @param stack1 Stack that is placed into a slot - * @param stack2 Slot content that stack1 is placed into + * + * @param stack1 + * Stack that is placed into a slot + * @param stack2 + * Slot content that stack1 is placed into * @return True if they can be combined */ public static boolean canCombine(ItemStack stack1, ItemStack stack2) @@ -269,8 +277,10 @@ public class Utils } /** - * @param stack1 Stack that is placed into a slot - * @param stack2 Slot content that stack1 is placed into + * @param stack1 + * Stack that is placed into a slot + * @param stack2 + * Slot content that stack1 is placed into * @return Stacks after stacking */ public static ItemStack[] combineStacks(ItemStack stack1, ItemStack stack2, int transferMax) @@ -300,8 +310,10 @@ public class Utils } /** - * @param stack1 Stack that is placed into a slot - * @param stack2 Slot content that stack1 is placed into + * @param stack1 + * Stack that is placed into a slot + * @param stack2 + * Slot content that stack1 is placed into * @return Stacks after stacking */ public static ItemStack[] combineStacks(ItemStack stack1, ItemStack stack2) diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/ClientEventHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/ClientEventHandler.java index 2b81ecbf..a3399286 100644 --- a/src/main/java/WayofTime/bloodmagic/util/handler/ClientEventHandler.java +++ b/src/main/java/WayofTime/bloodmagic/util/handler/ClientEventHandler.java @@ -29,20 +29,12 @@ import WayofTime.bloodmagic.client.render.RenderFakeBlocks; import WayofTime.bloodmagic.item.ItemRitualDiviner; import WayofTime.bloodmagic.util.GhostItemHelper; - public class ClientEventHandler { public static int currentLP = 0; public static int capacity = 0; - public TextureAtlasSprite - ritualStoneBlankIcon, - ritualStoneWaterIcon, - ritualStoneFireIcon, - ritualStoneEarthIcon, - ritualStoneAirIcon, - ritualStoneDawnIcon, - ritualStoneDuskIcon; + public TextureAtlasSprite ritualStoneBlankIcon, ritualStoneWaterIcon, ritualStoneFireIcon, ritualStoneEarthIcon, ritualStoneAirIcon, ritualStoneDawnIcon, ritualStoneDuskIcon; @SubscribeEvent public void onTooltipEvent(ItemTooltipEvent event) @@ -129,27 +121,27 @@ public class ClientEventHandler switch (ritualComponent.getRuneType()) { - case BLANK: - texture = ritualStoneBlankIcon; - break; - case WATER: - texture = ritualStoneWaterIcon; - break; - case FIRE: - texture = ritualStoneFireIcon; - break; - case EARTH: - texture = ritualStoneEarthIcon; - break; - case AIR: - texture = ritualStoneAirIcon; - break; - case DAWN: - texture = ritualStoneDawnIcon; - break; - case DUSK: - texture = ritualStoneDuskIcon; - break; + case BLANK: + texture = ritualStoneBlankIcon; + break; + case WATER: + texture = ritualStoneWaterIcon; + break; + case FIRE: + texture = ritualStoneFireIcon; + break; + case EARTH: + texture = ritualStoneEarthIcon; + break; + case AIR: + texture = ritualStoneAirIcon; + break; + case DAWN: + texture = ritualStoneDawnIcon; + break; + case DUSK: + texture = ritualStoneDuskIcon; + break; } RenderFakeBlocks.drawFakeBlock(texture, minX, minY, minZ, world); diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/EventHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/EventHandler.java index da5e87a0..5ecefdc9 100644 --- a/src/main/java/WayofTime/bloodmagic/util/handler/EventHandler.java +++ b/src/main/java/WayofTime/bloodmagic/util/handler/EventHandler.java @@ -483,7 +483,8 @@ public class EventHandler BindableHelper.setItemOwnerName(held, player.getDisplayNameString()); } - if (held != null && held.getItem() instanceof IBloodOrb) { + if (held != null && held.getItem() instanceof IBloodOrb) + { held = NBTHelper.checkNBT(held); IBloodOrb bloodOrb = (IBloodOrb) held.getItem(); SoulNetwork network = NetworkHelper.getSoulNetwork(player); diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/IMCHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/IMCHandler.java index a36ec173..d57c846e 100644 --- a/src/main/java/WayofTime/bloodmagic/util/handler/IMCHandler.java +++ b/src/main/java/WayofTime/bloodmagic/util/handler/IMCHandler.java @@ -8,10 +8,13 @@ import net.minecraftforge.fml.common.registry.GameRegistry; import WayofTime.bloodmagic.api.BloodMagicAPI; import WayofTime.bloodmagic.util.Utils; -public class IMCHandler { +public class IMCHandler +{ - public static void handleIMC(FMLInterModComms.IMCEvent event) { - for (FMLInterModComms.IMCMessage message : event.getMessages()) { + public static void handleIMC(FMLInterModComms.IMCEvent event) + { + for (FMLInterModComms.IMCMessage message : event.getMessages()) + { if (message.key.equals("teleposerBlacklist") && message.isItemStackMessage()) { ItemStack stack = message.getItemStackValue(); diff --git a/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelper.java b/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelper.java index e408e1e8..aa4a2969 100644 --- a/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelper.java +++ b/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelper.java @@ -24,8 +24,8 @@ import WayofTime.bloodmagic.api.Constants; * * If you pass a Block through here that uses the default ItemBlock, you * should specify a custom name. - * - * @deprecated in favor of {@link InventoryRenderHelperV2} + * + * @deprecated in favor of {@link InventoryRenderHelperV2} */ @Deprecated public class InventoryRenderHelper diff --git a/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelperV2.java b/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelperV2.java index e03293d4..85241294 100644 --- a/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelperV2.java +++ b/src/main/java/WayofTime/bloodmagic/util/helper/InventoryRenderHelperV2.java @@ -7,47 +7,58 @@ import net.minecraft.item.Item; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.ModelLoader; -public class InventoryRenderHelperV2 { +public class InventoryRenderHelperV2 +{ private final String domain; - public InventoryRenderHelperV2(String domain) { + public InventoryRenderHelperV2(String domain) + { this.domain = domain.endsWith(":") ? domain.replace(":", "") : domain; } - public void registerMesher(Item item, ItemMeshDefinition meshDefinition) { + public void registerMesher(Item item, ItemMeshDefinition meshDefinition) + { ModelLoader.setCustomMeshDefinition(item, meshDefinition); } - public void registerRender(Item item, int meta, String name, String variant) { + public void registerRender(Item item, int meta, String name, String variant) + { ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(new ResourceLocation(domain, "item/" + name), "type=" + variant)); } - public void registerRender(Item item, int meta, String variant) { + public void registerRender(Item item, int meta, String variant) + { registerRender(item, meta, item.getRegistryName().split(":")[1], variant); } - public void registerRender(Item item, String name, String variant) { + public void registerRender(Item item, String name, String variant) + { registerRender(item, 0, name, variant); } - public void registerRender(Item item, String variant) { + public void registerRender(Item item, String variant) + { registerRender(item, item.getRegistryName().split(":")[1], variant); } - public void registerRender(Block block, int meta, String name, String variant) { + public void registerRender(Block block, int meta, String name, String variant) + { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), meta, new ModelResourceLocation(new ResourceLocation(domain, name), variant)); } - public void registerRender(Block block, int meta, String variant) { + public void registerRender(Block block, int meta, String variant) + { registerRender(block, meta, block.getRegistryName().split(":")[1], variant); } - public void registerRender(Block block, String name, String variant) { + public void registerRender(Block block, String name, String variant) + { registerRender(block, 0, name, variant); } - public void registerRender(Block block, String variant) { + public void registerRender(Block block, String variant) + { registerRender(block, block.getRegistryName().split(":")[1], variant); } }